Commit b6b24709 by 杨林龙

添加参数判断

1 parent 9474bb6d
......@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -58,7 +59,7 @@ public class DashboardController {
@GetMapping("/getActiveDeviceWeekReport")
@ApiOperation(value = "一周激活设备报表统计", response = DeviceActiveVO.class)
@SysLog(module = "一周激活设备报表统计", value = "一周激活设备报表统计", action = OperateType.QUERY, saveLog = false)
public R<DeviceActiveVO> getActiveDeviceWeekReport(DeviceActiveSearch search) {
public R<DeviceActiveVO> getActiveDeviceWeekReport(@Validated DeviceActiveSearch search) {
List<DeviceActiveVO> deviceActiveList = dashboardService.getActiveDeviceWeekReport(search);
return R.ok().data(deviceActiveList);
}
......
......@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 设备激活查询
*
......@@ -17,11 +19,13 @@ public class DeviceActiveSearch extends BasicSearch {
* 查询开始时间
*/
@ApiModelProperty("查询开始时间")
@NotNull(message = "startTime不能为空")
String startTime;
/**
* 查询结束时间
*/
@ApiModelProperty("查询结束时间")
@NotNull(message = "endTime不能为空")
String endTime;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!