广州电信
This commit is contained in:
parent
86b3442354
commit
a0eb3d87be
|
|
@ -41,21 +41,38 @@ public class ApiHaiNanDXService extends ApiConfigService {
|
|||
return HaiNanDianXinApi.qryNbrList(logVO, this.getConfig(), param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 防诈校验接口查询
|
||||
*/
|
||||
public HaiNanDianXinApi.HaiNanResponseInfo<HaiNanDianXinApi.FraudCheckResponse>
|
||||
fraudCheck(final SuperiorApiLogSaveReqVO logVO, HaiNanDianXinApi.FraudCheckRequest param) throws UnirestException {
|
||||
return HaiNanDianXinApi.fraudCheck(logVO, this.getConfig(), param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单信息查询
|
||||
*/
|
||||
public HaiNanDianXinApi.HaiNanResponseInfo<HaiNanDianXinApi.QueryOrderInfoResponse>
|
||||
queryOrderInfo(final SuperiorApiLogSaveReqVO logVO, HaiNanDianXinApi.QueryOrderInfoRequest param) throws UnirestException {
|
||||
return HaiNanDianXinApi.queryOrderInfo(logVO, this.getConfig(), param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 物流轨迹查询
|
||||
* @return 物流轨迹查询返回结果
|
||||
* @throws UnirestException 请求异常
|
||||
*/
|
||||
public HaiNanDianXinApi.HaiNanResponseInfo<HaiNanDianXinApi.GetLogisticsTrajectoryResponse>
|
||||
getLogisticsTrajectory(final SuperiorApiLogSaveReqVO logVO, HaiNanDianXinApi.GetLogisticsTrajectoryRequest param) throws UnirestException {
|
||||
return HaiNanDianXinApi.getLogisticsTrajectory(logVO, this.getConfig(), param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 号卡订单收敛
|
||||
*
|
||||
* @return 号卡订单收敛返回结果
|
||||
* @throws UnirestException 请求异常
|
||||
*/
|
||||
public HaiNanDianXinApi.HaiNanResponseInfo<HaiNanDianXinApi.SynOrderInfoResponse>
|
||||
synOrderInfo(final SuperiorApiLogSaveReqVO logVO, HaiNanDianXinApi.SynOrderInfoRequest param) throws UnirestException {
|
||||
return HaiNanDianXinApi.synOrderInfo(logVO, this.getConfig(), param);
|
||||
|
|
|
|||
|
|
@ -52,4 +52,8 @@ public class SuperiorApiSkuConfigRespVO {
|
|||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private Integer indexInfo;
|
||||
private Boolean needConfig;
|
||||
private String defaultValue;
|
||||
|
||||
}
|
||||
|
|
@ -37,4 +37,8 @@ public class SuperiorApiSkuConfigSaveReqVO {
|
|||
@Schema(description = "选项(逗号,分割)")
|
||||
private String inputSelectValues;
|
||||
|
||||
private Integer indexInfo;
|
||||
private Boolean needConfig;
|
||||
private String defaultValue;
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
package cn.iocoder.yudao.module.haoka.dal.dataobject.superiorapi;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
|
|
@ -41,7 +43,7 @@ public class SuperiorApiSkuConfigDO extends BaseDO {
|
|||
private String name;
|
||||
/**
|
||||
* 是否必填
|
||||
*
|
||||
* <p>
|
||||
* 枚举 {@link TODO infra_boolean_string 对应的类}
|
||||
*/
|
||||
private Boolean required;
|
||||
|
|
@ -51,7 +53,7 @@ public class SuperiorApiSkuConfigDO extends BaseDO {
|
|||
private String remarks;
|
||||
/**
|
||||
* 输入类型
|
||||
*
|
||||
* <p>
|
||||
* 枚举 {@link TODO haoka_superior_api_input_type 对应的类}
|
||||
*/
|
||||
private Integer inputType;
|
||||
|
|
@ -64,4 +66,8 @@ public class SuperiorApiSkuConfigDO extends BaseDO {
|
|||
*/
|
||||
private Long deptId;
|
||||
|
||||
private Integer indexInfo;
|
||||
private Boolean needConfig;
|
||||
private String defaultValue;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,14 @@ import cn.iocoder.yudao.module.haoka.api.hunandianxin.HaiNanDxInfo;
|
|||
import cn.iocoder.yudao.module.haoka.api.liantong.area.LianTongArea;
|
||||
import cn.iocoder.yudao.module.haoka.api.liantong.area.LianTongAreaUtils;
|
||||
import cn.iocoder.yudao.module.haoka.api.liantong.model.response.KingOrderSyncResponse;
|
||||
import cn.iocoder.yudao.module.haoka.api.liantong.util.StringUtils;
|
||||
import cn.iocoder.yudao.module.haoka.controller.admin.onsaleproduct.vo.OnSaleProductPreOrderRespVO;
|
||||
import cn.iocoder.yudao.module.haoka.controller.admin.superiorapilog.vo.SuperiorApiLogSaveReqVO;
|
||||
import cn.iocoder.yudao.module.haoka.controller.admin.superiorproductconfig.vo.SuperiorProductConfigRespVO;
|
||||
import cn.iocoder.yudao.module.haoka.service.api.*;
|
||||
import cn.iocoder.yudao.module.haoka.service.onsaleproduct.OnSaleProductService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mashape.unirest.http.exceptions.UnirestException;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -35,8 +39,26 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
|
|||
@Override
|
||||
public ApiDealResp<OrderApiCreateResp> createOrder(final SuperiorApiLogSaveReqVO logVO, OrderApiCreateParam param) {
|
||||
OnSaleProductPreOrderRespVO preProduct = onSaleProductService.getOnSaleProductPreOrder(param.getProductId());
|
||||
|
||||
if (preProduct == null) {
|
||||
return ApiDealResp.failed("商品下架或者不存在");
|
||||
}
|
||||
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
final SuperiorProductConfigRespVO skuConfigVO = preProduct.getSuperiorProductConfigRespVO();
|
||||
|
||||
HaiNanDianXinApi.SynOrderInfoRequest createParam = new HaiNanDianXinApi.SynOrderInfoRequest();
|
||||
createParam.setOrderDate(format);
|
||||
createParam.setOrderArea("460");
|
||||
createParam.setOrderType("28");
|
||||
HaiNanDianXinApi.OrderBusiInfo orderBusiInfo = new HaiNanDianXinApi.OrderBusiInfo();
|
||||
// orderBusiInfo.setAccNbr()
|
||||
// createParam.setOrderBusiInfo(orderBusiInfo);
|
||||
// if (skuConfigVO != null && StringUtils.isNotEmpty(skuConfigVO.getConfig())) {
|
||||
// String config = skuConfigVO.getConfig();
|
||||
// JSONObject configs = JSON.parseObject(config);
|
||||
// createParam.set
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
LianTongArea receiveAddress = getAddress(param.getAddressDistrict());
|
||||
|
|
@ -49,7 +71,7 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
|
|||
// 2、提交预订单 得到token lianTongPreOrderSync
|
||||
// 3、用 token提交正式订单 lianTongOrderSyncV2
|
||||
|
||||
HaiNanDianXinApi.SynOrderInfoRequest createParam = new HaiNanDianXinApi.SynOrderInfoRequest();
|
||||
|
||||
try {
|
||||
HaiNanDianXinApi.HaiNanResponseInfo<HaiNanDianXinApi.SynOrderInfoResponse> responseInfo
|
||||
= apiHaiNanDXService.synOrderInfo(logVO, createParam);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
alter table haoka_superior_api_sku_config
|
||||
ADD COLUMN `index_info` int(11) COMMENT '排序',
|
||||
add column `need_config` bit(1) NOT NULL DEFAULT b'1' COMMENT '需要配置',
|
||||
add column `default_value` varchar(2048) COMMENT '默认值';
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue