Authored by tanling

Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8

... ... @@ -51,4 +51,6 @@ public @interface Cachable {
*/
String cacheTimeKey() default "";
int[] pageArgs() default {};
}
... ...
... ... @@ -6,6 +6,7 @@ import java.util.List;
import javax.annotation.Resource;
import com.yohoufo.common.utils.StringUtil;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
... ... @@ -90,35 +91,71 @@ public class ControllerCacheAop implements ApplicationContextAware{
//caculate cache key
final String level1_cache_key = this.getL1CacheKey(method, joinPoint.getArgs());
//final String level2_cache_key = this.getL2CacheKey(joinPoint, cacheExpire);
if (ArrayUtils.isEmpty(cacheExpire.pageArgs())) {
return dealSingeCache(level1_cache_key, cacheExpire, returnType, methodName, joinPoint);
} else {
return dealPageCache(level1_cache_key, cacheExpire, returnType, methodName, joinPoint);
}
}
private Object dealPageCache(String cacheKey, Cachable cacheExpire, Class<?> returnType, String methodName, ProceedingJoinPoint joinPoint) throws Throwable {
//从一级缓存中获取数据
try {
Object level1_obj = this.cacheClient.get(level1_cache_key, returnType);
if (level1_obj != null) {
logger.info("Cache1 hit for method:{} at key:{}.", methodName, level1_cache_key);
return level1_obj;
}
} catch (Exception e) {
logger.warn("get from level 1 cache exception.", e);
}
String pageKey = getPageCacheKey(cacheExpire.pageArgs());
try {
Object level1_obj = this.cacheClient.hashGet(cacheKey, pageKey, returnType);
if (level1_obj != null) {
logger.info("Cache1 hit for page method:{} at key:{}, page:{}.", methodName, cacheKey, pageKey);
return level1_obj;
}
} catch (Exception e) {
logger.warn("get from level 1 page cache exception.", e);
}
//cache miss at level1: 调用原来的请求,然后将结果缓存到cache1&cache2中。如果调用异常,则从cache2中查找
Object httpResponse;
Object httpResponse = null;
try {
httpResponse = joinPoint.proceed();
if (httpResponse != null) {
this.saveToCache(level1_cache_key, cacheExpire, httpResponse);
logger.info("saveToPageCache page method:{} at key:{}, page:{}.", methodName, cacheKey, pageKey);
this.saveToPageCache(cacheKey, pageKey, cacheExpire, httpResponse);
}
} catch (Throwable throwable) {
logger.error("Cache1 & Cache2 miss for method:{} .", methodName);
logger.error("Cache1 & Cache2 miss for page method:{} .", methodName);
throw throwable;
}
return httpResponse;
}
private Object dealSingeCache(String cacheKey, Cachable cacheExpire, Class<?> returnType, String methodName, ProceedingJoinPoint joinPoint) throws Throwable {
//从一级缓存中获取数据
try {
Object level1_obj = this.cacheClient.get(cacheKey, returnType);
if (level1_obj != null) {
logger.info("Cache1 hit for single method:{} at key:{}.", methodName, cacheKey);
return level1_obj;
}
} catch (Exception e) {
logger.warn("get from level 1 single cache exception.", e);
}
//cache miss at level1: 调用原来的请求,然后将结果缓存到cache1&cache2中。如果调用异常,则从cache2中查找
Object httpResponse = null;
try {
httpResponse = joinPoint.proceed();
if (httpResponse != null) {
logger.info("saveToPageCache page method:{} at key:{}.", methodName, cacheKey);
this.saveToCache(cacheKey, cacheExpire, httpResponse);
}
} catch (Throwable throwable) {
logger.error("Cache1 & Cache2 miss for single method:{} .", methodName);
throw throwable;
}
return httpResponse;
}
... ... @@ -143,6 +180,21 @@ public class ControllerCacheAop implements ApplicationContextAware{
}
this.cacheClient.set(level1_cache_key, cacheExpireTime, httpResponse);
}
/**
* 将结果保存在缓存中
* @param level1_cache_key
* @param cacheExpire
* @param httpResponse
*/
public void saveToPageCache(String level1_cache_key, String pageKey, Cachable cacheExpire, Object httpResponse) {
int cacheExpireTime = getCacheTime(cacheExpire);
// 一级缓存失效的时间,如果指定了,则使用指定的值。如果没有指定,则使用配置的值
if (cacheExpireTime <= 0) {
cacheExpireTime = 60;
}
this.cacheClient.hashPut(level1_cache_key, pageKey, httpResponse, cacheExpireTime);
}
/**
* 单位是s
... ... @@ -159,8 +211,8 @@ public class ControllerCacheAop implements ApplicationContextAware{
/**
* 根据拦截的方法的参数,生成cache的key. yh_gw:METHOD_NAME:METHOD_PARAM
*
* @param joinPoint 拦截点
* @param cacheExpire
* @param method 拦截点
* @param params
* @return key
*/
private String getL1CacheKey(Method method, Object[] params) {
... ... @@ -169,7 +221,9 @@ public class ControllerCacheAop implements ApplicationContextAware{
return StringUtils.EMPTY;
}
int[] excludeParams = cacheExpire.excludeArgs();
String cacheKey = this.getCacheKey(method.getName(), params, excludeParams);
int[] pageParams = cacheExpire.pageArgs();
String cacheKey = this.getCacheKey(method.getName(), params, excludeParams, pageParams);
String level1_cache_key = "YH:UFOGW:L1:" + cacheKey;
... ... @@ -189,10 +243,10 @@ public class ControllerCacheAop implements ApplicationContextAware{
}
private String getCacheKey(String methodName, Object params[], int[] excludeParams ){
private String getCacheKey(String methodName, Object params[], int[] excludeParams, int[] pageParams ){
//args params sign
String args_sign = this.getStrings(params, excludeParams);
String args_sign = this.getStrings(params, excludeParams, pageParams);
//method name
String cacheKeyPrefix = "yh_ufogw:" + methodName;
... ... @@ -200,6 +254,10 @@ public class ControllerCacheAop implements ApplicationContextAware{
return cacheKeyPrefix + ":" + args_sign;
}
private String getPageCacheKey(int[] pageParams) {
return "PAGE:" + StringUtils.join(pageParams, ":");
}
/**
... ... @@ -209,7 +267,7 @@ public class ControllerCacheAop implements ApplicationContextAware{
* @param excludeParams arguments to exclude
* @return params sign
*/
public String getStrings(Object arguments[], int[] excludeParams) {
public String getStrings(Object arguments[], int[] excludeParams, int[] pageParams) {
if (ArrayUtils.isEmpty(arguments)) {
return StringUtils.EMPTY;
... ... @@ -219,7 +277,7 @@ public class ControllerCacheAop implements ApplicationContextAware{
for (int i = 0; i < arguments.length; i++) {
//排除掉某些参数
if (ArrayUtils.contains(excludeParams, i)) {
if (ArrayUtils.contains(excludeParams, i) || ArrayUtils.contains(pageParams, i)) {
continue;
}
Object arg = arguments[i];
... ...
... ... @@ -9,7 +9,6 @@ public interface DepositOrderMapper {
DepositOrder selectByPrimaryKey(Integer id);
int updateByPrimaryKey(DepositOrder record);
int updatePayment(DepositOrder order);
... ...
... ... @@ -45,4 +45,6 @@ public interface StorageDepositMapper {
List<StorageDeposit> getDepositOffs(@Param("uid") Integer uid, @Param("storageId") Integer storageId, @Param("count") Integer count);
int updateStorageStatus(@Param("depositCode")String depositCode, @Param("status")int status);
int getUserDepositCount(@Param("uid") Integer uid);
}
\ No newline at end of file
... ...
... ... @@ -39,21 +39,6 @@
</insert>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.DepositOrder" >
update deposit_order
set uid = #{uid,jdbcType=INTEGER},
order_code = #{orderCode,jdbcType=BIGINT},
deposit_code = #{depositCode,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
payment = #{payment,jdbcType=INTEGER},
client_type = #{clientType,jdbcType=INTEGER},
event_type = #{eventType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updatePayment" parameterType="com.yohoufo.dal.order.model.DepositOrder">
update deposit_order
set payment = #{payment,jdbcType=INTEGER},
... ...
... ... @@ -324,6 +324,10 @@
select count(*) from storage_deposit
where owner_uid = #{uid} and status=1 and order_status=0 and del_status=0 and storage_id = #{storageId}
</select>
<select id="getUserDepositCount" resultType="java.lang.Integer">
select count(*) from storage_deposit
where owner_uid = #{uid} and status=1 and del_status=0
</select>
<select id="getDepositOffs" resultMap="BaseResultMap">
select * from storage_deposit
... ...
... ... @@ -25,10 +25,10 @@ public class DepositController {
private DepositService depositService;
@RequestMapping(params = "method=ufo.deposit.queryUserDoposit")
@Cachable
@Cachable(expire = 180, pageArgs = {1,2})
public ApiResponse queryUserDoposit(@RequestParam("uid") Integer uid
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit
, @RequestParam(value = "page", required = false, defaultValue = "1") Integer page
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit
) {
if (uid == null || uid < 1) {
LOG.warn("queryUserDoposit failed, invalid uid: {}", uid);
... ... @@ -41,9 +41,10 @@ public class DepositController {
}
@RequestMapping(params = "method=ufo.deposit.queryUserDopositBackDetail")
@Cachable(expire = 180, pageArgs = {1,2})
public ApiResponse queryUserDopositBackDetail(@RequestParam("uid") Integer uid
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit
, @RequestParam(value = "page", required = false, defaultValue = "1") Integer page
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit
) {
if (uid == null || uid < 1) {
LOG.warn("queryUserDopositBackDetail failed, invalid uid: {}", uid);
... ... @@ -56,10 +57,11 @@ public class DepositController {
}
@RequestMapping(params = "method=ufo.deposit.queryUserDopositing")
@Cachable(expire = 180, pageArgs = {2,3})
public ApiResponse queryUserDopositing(@RequestParam("uid") Integer uid
, @RequestParam("productId") Integer productId
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit
, @RequestParam(value = "page", required = false, defaultValue = "1") Integer page
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit
) {
if (uid == null || uid < 1) {
LOG.warn("queryUserDopositing failed, invalid uid: {}", uid);
... ... @@ -80,6 +82,7 @@ public class DepositController {
}
@RequestMapping(params = "method=ufo.deposit.queryUserStorageOffCount")
@Cachable(expire = 180)
public ApiResponse queryUserStorageOffCount(@RequestParam("uid") Integer uid
, @RequestParam("storageId") Integer storageId
) {
... ... @@ -96,4 +99,17 @@ public class DepositController {
LOG.info("queryUserStorageOffCount result: {}", count);
return new ApiResponse.ApiResponseBuilder().code(200).data(count).build();
}
@RequestMapping(params = "method=ufo.deposit.queryUserStorageCount")
@Cachable(expire = 180)
public ApiResponse queryUserStorageCount(@RequestParam("uid") Integer uid) {
if (uid == null || uid < 1) {
LOG.warn("queryUserStorageCount failed, invalid uid: {}", uid);
return new ApiResponse.ApiResponseBuilder().code(500).message("查询失败").build();
}
int count = depositService.getUserDepositCount(uid);
LOG.info("queryUserStorageCount result: {}", count);
return new ApiResponse.ApiResponseBuilder().code(200).data(count).build();
}
}
... ...
... ... @@ -568,16 +568,13 @@ public class SellerOrderController {
public ApiResponse publishQuickDeliverPrd(@RequestParam(name = "uid")int uid,
@RequestParam(name = "storage_id")int storage_id,
@RequestParam(name="price")String price,
@RequestParam(name="address_id")String address_id,
@RequestParam(name="depositCode") String depositCode) {
@RequestParam(name="num")int num) {
QuickDeliverOrderSubmitReq req = QuickDeliverOrderSubmitReq.builder()
.uid(uid)
.storageId(storage_id)
.price(price)
.addressId(address_id)
.num(1)
.num(num)
.skupTypeCode(SkupType.QUICK_DELIVER.getCode())
.depositCode(depositCode)
.build();
logger.info("in ufo.sellerOrder.publishQuickDeliverPrd, req {}", req);
... ...
... ... @@ -107,6 +107,8 @@ public class OrderDetailInfo {
private Integer attributes;
private String depositTips;
@Builder
@Data
... ...
... ... @@ -36,8 +36,12 @@ public interface DepositService {
boolean changeOwner(Integer uid, Integer skup, long buyOrderCode, Integer newUid);
// 可上架数量
int getDepositOffShelvesCount(Integer uid, Integer storageId);
// 可上架数量
int getUserDepositCount(Integer uid);
// 剩余存储天数
int getRemainDay(Integer uid, String depositCode);
int changeStorageStatus(String depositCode, int status);
List<StorageDeposit> getStorageDeposit4Publish(Integer uid, Integer storageId, int num);
}
... ...
... ... @@ -146,7 +146,7 @@ public class DepositOrderService {
}
public DepositOrder selectByOrderCodeUid(long orderCode, int uid) {
return null;
return depositOrderMapper.selectByOrderCode(orderCode);
}
public int updateStatusByOrderCode(DepositOrder order) {
... ...
... ... @@ -47,6 +47,7 @@ import com.yohoufo.order.service.seller.setting.SellerService;
import com.yohoufo.order.utils.BuyerOrderUtils;
import com.yohoufo.order.utils.PaymentHelper;
import com.yohoufo.order.utils.PubThreadFactory;
import com.yohoufo.order.utils.ServiceExceptions;
import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
... ... @@ -67,6 +68,8 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static com.yohoufo.order.utils.ServiceExceptions.throwServiceExceptionIf;
/**
* Created by chenchao on 2018/9/27.
*/
... ... @@ -1289,6 +1292,7 @@ public class AppraiseService {
LOGGER.warn("appraiseSuccess getOrderInfo order not exist, orderCode is {}", orderCode);
throw new ServiceException(ServiceError.ORDER_NULL);
}
throwServiceExceptionIf(BuyerOrderUtils.isDeposit(buyerOrder),"寄存订单不支持鉴定通过并发货");
final OrderStatus expectOrderStatus = OrderStatus.PLATFORM_CHECKING;
final OrderStatus targetOrderStatus = OrderStatus.WAITING_RECEIVE;
if (expectOrderStatus.getCode() != buyerOrder.getStatus().intValue()) {
... ...
... ... @@ -5,6 +5,7 @@ import com.yohobuy.ufo.model.order.bo.TimeoutBo;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohoufo.common.helper.ImageUrlAssist;
... ... @@ -17,8 +18,10 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods;
import com.yohoufo.dal.order.model.BuyerOrderMeta;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.order.common.ActionStatusHold;
import com.yohoufo.order.model.request.OrderRequest;
import com.yohoufo.order.model.response.OrderDetailInfo;
import com.yohoufo.order.service.IOrderDetailService;
import com.yohoufo.order.service.cache.OrderCacheService;
import com.yohoufo.order.service.handler.BuyerOrderButtonsHandler;
import com.yohoufo.order.utils.LoggerUtils;
import org.apache.commons.lang3.StringUtils;
... ... @@ -55,9 +58,32 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO
BuyerOrderMetaMapper buyerOrderMetaMapper;
@Autowired
private OrderCacheService orderCacheService;
@Autowired
private QiniuLiveRecordService qiniuLiveRecordService;
public OrderDetailInfo getOrderDetail(OrderRequest orderRequest){
int uid;
long orderCode;
final TabType actor = TabType.BUY;
OrderDetailInfo orderDetailInfo = orderCacheService.getOrderDetailInfo(uid = orderRequest.getUid(),
orderCode=orderRequest.getOrderCode(), actor);
if(Objects.nonNull(orderDetailInfo)){
resetDynamicProporties(orderDetailInfo,orderRequest.getAppVersion());
return orderDetailInfo;
}
orderDetailInfo = super.getOrderDetail(orderRequest);
if(Objects.nonNull(orderDetailInfo)){
if (orderDetailInfo.getAttributes() == OrderAttributes.DEPOSITE.getCode()){
orderDetailInfo.setDepositTips(OrderConstant.Tips.DEPOSIT_TIPS);
}
orderCacheService.cacheOrderDetailInfo(uid, orderCode, actor, orderDetailInfo);
}
return orderDetailInfo;
}
@Override
... ...
... ... @@ -7,6 +7,7 @@ import com.yohobuy.ufo.model.order.bo.TimeoutBo;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.common.OrderListType;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
import com.yohobuy.ufo.model.order.resp.OrderListInfo;
import com.yohobuy.ufo.model.order.resp.PageResp;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
... ... @@ -58,9 +59,15 @@ public class BuyerOrderListServiceImpl extends AbsOrderListService implements IO
@Autowired
private QiniuLiveRecordService qiniuLiveRecordService;
@Override
public PageResp<OrderListInfo> getOrderList(OrderListRequest request, boolean isPlatform){
PageResp<OrderListInfo> resp = super.getOrderList(request, isPlatform);
return resp;
}
public PageResp getOrderListForErpGW(OrderListRequest request) {
return getOrderList(request, true);
return super.getOrderList(request, true);
}
/**
... ...
... ... @@ -45,6 +45,7 @@ import com.yohoufo.order.service.pay.AbstractPayService;
import com.yohoufo.order.service.proxy.InBoxFacade;
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.utils.BuyerOrderUtils;
import com.yohoufo.order.utils.LoggerUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
... ... @@ -121,15 +122,20 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
* @param orderRequest
*/
public void confirm(OrderRequest orderRequest){
OrderStatus expectStatus = OrderStatus.WAITING_RECEIVE;
// 参数检查 ![待收货] 不合法
DataNode node = checkBase(orderRequest);
BuyerOrder buyerOrder = node.buyerOrderInDB;
// 待寄存或待收货
OrderStatus expectStatus = BuyerOrderUtils.isDeposit(buyerOrder) ?
OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE : OrderStatus.WAITING_RECEIVE;
checkStatus(node,orderRequest, expectStatus);
int uid;
long orderCode;
int sellerUid = node.buyerOrderInDB.getSellerUid();
// TODO 更新状态为已收货、SKUP的状态应该还是已出售
if (1 == buyerOrderMapper.updateStatusByOrderCode(orderCode=orderRequest.getOrderCode(), uid=orderRequest.getUid(),
int uid = buyerOrder.getUid();
long orderCode = buyerOrder.getOrderCode();
int sellerUid = buyerOrder.getSellerUid();
// 更新状态为已收货、SKUP的状态应该还是已出售
if (1 == buyerOrderMapper.updateStatusByOrderCode(orderCode, uid,
expectStatus.getCode(),
OrderStatus.DONE.getCode(),
DateUtil.getCurrentTimeSecond())) {
... ... @@ -550,21 +556,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
@Override
public OrderDetailInfo getOrderDetail(OrderRequest orderRequest) {
int uid;
long orderCode;
final TabType actor = TabType.BUY;
OrderDetailInfo orderDetailInfo = orderCacheService.getOrderDetailInfo(uid = orderRequest.getUid(),
orderCode=orderRequest.getOrderCode(), actor);
if(Objects.nonNull(orderDetailInfo)){
buyerOrderDetailService.resetDynamicProporties(orderDetailInfo,orderRequest.getAppVersion());
return orderDetailInfo;
}
orderDetailInfo = buyerOrderDetailService.getOrderDetail(orderRequest);
if(Objects.nonNull(orderDetailInfo)){
orderCacheService.cacheOrderDetailInfo(uid, orderCode, actor, orderDetailInfo);
}
return orderDetailInfo;
return buyerOrderDetailService.getOrderDetail(orderRequest);
}
... ...
... ... @@ -49,7 +49,19 @@ public class DepositOrderPaymentService extends AbstractOrderPaymentService {
@Override
public OrderInfo getOrderInfo(long orderCode) {
return null;
DepositOrder depositOrder = depositOrderService.selectByOrderCode(orderCode);
return OrderInfo.builder()
.id(depositOrder.getId())
.uid(depositOrder.getUid())
.orderCode(depositOrder.getOrderCode())
.payment(depositOrder.getPayment())
.status(depositOrder.getStatus())
.amount(depositOrder.getAmount())
.createTime(depositOrder.getCreateTime())
.orderCodeType(OrderCodeType.STORAGE_MANAGEMENT)
.status(depositOrder.getStatus())
.payExpireTime(30)
.build();
}
@Override
... ... @@ -71,6 +83,8 @@ public class DepositOrderPaymentService extends AbstractOrderPaymentService {
@Override
public PrepayResponse getAppPayRequest(PaymentRequest request) {
return null;
}
... ...
... ... @@ -214,6 +214,11 @@ public class DepositServiceImpl implements DepositService {
return successList;
}
// 批量上架-查询
public List<StorageDeposit> getStorageDeposit4Publish(Integer uid, Integer storageId, int num) {
return storageDepositMapper.getDepositOffs(uid, storageId, num);
}
// 批量下架
public List<Integer> changeSaleStatusOffBatch(Integer uid, List<Integer> skupList) {
List<Integer> successList = new ArrayList<>();
... ... @@ -258,7 +263,11 @@ public class DepositServiceImpl implements DepositService {
public int getDepositOffShelvesCount(Integer uid, Integer storageId) {
return storageDepositMapper.getDepositOffShelvesCount(uid, storageId);
}
// 用户存储总数(在库)
@Override
public int getUserDepositCount(Integer uid) {
return storageDepositMapper.getUserDepositCount(uid);
}
// 剩余存储天数
@Override
public int getRemainDay(Integer uid, String depositCode) {
... ...
... ... @@ -41,17 +41,17 @@ public class QuickDeliverPublishProcessor implements PublishProcessor<QuickDeliv
.num(qdosr.getNum())
.price(qdosr.getPrice()).skupType(qdosr.getSkupTypeCode()).build();
PriceComputePrepareProcessor.PriceComputeNode icpNode = priceComputePrepareProcessor.checkAndAcquire(socr);
/*
String depositCode;
if (StringUtils.isBlank(depositCode = qdosr.getDepositCode())){
logger.warn("QuickDeliverPublishProcessor check depositCode illegal, req {} ", qdosr);
throw new UfoServiceException(400, "不是寄存商品");
}
}*/
//TODO query deposit code is exist in system
BigDecimal salePrice = icpNode.getSalePrice();
SkupType skupType = icpNode.getSkupType();
/*
int addressId = AddressUtil.getDecryptStr(qdosr.getAddressId());
if (addressId < 0){
logger.warn("QuickDeliverPublishProcessor seller submit order addressId invalidate, uid {}, storageId {}, addressId is {}",
... ... @@ -66,17 +66,17 @@ public class QuickDeliverPublishProcessor implements PublishProcessor<QuickDeliv
logger.warn("QuickDeliverPublishProcessor seller submit addressId need update, uid is {}, storageId is {}, addressId is {}",
uid, storageId, addressId);
throw new ServiceException(ServiceError.ORDER_ADDRESS_NEED_UPDATE);
}
}*/
QuickDeliverOrderContext context = new QuickDeliverOrderContext();
context.setUid(uid);
context.setStorageId(storageId);
context.setSalePrice(salePrice);
//
context.setBackAddress(noHiddenBackAddress);
context.setBackHiddenAddress(hiddenBackAddress);
//context.setBackAddress(noHiddenBackAddress);
//context.setBackHiddenAddress(hiddenBackAddress);
//
context.setSkupType(skupType);
context.setDepositCode(depositCode);
//context.setDepositCode(depositCode);
return context;
}
}
... ...