Authored by mali

Merge branch 'master' of http://git.yoho.cn/ufo/yohoufo-fore

... ... @@ -59,6 +59,7 @@
#{item}
</foreach>
</if>
order by create_time desc, update_time desc
limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
</select>
... ... @@ -327,6 +328,7 @@
<select id="selectListBySellerUidStatus" resultMap="BaseResultMap">
select <include refid="Base_Column_List" /> from buyer_order
where <include refid="sql_where_4_select_SellerUidStatus"/>
order by create_time desc, update_time desc
limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
</select>
... ...
... ... @@ -62,7 +62,7 @@
<foreach collection="skupList" item="skup" open="(" separator="," close=")">
#{skup,jdbcType=INTEGER}
</foreach>
order by create_time desc, update_time desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
... ...
... ... @@ -12,7 +12,7 @@ public enum SkupStatus {
/**
* 售出
*/
SELL_OUT(2, "售出", new Node(null, null, null)),
SELL_OUT(2, "售出", new Node()),
/**
* 可售(已支付)
*/
... ... @@ -20,7 +20,8 @@ public enum SkupStatus {
new Node(
Arrays.asList(ButtonShow.NOT_SOLD.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.NOT_SOLD.getBo()),
OrderDetailDesc.Seller.PAY_FINISH
OrderDetailDesc.Seller.PAY_FINISH,
OrderDetailDesc.PaymentTips.AUTO_RETURN_SELLER
)
),
/**
... ... @@ -30,7 +31,8 @@ public enum SkupStatus {
new Node(
Arrays.asList(ButtonShow.NOT_SOLD.getBo(), ButtonShow.PAY_EARNESTMONEY.getBo()),
Arrays.asList(ButtonShow.NOT_SOLD.getBo(), ButtonShow.PAY_EARNESTMONEY.getBo()),
OrderDetailDesc.Seller.WAIT_PAY
OrderDetailDesc.Seller.WAIT_PAY,
OrderDetailDesc.PaymentTips.AUTO_RETURN_SELLER
)
),
... ... @@ -52,14 +54,16 @@ public enum SkupStatus {
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN.getBo(), ButtonShow.DEL_ORDER.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.DEL_ORDER.getBo(), ButtonShow.SOLD_AGAIN.getBo()),
OrderDetailDesc.Seller.SELF_CANCEL_BEFORE_EXIST_BUY
OrderDetailDesc.Seller.SELF_CANCEL_BEFORE_EXIST_BUY,
OrderDetailDesc.PaymentTips.FINISH_RETURN_SELLER
)
),
YOHO_CANCEL_SELL(23, "上架关闭(平台取消出售)",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN.getBo(), ButtonShow.DEL_ORDER.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.DEL_ORDER.getBo(), ButtonShow.SOLD_AGAIN.getBo()),
OrderDetailDesc.Seller.YOHO_CANCEL_BEFORE_EXIST_BUY
OrderDetailDesc.Seller.YOHO_CANCEL_BEFORE_EXIST_BUY,
OrderDetailDesc.PaymentTips.FINISH_RETURN_SELLER
)
)
;
... ... @@ -84,10 +88,25 @@ public enum SkupStatus {
String detailShowDesc;
public Node(List<ButtonShowBo> listButtons, List<ButtonShowBo> detailButtons, String desc) {
String paymentTips;
public Node() {
}
public Node(List<ButtonShowBo> listButtons, List<ButtonShowBo> detailButtons, String desc){
this.listButtons = listButtons;
this.detailButtons = detailButtons;
this.detailShowDesc = desc;
}
public Node(List<ButtonShowBo> listButtons, List<ButtonShowBo> detailButtons, String desc, String paymentTips) {
this.listButtons = listButtons;
this.detailButtons = detailButtons;
this.detailShowDesc = desc;
this.paymentTips = paymentTips;
}
}
... ... @@ -108,6 +127,9 @@ public enum SkupStatus {
return code;
}
public String getPaymentTips() {
return node.paymentTips;
}
public List<ButtonShowBo> getListButtons() {
return node.listButtons;
... ...
... ... @@ -94,4 +94,13 @@ public interface OrderDetailDesc {
}
interface PaymentTips{
String AUTO_RETURN_SELLER = "交易成功后自动退还";
String FINISH_RETURN_SELLER = "已退还至您的支付账户,预计到账1-5天,请注意查收";
}
}
... ...
package com.yohoufo.order.model.response;
import com.yoho.service.model.response.UserAddressRspBO;
import com.yohobuy.ufo.model.order.bo.PlatformFee;
import com.yohoufo.order.common.ButtonShow;
import com.yohoufo.order.model.AddressInfo;
import com.yohoufo.order.model.bo.ButtonShowBo;
import lombok.Data;
... ... @@ -67,6 +65,9 @@ public class OrderDetailInfo {
private String bankTransferFee;
private String createTime;
@Builder
@Data
public static class StatusDetail{
... ... @@ -102,8 +103,10 @@ public class OrderDetailInfo {
* 发货时间点
*/
String sendOutTimeStr;
/**
* 支付提示
*/
String paymentTips;
}
@Data
... ...
package com.yohoufo.order.model.response;
import com.yohoufo.order.common.ButtonShow;
import com.yohoufo.order.model.bo.ButtonShowBo;
import lombok.Data;
... ... @@ -40,4 +39,7 @@ public class OrderListInfo {
* 按钮显示
*/
List<ButtonShowBo> buttons;
String createTime;
}
... ...
... ... @@ -134,6 +134,7 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{
orderDetailInfo.setPayment(buyerOrder.getPayment());
}
}
orderDetailInfo.setCreateTime(DateUtil.formatDate(buyerOrder.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
return orderDetailInfo;
}
... ...
... ... @@ -156,6 +156,7 @@ public abstract class AbsOrderListService implements IOrderListService{
goodsInfo.setProductId(sellerOrderGoods.getProductId());
orderListInfo.setGoodsInfo(goodsInfo);
orderListInfo.setCreateTime(DateUtil.formatDate(buyerOrder.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
return orderListInfo;
}
}
... ...
... ... @@ -75,19 +75,20 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
/**
* 获取详情页 状态位明细
* @param order
* @param orderStatus
* @param skupStatus
* @return
*/
private OrderDetailInfo.StatusDetail getStatusDetail(SellerOrder order,
SkupStatus orderStatus) {
SkupStatus skupStatus) {
OrderDetailInfo.StatusDetail statusDetail = OrderDetailInfo.StatusDetail.builder()
.status(orderStatus.getCode())
.statuStr(orderStatus.getDesc())
.detailDesc(orderStatus.getDetailShowDesc())
.status(skupStatus.getCode())
.statuStr(skupStatus.getDesc())
.detailDesc(skupStatus.getDetailShowDesc())
.paymentTips(skupStatus.getPaymentTips())
.build();
// 待付款时,剩余时间
if (orderStatus.getCode() == SkupStatus.CAN_NOT_SELL.getCode()){
if (skupStatus.getCode() == SkupStatus.CAN_NOT_SELL.getCode()){
statusDetail.setLeftTime(DateUtil.getCurrentTimeSecond() - order.getCreateTime());
}
... ... @@ -128,6 +129,8 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
orderDetailInfo.setPayment(order.getPayment());
}
}
orderDetailInfo.setCreateTime(DateUtil.formatDate(order.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
return orderDetailInfo;
}
... ...
... ... @@ -123,6 +123,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
goodsInfo.setStorageId(sellerOrderGoods.getStorageId());
orderListInfo.setGoodsInfo(goodsInfo);
orderListInfo.setCreateTime(DateUtil.formatDate(sellerOrder.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
return orderListInfo;
}
... ...
... ... @@ -25,6 +25,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.math.BigDecimal;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@Service
... ... @@ -50,7 +51,8 @@ public class ShoppingServiceImpl implements IShoppingService {
@Autowired
private UserProxyService userProxyService;
@Value("${buyer.delivery.way.cost.sf:15}")
private double delivery_way_sf_cost;
/**
* 结算页数据
* @param request
... ... @@ -72,7 +74,8 @@ public class ShoppingServiceImpl implements IShoppingService {
response.setDeliveryWay(shoppingSupport.getDeliverWay());
response.setGood(shoppingSupport.getGoodsInfo(skupGood));
response.setPromotionFormulaList(shoppingSupport.getPromotionFormula(skupGood));
response.setAmount(skupGood.getGoodsPrice().add(new BigDecimal(OrderConstant.DELIVERY_WAY_SF_COST)).toString());
response.setAmount(skupGood.getGoodsPrice().add(new BigDecimal(delivery_way_sf_cost))
.setScale(2,BigDecimal.ROUND_HALF_UP).toPlainString());
// TODO 赔偿金计算
... ...
... ... @@ -85,6 +85,6 @@ redis.proxy.address=192.168.102.45
redis.proxy.auth=redis9646
redis.proxy.port=6379
buyer.delivery.way.cost.sf=0
order.seller.earnestmoney.min=0.01
order.seller.earnestmoney.max=200
\ No newline at end of file
... ...
... ... @@ -55,5 +55,6 @@ wechat.app.appid=wx049fdaa3ba9cdd7a
wechat.notifyurl=${wechat.notifyurl}
alipay.notifyurl=${alipay.notifyurl}
buyer.delivery.way.cost.sf=0
order.seller.earnestmoney.min=0.01
order.seller.earnestmoney.max=200
\ No newline at end of file
... ...