Procházet zdrojové kódy

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

tags/V1.8.0^2
xiaoying před 1 rokem
rodič
revize
e0211b324e
3 změnil soubory, kde provedl 30 přidání a 0 odebrání
  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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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());

}
}



Načítá se…
Zrušit
Uložit