Commit 79600242 by 汪志阳

fix:bug修改

parent 3017be2f
package com.makeit.module.controller.children.alarm; package com.makeit.module.controller.children.alarm;
import com.google.common.collect.Maps;
import com.makeit.common.dto.BaseIdDTO; import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.page.PageReqDTO; import com.makeit.common.page.PageReqDTO;
import com.makeit.common.page.PageVO; import com.makeit.common.page.PageVO;
import com.makeit.common.response.ApiResponseEntity; import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils; import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.alarm.PlatAlarmRecordQueryDTO; import com.makeit.dto.platform.alarm.PlatAlarmRecordQueryDTO;
import com.makeit.enums.CommonEnum;
import com.makeit.enums.report.PlatformTypeEnum; import com.makeit.enums.report.PlatformTypeEnum;
import com.makeit.global.aspect.tenant.TenantIdIgnore; import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.service.platform.alarm.PlatAlarmRecordService; import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.vo.platform.alarm.PlatAlarmRecordVO; import com.makeit.vo.platform.alarm.PlatAlarmRecordVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@Api(tags = "子女端小程序-告警记录") @Api(tags = "子女端小程序-告警记录")
@RestController @RestController
@RequestMapping("/children/alarm-record") @RequestMapping("/children/alarm-record")
...@@ -30,9 +35,14 @@ public class PlatAlarmRecordChildrenController { ...@@ -30,9 +35,14 @@ public class PlatAlarmRecordChildrenController {
@ApiOperation("列表") @ApiOperation("列表")
@PostMapping("page") @PostMapping("page")
@TenantIdIgnore @TenantIdIgnore
public ApiResponseEntity<PageVO<PlatAlarmRecordVO>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) { public ApiResponseEntity<Map<String, Object>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) {
//只能看到发给关联的长者告警 //只能看到发给关联的长者告警
return ApiResponseUtils.success(platAlarmRecordService.childrenPage(dto)); PageVO<PlatAlarmRecordVO> result = platAlarmRecordService.childrenPage(dto);
Map<String, Object> resMap = Maps.newHashMap();
boolean b = result.getList().stream().anyMatch(p -> StringUtils.equals(CommonEnum.NO.getValue(), p.getWechatReadFlag()));
resMap.put("wechatReadFlag", b);
resMap.put("page", result);
return ApiResponseUtils.success(resMap);
} }
@ApiOperation("查看") @ApiOperation("查看")
@PostMapping("view") @PostMapping("view")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment