Browse Source

区域debug

tags/24080901
PoffyZhang 1 year ago
parent
commit
81d51faa2b
2 changed files with 15 additions and 1 deletions
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java
  2. +14
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java View File

@@ -24,6 +24,7 @@ public interface RegionConst {
* 丽水行政区划编码 * 丽水行政区划编码
*/ */
String RC_LS = "331100"; String RC_LS = "331100";
String RC_LS_SBJ_IRS = "331101";
//遂昌县 //遂昌县
String RC_SC = "331123"; String RC_SC = "331123";




+ 14
- 1
pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java View File

@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.function.VUtils;
import com.ningdatech.irs.service.IRefreshTokenService; import com.ningdatech.irs.service.IRefreshTokenService;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.common.enumeration.CommonEnum; import com.ningdatech.pmapi.common.enumeration.CommonEnum;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.common.util.CryptUtils; import com.ningdatech.pmapi.common.util.CryptUtils;
@@ -231,7 +232,7 @@ public class AppIrsManage {
public JSONArray searchApps(ApiApplyDTO apply) throws NoSuchAlgorithmException { public JSONArray searchApps(ApiApplyDTO apply) throws NoSuchAlgorithmException {
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();
String areaCode = StringUtils.isNotBlank(apply.getAreaCode()) ? String areaCode = StringUtils.isNotBlank(apply.getAreaCode()) ?
apply.getAreaCode() : null;
convertAreaCode(apply.getAreaCode()) : null;
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret); String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret);
String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp);
String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign +
@@ -262,6 +263,18 @@ public class AppIrsManage {
return null; return null;
} }


/**
* 如果是市本级的 结尾改成01
* @param areaCode
* @return
*/
private String convertAreaCode(String areaCode) {
if(RegionConst.RC_LS.equals(areaCode)){
return RegionConst.RC_LS_SBJ_IRS;
}
return areaCode;
}

public String testGuibing() throws Exception { public String testGuibing() throws Exception {
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();
String appSecret = "496f0f2a19994f76b4fd9dae087366c7"; String appSecret = "496f0f2a19994f76b4fd9dae087366c7";


Loading…
Cancel
Save