type,status类型 #18
|
|
@ -20,6 +20,7 @@
|
|||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.3.4.RELEASE</version>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ public class SysNotification {
|
|||
|
||||
private Date createdAt;
|
||||
|
||||
private Byte status;
|
||||
private Integer status;
|
||||
|
||||
private Byte type;
|
||||
private Integer type;
|
||||
|
||||
private Boolean isDelete;
|
||||
|
||||
|
|
@ -73,19 +73,19 @@ public class SysNotification {
|
|||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Byte getStatus() {
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Byte status) {
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Byte getType() {
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Byte type) {
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class SysNotificationAddVo {
|
|||
|
||||
private String notification_url;
|
||||
|
||||
private Byte type;
|
||||
private Integer type;
|
||||
|
||||
public String getPlatform() {
|
||||
return platform;
|
||||
|
|
@ -54,11 +54,11 @@ public class SysNotificationAddVo {
|
|||
this.notification_url = notification_url;
|
||||
}
|
||||
|
||||
public Byte getType() {
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Byte type) {
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ public interface SysNotificationMapper extends BaseMapper<SysNotification> {
|
|||
|
||||
int updateStatusByNotificationId(@Param("platform") String platform,
|
||||
@Param("notificationIds") String notificationIds,
|
||||
@Param("status") Byte status);
|
||||
@Param("status") Integer status);
|
||||
|
||||
int getNewSysNotificationNumber(@Param("platform") String platform,
|
||||
@Param("receiver") Integer receiver);
|
||||
|
||||
List<SysNotification> getUnreadSysNotificationsList(@Param("platform") String platform,
|
||||
@Param("receiver") Integer receiver,
|
||||
@Param("status") byte status,
|
||||
@Param("status") Integer status,
|
||||
@Param("notificationNumber") Integer notificationNumber);
|
||||
|
||||
List<SysNotification> getSysNotificationPageList(Page page, String orderBy,
|
||||
|
|
@ -38,5 +38,5 @@ public interface SysNotificationMapper extends BaseMapper<SysNotification> {
|
|||
|
||||
int getSysNotificationNumberByType(@Param("platform") String platform,
|
||||
@Param("receiver") Integer receiver,
|
||||
@Param("type") Byte type);
|
||||
@Param("type") Integer type);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ import java.util.List;
|
|||
public interface SysNotificationService extends IService<SysNotification> {
|
||||
boolean addSysNotificationForUsers(SysNotificationAddVo sysNotification);
|
||||
|
||||
int changeStatusByNotificationIds(String platform, String notificationIds, Byte status);
|
||||
int changeStatusByNotificationIds(String platform, String notificationIds, Integer status);
|
||||
|
||||
int getAllNewSysNotificationNumber(String platform, Integer receiver);
|
||||
|
||||
List<SysNotification> getUnreadSysNotificationsList(String platform, Integer receiver, Integer notificationNumber);
|
||||
|
||||
int getSysNotificationNumberByType(String platform, Integer receiver, Byte type);
|
||||
int getSysNotificationNumberByType(String platform, Integer receiver, Integer type);
|
||||
|
||||
Page<SysNotification> getAllSysNotificationsPageList(int curPage, int pageSize, String orderBy, String platform, Integer receiver);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class SysNotificationServiceImpl extends ServiceImpl<SysNotificationMappe
|
|||
}
|
||||
|
||||
@Override
|
||||
public int changeStatusByNotificationIds(String platform, String notificationIds, Byte status) {
|
||||
public int changeStatusByNotificationIds(String platform, String notificationIds, Integer status) {
|
||||
return baseMapper.updateStatusByNotificationId(platform, notificationIds, status);
|
||||
}
|
||||
|
||||
|
|
@ -43,12 +43,12 @@ public class SysNotificationServiceImpl extends ServiceImpl<SysNotificationMappe
|
|||
|
||||
@Override
|
||||
public List<SysNotification> getUnreadSysNotificationsList(String platform, Integer receiver, Integer notificationNumber) {
|
||||
List<SysNotification> sysNotificationList = baseMapper.getUnreadSysNotificationsList(platform, receiver, (byte) 1, notificationNumber);
|
||||
List<SysNotification> sysNotificationList = baseMapper.getUnreadSysNotificationsList(platform, receiver, 1, notificationNumber);
|
||||
return sysNotificationList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSysNotificationNumberByType(String platform, Integer receiver, Byte type) {
|
||||
public int getSysNotificationNumberByType(String platform, Integer receiver, Integer type) {
|
||||
return baseMapper.getSysNotificationNumberByType(platform, receiver, type);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,15 +34,15 @@ public class ServiceTests {
|
|||
Page<SysNotification> sysNotificationPage = sysNotificationService.getAllSysNotificationsPageList(1,10,"","gitlink", 100);
|
||||
SysNotificationAddVo sysNotificationAddVo = new SysNotificationAddVo();
|
||||
sysNotificationAddVo.setSender((long) -1);
|
||||
sysNotificationAddVo.setReceivers("1,2,3,4");
|
||||
sysNotificationAddVo.setReceivers("7,8");
|
||||
sysNotificationAddVo.setContent("baladiwei 在 gitlink-notification-system 修改ReadMe 文件的标题");
|
||||
sysNotificationAddVo.setNotification_url("www.baidu.com");
|
||||
sysNotificationAddVo.setPlatform("gitlink");
|
||||
boolean j = sysNotificationService.addSysNotificationForUsers(sysNotificationAddVo);
|
||||
logger.info("insertResult:" + j);
|
||||
int k = sysNotificationService.changeStatusByNotificationIds("gitlink", "2,3", (byte) 2);
|
||||
int k = sysNotificationService.changeStatusByNotificationIds("gitlink", "2,3", 2);
|
||||
logger.info("updateStatus:" + k);
|
||||
int l = sysNotificationService.getSysNotificationNumberByType("gitlink", 100, (byte) 1);
|
||||
int l = sysNotificationService.getSysNotificationNumberByType("gitlink", 100, 1);
|
||||
logger.info("SysNotificationNumber:" + l);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue