|
|
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
5
|
5
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
6
|
6
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
7
|
7
|
import com.zzsmart.qomo.dao.entity.FlowDefinition;
|
|
8
|
|
-import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostModel;
|
|
9
|
8
|
import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostModelService;
|
|
10
|
9
|
import com.zzsmart.qomo.service.IDataFlowDefinitionService;
|
|
11
|
10
|
import io.swagger.annotations.Api;
|
|
|
@@ -14,12 +13,12 @@ import lombok.extern.slf4j.Slf4j;
|
|
14
|
13
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
15
|
14
|
import org.jeecg.common.api.vo.Result;
|
|
16
|
15
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
17
|
|
-import org.jeecg.common.system.base.controller.JeecgController;
|
|
18
|
16
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
19
|
17
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
20
|
18
|
import org.springframework.web.bind.annotation.*;
|
|
21
|
19
|
|
|
22
|
20
|
import javax.servlet.http.HttpServletRequest;
|
|
|
21
|
+import java.util.Date;
|
|
23
|
22
|
import java.util.List;
|
|
24
|
23
|
|
|
25
|
24
|
/**
|
|
|
@@ -32,7 +31,7 @@ import java.util.List;
|
|
32
|
31
|
@RestController
|
|
33
|
32
|
@RequestMapping("//cost-model")
|
|
34
|
33
|
@Slf4j
|
|
35
|
|
-public class AppSceneCostModelController {
|
|
|
34
|
+public class AppSceneCostModelController {
|
|
36
|
35
|
@Autowired
|
|
37
|
36
|
private IAppSceneCostModelService appSceneCostModelService;
|
|
38
|
37
|
@Autowired
|
|
|
@@ -79,6 +78,8 @@ public class AppSceneCostModelController {
|
|
79
|
78
|
@ApiOperation(value = "app_scene_cost_model-添加", notes = "app_scene_cost_model-添加")
|
|
80
|
79
|
@PostMapping(value = "/add")
|
|
81
|
80
|
public Result<FlowDefinition> add(@RequestBody FlowDefinition flowDefinition) {
|
|
|
81
|
+ flowDefinition.setCreateTime(new Date());
|
|
|
82
|
+ flowDefinition.setUpdateTime(new Date());
|
|
82
|
83
|
FlowDefinition definition = flowDefinitionService.add(flowDefinition);
|
|
83
|
84
|
return Result.OK(definition);
|
|
84
|
85
|
}
|
|
|
@@ -91,9 +92,9 @@ public class AppSceneCostModelController {
|
|
91
|
92
|
*/
|
|
92
|
93
|
@AutoLog(value = "app_scene_cost_model-编辑")
|
|
93
|
94
|
@ApiOperation(value = "app_scene_cost_model-编辑", notes = "app_scene_cost_model-编辑")
|
|
94
|
|
- @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_model:edit")
|
|
95
|
95
|
@PostMapping(value = "/edit")
|
|
96
|
96
|
public Result<FlowDefinition> edit(@RequestBody FlowDefinition flowDefinition) {
|
|
|
97
|
+ flowDefinition.setUpdateTime(new Date());
|
|
97
|
98
|
return Result.OK(flowDefinitionService.edit(flowDefinition));
|
|
98
|
99
|
}
|
|
99
|
100
|
|
|
|
@@ -105,7 +106,6 @@ public class AppSceneCostModelController {
|
|
105
|
106
|
*/
|
|
106
|
107
|
@AutoLog(value = "app_scene_cost_model-通过id删除")
|
|
107
|
108
|
@ApiOperation(value = "app_scene_cost_model-通过id删除", notes = "app_scene_cost_model-通过id删除")
|
|
108
|
|
- @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_model:delete")
|
|
109
|
109
|
@DeleteMapping(value = "/delete")
|
|
110
|
110
|
public Result<String> delete(@RequestParam(name = "id", required = true) Integer id) {
|
|
111
|
111
|
flowDefinitionService.delete(id);
|