|
@@ -0,0 +1,75 @@
|
|
|
+package com.gree.mall.manager.controller.settle.repair;
|
|
|
+
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.settle.repair.DailyWithholdVO;
|
|
|
+import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
+import com.gree.mall.manager.logic.settle.repair.DailyWithholdLogic;
|
|
|
+import com.gree.mall.manager.plus.entity.SettleDailyWithhold;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@Api(value = "维修日结算扣款配置API", tags = {"维修日结算扣款配置API"})
|
|
|
+@RequestMapping(value = "/daily/withhold", produces = "application/json; charset=utf-8")
|
|
|
+@RequiredArgsConstructor
|
|
|
+public class DailyWithholdController {
|
|
|
+
|
|
|
+ private final DailyWithholdLogic dailyWithholdLogic;
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "列表")
|
|
|
+ public ResponseHelper<IPage<DailyWithholdVO>> page(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) {
|
|
|
+ IPage<DailyWithholdVO> page = dailyWithholdLogic.page(zfireParamBean);
|
|
|
+ return ResponseHelper.success(page, new TypeReference<DailyWithholdVO>() {
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/detail")
|
|
|
+ @ApiOperation("详情")
|
|
|
+ public ResponseHelper<SettleDailyWithhold> detail(
|
|
|
+ @ApiParam(required = true) @RequestParam String id
|
|
|
+ ){
|
|
|
+ SettleDailyWithhold detail = dailyWithholdLogic.detail(id);
|
|
|
+ return ResponseHelper.success(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/add")
|
|
|
+ @ApiOperation(value = "新增")
|
|
|
+ public ResponseHelper add(
|
|
|
+ @RequestBody SettleDailyWithhold dailyWithhold
|
|
|
+ ){
|
|
|
+ dailyWithholdLogic.add(dailyWithhold);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/update")
|
|
|
+ @ApiOperation(value = "修改")
|
|
|
+ public ResponseHelper update(
|
|
|
+ @RequestBody SettleDailyWithhold dailyWithhold
|
|
|
+ ){
|
|
|
+ dailyWithholdLogic.update(dailyWithhold);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/delete")
|
|
|
+ @ApiOperation(value = "删除")
|
|
|
+ public ResponseHelper delete(
|
|
|
+ @ApiParam(required = true, value = "id") @RequestParam String id
|
|
|
+ ){
|
|
|
+ dailyWithholdLogic.delete(id);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+}
|