Authored by mali

寄存订单支付回调

package com.yohoufo.common.utils;
import org.slf4j.helpers.MessageFormatter;
/**
* Created by li.ma on 2019/7/9.
*/
public class StringUtil {
public static String getReplacedContent(String content ,Object... params) {
return MessageFormatter.arrayFormat(content, params).getMessage();
}
}
... ...
package com.yohoufo.dal.order.model;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.*;
import java.math.BigDecimal;
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class DepositOrder {
private Integer id;
... ...
... ... @@ -14,6 +14,7 @@ import com.yohobuy.ufo.model.order.resp.DepositOrderComputeResp;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.common.utils.StringUtil;
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
import com.yohoufo.dal.order.DepositOrderMapper;
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
... ... @@ -76,11 +77,7 @@ public class DepositOrderService {
StorageDeposit storageDeposit = storageDepositMapper.selectByDepositCode(req.getUid(), req.getDepositCode());
// TODO 不存在的时候有异常
Integer depositEndTime = storageDeposit.getDepositEndTime();
int depositRemainDay = 45;
if (null != depositEndTime) {
depositRemainDay = depositService.getRemainDay(req.getUid(), req.getDepositCode());
}
int depositRemainDay = depositService.getRemainDay(req.getUid(), req.getDepositCode()); // 还可存放多久 单位天
Integer skup = storageDeposit.getSkup();
Long orderCode = storageDeposit.getOrderCode();
... ... @@ -127,7 +124,7 @@ public class DepositOrderService {
}
private String getReplacedContent(String content ,Object... params) {
return MessageFormatter.arrayFormat(content, params).getMessage();
return StringUtil.getReplacedContent(content, params);
}
public void updateByOrderCode(DepositOrder order) {
... ...