记得上下班打卡 | git大法好,push需谨慎

Commit 69b1cf18 authored by 胡佳晨's avatar 胡佳晨

正在下单相关-店铺

正在下单-出货
parent f2792ce4
...@@ -22,7 +22,7 @@ import java.time.LocalDateTime; ...@@ -22,7 +22,7 @@ import java.time.LocalDateTime;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class GoblinOrderAttrVo implements Serializable,Cloneable { public class GoblinOrderAttrVo implements Serializable,Cloneable {
@ApiModelProperty(value = " 住建id") @ApiModelProperty(value = " 主键id")
private String orderAttrId; private String orderAttrId;
@ApiModelProperty(value = " 订单id") @ApiModelProperty(value = " 订单id")
private String orderId; private String orderId;
......
...@@ -54,8 +54,10 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -54,8 +54,10 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
private BigDecimal priceCoupon; private BigDecimal priceCoupon;
@ApiModelProperty(value = " 总优惠价格") @ApiModelProperty(value = " 总优惠价格")
private BigDecimal priceVoucher; private BigDecimal priceVoucher;
@ApiModelProperty(value = " 订单状态[0-待付款(用户刚下单)|2-代发货(用户付完款 等待商城发货)3-代收货(商城已经发货 等待用户确认收货)|4-已完成(用户已经确认收货 订单结束)|5-取消订单(用户未付款前取消订单)|6-退款通过(用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)|7-退货通过(用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)]") @ApiModelProperty(value = "订单状态[0-待付款(用户刚下单)|2-代发货(用户付完款 等待商城发货)3-代收货(商城已经发货 等待用户确认收货)|4-已完成(用户已经确认收货 订单结束)|5-取消订单(用户未付款前取消订单)|6-退款通过(用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)|7-退货通过(用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)]")
private Integer status; private Integer status;
@ApiModelProperty(value = "正在下单是否出货[0-未出货|1-已出货]")
private Integer zhengzaiStatus;
@ApiModelProperty(value = " 券id") @ApiModelProperty(value = " 券id")
private String ucouponId; private String ucouponId;
@ApiModelProperty(value = " 支付类型[wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付]") @ApiModelProperty(value = " 支付类型[wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付]")
......
...@@ -24,4 +24,6 @@ public interface IGoblinStoreZhengzaiService { ...@@ -24,4 +24,6 @@ public interface IGoblinStoreZhengzaiService {
ResponseDto<List<GoblinZhengzaiGoodVo>> getSpuList(String marketId); ResponseDto<List<GoblinZhengzaiGoodVo>> getSpuList(String marketId);
ResponseDto<List<GoblinAppOrderListVo>> orderList(int page); ResponseDto<List<GoblinAppOrderListVo>> orderList(int page);
ResponseDto<Boolean> orderPush(String orderMasterCode);
} }
...@@ -125,6 +125,10 @@ public class GoblinStoreOrder implements Serializable,Cloneable { ...@@ -125,6 +125,10 @@ public class GoblinStoreOrder implements Serializable,Cloneable {
*/ */
private Integer status; private Integer status;
/**
* 正在下单是否出货[0-未出货|1-已出货]
*/
private Integer zhengzaiStatus;
/** /**
* 预售订单状态[0-第一阶段未支付|1-第一阶段支付第二阶段未支付|3-第二阶段支付] * 预售订单状态[0-第一阶段未支付|1-第一阶段支付第二阶段未支付|3-第二阶段支付]
*/ */
......
...@@ -62,6 +62,16 @@ public class GoblinStoreZhengzaiController { ...@@ -62,6 +62,16 @@ public class GoblinStoreZhengzaiController {
return goblinStoreZhengzaiService.orderList(page); return goblinStoreZhengzaiService.orderList(page);
} }
@PostMapping("orderPush")
@ApiOperation("正在下单-出货")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderMasterCode", value = "主订单号"),
})
public ResponseDto<Boolean> orderPush(@RequestParam("orderMasterCode") @Valid String orderMasterCode) {
return goblinStoreZhengzaiService.orderPush(orderMasterCode);
}
@PostMapping("listByCode") @PostMapping("listByCode")
@ApiOperation("列表[根据masterCode]") @ApiOperation("列表[根据masterCode]")
@ApiImplicitParams({ @ApiImplicitParams({
......
package com.liquidnet.service.goblin.service.impl; package com.liquidnet.service.goblin.service.impl;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.CurrentUtil; import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.constant.GoblinStatusConst; import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.vo.*; import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.service.IGoblinStoreZhengzaiService; import com.liquidnet.service.goblin.service.IGoblinStoreZhengzaiService;
...@@ -14,8 +17,10 @@ import org.springframework.beans.BeanUtils; ...@@ -14,8 +17,10 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -86,7 +91,7 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi ...@@ -86,7 +91,7 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
List<GoblinAppOrderListVo> orderVoList = ObjectUtil.goblinAppOrderListVoArrayList(); List<GoblinAppOrderListVo> orderVoList = ObjectUtil.goblinAppOrderListVoArrayList();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
List<GoblinStoreOrderVo> mongoVoList = mongoUtils.storeZhengzaiOrderList(page,storeInfoVo.getStoreId()); List<GoblinStoreOrderVo> mongoVoList = mongoUtils.storeZhengzaiOrderList(page, storeInfoVo.getStoreId());
for (GoblinStoreOrderVo orderVo : mongoVoList) { for (GoblinStoreOrderVo orderVo : mongoVoList) {
GoblinAppOrderListVo vo = GoblinAppOrderListVo.getNew(); GoblinAppOrderListVo vo = GoblinAppOrderListVo.getNew();
BeanUtils.copyProperties(orderVo, vo); BeanUtils.copyProperties(orderVo, vo);
...@@ -102,6 +107,32 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi ...@@ -102,6 +107,32 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi
return ResponseDto.success(orderVoList); return ResponseDto.success(orderVoList);
} }
@Override
public ResponseDto<Boolean> orderPush(String orderMasterCode) {
String[] orderIds = redisUtils.getMasterCode(orderMasterCode);
LocalDateTime now = LocalDateTime.now();
LinkedList<Object[]> sqlDataOrder = CollectionUtil.linkedListObjectArr();
if (orderIds == null) {
return ResponseDto.failure("订单不存在");
} else {
for (String orderId : orderIds) {
GoblinStoreOrderVo storeOrderVo = redisUtils.getGoblinOrder(orderId);
storeOrderVo.setZhengzaiStatus(1);
//mongo
mongoUtils.updateGoblinStoreOrderVo(storeOrderVo.getOrderId(), storeOrderVo);
//redis
redisUtils.setGoblinOrder(storeOrderVo.getOrderId(), storeOrderVo);
sqlDataOrder.add(new Object[]{
1, now, storeOrderVo.getOrderId(), now, now
});
}
//mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("goblin_order.zhengzai.bind", sqlDataOrder));
}
return ResponseDto.success();
}
//获取 订单剩余可支付时间[S] //获取 订单剩余可支付时间[S]
private long getRestTime(GoblinStoreOrderVo orderVo) { private long getRestTime(GoblinStoreOrderVo orderVo) {
long restTime = 0L; long restTime = 0L;
......
...@@ -74,8 +74,9 @@ goblin_order.pay.order=UPDATE goblin_store_order SET payment_type = ? ,payment_i ...@@ -74,8 +74,9 @@ goblin_order.pay.order=UPDATE goblin_store_order SET payment_type = ? ,payment_i
goblin_order.pay.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.pay.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#---- 再次支付 #---- 再次支付
goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from = ? ,pay_code = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from = ? ,pay_code = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#---- 订单绑定[正在下单] #---- 订单绑定[正在下单] 出货
goblin_order.zhengzai.bind=UPDATE goblin_store_order SET uid = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.zhengzai.bind=UPDATE goblin_store_order SET uid = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#---- 商铺订单操作 #---- 商铺订单操作
goblin_order.store.cancel=UPDATE goblin_store_order SET mailNo = ? ,delivery_time = ? , logistics_company = ? , status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.cancel=UPDATE goblin_store_order SET mailNo = ? ,delivery_time = ? , logistics_company = ? , status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderSkuStatus=UPDATE goblin_order_sku SET status = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.orderSkuStatus=UPDATE goblin_order_sku SET status = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment