123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- package com.imed.costaccount.web;
- import com.imed.costaccount.common.util.Result;
- import com.imed.costaccount.model.ShareParamValue;
- import com.imed.costaccount.model.User;
- import com.imed.costaccount.service.ShareParamValueService;
- import io.swagger.annotations.Api;
- import org.apache.shiro.SecurityUtils;
- import org.springframework.web.bind.annotation.*;
- import java.util.Arrays;
- /**
- * 成本分摊参数值设置
- *
- * @author huangrui
- * @date 2021-08-17 10:03:48
- */
- @Api(tags = "成本分摊参数值管理")
- @RestController
- @RequestMapping("/costAccount/shareParamValue")
- public class ShareParamValueController {
- private final ShareParamValueService shareParamValueService;
- public ShareParamValueController(ShareParamValueService shareParamValueService) {
- this.shareParamValueService = shareParamValueService;
- }
- /**
- * 分页查询列表
- */
- @RequestMapping("/list")
- public Result list(@RequestParam(value = "current", defaultValue = "1") Integer current,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
- User user = (User) SecurityUtils.getSubject().getPrincipal();
- return Result.ok();
- }
- /**
- * 信息
- */
- @RequestMapping("/info/{id}")
- public Result info(@PathVariable("id") Long id){
- ShareParamValue shareParamValue = shareParamValueService.getById(id);
- return Result.ok(shareParamValue);
- }
- /**
- * 保存
- */
- @RequestMapping("/save")
- public Result save(@RequestBody ShareParamValue shareParamValue){
- shareParamValueService.save(shareParamValue);
- return Result.ok();
- }
- /**
- * 修改
- */
- @RequestMapping("/update")
- public Result update(@RequestBody ShareParamValue shareParamValue){
- shareParamValueService.updateById(shareParamValue);
- return Result.ok();
- }
- /**
- * 删除
- */
- @RequestMapping("/delete")
- public Result delete(@RequestBody Long[] ids){
- shareParamValueService.removeByIds(Arrays.asList(ids));
- return Result.ok();
- }
- }
|