张延森 2 лет назад
Родитель
Сommit
fdb6c2c0d7
1 измененных файлов: 5 добавлений и 0 удалений
  1. 5
    0
      src/main/java/com/yunzhi/marketing/broker/controller/BkNoticeController.java

+ 5
- 0
src/main/java/com/yunzhi/marketing/broker/controller/BkNoticeController.java Просмотреть файл

6
 import com.yunzhi.marketing.base.BaseController;
6
 import com.yunzhi.marketing.base.BaseController;
7
 import com.yunzhi.marketing.base.ResponseBean;
7
 import com.yunzhi.marketing.base.ResponseBean;
8
 import com.yunzhi.marketing.common.CommConstant;
8
 import com.yunzhi.marketing.common.CommConstant;
9
+import com.yunzhi.marketing.common.StringUtils;
9
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
12
 import io.swagger.annotations.ApiParam;
54
     public ResponseBean bkNoticeList(@ApiParam("客户端") @PathVariable String client,
55
     public ResponseBean bkNoticeList(@ApiParam("客户端") @PathVariable String client,
55
                                      @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56
                                      @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56
                                      @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
57
                                      @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
58
+                                     @ApiParam("消息类型") @RequestParam(value ="noticeType", required = false) String noticeType,
59
+                                     @ApiParam("我的") @RequestParam(value ="mine", required = false) Boolean mine,
57
                                      HttpServletRequest request) throws Exception{
60
                                      HttpServletRequest request) throws Exception{
58
 
61
 
59
         IPage<BkNotice> pg = new Page<>(pageNum, pageSize);
62
         IPage<BkNotice> pg = new Page<>(pageNum, pageSize);
60
         QueryWrapper<BkNotice> queryWrapper = new QueryWrapper<>();
63
         QueryWrapper<BkNotice> queryWrapper = new QueryWrapper<>();
64
+        queryWrapper.eq(!StringUtils.isEmpty(noticeType), "notice_type", noticeType);
65
+        queryWrapper.eq("wx".equals(client) && mine, "person_id", getPersonId(request));
61
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
66
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
62
 
67
 
63
         if ("admin".equals(client)) {
68
         if ("admin".equals(client)) {