Sfoglia il codice sorgente

新需求--测试地址

傅行帆 5 anni fa
parent
commit
e8d4aa5c14

+ 16
- 0
src/main/java/com/huiju/estateagents/config/FadadaProperties.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.huiju.estateagents.config;
2
+
3
+
4
+import lombok.Data;
5
+import org.springframework.boot.context.properties.ConfigurationProperties;
6
+import org.springframework.stereotype.Component;
7
+
8
+@Component
9
+@Data
10
+@ConfigurationProperties(prefix = "fadada")
11
+public class FadadaProperties {
12
+    private String appId;
13
+    private String appSecret;
14
+    private String version;
15
+    private String serveHost;
16
+}

+ 41
- 0
src/main/java/com/huiju/estateagents/eContract/controller/TaCompanyController.java Vedi File

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7
 import com.huiju.estateagents.base.BaseController;
8 8
 import com.huiju.estateagents.base.ResponseBean;
9 9
 import com.huiju.estateagents.common.CommConstant;
10
+import com.huiju.estateagents.config.FadadaProperties;
10 11
 import org.apache.commons.lang3.StringUtils;
11 12
 import org.slf4j.Logger;
12 13
 import org.slf4j.LoggerFactory;
@@ -37,6 +38,9 @@ public class TaCompanyController extends BaseController {
37 38
 
38 39
     private final Logger logger = LoggerFactory.getLogger(TaCompanyController.class);
39 40
 
41
+    @Autowired
42
+    private FadadaProperties fadadaProperties;
43
+
40 44
     @Autowired
41 45
     public ITaCompanyService iTaCompanyService;
42 46
 
@@ -165,4 +169,41 @@ public class TaCompanyController extends BaseController {
165 169
         return responseBean;
166 170
     }
167 171
 
172
+    /**
173
+     * 条件查询企业列表
174
+     *
175
+     * @param pageNum
176
+     * @param pageSize
177
+     * @param companyName
178
+     * @param companyCode
179
+     * @param certifiedStatus
180
+     * @return
181
+     */
182
+    @RequestMapping(value = "/channel/company/list", method = RequestMethod.GET)
183
+    public ResponseBean getCompanyList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
184
+                                       @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
185
+                                       @RequestParam(value = "companyName", required = false) String companyName,
186
+                                       @RequestParam(value = "companyCode", required = false) String companyCode,
187
+                                       @RequestParam(value = "certifiedStatus", required = false) String certifiedStatus) {
188
+        ResponseBean responseBean = new ResponseBean();
189
+        try {
190
+            fadadaProperties.getAppId();
191
+            //使用分页插件
192
+            IPage<TaCompany> pg = new Page<>(pageNum, pageSize);
193
+            QueryWrapper<TaCompany> queryWrapper = new QueryWrapper<>();
194
+            queryWrapper.like(StringUtils.isNotBlank(companyName), "company_name", companyName);
195
+            queryWrapper.like(StringUtils.isNotBlank(companyCode), "company_code", companyCode);
196
+            queryWrapper.eq(StringUtils.isNotBlank(certifiedStatus), "certified_status", certifiedStatus);
197
+            queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
198
+            queryWrapper.orderByDesc("create_date");
199
+
200
+            IPage<TaCompany> result = iTaCompanyService.page(pg, queryWrapper);
201
+            responseBean.addSuccess(result);
202
+        } catch (Exception e) {
203
+            e.printStackTrace();
204
+            logger.error("taCompanyList -=- {}", e.toString());
205
+            responseBean.addError(e.getMessage());
206
+        }
207
+        return responseBean;
208
+    }
168 209
 }

+ 7
- 1
src/main/resources/application-blue.yml Vedi File

@@ -76,4 +76,10 @@ sms:
76 76
 # 支付回调
77 77
 pay-notify: https://dev.pawoma.cn/api/notify/
78 78
 #退款回调
79
-pay-refund: https://dev.pawoma.cn/api/refund/
79
+pay-refund: https://dev.pawoma.cn/api/refund/
80
+
81
+fadada:
82
+  appId: ""
83
+  appSecret: ""
84
+  version: "2.0"
85
+  serveHost: "https://testapi.fadada.com:8443/api/"

+ 7
- 1
src/main/resources/application-green.yml Vedi File

@@ -76,4 +76,10 @@ sms:
76 76
 # 支付回调
77 77
 pay-notify: https://dev.pawoma.cn/api/notify/
78 78
 #退款回调
79
-pay-refund: https://dev.pawoma.cn/api/refund/
79
+pay-refund: https://dev.pawoma.cn/api/refund/
80
+
81
+fadada:
82
+  appId: ""
83
+  appSecret: ""
84
+  version: "2.0"
85
+  serveHost: "https://testapi.fadada.com:8443/api/"