|
@@ -0,0 +1,68 @@
|
|
|
+package com.chelvc.cloud.admin.controller;
|
|
|
+
|
|
|
+import com.chelvc.cloud.vehicle.api.dto.MerchantAuthDTO;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.MerchantAuthModifyParam;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.MerchantAuthPagingParam;
|
|
|
+import com.chelvc.cloud.vehicle.api.service.MerchantAuthService;
|
|
|
+import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
+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.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 商家认证接口
|
|
|
+ *
|
|
|
+ * @author liude
|
|
|
+ * @date 2023/12/13
|
|
|
+ */
|
|
|
+@Validated
|
|
|
+@RestController
|
|
|
+@ResponseWrapping
|
|
|
+@PreAuthorize("isScope('EMPLOYEE')")
|
|
|
+public class MerchantAuthController {
|
|
|
+ @DubboReference
|
|
|
+ private MerchantAuthService merchantAuthService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增商家认证
|
|
|
+ *
|
|
|
+ * @param param 新增参数
|
|
|
+ * @return 商家商家认证主键
|
|
|
+ */
|
|
|
+ @PostMapping("/merchantAuth")
|
|
|
+ public Long addMerchantAuth(@RequestBody @Valid MerchantAuthModifyParam param) {
|
|
|
+ return this.merchantAuthService.addMerchantAuth(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改商家商家认证
|
|
|
+ *
|
|
|
+ * @param id 商家商家认证主键
|
|
|
+ * @param param 修改参数
|
|
|
+ */
|
|
|
+ @PutMapping("/merchantAuth/{id}")
|
|
|
+ public void updateMerchantAuth(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
|
|
|
+ @RequestBody @Valid MerchantAuthModifyParam param) {
|
|
|
+ this.merchantAuthService.updateMerchantAuth(id, param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询商家商家认证分页
|
|
|
+ *
|
|
|
+ * @param param 查询参数
|
|
|
+ * @return 商家商家认证分页信息
|
|
|
+ */
|
|
|
+ @GetMapping("/merchantAuth/paging")
|
|
|
+ public Pagination<MerchantAuthDTO> getMerchantAuthPaging(@Valid MerchantAuthPagingParam param) {
|
|
|
+ return this.merchantAuthService.getMerchantAuthPaging(param);
|
|
|
+ }
|
|
|
+}
|