From 1433aafb945c428f78306b13ba1b00d1960c3a9a Mon Sep 17 00:00:00 2001 From: "jinguo24@163.com" Date: Sun, 26 Aug 2018 15:58:59 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=96=B2=E5=8A=B3=E5=BA=A6][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9]=E5=8F=AF=E6=8E=A5=E6=94=B6=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E6=95=B0=E4=B8=8D=E5=87=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simple/controller/PushLimitController.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/simple/controller/PushLimitController.java b/mallinkAdmin/src/main/java/com/simple/controller/PushLimitController.java index 5f5e786d5..1aaeeb325 100644 --- a/mallinkAdmin/src/main/java/com/simple/controller/PushLimitController.java +++ b/mallinkAdmin/src/main/java/com/simple/controller/PushLimitController.java @@ -1,19 +1,28 @@ package com.simple.controller; +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + import com.github.pagehelper.PageInfo; import com.simple.common.Result; import com.simple.common.ResultData; import com.simple.domain.po.PushLimit; import com.simple.service.PushLimitService; + +import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("pushLimit") +@Api(description="疲劳度相关接口") public class PushLimitController extends BaseController { @Autowired @@ -28,6 +37,7 @@ public class PushLimitController extends BaseController @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) public ResultData list(@ModelAttribute PushLimit pushLimit, Integer pageNum, Integer pageSize) { if (null == pushLimit) pushLimit = new PushLimit(); + pushLimit.setTenantId(getTenantId()); final PageInfo page = pushLimitService.listAsPage(pushLimit, pageNum, pageSize); return new ResultData(page); } @@ -37,6 +47,7 @@ public class PushLimitController extends BaseController @ApiOperation("根据id更新接口") @PostMapping("update") public ResultData update(@RequestBody PushLimit pushLimit) { + pushLimit.setMsgAmount(null); pushLimitService.saveOrUpdate(pushLimit); return new ResultData(); }