Sfoglia il codice sorgente

新增查询用户对应未读数量信息接口

tags/V1.8.0^2
xiaoying 1 anno fa
parent
commit
e0211b324e
3 ha cambiato i file con 30 aggiunte e 0 eliminazioni
  1. +9
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/controller/WestreamMessageController.java
  2. +2
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/IWestreamMessageService.java
  3. +19
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/ThWestreamMessageServiceImpl.java

+ 9
- 0
tuoheng-api/src/main/java/com/tuoheng/api/controller/WestreamMessageController.java Vedi File

@@ -26,6 +26,15 @@ public class WestreamMessageController {
private JsonResult getList(WestreamMessageQuery query) {
return westreamMessageService.getList(query);
}
/**
* 查询用户对应未读信息数量
*
* @return
*/
@GetMapping("/list")
private JsonResult sum(WestreamMessageQuery query) {
return westreamMessageService.sum(query);
}

/**
* 查看信息详情

+ 2
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/IWestreamMessageService.java Vedi File

@@ -17,4 +17,6 @@ public interface IWestreamMessageService extends IService<ThWestreamMessage> {
JsonResult read(WestreamMessageQuery query);

JsonResult deail(WestreamMessageQuery query);

JsonResult sum(WestreamMessageQuery query);
}

+ 19
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/ThWestreamMessageServiceImpl.java Vedi File

@@ -92,6 +92,25 @@ public class ThWestreamMessageServiceImpl extends ServiceImpl<ThWestreamMessageM

return JsonResult.success();
}

/**
* 查询用户对应未读信息数量
*
* @param query
* @return
*/
@Override
public JsonResult sum(WestreamMessageQuery query) {
//查询出所有未读的
List<ThWestreamMessage> list = this.list(Wrappers.<ThWestreamMessage>lambdaQuery()
.eq(ThWestreamMessage::getTenantId, query.getTenantId())
.eq(ThWestreamMessage::getOpenid, query.getOpenId())
.eq(ThWestreamMessage::getStatus, 1)
.eq(BaseEntity::getMark, 1));

return JsonResult.success(list.size());

}
}



Loading…
Annulla
Salva