|
|
@@ -92,6 +92,31 @@ public class ThWestreamMessageServiceImpl extends ServiceImpl<ThWestreamMessageM |
|
|
|
|
|
|
|
return JsonResult.success(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询用户对应未读信息数量 |
|
|
|
* |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult sum(WestreamMessageQuery query) { |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(query.getOpenId())) { |
|
|
|
return JsonResult.error("openid为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isNull(query.getTenantId())) { |
|
|
|
return JsonResult.error("TenantId为空"); |
|
|
|
} |
|
|
|
//查询出所有未读的 |
|
|
|
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()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|