PageResult<SuperiorApiLogDO> selectPage(SuperiorApiLogPageReqVO reqVO)
This commit is contained in:
parent
9f0094ec73
commit
5fcb9231ae
|
@ -56,7 +56,7 @@ public class HaokaUpdateOrderSchedule {
|
|||
private ApiLianTongService apiLianTongService;
|
||||
|
||||
|
||||
@Scheduled(cron = "0 */22 * * * ?")
|
||||
//@Scheduled(cron = "0 */22 * * * ?")
|
||||
public void updateOrder() {
|
||||
log.info("开始-----------更新订单开始--------------------");
|
||||
tenantFrameworkService.getTenantIds().forEach((tenantId) -> {
|
||||
|
|
|
@ -13,11 +13,13 @@ import cn.iocoder.yudao.module.haoka.api.liantong.model.response.KingIdentityCus
|
|||
import cn.iocoder.yudao.module.haoka.api.liantong.model.response.KingOrderSyncResponse;
|
||||
import cn.iocoder.yudao.module.haoka.api.liantong.model.response.KingPreOrderSyncResponse;
|
||||
import cn.iocoder.yudao.module.haoka.api.liantong.util.StringUtils;
|
||||
import cn.iocoder.yudao.module.haoka.controller.admin.address.vo.AddressVo;
|
||||
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.dal.dataobject.superiorapi.SuperiorApiDO;
|
||||
import cn.iocoder.yudao.module.haoka.dal.dataobject.superiorproductconfig.SuperiorProductConfigDO;
|
||||
import cn.iocoder.yudao.module.haoka.service.address.HaoKaAddressService;
|
||||
import cn.iocoder.yudao.module.haoka.service.api.*;
|
||||
import cn.iocoder.yudao.module.haoka.service.api.models.*;
|
||||
import cn.iocoder.yudao.module.haoka.service.onsaleproduct.OnSaleProductService;
|
||||
|
@ -46,6 +48,9 @@ public class LianTongApiDealStrategy implements ApiDealStrategy {
|
|||
@Resource
|
||||
private SuperiorProductConfigService superiorProductConfigService;
|
||||
|
||||
@Resource
|
||||
private HaoKaAddressService haoKaAddressService;
|
||||
|
||||
private LianTongArea getAddress(String code) {
|
||||
return LianTongAreaUtils.getArea(code);
|
||||
}
|
||||
|
@ -67,7 +72,20 @@ public class LianTongApiDealStrategy implements ApiDealStrategy {
|
|||
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
|
||||
|
||||
LianTongArea receiveAddress = getAddress(param.getAddressDistrictCode());
|
||||
String addressDistrictCode = param.getAddressDistrictCode();
|
||||
LianTongArea receiveAddress = getAddress(addressDistrictCode);
|
||||
if (receiveAddress==null){
|
||||
AddressVo address = haoKaAddressService.getAddress(addressDistrictCode);
|
||||
String substring = addressDistrictCode.substring(0, 4)+"00";
|
||||
receiveAddress = getAddress(substring);
|
||||
if (address!=null){
|
||||
receiveAddress=new LianTongArea();
|
||||
receiveAddress.setName(address.getName());
|
||||
receiveAddress.setProvinceCode(address.getProvinceCode());
|
||||
receiveAddress.setCityCode(address.getCityCode());
|
||||
receiveAddress.setDistrictCode(address.getAreaCode());
|
||||
}
|
||||
}
|
||||
|
||||
LianTongArea numAddress = getAddress(preProduct.getParentProduct().getBelongAreaCode());
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.haoka.controller.admin.orderoperatelog.vo.*;
|
|||
import cn.iocoder.yudao.module.haoka.dal.dataobject.orderoperatelog.OrderOperateLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
|
||||
/**
|
||||
* 订单操作日志 Service 接口
|
||||
|
@ -20,6 +21,7 @@ public interface OrderOperateLogService {
|
|||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
@Async
|
||||
Long createOrderOperateLog(@Valid OrderOperateLogSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
|
@ -52,4 +54,4 @@ public interface OrderOperateLogService {
|
|||
*/
|
||||
PageResult<OrderOperateLogDO> getOrderOperateLogPage(OrderOperateLogPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.iocoder.yudao.module.haoka.service.orderoperatelog;
|
||||
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -29,6 +30,7 @@ public class OrderOperateLogServiceImpl implements OrderOperateLogService {
|
|||
@Resource
|
||||
private OrderOperateLogMapper orderOperateLogMapper;
|
||||
|
||||
@Async
|
||||
@Override
|
||||
public Long createOrderOperateLog(OrderOperateLogSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
|
@ -73,4 +75,4 @@ public class OrderOperateLogServiceImpl implements OrderOperateLogService {
|
|||
return orderOperateLogMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue