合并 #14

Merged
xieke merged 13 commits from bgy into dev 2024-09-16 02:39:34 +00:00
Showing only changes of commit 137e83a126 - Show all commits
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zzsmart.qomo.dao.entity.FlowDefinition; import com.zzsmart.qomo.dao.entity.FlowDefinition;
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostModel;
import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostModelService; import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostModelService;
import com.zzsmart.qomo.service.IDataFlowDefinitionService; import com.zzsmart.qomo.service.IDataFlowDefinitionService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -14,12 +13,12 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@@ -32,7 +31,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("//cost-model") @RequestMapping("//cost-model")
@Slf4j @Slf4j
public class AppSceneCostModelController { public class AppSceneCostModelController {
@Autowired @Autowired
private IAppSceneCostModelService appSceneCostModelService; private IAppSceneCostModelService appSceneCostModelService;
@Autowired @Autowired
@@ -79,6 +78,8 @@ public class AppSceneCostModelController {
@ApiOperation(value = "app_scene_cost_model-添加", notes = "app_scene_cost_model-添加") @ApiOperation(value = "app_scene_cost_model-添加", notes = "app_scene_cost_model-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<FlowDefinition> add(@RequestBody FlowDefinition flowDefinition) { public Result<FlowDefinition> add(@RequestBody FlowDefinition flowDefinition) {
flowDefinition.setCreateTime(new Date());
flowDefinition.setUpdateTime(new Date());
FlowDefinition definition = flowDefinitionService.add(flowDefinition); FlowDefinition definition = flowDefinitionService.add(flowDefinition);
return Result.OK(definition); return Result.OK(definition);
} }
@@ -91,9 +92,9 @@ public class AppSceneCostModelController {
*/ */
@AutoLog(value = "app_scene_cost_model-编辑") @AutoLog(value = "app_scene_cost_model-编辑")
@ApiOperation(value = "app_scene_cost_model-编辑", notes = "app_scene_cost_model-编辑") @ApiOperation(value = "app_scene_cost_model-编辑", notes = "app_scene_cost_model-编辑")
@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_model:edit")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<FlowDefinition> edit(@RequestBody FlowDefinition flowDefinition) { public Result<FlowDefinition> edit(@RequestBody FlowDefinition flowDefinition) {
flowDefinition.setUpdateTime(new Date());
return Result.OK(flowDefinitionService.edit(flowDefinition)); return Result.OK(flowDefinitionService.edit(flowDefinition));
} }
@@ -105,7 +106,6 @@ public class AppSceneCostModelController {
*/ */
@AutoLog(value = "app_scene_cost_model-通过id删除") @AutoLog(value = "app_scene_cost_model-通过id删除")
@ApiOperation(value = "app_scene_cost_model-通过id删除", notes = "app_scene_cost_model-通过id删除") @ApiOperation(value = "app_scene_cost_model-通过id删除", notes = "app_scene_cost_model-通过id删除")
@RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_model:delete")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) Integer id) { public Result<String> delete(@RequestParam(name = "id", required = true) Integer id) {
flowDefinitionService.delete(id); flowDefinitionService.delete(id);