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

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

提交 添加活动增加演出id

parent 02b599ae
......@@ -60,6 +60,7 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_BUY_COUNT = PREFIX.concat("uid:");//用户sku购买数量 key:uid:skuId:$skuId
public static final String REDIS_GOBLIN_SALE_COUNT = PREFIX.concat("sale:skuId:");//用户sku购买数量 key:sale:skuId:$skuId
public static final String REDIS_GOBLIN_ORDER = PREFIX.concat("order:");//用户sku购买数量 key:$orderId
public static final String REDIS_GOBLIN_ORDER_BACK = PREFIX.concat("order:back:");//用户sku购买数量 key:$backOrderId
public static final String REDIS_GOBLIN_ORDER_SKU = PREFIX.concat("orderSku:");//用户sku购买数量 key:$orderSkuId
public static final String REDIS_GOBLIN_ORDER_UN_PAY = PREFIX.concat("order:un:pay:");//未支付订单id列表 key:$randomKey
public static final String REDIS_GOBLIN_ORDER_LIST = PREFIX.concat("order:id:list:");//用户订单id列表 key:$uid
......
......@@ -44,6 +44,7 @@ public class GoblinStatusConst {
ORDER_LOG_STATUS_16(16, "核销虚拟商品订单"),
ORDER_LOG_STATUS_17(17, "修改收货地址"),
ORDER_LOG_STATUS_20(20, "商家发起退款"),
ORDER_LOG_STATUS_21(21, "退款申请"),
ORDER_LOG_STATUS_22(22, "退款成功"),
ORDER_LOG_STATUS_23(23, "退款拒绝"),
......@@ -75,6 +76,19 @@ public class GoblinStatusConst {
public enum Type {
OPERATION_TYPE_1(1, "用户"),
OPERATION_TYPE_2(2, "商家"),
BACK_REASON_TYPE_1(1, "不想买了"),
BACK_REASON_TYPE_2(2, "收货人信息有误"),
BACK_REASON_TYPE_3(3, "未按指定时间发货"),
BACK_REASON_TYPE_4(4, "其他"),
BACK_REASON_TYPE_5(5, "不想买了"),
BACK_REASON_TYPE_6(6, "商品质量问题"),
BACK_REASON_TYPE_7(7, "收到商品与描述不符"),
BACK_REASON_TYPE_8(8, "商铺发起"),//todo
BACK_REASON_TYPE_9(9, "系统自动申请"),
BACK_TYPE_1(1, "退款"),
BACK_TYPE_2(2, "退货"),
;
private final int value;
......
package com.liquidnet.service.goblin.dto.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* 订单退单退款表
* </p>
*
* @author liquidnet
* @since 2021-12-27
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinBackOrderVo implements Serializable,Cloneable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "订单退单表id")
private String backOrderId;
@ApiModelProperty(value = "退款单号")
private String backCode;
@ApiModelProperty(value = "订单id")
private String orderId;
@ApiModelProperty(value = "订单编号")
private String orderCode;
@ApiModelProperty(value = "商铺id")
private String storeId;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "退货的单品ID多个用,分开 退款的时候不需要,因为退款只能整单退1001-1,1002-3 表示单品id为1001 的单品退货1件 单品id为1002的单品退货3件")
private String skuIdNums;
@ApiModelProperty(value = "类型[1-退款|2-退货]")
private Integer type;
@ApiModelProperty(value = "退款/退货原因[1-不想买了|2-收货人信息有误|3-未按指定时间发货|4-其他|5-不想买了|6-商品质量问题|7-收到商品与描述不符|8-商铺发起|9-系统自动申请]")
private String reason;
@ApiModelProperty(value = "问题说明")
private String describes;
@ApiModelProperty(value = "申请凭据[0-没有任何凭据|1-有发票|2-有质检报告]")
private Integer credential;
@ApiModelProperty(value = "返回方式[1-快递返回]目前只有快递返回 (退货的时候用户给商城寄送商品)")
private Integer backType;
@ApiModelProperty(value = "退货时候实际退款金额")
private BigDecimal realBackPrice;
@ApiModelProperty(value = "上传的退款凭证或者质检发票 多个图片 用, 隔开")
private String pics;
@ApiModelProperty(value = "退款/退货状态[0-商铺发起退款|1-退款申请(用户发送退款请求)|2-退款成功(商家同意退款)|3-退款拒绝(商家拒绝退款)|4-退货申请(用户发起退货请求)|5-退货拒绝(商家拒绝退货)|6-退货审核通过等待用户填写物流(商家审核通过,等待用户寄回商品)|7-待收货(用户已确认)|8-退货完成(商家收货并且同意退款给用户)|9-退货失败(商家不同意退款)")
private Integer status;
@ApiModelProperty(value = "是否预存款支付[0-否|1-是]")
private Integer preDepositPay;
@ApiModelProperty(value = "物流公司名称")
private String logisCompanyName;
@ApiModelProperty(value = "物流单号")
private String mailNo;
@ApiModelProperty(value = "创建时间")
private String createdAt;
private static final GoblinBackOrderVo obj = new GoblinBackOrderVo();
public static GoblinBackOrderVo getNew() {
try {
return (GoblinBackOrderVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinBackOrderVo();
}
}
......@@ -99,6 +99,8 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
private String ipAddress;
@ApiModelProperty(value = " paymentId")
private String paymentId;
@ApiModelProperty(value = " paymentType")
private String paymentType;
@ApiModelProperty(value = " 创建时间")
private String createdAt;
......
package com.liquidnet.service.goblin.param;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
* 退款回掉参数
* </p>
*
* @author jiangxiulong
* @since 2021-05-31 11:19 上午
*/
@Data
public class RefundCallbackParam implements Serializable {
private Integer status;
private BigDecimal refundPrice;
private String refundError;
private String refundCode; // PAY
private String refundAt;
private String orderRefundCode;
private String refundId;
private String refundType;
}
......@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinOrderLogVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreOrderListVo;
import com.liquidnet.service.goblin.param.RefundCallbackParam;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
......@@ -31,6 +32,5 @@ public interface IGoblinStoreOrderService {
ResponseDto<Boolean> refundOrderSku(String orderId, String orderSkuId, BigDecimal price);
ResponseDto<Boolean> refundOrder(String orderId, BigDecimal orderPrice, BigDecimal expressPrice);
ResponseDto<Boolean> refundSyncOrder(RefundCallbackParam refundCallbackParam);
}
......@@ -82,7 +82,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiOperation("创建活动-正在下单")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody
public ResponseDto<Boolean> purchasingInsert(GoblinStoreZhengzaiParam goblinStoreZhengzaiParam) {
public ResponseDto<String> purchasingInsert(GoblinStoreZhengzaiParam goblinStoreZhengzaiParam) {
return goblinZhengzaiMarketService.zhengzaiInsert(goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getPerformanceId(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime());
}
......@@ -109,11 +109,6 @@ public class GoblinSelfZhengzaiController extends BaseController {
@PostMapping("zhengzai/store")
@ApiOperation("活动详情-正在下单-新增店铺")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "marketId", value = "活动id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "showTime", value = "显示时间", example = "0"),
})
public ResponseDto<Boolean> purchasingStore(@RequestBody List<GoblinInsertZhengzaiParam> params) {
return goblinZhengzaiMarketService.zhengzaiStore(params);
}
......
......@@ -45,7 +45,7 @@ public interface IGoblinZhengzaiMarketService {
* @param et 结束时间
* @return
*/
ResponseDto<Boolean> zhengzaiInsert(String purchaseName, String performancesId, String st, String et);
ResponseDto<String> zhengzaiInsert(String purchaseName, String performancesId, String st, String et);
/**
* @param marketId 活动id
......
......@@ -113,7 +113,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
}
@Override
public ResponseDto<Boolean> zhengzaiInsert(String purchaseName,String performanceId, String st, String et) {
public ResponseDto<String> zhengzaiInsert(String purchaseName,String performanceId, String st, String et) {
GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew();
String SelfMarketId = IDGenerator.nextTimeId2();
selfMarketing.setSelfMarketId(SelfMarketId);
......@@ -135,7 +135,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
//redis
goblinRedisUtils.setSelfMarket(SelfMarketId, vo);
goblinRedisUtils.addZhengzaiList(vo);
return ResponseDto.success();
return ResponseDto.success(SelfMarketId);
}
@Override
......
......@@ -68,7 +68,11 @@ public class IDGenerator {
return ticketOrderCode(orderId);
}
public static String getWriteOffCode(){
public static String storeRefundCode(String orderMasterCode) {
return orderMasterCode.concat("R").concat(RandomUtil.getRandomInt(0, 50) + "");
}
public static String getWriteOffCode() {
return "";
}
......@@ -110,20 +114,21 @@ public class IDGenerator {
/**
* 获得活动 spu sku
*
* @param marketId
* @return
*/
public static String marketGoodId(String marketId) {
return StringUtil.right(marketId,5);
return StringUtil.right(marketId, 5);
}
public static void main(String[] args) {
System.out.println(""+IDGenerator.payCode());
System.out.println(""+IDGenerator.refundCode());
System.out.println("nextTimeId==="+IDGenerator.nextTimeId());
System.out.println("nextMilliId==="+IDGenerator.nextMilliId());
System.out.println("nextMilliId2==="+IDGenerator.nextMilliId2());
System.out.println("nextSnowId==="+IDGenerator.nextSnowId());
System.out.println("get32UUID==="+IDGenerator.get32UUID());
System.out.println("" + IDGenerator.payCode());
System.out.println("" + IDGenerator.refundCode());
System.out.println("nextTimeId===" + IDGenerator.nextTimeId());
System.out.println("nextMilliId===" + IDGenerator.nextMilliId());
System.out.println("nextMilliId2===" + IDGenerator.nextMilliId2());
System.out.println("nextSnowId===" + IDGenerator.nextSnowId());
System.out.println("get32UUID===" + IDGenerator.get32UUID());
}
}
......@@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinBackOrder implements Serializable {
public class GoblinBackOrder implements Serializable,Cloneable {
private static final long serialVersionUID = 1L;
......@@ -121,5 +121,14 @@ public class GoblinBackOrder implements Serializable {
private String comment;
private static final GoblinBackOrder obj = new GoblinBackOrder();
public static GoblinBackOrder getNew() {
try {
return (GoblinBackOrder) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinBackOrder();
}
}
......@@ -2,8 +2,10 @@ package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -17,7 +19,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinBackOrderLog implements Serializable {
public class GoblinBackOrderLog implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
......@@ -43,7 +45,10 @@ public class GoblinBackOrderLog implements Serializable {
* 留言
*/
private String message;
/**
* 操作人
*/
private String operationName;//todo
/**
* 退款申请[1-退款申请(用户发送退款请求)|2-退款成功(商家同意退款)|3-退款拒绝(商家拒绝退款)|4-退货申请(用户发起退货请求)|5-退货拒绝(商家拒绝退货)|6-退货审核通过等待用户填写物流(商家审核通过,等待用户寄回商品)|7-待收货(用户已确认)|8-退货完成(商家收货并且同意退款给用户)|9-退货失败(商家不同意退款)
*/
......@@ -55,5 +60,14 @@ public class GoblinBackOrderLog implements Serializable {
private String comment;
private static final GoblinBackOrderLog obj = new GoblinBackOrderLog();
public static GoblinBackOrderLog getNew() {
try {
return (GoblinBackOrderLog) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinBackOrderLog();
}
}
......@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreOrderListVo;
import com.liquidnet.service.goblin.param.RefundCallbackParam;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
......@@ -12,10 +13,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.math.BigDecimal;
......@@ -121,33 +119,13 @@ public class GoblinStoreOrderController {
public ResponseDto<Boolean> refundOrderSku(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "orderSkuId", required = true) @Valid String orderSkuId,
@RequestParam(value = "price", required = true) @Valid BigDecimal price) {
return ResponseDto.success();
}
@ApiOperation(value = "整单退款")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "orderPrice", value = "退款订单金额"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "expressPrice", value = "退款快递金额"),
})
@GetMapping(value = "refund")
public ResponseDto<Boolean> refundOrder(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "orderPrice", required = true) @Valid BigDecimal orderPrice,
@RequestParam(value = "expressPrice", required = true) @Valid BigDecimal expressPrice) {
return ResponseDto.success();
return goblinStoreOrderService.refundOrderSku(orderId, orderSkuId, price);
}
@ApiOperation(value = "退款回调")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderId", value = "订单id"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "orderPrice", value = "退款订单金额"),
@ApiImplicitParam(type = "form", required = false, dataType = "BigDecimal", name = "expressPrice", value = "退款快递金额"),
})
@GetMapping(value = "refundSyncOrder")
public ResponseDto<Boolean> refundSyncOrder(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "orderPrice", required = true) @Valid BigDecimal orderPrice,
@RequestParam(value = "expressPrice", required = true) @Valid BigDecimal expressPrice) {
return ResponseDto.success();
@PostMapping(value = "refundSyncOrder")
public ResponseDto<Boolean> refundSyncOrder(RefundCallbackParam refundCallbackParam) {
return goblinStoreOrderService.refundSyncOrder(refundCallbackParam);
}
// @ApiOperation(value = "发货")
// @ApiImplicitParams({
......
......@@ -616,6 +616,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderVo.setWriteOffCode(storeOrder.getWriteOffCode());
orderVo.setStatus(storeOrder.getStatus());
orderVo.setPaymentId(syncOrderParam.getPaymentId());
orderVo.setPaymentType(syncOrderParam.getPaymentType());
orderVo.setOrderSkuVoIds(skuList);
redisUtils.setGoblinOrder(orderId, orderVo);
//删除未支付订单
......
......@@ -449,6 +449,11 @@ public class GoblinMongoUtils {
return mongoTemplate.insert(vo, GoblinOrderLogVo.class.getSimpleName());
}
//添加 订单退款数据
public GoblinBackOrderVo insertGoblinBackOrderVo(GoblinBackOrderVo vo) {
return mongoTemplate.insert(vo, GoblinBackOrderVo.class.getSimpleName());
}
//资金列表
public HashMap<String, Object> moneyGetSpuList(String spuName, String st, String et, String storeId, int page) {
//查询销量
......
......@@ -589,4 +589,10 @@ public class GoblinRedisUtils {
}
}
//覆盖 退款订单vo
public void setBackOrderVo(String backOrderId, GoblinBackOrderVo vo) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_BACK.concat(backOrderId);
redisUtil.set(redisKey, vo);
}
}
......@@ -54,4 +54,8 @@ goblin_order.store.address=UPDATE goblin_order_attr SET express_contacts = ? ,ex
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.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,price_voucher = ? , sku_price_actual = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
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.orderExpressPrice=UPDATE goblin_store_order SET 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.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)
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