|
@@ -0,0 +1,61 @@
|
|
|
+package com.fdkankan.manage.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.fdkankan.manage.common.ResultCode;
|
|
|
+import com.fdkankan.manage.common.ResultData;
|
|
|
+import com.fdkankan.manage.entity.ServiceUpTip;
|
|
|
+import com.fdkankan.manage.exception.BusinessException;
|
|
|
+import com.fdkankan.manage.service.IServiceUpTipService;
|
|
|
+import com.fdkankan.manage.vo.request.ServiceUPTipParam;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2023-04-03
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/service/manage/serviceUpTip")
|
|
|
+public class ServiceUpTipController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ IServiceUpTipService serviceUpTipService;
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/list")
|
|
|
+ public ResultData list(@RequestBody ServiceUPTipParam param){
|
|
|
+ if(param.getType() == null){
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
+ }
|
|
|
+ return ResultData.ok(serviceUpTipService.pageList(param));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/saveOrUpdate")
|
|
|
+ public ResultData saveOrUpdate(@RequestBody ServiceUpTip param){
|
|
|
+ param.setCreateTime(null);
|
|
|
+ param.setUpdateTime(null);
|
|
|
+ serviceUpTipService.saveOrUpdate(param);
|
|
|
+ return ResultData.ok();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/delete")
|
|
|
+ public ResultData delete(@RequestBody ServiceUpTip param){
|
|
|
+ if(param.getId() == null){
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
+ }
|
|
|
+ serviceUpTipService.removeById(param.getId());
|
|
|
+ return ResultData.ok();
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|