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

Commit c9707e38 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents 2a0545d9 b9df4d2c
...@@ -46,6 +46,8 @@ public class GoblinBackOrderVo implements Serializable, Cloneable { ...@@ -46,6 +46,8 @@ public class GoblinBackOrderVo implements Serializable, Cloneable {
private Integer type; private Integer type;
@ApiModelProperty(value = "退款/退货原因[1-不想买了|2-收货人信息有误|3-未按指定时间发货|4-其他|5-不想买了|6-商品质量问题|7-收到商品与描述不符|8-商铺发起|9-系统自动申请]") @ApiModelProperty(value = "退款/退货原因[1-不想买了|2-收货人信息有误|3-未按指定时间发货|4-其他|5-不想买了|6-商品质量问题|7-收到商品与描述不符|8-商铺发起|9-系统自动申请]")
private String reason; private String reason;
@ApiModelProperty(value = "退款拒绝原因")
private String refuseReason;
@ApiModelProperty(value = "问题说明") @ApiModelProperty(value = "问题说明")
private String describes; private String describes;
@ApiModelProperty(value = "申请凭据[0-没有任何凭据|1-有发票|2-有质检报告]") @ApiModelProperty(value = "申请凭据[0-没有任何凭据|1-有发票|2-有质检报告]")
......
package com.liquidnet.service.goblin.entity; package com.liquidnet.service.goblin.entity;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -18,7 +21,7 @@ import lombok.EqualsAndHashCode; ...@@ -18,7 +21,7 @@ import lombok.EqualsAndHashCode;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class GoblinBackOrder implements Serializable,Cloneable { public class GoblinBackOrder implements Serializable, Cloneable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -120,6 +123,14 @@ public class GoblinBackOrder implements Serializable,Cloneable { ...@@ -120,6 +123,14 @@ public class GoblinBackOrder implements Serializable,Cloneable {
*/ */
private String mailNo; private String mailNo;
private String refuseReason;
private LocalDateTime auditAt;
private LocalDateTime expireAt;
private LocalDateTime refundAt;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
......
...@@ -140,12 +140,14 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -140,12 +140,14 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
public ResponseDto<Boolean> agreeRefund(String backOrderId) { public ResponseDto<Boolean> agreeRefund(String backOrderId) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) { if (storeInfoVo == null) {
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
} }
GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId); GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId);
backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue()); backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue());
backOrderVo.setAuditAt(nowStr);
//添加日志 //添加日志
GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now); GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now);
backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue()); backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue());
...@@ -170,7 +172,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -170,7 +172,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
queueUtils.sendMsgByRedis( queueUtils.sendMsgByRedis(
MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("goblin_order.store.applyRefund", SqlMapping.get("goblin_order.store.applyRefund",
backOrderVo.getStatus(),backOrderVo.getReason(), now, backOrderVo.getStatus(), backOrderVo.getReason(), backOrderVo.getAuditAt(), now,
backOrderId, now, now backOrderId, now, now
) )
); );
...@@ -189,12 +191,14 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -189,12 +191,14 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
public ResponseDto<Boolean> refusedRefund(String backOrderId) { public ResponseDto<Boolean> refusedRefund(String backOrderId) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) { if (storeInfoVo == null) {
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
} }
GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId); GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId);
backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_3.getValue()); backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_3.getValue());
backOrderVo.setAuditAt(nowStr);
//添加日志 //添加日志
GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now); GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now);
backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue()); backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue());
...@@ -208,7 +212,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -208,7 +212,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
queueUtils.sendMsgByRedis( queueUtils.sendMsgByRedis(
MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("goblin_order.store.backOrderStatus", SqlMapping.get("goblin_order.store.backOrderStatus",
backOrderVo.getStatus(), now, backOrderVo.getStatus(),backOrderVo.getAuditAt(), now,
backOrderId, now, now backOrderId, now, now
) )
); );
...@@ -245,7 +249,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -245,7 +249,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now); GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now);
backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue()); backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue());
backOrderLog.setOperationType(GoblinStatusConst.Type.OPERATION_TYPE_2.getValue()); backOrderLog.setOperationType(GoblinStatusConst.Type.OPERATION_TYPE_2.getValue());
backOrderLog.setMessage("商户退款-修改sku价格:backOrderId=[" + backOrderId + "],refundPrice=["+refundPrice+"],orderSkuId=["+orderSkuId+"]"); backOrderLog.setMessage("商户退款-修改sku价格:backOrderId=[" + backOrderId + "],refundPrice=[" + refundPrice + "],orderSkuId=[" + orderSkuId + "]");
//redis //redis
redisUtils.setBackOrderVo(backOrderId, backOrderVo); redisUtils.setBackOrderVo(backOrderId, backOrderVo);
//mongo //mongo
......
...@@ -163,7 +163,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -163,7 +163,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_5.getValue()); orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_5.getValue());
orderVo.setCancelReason("商铺取消"); orderVo.setCancelReason("商铺取消");
orderVo.setCancelTime(nowStr); orderVo.setCancelTime(nowStr);
for (String orderSkuId: orderVo.getOrderSkuVoIds()) { for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_5.getValue()); orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_5.getValue());
//redis //redis
...@@ -375,6 +375,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -375,6 +375,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
goblinBackOrder.setDescribes("店铺退款"); goblinBackOrder.setDescribes("店铺退款");
goblinBackOrder.setRealBackPrice(price); goblinBackOrder.setRealBackPrice(price);
goblinBackOrder.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue()); goblinBackOrder.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue());
goblinBackOrder.setAuditAt(now);
goblinBackOrder.setCreatedAt(now); goblinBackOrder.setCreatedAt(now);
GoblinBackOrderVo backOrderVo = GoblinBackOrderVo.getNew(); GoblinBackOrderVo backOrderVo = GoblinBackOrderVo.getNew();
BeanUtils.copyProperties(goblinBackOrder, backOrderVo); BeanUtils.copyProperties(goblinBackOrder, backOrderVo);
...@@ -419,7 +420,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -419,7 +420,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
goblinBackOrder.getOrderCode(), goblinBackOrder.getStoreId(), goblinBackOrder.getUserId(), goblinBackOrder.getOrderCode(), goblinBackOrder.getStoreId(), goblinBackOrder.getUserId(),
goblinBackOrder.getSkuIdNums(), goblinBackOrder.getType(), goblinBackOrder.getReason(), goblinBackOrder.getSkuIdNums(), goblinBackOrder.getType(), goblinBackOrder.getReason(),
goblinBackOrder.getDescribes(), goblinBackOrder.getRealBackPrice(), goblinBackOrder.getStatus(), goblinBackOrder.getDescribes(), goblinBackOrder.getRealBackPrice(), goblinBackOrder.getStatus(),
goblinBackOrder.getCreatedAt() goblinBackOrder.getCreatedAt(), goblinBackOrder.getAuditAt()
) )
); );
//添加日志 //添加日志
...@@ -461,7 +462,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -461,7 +462,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
orderVo.setDeliveryTime(nowStr); orderVo.setDeliveryTime(nowStr);
orderVo.setLogisticsCompany("松鼠德邦"); orderVo.setLogisticsCompany("松鼠德邦");
orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue()); orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue());
for (String orderSkuId: orderVo.getOrderSkuVoIds()) { for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue()); orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue());
//redis //redis
...@@ -501,6 +502,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -501,6 +502,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
@Override @Override
public String refundSyncOrder(RefundCallbackParam refundCallbackParam) { public String refundSyncOrder(RefundCallbackParam refundCallbackParam) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime();
log.info("refundCallback订单退款回调参数: [RefundCallbackParam={}]", refundCallbackParam); log.info("refundCallback订单退款回调参数: [RefundCallbackParam={}]", refundCallbackParam);
GoblinBackOrderVo backOrderVo = mongoUtils.getGoblinBackOrderVoByBackCode(refundCallbackParam.getRefundCode()); GoblinBackOrderVo backOrderVo = mongoUtils.getGoblinBackOrderVoByBackCode(refundCallbackParam.getRefundCode());
if (backOrderVo == null) { if (backOrderVo == null) {
...@@ -533,6 +535,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -533,6 +535,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue()); orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
} }
backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_2.getValue()); backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_2.getValue());
backOrderVo.setRefundAt(nowStr);
for (GoblinBackOrderSkuVo backOrderSkuVo : backOrderSkuVos) { for (GoblinBackOrderSkuVo backOrderSkuVo : backOrderSkuVos) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(backOrderSkuVo.getOrderSkuId()); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(backOrderSkuVo.getOrderSkuId());
orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund().add(price)); orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund().add(price));
...@@ -581,7 +584,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -581,7 +584,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
orderId, now, now orderId, now, now
}); });
sqlsBackOrder.add(new Object[]{ sqlsBackOrder.add(new Object[]{
backOrderVo.getStatus(), now, backOrderVo.getBackOrderId(), now, now backOrderVo.getStatus(), now, now, backOrderVo.getBackOrderId(), now, now
}); });
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.gets(sqls, sqlsOrder, sqlsOrderSku, sqlsBackOrder)); SqlMapping.gets(sqls, sqlsOrder, sqlsOrderSku, sqlsBackOrder));
......
...@@ -81,16 +81,16 @@ goblin_order.store.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,p ...@@ -81,16 +81,16 @@ goblin_order.store.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,p
goblin_order.store.log = INSERT INTO goblin_order_operation_log (`order_log_id`,`order_id`,`type`,`remark`,`operation_name`,`created_at`) VALUES(?,?,?,?,?,?) goblin_order.store.log = INSERT INTO goblin_order_operation_log (`order_log_id`,`order_id`,`type`,`remark`,`operation_name`,`created_at`) VALUES(?,?,?,?,?,?)
goblin_order.store.refundLog = INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?) goblin_order.store.refundLog = INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?)
goblin_order.store.orderExpressPrice=UPDATE goblin_store_order SET price_total =? , price_modify = ? ,price_voucher = ? , price_actual = ? ,price_express = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.orderExpressPrice=UPDATE goblin_store_order SET price_total =? , price_modify = ? ,price_voucher = ? , price_actual = ? ,price_express = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_order.store.refundPrice=UPDATE goblin_store_order SET price_refund = ? ,status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.refundPrice=UPDATE goblin_store_order SET price_refund = ? ,status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.refundSkuPrice=UPDATE goblin_order_sku SET price_refund = ? ,status = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.refundSkuPrice=UPDATE goblin_order_sku SET price_refund = ? ,status = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.refundBackOrder=UPDATE goblin_back_order SET status = ? , updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.refundBackOrder=UPDATE goblin_back_order SET status = ? ,refund_at=?, updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.changeExpress=UPDATE goblin_back_order SET real_back_price = ? ,back_price_express = ? updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.changeExpress=UPDATE goblin_back_order SET real_back_price = ? ,back_price_express = ? updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.changeSku=UPDATE goblin_back_order SET real_back_price = ? , updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.changeSku=UPDATE goblin_back_order SET real_back_price = ? , updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.backOrderStatus=UPDATE goblin_back_order SET status = ? , updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.backOrderStatus=UPDATE goblin_back_order SET status = ? , audit_at=?,updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderStatus=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.orderStatus=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.applyRefund=UPDATE goblin_back_order SET status = ? ,reason=?, updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.applyRefund=UPDATE goblin_back_order SET status = ? ,reason=?,audit_at=?, updated_at = ? WHERE back_order_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