张延森 пре 2 година
родитељ
комит
fdb6c2c0d7

+ 5
- 0
src/main/java/com/yunzhi/marketing/broker/controller/BkNoticeController.java Прегледај датотеку

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.yunzhi.marketing.base.BaseController;
7 7
 import com.yunzhi.marketing.base.ResponseBean;
8 8
 import com.yunzhi.marketing.common.CommConstant;
9
+import com.yunzhi.marketing.common.StringUtils;
9 10
 import io.swagger.annotations.Api;
10 11
 import io.swagger.annotations.ApiOperation;
11 12
 import io.swagger.annotations.ApiParam;
@@ -54,10 +55,14 @@ public class BkNoticeController extends BaseController {
54 55
     public ResponseBean bkNoticeList(@ApiParam("客户端") @PathVariable String client,
55 56
                                      @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56 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 60
                                      HttpServletRequest request) throws Exception{
58 61
 
59 62
         IPage<BkNotice> pg = new Page<>(pageNum, pageSize);
60 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 66
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
62 67
 
63 68
         if ("admin".equals(client)) {