|
@@ -0,0 +1,102 @@
|
|
|
|
|
+package space.anyi.openAPI.controller;
|
|
|
|
|
+
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.commom.PageVO;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.commom.ResponseResult;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.interfaceInvokeSku.InterfaceInvokeSku;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.interfaceInvokeSku.dto.RequestAddInterFaceInvokeSku;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.interfaceInvokeSku.dto.RequestPageInterfaceInvokeSku;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.interfaceInvokeSku.dto.RequestUpdateInterFaceInvokeSku;
|
|
|
|
|
+import space.anyi.openAPI.comom.model.interfaceInvokeSku.vo.InterfaceInvokeSkuVo;
|
|
|
|
|
+import space.anyi.openAPI.comom.service.InterfaceInvokeSkuService;
|
|
|
|
|
+import space.anyi.openAPI.util.BeanCopyUtil;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @ProjectName: yangyi-open-api-platform
|
|
|
|
|
+ * @FileName: InterfaceInvokeSkuController
|
|
|
|
|
+ * @Author: 杨逸
|
|
|
|
|
+ * @Data:2025/12/30 15:27
|
|
|
|
|
+ * @Description: controller of interfaceInvokeSku
|
|
|
|
|
+ */
|
|
|
|
|
+@RestController()
|
|
|
|
|
+@RequestMapping("/interfaceInvokeSku")
|
|
|
|
|
+public class InterfaceInvokeSkuController {
|
|
|
|
|
+ private final InterfaceInvokeSkuService interfaceInvokeSkuService;
|
|
|
|
|
+
|
|
|
|
|
+ public InterfaceInvokeSkuController(InterfaceInvokeSkuService interfaceInvokeSkuService) {
|
|
|
|
|
+ this.interfaceInvokeSkuService = interfaceInvokeSkuService;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param requestPageInterfaceInvokeSku
|
|
|
|
|
+ * @return {@code ResponseResult }
|
|
|
|
|
+ * @description: 分页查询
|
|
|
|
|
+ * @author: 杨逸
|
|
|
|
|
+ * @data:2025/12/30 15:50:04
|
|
|
|
|
+ * @since 1.0.0
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping
|
|
|
|
|
+ public ResponseResult list(RequestPageInterfaceInvokeSku requestPageInterfaceInvokeSku){
|
|
|
|
|
+ PageVO<InterfaceInvokeSkuVo> pageVo = interfaceInvokeSkuService.listPage(requestPageInterfaceInvokeSku);
|
|
|
|
|
+ return ResponseResult.okResult(pageVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param id
|
|
|
|
|
+ * @return {@code ResponseResult }
|
|
|
|
|
+ * @description: 根据id查询
|
|
|
|
|
+ * @author: 杨逸
|
|
|
|
|
+ * @data:2025/12/30 15:52:18
|
|
|
|
|
+ * @since 1.0.0
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/{id}")
|
|
|
|
|
+ public ResponseResult getById(@PathVariable("id") Long id){
|
|
|
|
|
+ InterfaceInvokeSku interfaceInvokeSku = interfaceInvokeSkuService.getById(id);
|
|
|
|
|
+ return ResponseResult.okResult(BeanCopyUtil.copyBean(interfaceInvokeSku,InterfaceInvokeSkuVo.class));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param requestAddInterFaceInvokeSku
|
|
|
|
|
+ * @return {@code ResponseResult }
|
|
|
|
|
+ * @description: 新增
|
|
|
|
|
+ * @author: 杨逸
|
|
|
|
|
+ * @data:2025/12/30 16:07:00
|
|
|
|
|
+ * @since 1.0.0
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping
|
|
|
|
|
+ public ResponseResult add(@RequestBody RequestAddInterFaceInvokeSku requestAddInterFaceInvokeSku){
|
|
|
|
|
+ InterfaceInvokeSku interfaceInvokeSku = BeanCopyUtil.copyBean(requestAddInterFaceInvokeSku, InterfaceInvokeSku.class);
|
|
|
|
|
+ return interfaceInvokeSkuService.add(requestAddInterFaceInvokeSku);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param requestUpdateInterFaceInvokeSku
|
|
|
|
|
+ * @return {@code ResponseResult }
|
|
|
|
|
+ * @description: 修改
|
|
|
|
|
+ * @author: 杨逸
|
|
|
|
|
+ * @data:2025/12/30 16:16:14
|
|
|
|
|
+ * @since 1.0.0
|
|
|
|
|
+ */
|
|
|
|
|
+ @PutMapping
|
|
|
|
|
+ public ResponseResult update(@RequestBody RequestUpdateInterFaceInvokeSku requestUpdateInterFaceInvokeSku){
|
|
|
|
|
+ //todo:check
|
|
|
|
|
+ interfaceInvokeSkuService.updateById(BeanCopyUtil.copyBean(requestUpdateInterFaceInvokeSku, InterfaceInvokeSku.class));
|
|
|
|
|
+ return ResponseResult.okResult();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param ids List of InterfaceInvokeSKU IDs
|
|
|
|
|
+ * @return {@code ResponseResult }
|
|
|
|
|
+ * @description: 删除
|
|
|
|
|
+ * @author: 杨逸
|
|
|
|
|
+ * @data:2025/12/30 16:08:51
|
|
|
|
|
+ * @since 1.0.0
|
|
|
|
|
+ */
|
|
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
|
|
+ public ResponseResult deleteById(@PathVariable("ids") List<Long> ids){
|
|
|
|
|
+ interfaceInvokeSkuService.removeByIds(ids);
|
|
|
|
|
+ return ResponseResult.okResult();
|
|
|
|
|
+ }
|
|
|
|
|
+}
|