Fix:BeanUtils.copyProperties(ordersDO,ordersSaveReqVO);

This commit is contained in:
Owen 2025-02-28 16:07:56 +08:00
parent 058bf99296
commit 9c219f6989
5 changed files with 27 additions and 10 deletions

View File

@ -26,8 +26,8 @@ public class TenantContextHolder {
* @return 租户编号
*/
public static Long getTenantId() {
return TENANT_ID.get();
// return 162L;
// return TENANT_ID.get();
return 162L;
}
/**

View File

@ -27,7 +27,7 @@ public class ApiHuNanDXService extends ApiConfigService {
Map<String, String> devConfig = getDevConfig(haokaSuperiorApiId);
return new HaiNanDxInfo.ConfigInfo(
devConfig.get(Key_accessToken),
devConfig.get(Key_secret),
//devConfig.get(Key_secret),
devConfig.get(Key_channel),
devConfig.get(Key_baseUrl)
);

View File

@ -10,7 +10,7 @@ public class HaiNanDxInfo {
@AllArgsConstructor
public static class ConfigInfo {
private String accessToken; // access_token
private String secret; // 密钥
// private String secret; // 密钥
private String channel; // 渠道ID
private String baseUrl; // 接口基础URL
}

View File

@ -65,19 +65,36 @@ public class HuNanDXApi {
HaiNanDxInfo.NeedSignQueryParam<HaiNanDxInfo.QueryPhoneNumberParam> param) throws Exception {
// 生成签名
JSONObject jsonObject = (JSONObject) JSON.toJSON(param);
String sign = genSignFromMap(jsonObject, config.getSecret());
param.setSign(sign);
// String sign = genSignFromMap(jsonObject, config.getSecret());
// param.setSign(sign);
param.setChannel(config.getChannel());
// param.setTimestamp()
return doExecute(logVO, config, "qry.nmall.phoneNumberlList", param, HaiNanDxInfo.QueryPhoneNumberResp.class);
}
public static void main(String[] args) throws Exception {
HaiNanDxInfo.ConfigInfo configInfo = new HaiNanDxInfo.ConfigInfo(
"ZDNmMWQwZjMyMzUzZWE3OWNjYWE4NGZjMWMxY2M2OTA=","masqxmyyl","https://222.246.146.26:19443"
);
HaiNanDxInfo.NeedSignQueryParam<HaiNanDxInfo.QueryPhoneNumberParam> param = new HaiNanDxInfo.NeedSignQueryParam<>();
HaiNanDxInfo.QueryPhoneNumberParam numberParam = new HaiNanDxInfo.QueryPhoneNumberParam();
numberParam.setPageSize("10");
numberParam.setCurrentPage("1");
param.setData(numberParam);
HaiNanDxInfo.ResponseInfo<HaiNanDxInfo.QueryPhoneNumberResp> query =
HuNanDXApi.queryPhoneNumber(new SuperiorApiLogSaveReqVO(), configInfo, param);
System.out.println(JSON.toJSONString(query));
}
// 接口8占用号码qry.nmall.possessPhoneNumber
public static HaiNanDxInfo.ResponseInfo<HaiNanDxInfo.PossessPhoneNumberResp>
possessPhoneNumber(final SuperiorApiLogSaveReqVO logVO, HaiNanDxInfo.ConfigInfo config,
HaiNanDxInfo.NeedSignQueryParam<HaiNanDxInfo.PossessPhoneNumberParam> param) throws Exception {
// 生成签名
JSONObject jsonObject = (JSONObject) JSON.toJSON(param);
String sign = genSignFromMap(jsonObject, config.getSecret());
param.setSign(sign);
// JSONObject jsonObject = (JSONObject) JSON.toJSON(param);
// String sign = genSignFromMap(jsonObject, config.getSecret());
// param.setSign(sign);
return doExecute(logVO, config, "qry.nmall.possessPhoneNumber", param, HaiNanDxInfo.PossessPhoneNumberResp.class);
}

View File

@ -45,7 +45,7 @@ public class OrdersController {
@Operation(summary = "创建订单")
//@PreAuthorize("@ss.hasPermission('haoka:orders:create')")
public CommonResult<Long> createOrders(@Valid @RequestBody OrdersSaveReqVO createReqVO) {
//TenantContextHolder.setTenantId(162L);
TenantContextHolder.setTenantId(162L);
return success(ordersService.createOrders(createReqVO));
}