修改请求接口

袁野 2 years ago
parent 0b97b5a52e
commit 564b0d91ef
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 10
      hai-service/src/main/java/com/hai/service/ApiOpenService.java
  3. 11
      hai-service/src/main/java/com/hai/service/impl/ApiOpenServiceImpl.java

File diff suppressed because one or more lines are too long

@ -24,4 +24,14 @@ public interface ApiOpenService {
*/ */
void createOrder(JSONObject object , ApiMerchants apiMerchants , ApiProductConfig productConfig) throws Exception; void createOrder(JSONObject object , ApiMerchants apiMerchants , ApiProductConfig productConfig) throws Exception;
/**
* @Author Sum1Dream
* @name getAllCities.java
* @Description // 获取大陆所有城市
* @Date 10:16 2022/6/27
* @Param []
* @return com.alibaba.fastjson.JSONObject
*/
JSONObject getAllCities();
} }

@ -1,10 +1,12 @@
package com.hai.service.impl; package com.hai.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.utils.DateUtil; import com.hai.common.utils.DateUtil;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.IDGenerator; import com.hai.common.utils.IDGenerator;
import com.hai.config.CommonSysConst; import com.hai.config.CommonSysConst;
import com.hai.config.RechargeConfig; import com.hai.config.RechargeConfig;
@ -268,4 +270,13 @@ public class ApiOpenServiceImpl implements ApiOpenService {
outRechargeOrderMapper.updateByPrimaryKey(outRechargeOrder); outRechargeOrderMapper.updateByPrimaryKey(outRechargeOrder);
} }
@Override
public JSONObject getAllCities() {
JSONObject object = HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuUrl()+"/openApi/v2/cities/listAll", "");
if (object != null && !object.getBoolean("success")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_ERROR);
}
return object;
}
} }

Loading…
Cancel
Save