|
@@ -1,13 +1,11 @@
|
|
package com.ruoyi.demo.controller;
|
|
package com.ruoyi.demo.controller;
|
|
|
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
import com.ruoyi.common.core.domain.R;
|
|
|
|
+import com.ruoyi.demo.entity.Statistics;
|
|
import com.ruoyi.demo.entity.bo.PlanBo;
|
|
import com.ruoyi.demo.entity.bo.PlanBo;
|
|
import com.ruoyi.demo.service.StatisticsService;
|
|
import com.ruoyi.demo.service.StatisticsService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/statistics")
|
|
@RequestMapping("/statistics")
|
|
@@ -24,4 +22,12 @@ public class StatisticsController {
|
|
public R scanTotal(){
|
|
public R scanTotal(){
|
|
return R.ok(statisticsService.getScanTotal());
|
|
return R.ok(statisticsService.getScanTotal());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping()
|
|
|
|
+ public R add(@RequestBody Statistics bo){
|
|
|
|
+ int i = statisticsService.add(bo);
|
|
|
|
+ if (i == 1)
|
|
|
|
+ return R.ok("添加成功");
|
|
|
|
+ return R.fail("添加失败");
|
|
|
|
+ }
|
|
}
|
|
}
|