|
@@ -0,0 +1,60 @@
|
|
|
+package com.chelvc.cloud.admin.controller;
|
|
|
+
|
|
|
+import com.chelvc.cloud.vehicle.api.dto.PlatformProfitRatioDTO;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.EditPlatformProfitRatioParam;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.QueryPlatformProfitRatioParam;
|
|
|
+import com.chelvc.cloud.vehicle.api.service.PlatformProfitRatioService;
|
|
|
+import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
+import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
+import com.chelvc.framework.common.model.Pagination;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 平台/用户/商家分佣比例管理接口
|
|
|
+ */
|
|
|
+@Validated
|
|
|
+@RestController
|
|
|
+@ResponseWrapping
|
|
|
+@PreAuthorize("isScope('EMPLOYEE')")
|
|
|
+public class ProfitRatioController {
|
|
|
+
|
|
|
+ @DubboReference
|
|
|
+ PlatformProfitRatioService platformProfitRatioService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询列表
|
|
|
+ * @param param 查询参数
|
|
|
+ * @param pageCode
|
|
|
+ * @param pageSize
|
|
|
+ * @author igl
|
|
|
+ * @date 2024/2/23 17:25
|
|
|
+ */
|
|
|
+ @GetMapping("/platform/profit-ratio/page")
|
|
|
+ public Pagination<PlatformProfitRatioDTO> list(@Validated QueryPlatformProfitRatioParam param, Long pageCode, Long pageSize) {
|
|
|
+ if (pageCode == null) {
|
|
|
+ pageCode = 1L;
|
|
|
+ }
|
|
|
+ if (pageSize == null) {
|
|
|
+ pageSize = 20L;
|
|
|
+ }
|
|
|
+ return this.platformProfitRatioService.queryPageList(param, pageCode, pageSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改分佣比例
|
|
|
+ * @param param
|
|
|
+ * @author igl
|
|
|
+ * @date 2024/2/23 17:25
|
|
|
+ */
|
|
|
+ @PostMapping("/platform/profit-ratio/edit")
|
|
|
+ public void edit(@Validated @RequestBody EditPlatformProfitRatioParam param) {
|
|
|
+ param.setOperateUserId(SessionContextHolder.getId());
|
|
|
+ this.platformProfitRatioService.edit(param);
|
|
|
+ }
|
|
|
+}
|