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

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

修改接口文档

parent 9a9cbd37
...@@ -21,6 +21,8 @@ public class GoblinStoreOrderListSkuVo implements Cloneable { ...@@ -21,6 +21,8 @@ public class GoblinStoreOrderListSkuVo implements Cloneable {
private String skuImage; private String skuImage;
@ApiModelProperty(value = " 数量") @ApiModelProperty(value = " 数量")
private Integer num; private Integer num;
@ApiModelProperty(value = "订单状态[0-待付款(用户刚下单)|2-代发货(用户付完款 等待商城发货)|3-代收货(商城已经发货 等待用户确认收货)|4-已完成(用户已经确认收货 订单结束)|5-取消订单(用户未付款前取消订单)|6-退款通过(用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)|7-退货通过(用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)|61-6的发起状态|71-7的发起状态]")
private int status;
@ApiModelProperty(value = " 价格") @ApiModelProperty(value = " 价格")
private BigDecimal skuPriceActual; private BigDecimal skuPriceActual;
//todo hujiachen 缺券相关 活动相关 //todo hujiachen 缺券相关 活动相关
......
...@@ -57,7 +57,7 @@ public class GoblinStoreOrderController { ...@@ -57,7 +57,7 @@ public class GoblinStoreOrderController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id"),
}) })
@GetMapping(value = "details") @GetMapping(value = "details")
public ResponseDto<GoblinStoreOrderListVo> orderList(@RequestParam(value = "orderId", required = true) @Valid String orderId) { public ResponseDto<GoblinStoreOrderListVo> orderDetails(@RequestParam(value = "orderId", required = true) @Valid String orderId) {
return goblinStoreOrderService.orderDetails(orderId); return goblinStoreOrderService.orderDetails(orderId);
} }
......
...@@ -91,6 +91,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -91,6 +91,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
itemSkuVo.setSkuPriceActual(orderSkuVo.getSkuPriceActual()); itemSkuVo.setSkuPriceActual(orderSkuVo.getSkuPriceActual());
itemSkuVo.setSkuSpecs(orderSkuVo.getSkuSpecs()); itemSkuVo.setSkuSpecs(orderSkuVo.getSkuSpecs());
itemSkuVo.setSkuImage(orderSkuVo.getSkuImage()); itemSkuVo.setSkuImage(orderSkuVo.getSkuImage());
itemSkuVo.setStatus(orderSkuVo.getStatus());
orderListSkuVos.add(itemSkuVo); orderListSkuVos.add(itemSkuVo);
} }
vo.setStoreOrderListSkuVoList(orderListSkuVos); vo.setStoreOrderListSkuVoList(orderListSkuVos);
...@@ -134,6 +135,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -134,6 +135,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
itemSkuVo.setSkuPriceActual(orderSkuVo.getSkuPriceActual()); itemSkuVo.setSkuPriceActual(orderSkuVo.getSkuPriceActual());
itemSkuVo.setSkuSpecs(orderSkuVo.getSkuSpecs()); itemSkuVo.setSkuSpecs(orderSkuVo.getSkuSpecs());
itemSkuVo.setSkuImage(orderSkuVo.getSkuImage()); itemSkuVo.setSkuImage(orderSkuVo.getSkuImage());
itemSkuVo.setStatus(orderSkuVo.getStatus());
orderListSkuVos.add(itemSkuVo); orderListSkuVos.add(itemSkuVo);
} }
vo.setStoreOrderListSkuVoList(orderListSkuVos); vo.setStoreOrderListSkuVoList(orderListSkuVos);
...@@ -145,6 +147,11 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -145,6 +147,11 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime(); String nowStr = DateUtil.getNowTime();
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlsOrder = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> sqlsOrderSku = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("goblin_order.store.cancel"));
sqls.add(SqlMapping.get("goblin_order.store.orderSkuStatus"));
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) { if (storeInfoVo == null) {
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
...@@ -156,6 +163,19 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -156,6 +163,19 @@ 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()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_5.getValue());
//redis
redisUtils.setGoblinOrderSku(orderSkuId, orderSkuVo);
//mongo
mongoUtils.updateGoblinOrderSkuVo(orderSkuId, orderSkuVo);
//mysql
sqlsOrderSku.add(new Object[]{
orderSkuVo.getStatus(), now,
orderSkuVo.getOrderSkuId(), now, now
});
}
GoblinOrderOperationLog log = initLog(orderId, uid, now); GoblinOrderOperationLog log = initLog(orderId, uid, now);
log.setType(GoblinStatusConst.Status.ORDER_LOG_STATUS_14.getValue()); log.setType(GoblinStatusConst.Status.ORDER_LOG_STATUS_14.getValue());
log.setRemark("商铺取消订单"); log.setRemark("商铺取消订单");
...@@ -164,13 +184,12 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -164,13 +184,12 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
//mongo //mongo
mongoUtils.updateGoblinStoreOrderVo(orderId, orderVo); mongoUtils.updateGoblinStoreOrderVo(orderId, orderVo);
//mysql //mysql
queueUtils.sendMsgByRedis( sqlsOrder.add(new Object[]{
MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), orderVo.getStatus(), now, orderVo.getCancelReason(), now,
SqlMapping.get("goblin_order.store.cancel", orderId, now, now
orderVo.getStatus(), now, orderVo.getCancelReason(), now, });
orderId, now, now queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
) SqlMapping.gets(sqls, sqlsOrder, sqlsOrderSku));
);
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -422,6 +441,11 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -422,6 +441,11 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime(); String nowStr = DateUtil.getNowTime();
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlsOrder = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> sqlsOrderSku = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("goblin_order.store.express"));
sqls.add(SqlMapping.get("goblin_order.store.orderSkuStatus"));
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) { if (storeInfoVo == null) {
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
...@@ -437,6 +461,19 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -437,6 +461,19 @@ 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()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue());
//redis
redisUtils.setGoblinOrderSku(orderSkuId, orderSkuVo);
//mongo
mongoUtils.updateGoblinOrderSkuVo(orderSkuId, orderSkuVo);
//mysql
sqlsOrderSku.add(new Object[]{
orderSkuVo.getStatus(), now,
orderSkuVo.getOrderSkuId(), now, now
});
}
GoblinOrderOperationLog log = initLog(orderId, uid, now); GoblinOrderOperationLog log = initLog(orderId, uid, now);
log.setType(GoblinStatusConst.Status.ORDER_LOG_STATUS_13.getValue()); log.setType(GoblinStatusConst.Status.ORDER_LOG_STATUS_13.getValue());
log.setRemark("发货:orderId=[" + orderId + "],mailNo=[" + mailNo + "]"); log.setRemark("发货:orderId=[" + orderId + "],mailNo=[" + mailNo + "]");
...@@ -446,12 +483,11 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -446,12 +483,11 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
//mongo //mongo
mongoUtils.updateGoblinStoreOrderVo(orderId, orderVo); mongoUtils.updateGoblinStoreOrderVo(orderId, orderVo);
//mysql //mysql
queueUtils.sendMsgByRedis( sqlsOrder.add(new Object[]{
MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), orderVo.getMailNo(), orderVo.getDeliveryTime(), orderVo.getLogisticsCompany(), orderVo.getStatus(), now, orderId, now, now
SqlMapping.get("goblin_order.store.express", });
orderVo.getMailNo(), orderVo.getDeliveryTime(), orderVo.getLogisticsCompany(), orderVo.getStatus(), now, orderId, now, now queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
) SqlMapping.gets(sqls, sqlsOrder, sqlsOrderSku));
);
//添加日志 //添加日志
queueUtils.sendMsgByRedis( queueUtils.sendMsgByRedis(
MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(), MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
......
...@@ -65,6 +65,7 @@ goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from = ...@@ -65,6 +65,7 @@ goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from =
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.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.express=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.express=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.address=UPDATE goblin_order_attr SET express_contacts = ? ,express_address_detail = ? , express_phone = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.address=UPDATE goblin_order_attr SET express_contacts = ? ,express_address_detail = ? , express_phone = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderPrice=UPDATE goblin_store_order SET price_modify = ? ,price_voucher = ? , price_actual = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.orderPrice=UPDATE goblin_store_order SET price_modify = ? ,price_voucher = ? , price_actual = ? , updated_at = ? WHERE 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