vip购买相关
This commit is contained in:
@@ -19,4 +19,6 @@ public interface BuyOrderService extends IService<BuyOrder> {
|
||||
Map<String,Object> commonOrderDetail(Map params);
|
||||
|
||||
ExpressQueryResponse commonExpressDetail(Map params);
|
||||
|
||||
void updateOrderStatus(Integer userId, String orderSn, String type);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -144,6 +146,31 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOrderStatus(Integer userId, String orderSn, String type) {
|
||||
|
||||
// 支付成功 0
|
||||
|
||||
// 发货成功 1
|
||||
|
||||
// 交易成功 2
|
||||
|
||||
// 交易失败 9
|
||||
BuyOrder orderEntity = this.getOne(new QueryWrapper<BuyOrder>().eq("user_id", userId)
|
||||
.eq("order_sn", orderSn));
|
||||
if (type.equals("0")) {
|
||||
orderEntity.setPaymentDate(new Date());
|
||||
orderEntity.setOrderStatus("1");
|
||||
} else if (type.equals("9")) {
|
||||
orderEntity.setOrderStatus("4");
|
||||
} else if (type.equals("1")) {
|
||||
orderEntity.setOrderStatus("2");
|
||||
} else if (type.equals("2")) {
|
||||
orderEntity.setOrderStatus("3");
|
||||
}
|
||||
updateById(orderEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressQueryResponse commonExpressDetail(Map params) {
|
||||
LambdaQueryWrapper<ExpressOrder> expressOrderWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
Reference in New Issue
Block a user