|
@@ -0,0 +1,57 @@
|
|
|
+package com.ym.mec.web.controller;
|
|
|
+
|
|
|
+import com.ym.mec.biz.service.HfMerchantConfigService;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
+import com.ym.mec.common.page.QueryInfo;
|
|
|
+import com.ym.mec.thirdparty.adapay.entity.HfMerchantConfig;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+/**
|
|
|
+ * (HfMerchantConfig)表控制层
|
|
|
+ *
|
|
|
+ * @author hgw
|
|
|
+ * @since 2022-07-13 10:07:36
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/hfMerchantConfig")
|
|
|
+public class HfMerchantConfigController extends BaseController {
|
|
|
+ /**
|
|
|
+ * 服务对象
|
|
|
+ */
|
|
|
+ @Resource
|
|
|
+ private HfMerchantConfigService hfMerchantConfigService;
|
|
|
+
|
|
|
+ @ApiOperation("创建汇付商户配置")
|
|
|
+ @PostMapping("/add")
|
|
|
+ public HttpResponseResult<Object> add(@RequestBody HfMerchantConfig dto) {
|
|
|
+ hfMerchantConfigService.insert(dto);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("创建汇付商户配置")
|
|
|
+ @PostMapping("/update")
|
|
|
+ public HttpResponseResult<Object> update(@RequestBody HfMerchantConfig dto) {
|
|
|
+ hfMerchantConfigService.update(dto);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("根据机构id查询汇付商户配置")
|
|
|
+ @GetMapping(value = "/queryByTenantId/{id}")
|
|
|
+ public HttpResponseResult<HfMerchantConfig> queryByTenantId(@ApiParam(value = "机构ID", required = true) @PathVariable("id") Integer id) {
|
|
|
+ return succeed(hfMerchantConfigService.queryByTenantId(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("分页查询汇付商户配置")
|
|
|
+ @PostMapping(value = "/queryPage")
|
|
|
+ public HttpResponseResult<PageInfo<HfMerchantConfig>> queryPage(@RequestBody QueryInfo dto) {
|
|
|
+ return succeed(hfMerchantConfigService.queryPage(dto));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|