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

Commit d6c0c604 authored by 胡佳晨's avatar 胡佳晨

添加 核销时间

parent 76035019
...@@ -62,7 +62,12 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable { ...@@ -62,7 +62,12 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable {
private BigDecimal priceVoucher; private BigDecimal priceVoucher;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private String createdAt; private String createdAt;
@ApiModelProperty(value = "核销时间")
private String pushTime;
public String getPushTime() {
return pushTime==null?"":pushTime;
}
public GoblinOrderSkuVo copy(GoblinOrderSku source) { public GoblinOrderSkuVo copy(GoblinOrderSku source) {
if (null == source) return this; if (null == source) return this;
......
...@@ -125,6 +125,12 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -125,6 +125,12 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
private String mixId; private String mixId;
@ApiModelProperty(value = "混合售名称") @ApiModelProperty(value = "混合售名称")
private String mixName; private String mixName;
@ApiModelProperty(value = "核销时间")
private String pushTime;
public String getPushTime() {
return pushTime==null?"":pushTime;
}
public BigDecimal getPriceModify() { public BigDecimal getPriceModify() {
if (priceModify == null) { if (priceModify == null) {
......
...@@ -68,3 +68,9 @@ ALTER TABLE goblin_nft_order ...@@ -68,3 +68,9 @@ ALTER TABLE goblin_nft_order
ADD mix_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组合售id'; ADD mix_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组合售id';
ALTER TABLE goblin_store_order ALTER TABLE goblin_store_order
ADD mix_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组合售id'; ADD mix_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组合售id';
-- 2022年07月28日11:00:36 增加 核销时间字段
ALTER TABLE goblin_order_sku
ADD push_time datetime DEFAULT NULL COMMENT '核销时间';
ALTER TABLE goblin_store_order
ADD push_time datetime DEFAULT NULL COMMENT '核销时间';
\ No newline at end of file
...@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service; ...@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -91,8 +92,8 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -91,8 +92,8 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
LinkedList<String> sqls = CollectionUtil.linkedListString(); LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlDataOrder = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> sqlDataOrder = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> sqlDataSku = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> sqlDataSku = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("goblin_order.store.orderStatus")); sqls.add(SqlMapping.get("goblin_order.store.orderPush"));
sqls.add(SqlMapping.get("goblin_order.store.orderSkuStatus")); sqls.add(SqlMapping.get("goblin_order.store.orderSkuPush"));
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) { if (storeInfoVo == null) {
...@@ -103,7 +104,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -103,7 +104,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
} else { } else {
for (String orderId : orderIds) { for (String orderId : orderIds) {
GoblinStoreOrderVo storeOrderVo = redisUtils.getGoblinOrder(orderId); GoblinStoreOrderVo storeOrderVo = redisUtils.getGoblinOrder(orderId);
if (!storeInfoVo.getStoreId().equals(storeOrderVo.getStoreId())|| !(storeOrderVo.getWriteOffCode().equals(offCode))) { if (!storeInfoVo.getStoreId().equals(storeOrderVo.getStoreId()) || !(storeOrderVo.getWriteOffCode().equals(offCode))) {
continue; continue;
} }
if (storeOrderVo.getStatus().equals(GoblinStatusConst.Status.ORDER_STATUS_0.getValue())) { if (storeOrderVo.getStatus().equals(GoblinStatusConst.Status.ORDER_STATUS_0.getValue())) {
...@@ -117,16 +118,18 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -117,16 +118,18 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
} }
storeOrderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue()); storeOrderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
storeOrderVo.setZhengzaiStatus(1); storeOrderVo.setZhengzaiStatus(1);
storeOrderVo.setPushTime(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
sqlDataOrder.add(new Object[]{ sqlDataOrder.add(new Object[]{
storeOrderVo.getStatus(),storeOrderVo.getZhengzaiStatus(), now, storeOrderVo.getStatus(), storeOrderVo.getZhengzaiStatus(), now, now,
storeOrderVo.getOrderId(), now, now storeOrderVo.getOrderId(), now, now
}); });
List<String> skuIds = storeOrderVo.getOrderSkuVoIds(); List<String> skuIds = storeOrderVo.getOrderSkuVoIds();
for (String skuId : skuIds) { for (String skuId : skuIds) {
GoblinOrderSkuVo skuInfoVo = redisUtils.getGoblinOrderSkuVo(skuId); GoblinOrderSkuVo skuInfoVo = redisUtils.getGoblinOrderSkuVo(skuId);
skuInfoVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue()); skuInfoVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
skuInfoVo.setPushTime(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
sqlDataSku.add(new Object[]{ sqlDataSku.add(new Object[]{
skuInfoVo.getStatus(), now, skuInfoVo.getStatus(), now, now,
skuInfoVo.getOrderSkuId(), now, now skuInfoVo.getOrderSkuId(), now, now
}); });
redisUtils.setGoblinOrderSku(skuInfoVo.getOrderSkuId(), skuInfoVo); redisUtils.setGoblinOrderSku(skuInfoVo.getOrderSkuId(), skuInfoVo);
...@@ -202,7 +205,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService { ...@@ -202,7 +205,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
mongoUtils.updateGoblinStoreOrderVo(storeOrderVo.getOrderId(), storeOrderVo); mongoUtils.updateGoblinStoreOrderVo(storeOrderVo.getOrderId(), storeOrderVo);
//redis //redis
redisUtils.setGoblinOrder(storeOrderVo.getOrderId(), storeOrderVo); redisUtils.setGoblinOrder(storeOrderVo.getOrderId(), storeOrderVo);
redisUtils.addZhengzaiOrderList(uid,orderId); redisUtils.addZhengzaiOrderList(uid, orderId);
//mysql //mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("goblin_order.zhengzai.bind", SqlMapping.get("goblin_order.zhengzai.bind",
......
...@@ -94,6 +94,9 @@ goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,st ...@@ -94,6 +94,9 @@ goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,st
#---- \u5546\u94FA\u8BA2\u5355\u64CD\u4F5C #---- \u5546\u94FA\u8BA2\u5355\u64CD\u4F5C
goblin_order.store.cancel=UPDATE goblin_store_order SET status = ? ,cancel_time = ? , cancel_reason = ? , 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 status = ? ,cancel_time = ? , cancel_reason = ? , 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)
goblin_order.store.orderSkuPush=UPDATE goblin_order_sku SET status = ? , updated_at = ?,push_time = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderPush=UPDATE goblin_store_order SET status = ? ,zhengzai_status=?, updated_at = ?,push_time = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.express=UPDATE goblin_store_order SET status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.express=UPDATE goblin_store_order SET status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.mail=INSERT INTO goblin_mail (`mail_id`,`order_id`,`mail_no`,`delivery_time`,`logistics_company`,`order_sku_ids`,`created_at`) VALUES (?,?,?,?,?,?,?) goblin_order.mail=INSERT INTO goblin_mail (`mail_id`,`order_id`,`mail_no`,`delivery_time`,`logistics_company`,`order_sku_ids`,`created_at`) VALUES (?,?,?,?,?,?,?)
goblin_order.mail.update=UPDATE goblin_mail SET mail_no = ? , updated_at = ? WHERE mail_id = ? goblin_order.mail.update=UPDATE goblin_mail SET mail_no = ? , updated_at = ? WHERE mail_id = ?
......
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