소스 검색

消息通知配置与商家认证

liude 1 년 전
부모
커밋
edc8d87918

+ 68 - 0
src/main/java/com/chelvc/cloud/admin/controller/MerchantAuthController.java

@@ -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);
+    }
+}

+ 69 - 0
src/main/java/com/chelvc/cloud/admin/controller/NoticeController.java

@@ -0,0 +1,69 @@
+package com.chelvc.cloud.admin.controller;
+
+import com.chelvc.cloud.vehicle.api.dto.NoticeDTO;
+import com.chelvc.cloud.vehicle.api.param.NoticeModifyParam;
+import com.chelvc.cloud.vehicle.api.param.NoticePagingParam;
+import com.chelvc.cloud.vehicle.api.service.NoticeService;
+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 NoticeController {
+    @DubboReference
+    private NoticeService noticeService;
+
+    /**
+     * 新增通知配置
+     *
+     * @param param 新增参数
+     * @return 通知配置主键
+     */
+    @PostMapping("/notice")
+    public Long addNotice(@RequestBody @Valid NoticeModifyParam param) {
+        return this.noticeService.addNotice(param);
+    }
+
+    /**
+     * 修改通知配置
+     *
+     * @param id    通知配置主键
+     * @param param 修改参数
+     */
+    @PutMapping("/notice/{id}")
+    public void updateNotice(@PathVariable("id") @Min(value = 1, message = "通知配置主键不能小于1") Long id,
+                               @RequestBody @Valid NoticeModifyParam param) {
+        this.noticeService.updateNotice(id, param);
+    }
+
+    /**
+     * 查询通知配置分页
+     *
+     * @param param 查询参数
+     * @return 通知配置分页信息
+     */
+    @GetMapping("/notice/paging")
+    public Pagination<NoticeDTO> getNoticePaging(@Valid NoticePagingParam param) {
+        return this.noticeService.getNoticePaging(param);
+    }
+}

+ 38 - 0
src/main/java/com/chelvc/cloud/admin/controller/OrderController.java

@@ -0,0 +1,38 @@
+package com.chelvc.cloud.admin.controller;
+import com.chelvc.cloud.vehicle.api.dto.OmsOrderDTO;
+import com.chelvc.cloud.vehicle.api.param.OrderPagingParam;
+import com.chelvc.cloud.vehicle.api.service.IOmsOrderService;
+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.RestController;
+import javax.validation.Valid;
+
+/**
+ * 订单接口
+ *
+ * @author liude
+ * @Date 2023/11/29
+ **/
+@Validated
+@RestController
+@ResponseWrapping
+@PreAuthorize("isScope('EMPLOYEE')")
+public class OrderController {
+    @DubboReference
+    private IOmsOrderService orderService;
+
+    /**
+     * 查询订单分页
+     *
+     * @param param 查询参数
+     * @return 订单分页信息
+     */
+    @GetMapping("/order/paging")
+    public Pagination<OmsOrderDTO> getOrderPaging(@Valid OrderPagingParam param) {
+        return this.orderService.getOmsOrderPaging(param);
+    }
+}