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

Commit 2bd53215 authored by 胡佳晨's avatar 胡佳晨

Merge branch 'pre' into 'master'

Pre

See merge request !350
parents a61dd493 9756887a
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
@Data @Data
public class AdamMemberRightsCouponRuleVo implements Serializable, Cloneable { public class AdamMemberRightsCouponRuleVo implements Serializable, Cloneable {
private static final long serialVersionUID = 4282440130223655255L; private static final long serialVersionUID = 4282440130223655255L;
@ApiModelProperty(value = "适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", example = "90") @ApiModelProperty(value = "适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", example = "90")
private Integer useScope; private Integer useScope;
@ApiModelProperty(value = "适用名称", example = "北京草莓") @ApiModelProperty(value = "适用名称", example = "北京草莓")
private String busiName; private String busiName;
......
...@@ -38,4 +38,17 @@ public class CandyRedisConst { ...@@ -38,4 +38,17 @@ public class CandyRedisConst {
* </value> * </value>
*/ */
public static final String BASIC_COMMON_COUPON = PREFIX.concat("basic:common_coupon"); public static final String BASIC_COMMON_COUPON = PREFIX.concat("basic:common_coupon");
/**
* <key>
* candy:basic:user_coupon_assoc:${ucouponId}
* </key>
* <value>
* com.liquidnet.service.candy.dto.CandyUserCouponAssocDto
* </value>
*/
public static final String BASIC_USER_COUPON_ASSOC = PREFIX.concat("basic:user_coupon_assoc:");
/**
* 发放券操作人-券类商品下单
*/
public static final String OPERATOR_MGT_COUPON_BY_SKU = "COUPON_SKU";
} }
...@@ -9,7 +9,7 @@ import javax.validation.constraints.Pattern; ...@@ -9,7 +9,7 @@ import javax.validation.constraints.Pattern;
@ApiModel(value = "CandyCouponRuleBuildParam", description = "添加券规则入参") @ApiModel(value = "CandyCouponRuleBuildParam", description = "添加券规则入参")
public class CandyCouponRuleBuildParam { public class CandyCouponRuleBuildParam {
@Pattern(regexp = "\\b(100|90|91|92|80|81)\\b", message = "适用范围无效") @Pattern(regexp = "\\b(100|90|91|92|80|81)\\b", message = "适用范围无效")
@ApiModelProperty(required = true, value = "适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", allowableValues = "100,90,91,92,80,81") @ApiModelProperty(required = true, value = "适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", allowableValues = "100,90,91,92,80,81")
private Integer useScope; private Integer useScope;
@ApiModelProperty(required = true, value = "适用名称", allowableValues = "适用名称") @ApiModelProperty(required = true, value = "适用名称", allowableValues = "适用名称")
private String busiName; private String busiName;
......
...@@ -28,9 +28,9 @@ public interface ICandyCouponService { ...@@ -28,9 +28,9 @@ public interface ICandyCouponService {
List<CandyCouponVo> memberCoupon(String mCouponId); List<CandyCouponVo> memberCoupon(String mCouponId);
CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type); CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type,int perType,int isTrueName);
Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId); Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId,int perType,int isTrueName);
CandyMyCouponListVo preUseGoodCoupon(BigDecimal priceTotal, String goodId, Integer type,String uid); CandyMyCouponListVo preUseGoodCoupon(BigDecimal priceTotal, String goodId, Integer type,String uid);
...@@ -40,7 +40,7 @@ public interface ICandyCouponService { ...@@ -40,7 +40,7 @@ public interface ICandyCouponService {
Integer stateCoupon(String uCouponId); Integer stateCoupon(String uCouponId);
CandyUseResultVo useCoupon(String uCouponId, String content, String totalPrice, String performanceId, String timesId, String ticketId, String goodIds,String uid); CandyUseResultVo useCoupon(String uCouponId, String content, String totalPrice, String performanceId, String timesId, String ticketId, String goodIds,String uid,int perType);
Boolean useBackCoupon(List<BackCouponParam> backCouponParam); Boolean useBackCoupon(List<BackCouponParam> backCouponParam);
......
...@@ -12,7 +12,7 @@ public class CandyCouponRulesVo implements Serializable,Cloneable { ...@@ -12,7 +12,7 @@ public class CandyCouponRulesVo implements Serializable,Cloneable {
private static final long serialVersionUID = 4073256621782131607L; private static final long serialVersionUID = 4073256621782131607L;
@ApiModelProperty(value = "适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]",example = "90") @ApiModelProperty(value = "适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]",example = "90")
private Integer useScope; private Integer useScope;
@ApiModelProperty(value = "适用名称",example = "北京草莓") @ApiModelProperty(value = "适用名称",example = "北京草莓")
private String busiName; private String busiName;
......
...@@ -118,6 +118,8 @@ public class GoblinRedisConst { ...@@ -118,6 +118,8 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_STORE_MARKET_ISCONFIG = PREFIX.concat("store:is_config:");//商铺活动-该活动配置了款式的商品 public static final String REDIS_GOBLIN_STORE_MARKET_ISCONFIG = PREFIX.concat("store:is_config:");//商铺活动-该活动配置了款式的商品
public static final String REDIS_GOBLIN_BUY_COUNT = PREFIX.concat("uid:");//用户sku购买数量 key:uid:skuId:$skuId public static final String REDIS_GOBLIN_BUY_COUNT = PREFIX.concat("uid:");//用户sku购买数量 key:uid:skuId:$skuId
public static final String REDIS_GOBLIN_BUY_COUNT_IDNO = PREFIX.concat("idno:%s:%s:%s");// 实名sku购买数量 key:$idType:$idNo:$skuId
public static final String REDIS_GOBLIN_SALE_COUNT = PREFIX.concat("sale:skuId:");//用户sku购买数量 key:sale: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_SALE_SPU_COUNT = PREFIX.concat("sale:spuId:");//用户sku购买数量 key:sale:skuId:$spuId public static final String REDIS_GOBLIN_SALE_SPU_COUNT = PREFIX.concat("sale:spuId:");//用户sku购买数量 key:sale:skuId:$spuId
public static final String REDIS_GOBLIN_ORDER = PREFIX.concat("order:");//用户sku购买数量 key:$orderId public static final String REDIS_GOBLIN_ORDER = PREFIX.concat("order:");//用户sku购买数量 key:$orderId
......
...@@ -16,4 +16,10 @@ public class GoblinOrderSkuParam { ...@@ -16,4 +16,10 @@ public class GoblinOrderSkuParam {
private String spuId; private String spuId;
@ApiModelProperty(required = true, value = "数量") @ApiModelProperty(required = true, value = "数量")
private Integer number; private Integer number;
@ApiModelProperty(required = false, value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照")
private Integer idType;
@ApiModelProperty(required = false, value = "关联人姓名")
private String idName;
@ApiModelProperty(required = false, value = "关联人证件号码")
private String idNo;
} }
...@@ -169,6 +169,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable { ...@@ -169,6 +169,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
} else { } else {
vo.setSpuNo(this.getSpuNo()); vo.setSpuNo(this.getSpuNo());
} }
vo.setSpuType(0);
vo.setName(this.getName()); vo.setName(this.getName());
vo.setSubtitle(this.getSubtitle()); vo.setSubtitle(this.getSubtitle());
vo.setSellPrice(this.getSellPrice()); vo.setSellPrice(this.getSellPrice());
...@@ -227,6 +228,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable { ...@@ -227,6 +228,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
vo.setStoreId(this.getStoreId()); vo.setStoreId(this.getStoreId());
vo.setSpuId(this.getSpuId()); vo.setSpuId(this.getSpuId());
vo.setSpuNo(this.getSpuNo()); vo.setSpuNo(this.getSpuNo());
vo.setSpuType(0);
vo.setName(this.getName()); vo.setName(this.getName());
vo.setSubtitle(this.getSubtitle()); vo.setSubtitle(this.getSubtitle());
vo.setSellPrice(this.getSellPrice()); vo.setSellPrice(this.getSellPrice());
......
package com.liquidnet.service.goblin.dto.manage;
import com.liquidnet.commons.lang.constant.LnsRegex;
import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@ApiModel(value = "GoblinStoreMgtGoodsCouponAddSkuParam", description = "商品管理:添加券类商品:添加券SKU入参")
@Data
public class GoblinStoreMgtGoodsCouponAddSkuParam implements Serializable {
private static final long serialVersionUID = 7886534346305369761L;
@ApiModelProperty(position = 10, required = false, value = "单品ID[编辑时必传]")
private String skuId;
// @ApiModelProperty(position = 11, required = false, value = "单品编码[默认为系统编码,也可手动输入商家自己的编码]")
// @Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_UNDER_50, message = "单品编码格式或长度有误")
// private String skuNo;
// @ApiModelProperty(position = 12, required = false, value = "单品条码")
// @Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_32, message = "单品条码格式或长度有误")
// private String skuBarCode;
// @ApiModelProperty(position = 13, required = false, value = "ERP商家编码")
// @Size(max = 40, message = "ERP商家编码长度限制40")
// private String skuErpCode;//-
// @ApiModelProperty(position = 14, required = false, value = "ERP托管[0-否|1-是],默认0")
// @Pattern(regexp = "\\b(0|1)\\b", message = "ERP托管参数无效")
// private String erpHosting;//-
// @ApiModelProperty(position = 15, required = false, value = "ERP仓库编号")
// @Size(max = 40, message = "ERP仓库编号长度限制40")
// private String erpWarehouseNo;//-
// @ApiModelProperty(position = 16, required = false, value = "单品默认图片的url[256]")
// @NotBlank(message = "单品图片不能为空")
// private String skuPic;
@ApiModelProperty(position = 12, required = false, value = "单品规格信息")
// @NotNull(message = "规格信息不能为空")
// @Valid// 初始化写死['规格':'张']
private List<GoblinGoodsSpecDto> skuSpecList;
// @ApiModelProperty(position = 18, required = false, value = "单品销售价-原价[20,2]")
// private BigDecimal sellPrice;
@ApiModelProperty(position = 19, required = true, value = "单品现价[20,2]")
@Digits(integer = 6, fraction = 2, message = "参数'单品现价'无效")
@DecimalMin(value = "0.01", message = "参数'单品现价'必须为大于0")
private BigDecimal price;
// @ApiModelProperty(position = 20, required = false, value = "单品会员价格[20,2]")
// @NotNull(message = "单品会员价格不能为空")
// @Min(value = 0, message = "单品会员价格不能小于0")
// private BigDecimal priceMember;
// @ApiModelProperty(position = 21, required = false, value = "单品的重量[20,2]")
// private BigDecimal weight;//-
@ApiModelProperty(position = 20, required = true, value = "总库存")
@Min(value = 0, message = "总库存不能小于0")
private Integer stock;
// @ApiModelProperty(position = 21, required = false, value = "预警库存")
// private Integer warningStock;
// @ApiModelProperty(position = 22, required = false, value = "ISBN,针对CD/图书等[100]")
// private String skuIsbn;//-
// @ApiModelProperty(position = 23, required = false, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]")
// @NotNull(message = "购买限制不能为空")
// private String buyFactor;
// @ApiModelProperty(position = 24, required = false, value = "购买限制人员名单[购买限制为2-指定用户时必填]")
// private String buyRoster;
@ApiModelProperty(position = 25, required = false, value = "限量[0-无限制|X:限购数量]")
private Integer buyLimit;
// @ApiModelProperty(position = 26, required = false, value = "单品有效期[yyyy-MM-dd HH:mm:ss]")
// @Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "单品有效期格式有误")
// private String skuValidity;
// @ApiModelProperty(position = 27, required = false, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
// private String skuAppear;
/**
* ---------------------------- 券类商品-代金券属性 ----------------------------
*/
@ApiModelProperty(position = 28, required = true, value = "是否实名[0-否|1-是,表示该商品需要实名关联]", allowableValues = "0,1", example = "1")
@Pattern(regexp = "\\b(0|1)\\b", message = "参数'是否实名'无效")
private String isTrueName;
@ApiModelProperty(position = 29, required = true, value = "适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]", allowableValues = "101,102,103", example = "101")
@Pattern(regexp = "\\b(101|102|103)\\b", message = "参数'适用范围'无效")
private String useScope;
@ApiModelProperty(position = 30, required = true, value = "面值", example = "99.00")
@Digits(integer = 3, fraction = 2, message = "参数'面值'无效")
@DecimalMin(value = "0.01", message = "参数'面值'必须为大于0")
private BigDecimal valFace;
@ApiModelProperty(position = 31, required = true, value = "开始时间[yyyy-MM-dd HH:mm:ss]", example = "2024-01-01 00:00:00")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "开始时间格式有误")
@NotNull(message = "参数'开始时间'不可为空")
private String effectAt;
@ApiModelProperty(position = 32, required = true, value = "结束时间[yyyy-MM-dd HH:mm:ss]", example = "2024-12-31 00:00:00")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "结束时间格式有误")
@NotNull(message = "参数'结束时间'不可为空")
private String expireAt;
}
package com.liquidnet.service.goblin.dto.manage;
import com.liquidnet.commons.lang.constant.LnsRegex;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
@ApiModel(value = "GoblinStoreMgtGoodsCouponEditSkuParam", description = "商品管理:编辑券类商品:编辑券SKU入参")
@Data
public class GoblinStoreMgtGoodsCouponEditSkuParam implements Serializable {
private static final long serialVersionUID = 8174428924922310702L;
@ApiModelProperty(position = 10, required = true, value = "店铺ID[64]")
@NotBlank(message = "店铺ID不能为空")
private String storeId;
@ApiModelProperty(position = 11, required = true, value = "商品ID[64]")
@NotNull(message = "商品ID不能为空")
private String spuId;
@ApiModelProperty(position = 12, required = true, value = "单品ID[编辑时必传]")
@NotNull(message = "商品SKU_ID不能为空")
private String skuId;
@ApiModelProperty(position = 13, required = true, value = "单品现价[20,2]")
@Digits(integer = 3, fraction = 2, message = "参数'单品现价'无效")
@DecimalMin(value = "0.01", message = "参数'单品现价'必须为大于0")
private BigDecimal price;
@ApiModelProperty(position = 14, required = true, value = "限量[0-无限制|X:限购数量]")
@Min(value = 0, message = "参数'限购数量'不能小于0")
@NotNull(message = "参数'限购数量'不可为空")
private Integer buyLimit;
@ApiModelProperty(position = 15, required = false, value = "总库存")
private Integer stock;
@ApiModelProperty(position = 16, required = false, value = "总库存")
private Integer skuStock;
@ApiModelProperty(position = 17, required = false, value = "加减库存")
private Integer operStock;
/**
* ---------------------------- 券类商品-代金券属性 ----------------------------
*/
@ApiModelProperty(position = 18, required = true, value = "是否实名[0-否|1-是,表示该商品需要实名关联]", example = "1")
@Pattern(regexp = "\\b(0|1)\\b", message = "参数'是否实名'无效")
private String isTrueName;
@ApiModelProperty(position = 19, required = true, value = "适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]")
@Pattern(regexp = "\\b(101|102|103)\\b", message = "参数'适用范围'无效")
private String useScope;
@ApiModelProperty(position = 20, required = true, value = "面值", example = "99.00")
@Digits(integer = 3, fraction = 2, message = "参数'面值'无效")
@DecimalMin(value = "0.01", message = "参数'面值'必须为大于0")
private BigDecimal valFace;
@ApiModelProperty(position = 21, required = true, value = "结束时间[yyyy-MM-dd HH:mm:ss]", example = "2024-01-01 00:00:00")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "开始时间格式有误")
@NotNull(message = "参数'开始时间'不可为空")
private String effectAt;
@ApiModelProperty(position = 22, required = true, value = "结束时间[yyyy-MM-dd HH:mm:ss]", example = "2024-12-31 00:00:00")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "结束时间格式有误")
@NotNull(message = "参数'结束时间'不可为空")
private String expireAt;
public GoblinGoodsSkuInfoVo initEditGoodsSkuInfoVo() {
GoblinGoodsSkuInfoVo goodsSkuInfoVo = GoblinGoodsSkuInfoVo.getNew();
goodsSkuInfoVo.setSkuType(2);
goodsSkuInfoVo.setSkuId(this.getSkuId());
goodsSkuInfoVo.setPrice(this.getPrice());
goodsSkuInfoVo.setPriceMember(this.getPrice());
goodsSkuInfoVo.setBuyLimit(this.getBuyLimit());
goodsSkuInfoVo.setStock(this.getStock());
goodsSkuInfoVo.setSkuStock(this.getSkuStock());
goodsSkuInfoVo.setIsTrueName(Integer.valueOf(this.getIsTrueName()));
goodsSkuInfoVo.setUseScope(Integer.valueOf(this.getUseScope()));
goodsSkuInfoVo.setValFace(this.getValFace());
goodsSkuInfoVo.setEffectAt(DateUtil.Formatter.yyyyMMddHHmmss.parse(this.getEffectAt()));
goodsSkuInfoVo.setExpireAt(DateUtil.Formatter.yyyyMMddHHmmss.parse(this.getExpireAt()));
return goodsSkuInfoVo;
}
}
...@@ -108,6 +108,7 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable { ...@@ -108,6 +108,7 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
goodsSkuInfoVo.setName(mgtGoodsSkuInfoVo.getName()); goodsSkuInfoVo.setName(mgtGoodsSkuInfoVo.getName());
goodsSkuInfoVo.setSkuSpecList(mgtGoodsSkuInfoVo.getSkuSpecList()); goodsSkuInfoVo.setSkuSpecList(mgtGoodsSkuInfoVo.getSkuSpecList());
} }
goodsSkuInfoVo.setSkuType(0);
goodsSkuInfoVo.setSkuId(this.getSkuId()); goodsSkuInfoVo.setSkuId(this.getSkuId());
goodsSkuInfoVo.setSkuBarCode(this.getSkuBarCode()); goodsSkuInfoVo.setSkuBarCode(this.getSkuBarCode());
goodsSkuInfoVo.setSkuPic(this.getSkuPic()); goodsSkuInfoVo.setSkuPic(this.getSkuPic());
...@@ -133,6 +134,7 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable { ...@@ -133,6 +134,7 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
public GoblinGoodsSkuInfoVo initEditAddGoodsSkuInfoVo() { public GoblinGoodsSkuInfoVo initEditAddGoodsSkuInfoVo() {
GoblinGoodsSkuInfoVo vo = GoblinGoodsSkuInfoVo.getNew(); GoblinGoodsSkuInfoVo vo = GoblinGoodsSkuInfoVo.getNew();
List<GoblinGoodsSpecDto> skuSpecList = this.getSkuSpecList(); List<GoblinGoodsSpecDto> skuSpecList = this.getSkuSpecList();
vo.setSkuType(0);
vo.setName(""); vo.setName("");
for (GoblinGoodsSpecDto goblinGoodsSpecDto : skuSpecList) { for (GoblinGoodsSpecDto goblinGoodsSpecDto : skuSpecList) {
vo.setName(vo.getName().concat(goblinGoodsSpecDto.getSpecVname())); vo.setName(vo.getName().concat(goblinGoodsSpecDto.getSpecVname()));
......
...@@ -41,6 +41,6 @@ public class GoblinStoreMgtGoodsFilterParam implements Serializable { ...@@ -41,6 +41,6 @@ public class GoblinStoreMgtGoodsFilterParam implements Serializable {
private BigDecimal priceGe; private BigDecimal priceGe;
@ApiModelProperty(position = 20, required = false, value = "价格区间MAX") @ApiModelProperty(position = 20, required = false, value = "价格区间MAX")
private BigDecimal priceLe; private BigDecimal priceLe;
@ApiModelProperty(position = 21, required = false, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 21, required = false, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private Integer spuType; private Integer spuType;
} }
...@@ -24,7 +24,7 @@ public class GoblinStoreMgtGoodsSkuSimpleFilterParam implements Serializable { ...@@ -24,7 +24,7 @@ public class GoblinStoreMgtGoodsSkuSimpleFilterParam implements Serializable {
@ApiModelProperty(position = 13, required = false, value = "搜索关键字[128]") @ApiModelProperty(position = 13, required = false, value = "搜索关键字[128]")
@Size(min = 2, max = 100, message = "搜索关键字长度范围2~100") @Size(min = 2, max = 100, message = "搜索关键字长度范围2~100")
private String keyword; private String keyword;
@ApiModelProperty(position = 14, required = false, value = "商品类型[0-常规|1-数字藏品],未指定则代表全部") @ApiModelProperty(position = 14, required = false, value = "商品类型[0-常规|1-数字藏品|2-券类商品],未指定则代表全部")
private Integer skuType; private Integer skuType;
// @ApiModelProperty(position = 15, required = false, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]", allowableValues = "0,1,2,3") // @ApiModelProperty(position = 15, required = false, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]", allowableValues = "0,1,2,3")
// private String shelvesStatus; // private String shelvesStatus;
......
...@@ -19,7 +19,7 @@ public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable { ...@@ -19,7 +19,7 @@ public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[45]") @ApiModelProperty(position = 12, value = "商品编码[45]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int spuType; private int spuType;
@ApiModelProperty(position = 13, value = "封面图片地址[256]") @ApiModelProperty(position = 13, value = "封面图片地址[256]")
private String coverPic; private String coverPic;
......
...@@ -14,7 +14,7 @@ public class GoblinStoreMgtGoodsSkuSimpleVo implements Serializable { ...@@ -14,7 +14,7 @@ public class GoblinStoreMgtGoodsSkuSimpleVo implements Serializable {
private String spuId; private String spuId;
@ApiModelProperty(position = 11, value = "单品ID[64]") @ApiModelProperty(position = 11, value = "单品ID[64]")
private String skuId; private String skuId;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType; private int skuType;
@ApiModelProperty(position = 13, value = "单品名称[100]") @ApiModelProperty(position = 13, value = "单品名称[100]")
private String name; private String name;
......
package com.liquidnet.service.goblin.dto.vo; package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -17,6 +18,7 @@ import java.math.BigDecimal; ...@@ -17,6 +18,7 @@ import java.math.BigDecimal;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinBackOrderSkuVo implements Serializable,Cloneable { public class GoblinBackOrderSkuVo implements Serializable,Cloneable {
@ApiModelProperty(value = "orderSkuId") @ApiModelProperty(value = "orderSkuId")
...@@ -42,6 +44,9 @@ public class GoblinBackOrderSkuVo implements Serializable,Cloneable { ...@@ -42,6 +44,9 @@ public class GoblinBackOrderSkuVo implements Serializable,Cloneable {
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private String createdAt; private String createdAt;
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private Integer skuType;
private static final GoblinBackOrderSkuVo obj = new GoblinBackOrderSkuVo(); private static final GoblinBackOrderSkuVo obj = new GoblinBackOrderSkuVo();
public static GoblinBackOrderSkuVo getNew() { public static GoblinBackOrderSkuVo getNew() {
......
...@@ -14,6 +14,8 @@ import java.util.List; ...@@ -14,6 +14,8 @@ import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinGoodsInfoDetailVo implements Serializable, Cloneable { public class GoblinGoodsInfoDetailVo implements Serializable, Cloneable {
private static final long serialVersionUID = -4712015317981742851L; private static final long serialVersionUID = -4712015317981742851L;
@ApiModelProperty(position = 1, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private Integer spuType;
@ApiModelProperty(position = 22, value = "规格展现方式[1-常规|2-组合]") @ApiModelProperty(position = 22, value = "规格展现方式[1-常规|2-组合]")
private String specMode; private String specMode;
@ApiModelProperty(position = 51, value = "规格信息") @ApiModelProperty(position = 51, value = "规格信息")
......
...@@ -30,7 +30,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -30,7 +30,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String spuErpCode; private String spuErpCode;
@ApiModelProperty(position = 12, value = "ERP类型[WANGDIAN-旺店通]") @ApiModelProperty(position = 12, value = "ERP类型[WANGDIAN-旺店通]")
private String erpType; private String erpType;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int spuType; private int spuType;
@ApiModelProperty(position = 13, value = "商品名称[100]") @ApiModelProperty(position = 13, value = "商品名称[100]")
private String name; private String name;
......
...@@ -45,6 +45,8 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable { ...@@ -45,6 +45,8 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
private Integer buyLimit; private Integer buyLimit;
@ApiModelProperty(position = 27, value = "剩余库存") @ApiModelProperty(position = 27, value = "剩余库存")
private Integer restStock; private Integer restStock;
@ApiModelProperty(position = 51, value = "是否实名[0-否|1-是,表示该商品需要实名关联]")
private Integer isTrueName;
private static final GoblinGoodsSkuInfoDetailVo obj = new GoblinGoodsSkuInfoDetailVo(); private static final GoblinGoodsSkuInfoDetailVo obj = new GoblinGoodsSkuInfoDetailVo();
......
package com.liquidnet.service.goblin.dto.vo; package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto; import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto;
...@@ -35,7 +34,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -35,7 +34,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private int erpHosting; private int erpHosting;
@ApiModelProperty(position = 12, value = "ERP仓库编号") @ApiModelProperty(position = 12, value = "ERP仓库编号")
private String erpWarehouseNo; private String erpWarehouseNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType; private int skuType;
@ApiModelProperty(position = 13, value = "单品的名称[100]") @ApiModelProperty(position = 13, value = "单品的名称[100]")
private String name; private String name;
...@@ -137,6 +136,32 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -137,6 +136,32 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String nftHash; private String nftHash;
@ApiModelProperty(position = 33, value = "NFT系列声明时间") @ApiModelProperty(position = 33, value = "NFT系列声明时间")
private String declareAt; private String declareAt;
/**
* ---------------------------- 以下为券类商品-代金券属性 ----------------------------
*/
@ApiModelProperty(position = 33, value = "是否实名[0-否|1-是,表示该商品需要实名关联]")
private Integer isTrueName;
@ApiModelProperty(position = 33, value = "业务类别[0-全场|1-演出|2-商品|3-优先购]")
private Integer busiType;
@ApiModelProperty(position = 33, value = "券类型[1-代金券|2-满减券|3-兑换券|4-折扣券|101-优先券]")
private Integer couType;
@ApiModelProperty(position = 33, value = "适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]")
private Integer useScope;
@ApiModelProperty(position = 33, value = "面值")
private BigDecimal valFace;
@ApiModelProperty(position = 33, value = "购买后(单位天)有效期,与生效/过期时间二选一")
private Integer validity;
@ApiModelProperty(position = 33, value = "生效时间[yyyy-MM-dd HH:mm:ss]")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime effectAt;
@ApiModelProperty(position = 33, value = "过期时间[yyyy-MM-dd HH:mm:ss]")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime expireAt;
/**
* ---------------------------- 以上为券类商品-代金券属性 ----------------------------
*/
@ApiModelProperty(position = 34, value = "删除标记[0-未删除|1-删除]") @ApiModelProperty(position = 34, value = "删除标记[0-未删除|1-删除]")
private String delFlg; private String delFlg;
@ApiModelProperty(position = 35, value = "上架时间") @ApiModelProperty(position = 35, value = "上架时间")
...@@ -175,7 +200,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -175,7 +200,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private static final GoblinGoodsSkuInfoVo obj = new GoblinGoodsSkuInfoVo(); private static final GoblinGoodsSkuInfoVo obj = new GoblinGoodsSkuInfoVo();
public String getUnbox() { public String getUnbox() {
if (skuType == 0) { if (skuType == 0 || skuType == 2) {
return unbox == null ? "0" : unbox; return unbox == null ? "0" : unbox;
} else { } else {
return unbox; return unbox;
...@@ -189,4 +214,10 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -189,4 +214,10 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
return new GoblinGoodsSkuInfoVo(); return new GoblinGoodsSkuInfoVo();
} }
} }
public String getCouponSnapshot() {
String str = "skuId=%s,price=%s,valFace=%s,buyLimit=%d,useScope=%s,effectAt=%s,expireAt=%s,isTrueName=%s;";
return String.format(str, this.getSkuId(), this.getPrice(), this.getValFace(),
this.getBuyLimit(), this.getUseScope(), this.getEffectAt(), this.getExpireAt(), this.getIsTrueName());
}
} }
package com.liquidnet.service.goblin.dto.vo; package com.liquidnet.service.goblin.dto.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.SensitizeUtil;
import com.liquidnet.service.goblin.entity.GoblinOrderSku; import com.liquidnet.service.goblin.entity.GoblinOrderSku;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.Objects;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
/** /**
* <p> * <p>
...@@ -78,6 +74,25 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable { ...@@ -78,6 +74,25 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable {
@ApiModelProperty(value = "erp-仓库号") @ApiModelProperty(value = "erp-仓库号")
private String erpWarehouseNo; private String erpWarehouseNo;
/**
* ---------------------------- 以下为券类商品-代金券属性 ----------------------------
*/
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private Integer skuType;
@ApiModelProperty(value = "是否实名[0-否|1-是,表示该商品需要实名关联],这里默认0")
private Integer isTrueName;
@ApiModelProperty(value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照")
private Integer idType;
@ApiModelProperty(value = "关联人姓名")
private String idName;
@ApiModelProperty(value = "关联人证件号码")
private String idNo;
/**
* ---------------------------- 以上为券类商品-代金券属性 ----------------------------
*/
public String getPushTime() { public String getPushTime() {
return pushTime == null ? "" : pushTime; return pushTime == null ? "" : pushTime;
} }
...@@ -122,4 +137,17 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable { ...@@ -122,4 +137,17 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable {
return new GoblinOrderSkuVo(); return new GoblinOrderSkuVo();
} }
} }
/**
* 脱敏处理-关联人信息
*
* @return AdamUserIdentityVo
*/
public void desensitize() {
this.setIdName(SensitizeUtil.chineseName(this.getIdName()));
this.setIdNo(SensitizeUtil.custom(this.getIdNo(), 3, 2));
if (!Objects.isNull(this.idNo) && StringUtils.length(this.getIdNo()) < 9) {
this.setIdNo(SensitizeUtil.custom(this.getIdNo(), 2, 2));
}
}
} }
...@@ -32,6 +32,24 @@ public class GoblinStoreOrderListSkuVo implements Cloneable { ...@@ -32,6 +32,24 @@ public class GoblinStoreOrderListSkuVo implements Cloneable {
@ApiModelProperty(value = "优惠价") @ApiModelProperty(value = "优惠价")
private BigDecimal priceVoucher; private BigDecimal priceVoucher;
/**
* ---------------------------- 以下为券类商品-代金券属性 ----------------------------
*/
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private Integer skuType;
@ApiModelProperty(value = "是否实名[0-否|1-是,表示该商品需要实名关联],这里默认0")
private Integer isTrueName;
@ApiModelProperty(value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照")
private Integer idType;
@ApiModelProperty(value = "关联人姓名")
private String idName;
@ApiModelProperty(value = "关联人证件号码")
private String idNo;
/**
* ---------------------------- 以上为券类商品-代金券属性 ----------------------------
*/
private static final GoblinStoreOrderListSkuVo obj = new GoblinStoreOrderListSkuVo(); private static final GoblinStoreOrderListSkuVo obj = new GoblinStoreOrderListSkuVo();
public static GoblinStoreOrderListSkuVo getNew() { public static GoblinStoreOrderListSkuVo getNew() {
......
...@@ -25,7 +25,7 @@ public class NoticeGoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -25,7 +25,7 @@ public class NoticeGoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(value = "单品的编号[45]") @ApiModelProperty(value = "单品的编号[45]")
private String skuNo; private String skuNo;
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType; private int skuType;
@ApiModelProperty(value = "单品的名称[100]") @ApiModelProperty(value = "单品的名称[100]")
private String name; private String name;
......
package com.liquidnet.service.goblin.param; package com.liquidnet.service.goblin.param;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderSkuParam;
import com.liquidnet.service.goblin.entity.GoblinOrderAttr; import com.liquidnet.service.goblin.entity.GoblinOrderAttr;
import com.liquidnet.service.goblin.entity.GoblinOrderSku; import com.liquidnet.service.goblin.entity.GoblinOrderSku;
import com.liquidnet.service.goblin.entity.GoblinStoreOrder; import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
...@@ -9,6 +10,7 @@ import lombok.Data; ...@@ -9,6 +10,7 @@ import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map;
@ApiModel(value = "GoblinOrderPreParam") @ApiModel(value = "GoblinOrderPreParam")
...@@ -48,6 +50,7 @@ public class GoblinOrderPreParam implements Cloneable{ ...@@ -48,6 +50,7 @@ public class GoblinOrderPreParam implements Cloneable{
private List<GoblinOrderSku> orderSkuList; private List<GoblinOrderSku> orderSkuList;
private List<String> storeSpuIds; private List<String> storeSpuIds;
private List<String> platformSpuIds; private List<String> platformSpuIds;
private Map<String, GoblinOrderSkuParam> orderSkuParamMap;
private static final GoblinOrderPreParam obj = new GoblinOrderPreParam(); private static final GoblinOrderPreParam obj = new GoblinOrderPreParam();
......
package com.liquidnet.service.goblin.param; package com.liquidnet.service.goblin.param;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderSkuParam;
import com.liquidnet.service.goblin.entity.GoblinOrderAttr; import com.liquidnet.service.goblin.entity.GoblinOrderAttr;
import com.liquidnet.service.goblin.entity.GoblinOrderSku; import com.liquidnet.service.goblin.entity.GoblinOrderSku;
import com.liquidnet.service.goblin.entity.GoblinStoreOrder; import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
...@@ -9,6 +10,7 @@ import lombok.Data; ...@@ -9,6 +10,7 @@ import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map;
@ApiModel(value = "GoblinOrderSqlParam") @ApiModel(value = "GoblinOrderSqlParam")
...@@ -18,6 +20,7 @@ public class GoblinOrderSqlParam implements Cloneable{ ...@@ -18,6 +20,7 @@ public class GoblinOrderSqlParam implements Cloneable{
private GoblinStoreOrder storeOrder; private GoblinStoreOrder storeOrder;
private GoblinOrderAttr orderAttr; private GoblinOrderAttr orderAttr;
private List<GoblinOrderSku> orderSkuList; private List<GoblinOrderSku> orderSkuList;
private Map<String, GoblinOrderSkuParam> orderSkuParamMap;
private static final GoblinOrderSqlParam obj = new GoblinOrderSqlParam(); private static final GoblinOrderSqlParam obj = new GoblinOrderSqlParam();
......
...@@ -16,6 +16,8 @@ public interface IGoblinOrderAppService { ...@@ -16,6 +16,8 @@ public interface IGoblinOrderAppService {
ResponseDto<GoblinAppOrderDetailsVo> orderDetails(String orderId,String uid); ResponseDto<GoblinAppOrderDetailsVo> orderDetails(String orderId,String uid);
Integer couponState(String orderId, String uid);
ResponseDto<Boolean> getProduce(String orderId,String uid); ResponseDto<Boolean> getProduce(String orderId,String uid);
ResponseDto<Boolean> applyRefund(GoblinAppOrderRefundParam param); ResponseDto<Boolean> applyRefund(GoblinAppOrderRefundParam param);
......
...@@ -40,6 +40,14 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -40,6 +40,14 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
void digitalGoodsAdd(GoblinGoodsInfoVo goodsInfoVo); void digitalGoodsAdd(GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:SPU添加-券类商品
*
* @param goodsInfoVo GoblinGoodsInfoVo
* @param goodsSkuInfoVoList List<GoblinGoodsSkuInfoVo>
*/
void couponGoodsAdd(GoblinGoodsInfoVo goodsInfoVo, List<GoblinGoodsSkuInfoVo> goodsSkuInfoVoList);
/** /**
* 商品管理:SPU详情 * 商品管理:SPU详情
* *
...@@ -69,6 +77,16 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -69,6 +77,16 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
boolean digitalGoodsEditSpu(String uid, GoblinStoreMgtDigitalGoodsAddParam mgtDigitalGoodsAddParam, GoblinGoodsInfoVo goodsInfoVo); boolean digitalGoodsEditSpu(String uid, GoblinStoreMgtDigitalGoodsAddParam mgtDigitalGoodsAddParam, GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:商品编辑:SPU编辑
*
* @param uid UID
* @param mgtGoodsCouponAddParam GoblinStoreMgtGoodsCouponAddParam
* @param goodsInfoVo GoblinGoodsInfoVo
* @return boolean
*/
boolean couponGoodsEditSpu(String uid, GoblinStoreMgtGoodsCouponAddParam mgtGoodsCouponAddParam, GoblinGoodsInfoVo goodsInfoVo);
/** /**
* 商品管理:商品编辑:SKU编辑 * 商品管理:商品编辑:SKU编辑
* *
...@@ -93,6 +111,16 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -93,6 +111,16 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
boolean digitalGoodsEditSku(String uid, GoblinStoreMgtDigitalGoodsAddSkuParam mgtDigitalGoodsAddSkuParam, GoblinGoodsInfoVo mgtGoodsInfoVo); boolean digitalGoodsEditSku(String uid, GoblinStoreMgtDigitalGoodsAddSkuParam mgtDigitalGoodsAddSkuParam, GoblinGoodsInfoVo mgtGoodsInfoVo);
/**
* 商品管理:商品编辑:SKU编辑-券类商品
*
* @param uid UID
* @param mgtGoodsEditSkuParam GoblinStoreMgtGoodsCouponEditSkuParam
* @param goodsInfoVo GoblinGoodsInfoVo
* @return boolean
*/
boolean couponGoodsEditSku(String uid, GoblinStoreMgtGoodsCouponEditSkuParam mgtGoodsEditSkuParam, GoblinGoodsInfoVo goodsInfoVo);
/** /**
* 商品管理:商品编辑:SKU添加 * 商品管理:商品编辑:SKU添加
* *
......
...@@ -25,6 +25,7 @@ public class KylinRedisConst { ...@@ -25,6 +25,7 @@ public class KylinRedisConst {
public static final String TIMES = "kylin:times:id:"; public static final String TIMES = "kylin:times:id:";
public static final String AGENT = "kylin:agent:info"; public static final String AGENT = "kylin:agent:info";
public static final String ORDER_LIST = "kylin:order:list:userId:"; public static final String ORDER_LIST = "kylin:order:list:userId:";
public static final String ORDER_REFUND_TEMP = "kylin:order:refund:";
public static final String ORDER_REFUND_BY_ORDER_ID = "kylin:order:refund:orderId:"; public static final String ORDER_REFUND_BY_ORDER_ID = "kylin:order:refund:orderId:";
public static final String ORDER_REFUND = "kylin:order:refund:orderRefundsId:"; public static final String ORDER_REFUND = "kylin:order:refund:orderRefundsId:";
......
...@@ -23,7 +23,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -23,7 +23,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]") @ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int spuType; private int spuType;
@ApiModelProperty(position = 13, value = "商品名称[100]") @ApiModelProperty(position = 13, value = "商品名称[100]")
private String name; private String name;
......
...@@ -15,8 +15,8 @@ import java.math.BigDecimal; ...@@ -15,8 +15,8 @@ import java.math.BigDecimal;
*/ */
@Data @Data
public class OrderRefundPoundage implements Cloneable { public class OrderRefundPoundage implements Cloneable {
@ApiModelProperty(value = "天数") @ApiModelProperty(value = "日期 yyyy-MM-dd HH:mm:ss")
private int day; private String day;
@ApiModelProperty(value = "距离演出开始日期>15天") @ApiModelProperty(value = "距离演出开始日期>15天")
private String content; private String content;
@ApiModelProperty(value = "费率 如果手续费是0.1") @ApiModelProperty(value = "费率 如果手续费是0.1")
......
package com.liquidnet.service.kylin.dto.vo.admin;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* <p>
* 退款手续费说明
* </p>
*
* @author jiangxiulong
* @since 2021-10-13
*/
@Data
public class OrderRefundPoundageF implements Cloneable {
@ApiModelProperty(value = "演出id")
private String performanceId;
@ApiModelProperty(value = "阶梯退款数据")
private List<OrderRefundPoundage> orderRefundPoundage;
private static final OrderRefundPoundageF obj = new OrderRefundPoundageF();
public static OrderRefundPoundageF getNew() {
try {
return (OrderRefundPoundageF) obj.clone();
} catch (CloneNotSupportedException e) {
return new OrderRefundPoundageF();
}
}
}
...@@ -153,6 +153,14 @@ public class KylinPerformanceVo implements Serializable, Cloneable { ...@@ -153,6 +153,14 @@ public class KylinPerformanceVo implements Serializable, Cloneable {
} }
} }
//todo 阶梯退票 所有调用这个方法的地方都有改动
public Integer getIsRefundPoundage(Integer i) {
if(null==i || 0==i){
return 0;
}
return 1;
}
public void setPerformance(KylinPerformances performance) { public void setPerformance(KylinPerformances performance) {
this.mid = performance.getMid(); this.mid = performance.getMid();
this.performancesId = performance.getPerformancesId(); this.performancesId = performance.getPerformancesId();
......
...@@ -11,6 +11,7 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo; ...@@ -11,6 +11,7 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.entity.KylinOrderImport; import com.liquidnet.service.kylin.entity.KylinOrderImport;
import com.liquidnet.service.kylin.entity.KylinPerformances; import com.liquidnet.service.kylin.entity.KylinPerformances;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -28,6 +29,7 @@ public interface IKylinPerformancesAdminService { ...@@ -28,6 +29,7 @@ public interface IKylinPerformancesAdminService {
/** /**
* 同步演出 到票务平台 * 同步演出 到票务平台
*
* @param performanceId 演出id * @param performanceId 演出id
* @return 结果 * @return 结果
*/ */
...@@ -35,6 +37,7 @@ public interface IKylinPerformancesAdminService { ...@@ -35,6 +37,7 @@ public interface IKylinPerformancesAdminService {
/** /**
* 同步订单 到票务平台 * 同步订单 到票务平台
*
* @param performanceId 演出id * @param performanceId 演出id
* @return 结果 * @return 结果
*/ */
...@@ -80,7 +83,7 @@ public interface IKylinPerformancesAdminService { ...@@ -80,7 +83,7 @@ public interface IKylinPerformancesAdminService {
* @param status 演出状态 * @param status 演出状态
* @return 20个 sql 数据 * @return 20个 sql 数据
*/ */
List<PerformanceTitleDao> getListByStatus(String status,String title); List<PerformanceTitleDao> getListByStatus(String status, String title);
/** /**
* 根据演出状态 查询演出列表 演出全量场次票 * 根据演出状态 查询演出列表 演出全量场次票
...@@ -94,7 +97,7 @@ public interface IKylinPerformancesAdminService { ...@@ -94,7 +97,7 @@ public interface IKylinPerformancesAdminService {
* 根据(演出\场次\票种)ID 查询演出、场次、票种信息 * 根据(演出\场次\票种)ID 查询演出、场次、票种信息
* *
* @param scope ID所属字段 * @param scope ID所属字段
* @param id ID值 * @param id ID值
* @return 1条记录(包括演出名称、场次名称?、票种名称?及对于ID) * @return 1条记录(包括演出名称、场次名称?、票种名称?及对于ID)
*/ */
PerformanceSimpleAllDao getSimpleDetailByScopeAndId(String scope, String id); PerformanceSimpleAllDao getSimpleDetailByScopeAndId(String scope, String id);
...@@ -123,7 +126,7 @@ public interface IKylinPerformancesAdminService { ...@@ -123,7 +126,7 @@ public interface IKylinPerformancesAdminService {
* @param performancesId 相关参数 * @param performancesId 相关参数
* @return boolean * @return boolean
*/ */
boolean setRecommend(String performancesId,Integer isRecommend); boolean setRecommend(String performancesId, Integer isRecommend);
/** /**
* 设置 演出推荐 关联 * 设置 演出推荐 关联
...@@ -131,7 +134,7 @@ public interface IKylinPerformancesAdminService { ...@@ -131,7 +134,7 @@ public interface IKylinPerformancesAdminService {
* @param performancesId 相关参数 * @param performancesId 相关参数
* @return boolean * @return boolean
*/ */
Integer setIsShow(String performancesId,Integer isShow); Integer setIsShow(String performancesId, Integer isShow);
/** /**
* 查询 推荐演出列表 * 查询 推荐演出列表
...@@ -193,41 +196,79 @@ public interface IKylinPerformancesAdminService { ...@@ -193,41 +196,79 @@ public interface IKylinPerformancesAdminService {
/** /**
* 修改 当前票种是否关联分销 * 修改 当前票种是否关联分销
*
* @param ticketId 票务id * @param ticketId 票务id
* @param status 0 否 1 是 * @param status 0 否 1 是
* @return * @return
*/ */
boolean changeTicketAgent(String performancesId,String ticketId, Integer status); boolean changeTicketAgent(String performancesId, String ticketId, Integer status);
/** /**
* 修改 当前票种支付文案 * 修改 当前票种支付文案
*
* @param ticketId 票务id * @param ticketId 票务id
* @param payTxt 支付文案 * @param payTxt 支付文案
* @return * @return
*/ */
boolean changeTicketPayTxt(String performancesId,String ticketId, String payTxt); boolean changeTicketPayTxt(String performancesId, String ticketId, String payTxt);
/** /**
* 修改 演出&票种&是否同步到大麦 * 修改 演出&票种&是否同步到大麦
*
* @return * @return
*/ */
boolean changeSysDamai(List<SysDamaiParam> params); boolean changeSysDamai(List<SysDamaiParam> params);
/** /**
* 获取 演出退款配置 * 获取 演出退款配置
*
* @param performanceId * @param performanceId
* @return * @return
*/ */
PerformanceRefundConfigVo getRefundConfig(String performanceId); PerformanceRefundConfigVo getRefundConfig(String performanceId);
/**
* 配置 注意事项
*
* @param performanceId
* @return
*/
String setPoundageExplain(String explain, String performanceId);
/**
* 获取 注意事项
*
* @param performanceId
* @return
*/
String getPoundageExplain(String performanceId);
/**
* 配置 注意事项
*
* @param performanceId
* @return
*/
String setRefundPoundageAll(List<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId);
/**
* 获取 注意事项
*
* @param performanceId
* @return
*/
ArrayList<OrderRefundPoundage> getRefundPoundageAll(String performanceId);
/** /**
* 修改 演出退款配置 * 修改 演出退款配置
*
* @return * @return
*/ */
String changeRefundConfig(String performancesId, String changeRefundConfig(String performancesId,
Integer isCanRefund, Integer isCanRefund,
String refundOpenTime, String refundOpenTime,
String refundCloseTime, String refundCloseTime,
Integer isRefundPoundage, Integer isRefundPoundage,
Integer isRefundVoucher, Integer isRefundVoucher,
Integer isRefundExpress, Integer isRefundExpress,
...@@ -236,6 +277,7 @@ public interface IKylinPerformancesAdminService { ...@@ -236,6 +277,7 @@ public interface IKylinPerformancesAdminService {
/** /**
* 获取 演出转赠配置 * 获取 演出转赠配置
*
* @param performanceId * @param performanceId
* @return * @return
*/ */
...@@ -243,6 +285,7 @@ public interface IKylinPerformancesAdminService { ...@@ -243,6 +285,7 @@ public interface IKylinPerformancesAdminService {
/** /**
* 获取 演出转赠配置 * 获取 演出转赠配置
*
* @param performanceId * @param performanceId
* @return * @return
*/ */
...@@ -250,12 +293,13 @@ public interface IKylinPerformancesAdminService { ...@@ -250,12 +293,13 @@ public interface IKylinPerformancesAdminService {
/** /**
* 修改 演出转赠配置 * 修改 演出转赠配置
*
* @return * @return
*/ */
String changeTransferConfig(String performancesId, String changeTransferConfig(String performancesId,
Integer isCanRefund, Integer isCanRefund,
String refundOpenTime, String refundOpenTime,
String refundCloseTime); String refundCloseTime);
KylinPerformanceAgentVo getPerformanceAgent(String performancesId); KylinPerformanceAgentVo getPerformanceAgent(String performancesId);
......
...@@ -237,5 +237,4 @@ public class LocalAdminController extends BaseController ...@@ -237,5 +237,4 @@ public class LocalAdminController extends BaseController
{ {
return smilePrefix + "/userList/add"; return smilePrefix + "/userList/add";
} }
} }
...@@ -39,7 +39,7 @@ public class GoblinCommonController extends BaseController { ...@@ -39,7 +39,7 @@ public class GoblinCommonController extends BaseController {
@GetMapping("goods") @GetMapping("goods")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品]"), @ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品|2-券类商品]"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuAppear", value = "显示状态"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuAppear", value = "显示状态"),
}) })
...@@ -58,7 +58,7 @@ public class GoblinCommonController extends BaseController { ...@@ -58,7 +58,7 @@ public class GoblinCommonController extends BaseController {
@GetMapping("sku") @GetMapping("sku")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品]"), @ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品|2-券类商品]"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"),
}) })
@ResponseBody @ResponseBody
......
...@@ -10,6 +10,7 @@ import com.liquidnet.client.admin.common.enums.BusinessType; ...@@ -10,6 +10,7 @@ import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.zhengzai.kylin.dto.KylinOrderImportDto; import com.liquidnet.client.admin.zhengzai.kylin.dto.KylinOrderImportDto;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp; import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.goblin.param.GoblinFrontCubeParam;
import com.liquidnet.service.kylin.dao.PerformanceAdminListDao; import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
import com.liquidnet.service.kylin.dao.PerformanceMemberAuditDao; import com.liquidnet.service.kylin.dao.PerformanceMemberAuditDao;
import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao; import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao;
...@@ -21,12 +22,14 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo; ...@@ -21,12 +22,14 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.entity.KylinOrderImport; import com.liquidnet.service.kylin.entity.KylinOrderImport;
import com.liquidnet.service.kylin.service.admin.IKylinPerformancesAdminService; import com.liquidnet.service.kylin.service.admin.IKylinPerformancesAdminService;
import com.liquidnet.service.kylin.service.other.DamaiService; import com.liquidnet.service.kylin.service.other.DamaiService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -117,7 +120,7 @@ public class KylinPerformancesController extends BaseController { ...@@ -117,7 +120,7 @@ public class KylinPerformancesController extends BaseController {
return toAjax(kylinPerformancesService.setIsShow(performancesId, isShow)); return toAjax(kylinPerformancesService.setIsShow(performancesId, isShow));
} }
// @Log(title = "演出列表", businessType = BusinessType.DETAIL) // @Log(title = "演出列表", businessType = BusinessType.DETAIL)
//@RequiresPermissions("kylin:performances:view") //@RequiresPermissions("kylin:performances:view")
@GetMapping(value = "/memberInfo/{performancesId}") @GetMapping(value = "/memberInfo/{performancesId}")
public String memberInfo(@PathVariable("performancesId") String performancesId, ModelMap mmap) { public String memberInfo(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
...@@ -135,7 +138,7 @@ public class KylinPerformancesController extends BaseController { ...@@ -135,7 +138,7 @@ public class KylinPerformancesController extends BaseController {
return toAjax(result); return toAjax(result);
} }
// @Log(title = "演出列表-演出数据", businessType = BusinessType.LIST) // @Log(title = "演出列表-演出数据", businessType = BusinessType.LIST)
//@RequiresPermissions("kylin:performances:view") //@RequiresPermissions("kylin:performances:view")
@GetMapping(value = "/performanceStatic/{performancesId}") @GetMapping(value = "/performanceStatic/{performancesId}")
public String performanceStatic(@PathVariable("performancesId") String performancesId, ModelMap mmap) { public String performanceStatic(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
...@@ -229,6 +232,56 @@ public class KylinPerformancesController extends BaseController { ...@@ -229,6 +232,56 @@ public class KylinPerformancesController extends BaseController {
return prefix + "/refundConfig"; return prefix + "/refundConfig";
} }
@GetMapping(value = "/refundPoundage/{performancesId}")
public String getRefundPoundage(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
ArrayList<OrderRefundPoundage> refundPoundageList = kylinPerformancesService.getRefundPoundageAll(performancesId);
String refundPoundageExplain = kylinPerformancesService.getPoundageExplain(performancesId);
mmap.put("performancesId", performancesId);
mmap.put("refundPoundageList", refundPoundageList);
mmap.put("refundPoundageExplain", refundPoundageExplain);
return prefix + "/refundPoundage";
}
//
@PostMapping(value = "/refundConfig/explain") //todo 阶梯退票
@ApiOperation(value = "设置注意事项")
@ResponseBody
public AjaxResult setPoundageExplain(@RequestParam("explain") String explain,
@RequestParam("performancesId") String performancesId) {
String result = kylinPerformancesService.setPoundageExplain(explain, performancesId);
return AjaxResult.success(result);
}
@GetMapping(value = "/refundConfig/explain") //todo 阶梯退票
@ApiOperation(value = "获取注意事项")
@ResponseBody
public AjaxResult getPoundageExplain(@RequestParam("performancesId") String performancesId) {
String result = kylinPerformancesService.getPoundageExplain(performancesId);
return AjaxResult.success(result);
}
//阶梯退票
@GetMapping(value = "/refundConfig/poundage") //todo 阶梯退票
@ApiOperation(value = "获取阶梯退票")
@ResponseBody
public AjaxResult getRefundPoundageAll(@RequestParam("performancesId") String performancesId) {
ArrayList<OrderRefundPoundage> result = kylinPerformancesService.getRefundPoundageAll(performancesId);
return AjaxResult.success(result);
}
//
@PostMapping(value = "/refundConfig/poundage") //todo 阶梯退票
@ApiOperation(value = "设置阶梯退票")
@ResponseBody
public AjaxResult setRefundPoundageAll(@RequestBody OrderRefundPoundageF param) {
String result = kylinPerformancesService.setRefundPoundageAll(param.getOrderRefundPoundage(), param.getPerformanceId());
if (null != result && result.equals("操作成功")) {
return AjaxResult.success(result);
} else {
return AjaxResult.error(result);
}
}
//@RequiresPermissions("kylin:performances:view") //@RequiresPermissions("kylin:performances:view")
@PostMapping(value = "/refundConfig/change") @PostMapping(value = "/refundConfig/change")
@ResponseBody @ResponseBody
......
...@@ -25,8 +25,9 @@ ...@@ -25,8 +25,9 @@
</li> </li>
<li id="li-tab-1"><a data-toggle="tab" href="#tab-1" aria-expanded="true" id="tab-nav-1"> 演出数据</a> <li id="li-tab-1"><a data-toggle="tab" href="#tab-1" aria-expanded="true" id="tab-nav-1"> 演出数据</a>
</li> </li>
<li id="li-tab-6"><a data-toggle="tab" href="#tab-6" aria-expanded="false" <li id="li-tab-6"><a data-toggle="tab" href="#tab-6" aria-expanded="false" onclick="refundConfigInfo()">退款管理</a>
onclick="refundConfigInfo()">退款管理</a> </li>
<li id="li-tab-10"><a data-toggle="tab" href="#tab-10" aria-expanded="false" onclick="refundPoundageInfo()">阶段退票</a>
</li> </li>
<li id="li-tab-7"><a data-toggle="tab" href="#tab-7" aria-expanded="false" onclick="transferInfo()">转赠配置</a> <li id="li-tab-7"><a data-toggle="tab" href="#tab-7" aria-expanded="false" onclick="transferInfo()">转赠配置</a>
</li> </li>
...@@ -309,6 +310,13 @@ ...@@ -309,6 +310,13 @@
height=800px frameborder=0></iframe> height=800px frameborder=0></iframe>
</div> </div>
</div> </div>
<div id="tab-10" class="tab-pane">
<div class="panel-body">
<iframe id="refundPoundage_iframe" name="refundPoundage_iframe" marginwidth=0 marginheight=0
width=100%
height=800px frameborder=0></iframe>
</div>
</div>
<div id="tab-7" class="tab-pane"> <div id="tab-7" class="tab-pane">
<div class="panel-body"> <div class="panel-body">
<iframe id="transfer_iframe" name="transfer_iframe" marginwidth=0 marginheight=0 width=100% <iframe id="transfer_iframe" name="transfer_iframe" marginwidth=0 marginheight=0 width=100%
...@@ -506,6 +514,10 @@ ...@@ -506,6 +514,10 @@
function refundConfigInfo() { function refundConfigInfo() {
document.getElementById("refundConfig_iframe").src = "../refundConfig/" + '[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", ""); document.getElementById("refundConfig_iframe").src = "../refundConfig/" + '[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", "");
} }
//阶梯退票
function refundPoundageInfo() {
document.getElementById("refundPoundage_iframe").src = `../refundPoundage/${'[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", "")}`
}
//转赠配置 //转赠配置
function transferInfo() { function transferInfo() {
......
...@@ -121,6 +121,10 @@ ...@@ -121,6 +121,10 @@
field: 'saleGeneral', field: 'saleGeneral',
title: '实销' title: '实销'
}, },
// {
// field: 'refundNumber',
// title: '退票'
// },
{ {
field: 'surplusGeneral', field: 'surplusGeneral',
title: '余票' title: '余票'
......
...@@ -97,6 +97,9 @@ ...@@ -97,6 +97,9 @@
<th> <th>
<div class="cell">退票数量</div> <div class="cell">退票数量</div>
</th> </th>
<th>
<div class="cell">羊毛券数量</div>
</th>
<th> <th>
<div class="cell">销售额(元)</div> <div class="cell">销售额(元)</div>
</th> </th>
...@@ -134,6 +137,9 @@ ...@@ -134,6 +137,9 @@
<td> <td>
<div class="cell" th:text="${respBean.totalRefundGeneral}">0</div> <div class="cell" th:text="${respBean.totalRefundGeneral}">0</div>
</td> </td>
<td>
<div class="cell" th:text="${respBean.totalVoucherCount}">0</div>
</td>
<td> <td>
<div class="cell" th:text="${respBean.totalSalePrice}">0</div> <div class="cell" th:text="${respBean.totalSalePrice}">0</div>
</td> </td>
......
...@@ -23,10 +23,12 @@ ...@@ -23,10 +23,12 @@
<label class="col-sm-3 control-label is-required">用户申请退款:</label> <label class="col-sm-3 control-label is-required">用户申请退款:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="0" name="performance_isCanRefund" th:checked="*{isCanRefund==0 ? true : false}" checked> 关闭</label> <input type="radio" value="0" name="performance_isCanRefund"
th:checked="*{isCanRefund==0 ? true : false}" checked> 关闭</label>
</div> </div>
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="1" name="performance_isCanRefund" th:checked="*{isCanRefund==1 ? true : false}">开启</label> <input type="radio" value="1" name="performance_isCanRefund"
th:checked="*{isCanRefund==1 ? true : false}">开启</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -40,14 +42,17 @@ ...@@ -40,14 +42,17 @@
class="form-control" id="endTime" placeholder="结束时间选择" name="refundCloseTime" class="form-control" id="endTime" placeholder="结束时间选择" name="refundCloseTime"
required/> required/>
</div> </div>
<div class="form-group"> <!-- todo 阶梯退票 添加了 style="display: none" 这个注释你看完需要删除-->
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">用户退款手续费:</label> <label class="col-sm-3 control-label is-required">用户退款手续费:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="0" name="performance_isRefundPoundage" th:checked="*{isRefundPoundage==0 ? true : false}" checked> 关闭</label> <input type="radio" value="0" name="performance_isRefundPoundage"
th:checked="*{isRefundPoundage==0 ? true : false}" checked> 关闭</label>
</div> </div>
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="1" name="performance_isRefundPoundage" th:checked="*{isRefundPoundage==1 ? true : false}">开启</label> <input type="radio" value="1" name="performance_isRefundPoundage"
th:checked="*{isRefundPoundage==1 ? true : false}">开启</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -55,10 +60,12 @@ ...@@ -55,10 +60,12 @@
<label class="col-sm-3 control-label is-required">用户退款快递票上门取货快递费:</label> <label class="col-sm-3 control-label is-required">用户退款快递票上门取货快递费:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="0" name="performance_isRefundExpress" th:checked="*{isRefundExpress==0 ? true : false}" checked> 公司月结</label> <input type="radio" value="0" name="performance_isRefundExpress"
th:checked="*{isRefundExpress==0 ? true : false}" checked> 公司月结</label>
</div> </div>
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="1" name="performance_isRefundExpress" th:checked="*{isRefundExpress==1 ? true : false}">用户承担</label> <input type="radio" value="1" name="performance_isRefundExpress"
th:checked="*{isRefundExpress==1 ? true : false}">用户承担</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -66,10 +73,12 @@ ...@@ -66,10 +73,12 @@
<label class="col-sm-3 control-label is-required">用户退款快递票是否需要退回:</label> <label class="col-sm-3 control-label is-required">用户退款快递票是否需要退回:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="1" name="isBackPaperTicket" th:checked="*{isBackPaperTicket==1 ? true : false}" checked> 需要</label> <input type="radio" value="1" name="isBackPaperTicket"
th:checked="*{isBackPaperTicket==1 ? true : false}" checked> 需要</label>
</div> </div>
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="0" name="isBackPaperTicket" th:checked="*{isBackPaperTicket==0 ? true : false}">不需要</label> <input type="radio" value="0" name="isBackPaperTicket"
th:checked="*{isBackPaperTicket==0 ? true : false}">不需要</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -77,10 +86,12 @@ ...@@ -77,10 +86,12 @@
<label class="col-sm-3 control-label is-required">用户退款快递票快递费是否退回:</label> <label class="col-sm-3 control-label is-required">用户退款快递票快递费是否退回:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="1" name="isRefundExpressNew" th:checked="*{isRefundExpressNew==1 ? true : false}" checked> 退回</label> <input type="radio" value="1" name="isRefundExpressNew"
th:checked="*{isRefundExpressNew==1 ? true : false}" checked> 退回</label>
</div> </div>
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="0" name="isRefundExpressNew" th:checked="*{isRefundExpressNew==0 ? true : false}">不退回</label> <input type="radio" value="0" name="isRefundExpressNew"
th:checked="*{isRefundExpressNew==0 ? true : false}">不退回</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -88,10 +99,12 @@ ...@@ -88,10 +99,12 @@
<label class="col-sm-3 control-label is-required">退款是否退优惠券:</label> <label class="col-sm-3 control-label is-required">退款是否退优惠券:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="0" name="performance_isRefundVoucher" th:checked="*{isRefundVoucher==0 ? true : false}" checked> 关闭</label> <input type="radio" value="0" name="performance_isRefundVoucher"
th:checked="*{isRefundVoucher==0 ? true : false}" checked> 关闭</label>
</div> </div>
<div class="radio check-box"> <div class="radio check-box">
<input type="radio" value="1" name="performance_isRefundVoucher" th:checked="*{isRefundVoucher==1 ? true : false}">开启</label> <input type="radio" value="1" name="performance_isRefundVoucher"
th:checked="*{isRefundVoucher==1 ? true : false}">开启</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -144,7 +157,8 @@ ...@@ -144,7 +157,8 @@
isCanRefund: parseInt($("input[name^='performance_isCanRefund']:checked").val()), isCanRefund: parseInt($("input[name^='performance_isCanRefund']:checked").val()),
refundOpenTime: $("input[name^='refundOpenTime']").val(), refundOpenTime: $("input[name^='refundOpenTime']").val(),
refundCloseTime: $("input[name^='refundCloseTime']").val(), refundCloseTime: $("input[name^='refundCloseTime']").val(),
isRefundPoundage: parseInt($("input[name^='performance_isRefundPoundage']:checked").val()), // isRefundPoundage: parseInt($("input[name^='performance_isRefundPoundage']:checked").val()),
isRefundPoundage: 0,
isRefundVoucher: parseInt($("input[name^='performance_isRefundVoucher']:checked").val()), isRefundVoucher: parseInt($("input[name^='performance_isRefundVoucher']:checked").val()),
isRefundExpress: parseInt($("input[name^='performance_isRefundExpress']:checked").val()), isRefundExpress: parseInt($("input[name^='performance_isRefundExpress']:checked").val()),
isBackPaperTicket: parseInt($("input[name^='isBackPaperTicket']:checked").val()), isBackPaperTicket: parseInt($("input[name^='isBackPaperTicket']:checked").val()),
......
...@@ -45,6 +45,7 @@ import org.springframework.data.mongodb.core.query.Criteria; ...@@ -45,6 +45,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -53,6 +54,8 @@ import java.util.List; ...@@ -53,6 +54,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
/** /**
* <p> * <p>
* 演出 服务实现类 * 演出 服务实现类
...@@ -91,6 +94,8 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -91,6 +94,8 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
ISlimeAuthorizationRecordsAdminService merchantAuthorizationRecordsAdminService; ISlimeAuthorizationRecordsAdminService merchantAuthorizationRecordsAdminService;
@Autowired @Autowired
InnerService innerService; InnerService innerService;
@Autowired
private KylinOrderRefundsMapper kylinOrderRefundsMapper;
@Autowired @Autowired
SmileRedisUtils smileRedisUtils; SmileRedisUtils smileRedisUtils;
...@@ -744,7 +749,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -744,7 +749,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
vo.setRefundCloseTime(kylinPerformanceStatus.getRefundCloseTime() == null ? "" : DateUtil.Formatter.yyyyMMddHHmmss.format(kylinPerformanceStatus.getRefundCloseTime())); vo.setRefundCloseTime(kylinPerformanceStatus.getRefundCloseTime() == null ? "" : DateUtil.Formatter.yyyyMMddHHmmss.format(kylinPerformanceStatus.getRefundCloseTime()));
vo.setRefundOpenTime(kylinPerformanceStatus.getRefundOpenTime() == null ? "" : DateUtil.Formatter.yyyyMMddHHmmss.format(kylinPerformanceStatus.getRefundOpenTime())); vo.setRefundOpenTime(kylinPerformanceStatus.getRefundOpenTime() == null ? "" : DateUtil.Formatter.yyyyMMddHHmmss.format(kylinPerformanceStatus.getRefundOpenTime()));
vo.setIsRefundPoundage(kylinPerformanceStatus.getIsRefundPoundage()); // vo.setIsRefundPoundage(kylinPerformanceStatus.getIsRefundPoundage());
vo.setIsRefundVoucher(kylinPerformanceStatus.getIsRefundVoucher()); vo.setIsRefundVoucher(kylinPerformanceStatus.getIsRefundVoucher());
vo.setIsRefundExpress(kylinPerformanceStatus.getIsRefundExpress()); vo.setIsRefundExpress(kylinPerformanceStatus.getIsRefundExpress());
vo.setIsBackPaperTicket(kylinPerformanceStatus.getIsBackPaperTicket()); vo.setIsBackPaperTicket(kylinPerformanceStatus.getIsBackPaperTicket());
...@@ -754,6 +759,65 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -754,6 +759,65 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
return vo; return vo;
} }
@Override
public String setPoundageExplain(String explain, String performanceId) {
dataUtils.setRefundPoundageExplain(explain, performanceId);
return explain;
}
@Override
public String getPoundageExplain(String performanceId) {
return dataUtils.getRefundPoundageExplain(performanceId);
}
@Override
public String setRefundPoundageAll(List<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId) {
if (orderRefundPoundageArrayList.size() > 10) {
return "阶梯不能大于10";
}
PerformanceRefundConfigVo configVo = getRefundConfig(performanceId);
if (configVo.getIsCanRefund() == 1) {
return "请先关闭退款再进行操作";
}
int count = kylinOrderRefundsMapper.selectingCount(performanceId);
if (count > 0) {
return "请先处理该演出待退款订单再进行操作";
}
LocalDateTime nextTime = LocalDateTime.parse("2001-01-01 12:00:00", DTF_YMD_HMS);
for (OrderRefundPoundage item : orderRefundPoundageArrayList) {
if (item.getPresent().compareTo(BigDecimal.ONE) > 0) {
return "手续费不能大于100%";
}
LocalDateTime curTime = LocalDateTime.parse(item.getDay(), DTF_YMD_HMS);
if (curTime.isBefore(nextTime)) {
return "当前阶梯时间不能早于前一个阶梯";
}
nextTime = curTime;
}
if (orderRefundPoundageArrayList.size() > 1) {
LocalDateTime st = LocalDateTime.parse(configVo.getRefundOpenTime(), DTF_YMD_HMS);
LocalDateTime et = LocalDateTime.parse(configVo.getRefundCloseTime(), DTF_YMD_HMS);
LocalDateTime ft = LocalDateTime.parse(orderRefundPoundageArrayList.get(0).getDay(), DTF_YMD_HMS);
LocalDateTime lt = LocalDateTime.parse(orderRefundPoundageArrayList.get(orderRefundPoundageArrayList.size() - 1).getDay(), DTF_YMD_HMS);
if (ft.isBefore(st)) {
return orderRefundPoundageArrayList.get(0).getDay() + "超出退款时间范围";
} else if (lt.isAfter(et)) {
return orderRefundPoundageArrayList.get(orderRefundPoundageArrayList.size() - 1).getDay() + "超出退款时间范围";
}
}
dataUtils.setRefundPoundage(orderRefundPoundageArrayList, performanceId);
return "操作成功";
}
@Override
public ArrayList<OrderRefundPoundage> getRefundPoundageAll(String performanceId) {
return dataUtils.getRefundPoundage(performanceId);
}
@Override @Override
public PerformanceTransferConfigVo getTransferConfig(String performanceId) { public PerformanceTransferConfigVo getTransferConfig(String performanceId) {
KylinPerformances kylinPerformances = performancesMapper.selectOne(new UpdateWrapper<KylinPerformances>().eq("performances_id", performanceId)); KylinPerformances kylinPerformances = performancesMapper.selectOne(new UpdateWrapper<KylinPerformances>().eq("performances_id", performanceId));
...@@ -895,6 +959,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -895,6 +959,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
countBean.setTotalRefundPrice(countBean.getTotalRefundPrice().add(dto.getTotalRefundPrice())); countBean.setTotalRefundPrice(countBean.getTotalRefundPrice().add(dto.getTotalRefundPrice()));
countBean.setTotalMemberNumber(countBean.getTotalMemberNumber().add(dto.getTotalMemberNumber())); countBean.setTotalMemberNumber(countBean.getTotalMemberNumber().add(dto.getTotalMemberNumber()));
countBean.setTotalPayingNumber(countBean.getTotalPayingNumber().add(dto.getTotalPayingNumber())); countBean.setTotalPayingNumber(countBean.getTotalPayingNumber().add(dto.getTotalPayingNumber()));
countBean.setTotalVoucherCount(countBean.getTotalVoucherCount().add(dto.getTotalVoucherCount()));
countBean.setTotalBuyUsers(dto.getTotalBuyUsers()); countBean.setTotalBuyUsers(dto.getTotalBuyUsers());
}); });
dtoList.add(countBean); dtoList.add(countBean);
......
...@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil; ...@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.vo.KylinExpressModuleVo; import com.liquidnet.service.kylin.dto.vo.KylinExpressModuleVo;
import com.liquidnet.service.kylin.dto.vo.admin.OrderRefundAddress; import com.liquidnet.service.kylin.dto.vo.admin.OrderRefundAddress;
import com.liquidnet.service.kylin.dto.vo.admin.OrderRefundPoundage;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo; import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo; import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
...@@ -24,6 +25,7 @@ import org.springframework.stereotype.Component; ...@@ -24,6 +25,7 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Component @Component
...@@ -274,8 +276,8 @@ public class DataUtils { ...@@ -274,8 +276,8 @@ public class DataUtils {
public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) { public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) {
String redisKeyUid; String redisKeyUid;
String redisKeyIdCard; String redisKeyIdCard;
String performanceIdKeyIdCard=""; String performanceIdKeyIdCard = "";
String ticketIdKeyIdCard=""; String ticketIdKeyIdCard = "";
int isTrueName = getPerformanceIsTrueName(performanceId); int isTrueName = getPerformanceIsTrueName(performanceId);
...@@ -499,36 +501,84 @@ public class DataUtils { ...@@ -499,36 +501,84 @@ public class DataUtils {
public String getTicketPayTxt(String ticketId) { public String getTicketPayTxt(String ticketId) {
String rdsKey = KylinRedisConst.TICKET_PAY_TXT.concat(ticketId); String rdsKey = KylinRedisConst.TICKET_PAY_TXT.concat(ticketId);
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdsKey); Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdsKey);
if(obj==null){ if (obj == null) {
return ""; return "";
}else{ } else {
return (String) obj; return (String) obj;
} }
} }
//删除 订单Ar激活码 //删除 订单Ar激活码
public void delOrderArCode(String orderId){ public void delOrderArCode(String orderId) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId); String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
redisDataSourceUtil.getRedisKylinUtil().del(rdk); redisDataSourceUtil.getRedisKylinUtil().del(rdk);
} }
//添加 订单Ar激活码 //添加 订单Ar激活码
public void addOrderArCode(String orderId,String arCode){ public void addOrderArCode(String orderId, String arCode) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId); String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
List<String> data = getOrderArCode(orderId); List<String> data = getOrderArCode(orderId);
data.add(arCode); data.add(arCode);
redisDataSourceUtil.getRedisKylinUtil().set(rdk,data); redisDataSourceUtil.getRedisKylinUtil().set(rdk, data);
} }
//获取 订单Ar激活码 //获取 订单Ar激活码
public List<String> getOrderArCode(String orderId){ public List<String> getOrderArCode(String orderId) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId); String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdk); Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdk);
if(obj==null){ if (obj == null) {
return CollectionUtil.arrayListString(); return CollectionUtil.arrayListString();
}else{ } else {
return (List<String>) obj; return (List<String>) obj;
} }
} }
/**
* //todo 阶梯退票
* 设置 注意事项
*
* @param explain 注意事项
* @param performanceId 演出id
*/
public void setRefundPoundageExplain(String explain, String performanceId) {
redisDataSourceUtil.getRedisKylinUtil().set(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId), explain);
}
/**
* //todo 阶梯退票
* 获取 注意事项
*
* @param performanceId 演出id
*/
public String getRefundPoundageExplain(String performanceId) {
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId));
if (null == obj) {
return "";
} else {
return (String) obj;
}
}
/**
* //todo 阶梯退票
* 设置手续费
*
* @param orderRefundPoundageArrayList 手续费数据集合
* @param performanceId 演出id
*/
public void setRefundPoundage(List<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId) {
redisDataSourceUtil.getRedisKylinUtil().set(KylinRedisConst.ORDER_REFUND_POUNDAGE.concat(":").concat(performanceId), orderRefundPoundageArrayList);
}
// 获取手续费
public ArrayList<OrderRefundPoundage> getRefundPoundage(String performanceId) {
ArrayList<OrderRefundPoundage> orderRefundPoundageArrayList = new ArrayList<>();
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(KylinRedisConst.ORDER_REFUND_POUNDAGE.concat(":").concat(performanceId));
if (obj == null) {
return orderRefundPoundageArrayList;
} else {
return (ArrayList<OrderRefundPoundage>) obj;
}
}
} }
...@@ -68,7 +68,13 @@ public class SmsEnum { ...@@ -68,7 +68,13 @@ public class SmsEnum {
* 购票短信 * 购票短信
* - 模版内容:您已成功购买${name}门票。可至个人中心查看订单 http://t.cn/ExMlr1B。演出${time}开始。微信关注 摩登天空服务号,获得更多演出资讯。特别提示:下载“正在现场APP”最新版,使用“在场”功能,可结识该场演出中共同观演的在场好友。 * - 模版内容:您已成功购买${name}门票。可至个人中心查看订单 http://t.cn/ExMlr1B。演出${time}开始。微信关注 摩登天空服务号,获得更多演出资讯。特别提示:下载“正在现场APP”最新版,使用“在场”功能,可结识该场演出中共同观演的在场好友。
*/ */
@Deprecated
SMS_225995308, SMS_225995308,
/**
* 购票短信
* - 模版内容:您已成功购买${name}门票。可至个人中心查看订单 http://t.cn/ExMlr1B。演出${time}开始。微信关注 摩登天空订阅号,获得更多演出资讯。特别提示: 获取「正在现场」最新版,使用“在场"功能,可结识该场演出中共同观演的在场好友。
*/
SMS_463657321,
/** /**
* 购买会员 * 购买会员
* - 模版内容:欢迎加入登登登VIP大家庭。请微信关注“摩登天空服务号”,回复VIP,获取专属小助理客服服务了,回T退订 * - 模版内容:欢迎加入登登登VIP大家庭。请微信关注“摩登天空服务号”,回复VIP,获取专属小助理客服服务了,回T退订
......
package com.liquidnet.service.candy.dto;
import com.liquidnet.service.candy.entity.CandyUserCouponAssoc;
import lombok.Data;
import java.io.Serializable;
@Data
public class CandyUserCouponAssocDto implements Serializable, Cloneable {
private static final long serialVersionUID = -5500626839150118876L;
/**
* 关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
*/
private Integer idType;
/**
* 关联人姓名
*/
private String idName;
/**
* 关联人证件号码
*/
private String idNo;
private static final CandyUserCouponAssocDto obj = new CandyUserCouponAssocDto();
public static CandyUserCouponAssocDto getNew() {
try {
return (CandyUserCouponAssocDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new CandyUserCouponAssocDto();
}
}
public CandyUserCouponAssocDto copy(CandyUserCouponAssoc userCouponAssoc) {
if (null == userCouponAssoc) return this;
this.setIdType(userCouponAssoc.getIdType());
this.setIdName(userCouponAssoc.getIdName());
this.setIdNo(userCouponAssoc.getIdNo());
return this;
}
}
...@@ -30,6 +30,7 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable { ...@@ -30,6 +30,7 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable {
private Integer overlay; private Integer overlay;
private Integer overlayLevel; private Integer overlayLevel;
private Integer validity; private Integer validity;
private Integer isTrueName;
private Integer redeemValidity; private Integer redeemValidity;
private LocalDateTime redeemStart; private LocalDateTime redeemStart;
private LocalDateTime redeemStop; private LocalDateTime redeemStop;
...@@ -60,7 +61,6 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable { ...@@ -60,7 +61,6 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable {
/* com.liquidnet.service.candy.entity.CandyCommonCoupon */ /* com.liquidnet.service.candy.entity.CandyCommonCoupon */
private String ccouponId; private String ccouponId;
private static final CandyUserCouponBasicDto obj = new CandyUserCouponBasicDto(); private static final CandyUserCouponBasicDto obj = new CandyUserCouponBasicDto();
public static CandyUserCouponBasicDto getNew() { public static CandyUserCouponBasicDto getNew() {
...@@ -89,6 +89,7 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable { ...@@ -89,6 +89,7 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable {
this.setOverlay(coupon.getOverlay()); this.setOverlay(coupon.getOverlay());
this.setOverlayLevel(coupon.getOverlayLevel()); this.setOverlayLevel(coupon.getOverlayLevel());
this.setValidity(coupon.getValidity()); this.setValidity(coupon.getValidity());
this.setIsTrueName(coupon.getIsTrueName());
this.setRedeemValidity(coupon.getRedeemValidity()); this.setRedeemValidity(coupon.getRedeemValidity());
this.setRedeemStart(coupon.getRedeemStart()); this.setRedeemStart(coupon.getRedeemStart());
this.setRedeemStop(coupon.getRedeemStop()); this.setRedeemStop(coupon.getRedeemStop());
......
...@@ -104,6 +104,11 @@ public class CandyCoupon implements Serializable { ...@@ -104,6 +104,11 @@ public class CandyCoupon implements Serializable {
*/ */
private Integer validity; private Integer validity;
/**
* 是否实名[0-否|1-是,表示该商品需要实名关联]
*/
private Integer isTrueName;
/** /**
* 兑换有效期(单位天) * 兑换有效期(单位天)
*/ */
......
...@@ -28,7 +28,7 @@ public class CandyCouponRule implements Serializable { ...@@ -28,7 +28,7 @@ public class CandyCouponRule implements Serializable {
private String couponId; private String couponId;
/** /**
* 适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式] * 适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]
*/ */
private Integer useScope; private Integer useScope;
......
package com.liquidnet.service.candy.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 券关联适用人信息
* </p>
*
* @author liquidnet
* @since 2024-01-26
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class CandyUserCouponAssoc implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* ~candy_user_coupon.ucoupon_id
*/
private String ucouponId;
/**
* 关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
*/
private Integer idType;
/**
* 关联人姓名
*/
private String idName;
/**
* 关联人证件号码
*/
private String idNo;
private String comment;
}
package com.liquidnet.service.candy.mapper;
import com.liquidnet.service.candy.entity.CandyUserCouponAssoc;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 券关联适用人信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2024-01-26
*/
public interface CandyUserCouponAssocMapper extends BaseMapper<CandyUserCouponAssoc> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.candy.mapper.CandyUserCouponAssocMapper">
</mapper>
...@@ -51,7 +51,7 @@ public class GoblinGoods implements Serializable { ...@@ -51,7 +51,7 @@ public class GoblinGoods implements Serializable {
private String erpType; private String erpType;
/** /**
* 商品类型[0-常规|1-数字藏品] * 商品类型[0-常规|1-数字藏品|2-券类商品]
*/ */
private Integer spuType; private Integer spuType;
......
...@@ -58,7 +58,7 @@ public class GoblinGoodsSku implements Serializable { ...@@ -58,7 +58,7 @@ public class GoblinGoodsSku implements Serializable {
private String erpWarehouseNo; private String erpWarehouseNo;
/** /**
* 商品类型[0-常规|1-数字藏品] * 商品类型[0-常规|1-数字藏品|2-券类商品]
*/ */
private Integer skuType; private Integer skuType;
......
package com.liquidnet.service.goblin.entity;
import java.math.BigDecimal;
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;
/**
* <p>
* 商品券信息
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinGoodsSkuCoupon implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 单品id
*/
private String skuId;
/**
* 是否实名[0-否|1-是,表示该商品需要实名关联]
*/
private Integer isTrueName;
/**
* 业务类别[1-演出]
*/
private Integer busiType;
/**
* 券类型[1-代金券]
*/
private Integer couType;
/**
* 适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]
*/
private Integer useScope;
/**
* 面值
*/
private BigDecimal valFace;
/**
* 购买后(单位天)有效期,与生效/过期时间二选一
*/
private Integer validity;
/**
* 生效时间
*/
private LocalDateTime effectAt;
/**
* 过期时间
*/
private LocalDateTime expireAt;
private String comment;
}
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;
/**
* <p>
* 商品券关联人信息
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinOrderSkuAssoc implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 订单sku_id
*/
private String orderSkuId;
/**
* 是否实名[0-否|1-是,表示该商品需要实名关联]
*/
private Integer isTrueName;
/**
* 关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
*/
private Integer idType;
/**
* 关联人姓名
*/
private String idName;
/**
* 关联人证件号码
*/
private String idNo;
/**
* 操作人
*/
private String operator;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private String comment;
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinGoodsSkuCoupon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商品券信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
public interface GoblinGoodsSkuCouponMapper extends BaseMapper<GoblinGoodsSkuCoupon> {
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinOrderSkuAssoc;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商品券关联人信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
public interface GoblinOrderSkuAssocMapper extends BaseMapper<GoblinOrderSkuAssoc> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinGoodsSkuCouponMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinOrderSkuAssocMapper">
</mapper>
...@@ -22,6 +22,7 @@ public class PerformanceAdminListDao { ...@@ -22,6 +22,7 @@ public class PerformanceAdminListDao {
private Integer auditStatus; private Integer auditStatus;
private Integer totalGeneral; private Integer totalGeneral;
private Integer saleGeneral; private Integer saleGeneral;
// private Integer refundNumber;
private BigDecimal totalSalePrice; private BigDecimal totalSalePrice;
private Integer surplusGeneral; private Integer surplusGeneral;
private Integer syncDamai; private Integer syncDamai;
......
...@@ -33,6 +33,7 @@ public class PerformanceOrderStatisticalDao implements Cloneable{ ...@@ -33,6 +33,7 @@ public class PerformanceOrderStatisticalDao implements Cloneable{
private BigDecimal totalMemberNumber = BigDecimal.ZERO; private BigDecimal totalMemberNumber = BigDecimal.ZERO;
private BigDecimal totalPayingNumber = BigDecimal.ZERO; private BigDecimal totalPayingNumber = BigDecimal.ZERO;
private BigDecimal totalBuyUsers = BigDecimal.ZERO; private BigDecimal totalBuyUsers = BigDecimal.ZERO;
private BigDecimal totalVoucherCount = BigDecimal.ZERO;
private static final PerformanceOrderStatisticalDao obj = new PerformanceOrderStatisticalDao(); private static final PerformanceOrderStatisticalDao obj = new PerformanceOrderStatisticalDao();
public static PerformanceOrderStatisticalDao getNew() { public static PerformanceOrderStatisticalDao getNew() {
......
...@@ -28,7 +28,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> { ...@@ -28,7 +28,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
double refundedTotalPrice(String orderTicketsId); double refundedTotalPrice(String orderTicketsId);
List<OrderRefundDao> misRefundList(Map<String,Object> map); List<OrderRefundDao> misRefundList(Map<String, Object> map);
int selectRefundingCount( int selectRefundingCount(
@Param("orderTicketsId") String orderTicketsId, @Param("orderTicketsId") String orderTicketsId,
...@@ -47,4 +47,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> { ...@@ -47,4 +47,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
@Param("orderRefundsId") String orderRefundsId, @Param("orderRefundsId") String orderRefundsId,
@Param("entitiesId") String entitiesId @Param("entitiesId") String entitiesId
); );
//查询正在进行的订单 TODO 阶梯退票
int selectingCount(@Param("performanceId") String performanceId);
} }
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
<result column="price" property="price"/> <result column="price" property="price"/>
<result column="created_at" property="createdAt"/> <result column="created_at" property="createdAt"/>
</resultMap> </resultMap>
<select id="misRefundList1" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao" resultMap="misRefundListResult"> <select id="misRefundList1" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao"
resultMap="misRefundListResult">
SELECT a.*, b.order_code, b.performance_title, d.mailno SELECT a.*, b.order_code, b.performance_title, d.mailno
FROM kylin_order_refunds AS a FROM kylin_order_refunds AS a
JOIN kylin_order_tickets AS b ON a.order_tickets_id = b.order_tickets_id JOIN kylin_order_tickets AS b ON a.order_tickets_id = b.order_tickets_id
...@@ -79,7 +80,8 @@ ...@@ -79,7 +80,8 @@
ORDER BY a.mid DESC ORDER BY a.mid DESC
</select> </select>
<select id="misRefundList" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao" resultMap="misRefundListResult"> <select id="misRefundList" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao"
resultMap="misRefundListResult">
select t.*, b.order_code, b.performance_title, b.get_ticket_type from select t.*, b.order_code, b.performance_title, b.get_ticket_type from
(select a.*, d.mailno, d.send_express_type,d.remark,d.express_status (select a.*, d.mailno, d.send_express_type,d.remark,d.express_status
from kylin_order_refunds a from kylin_order_refunds a
...@@ -182,4 +184,13 @@ ...@@ -182,4 +184,13 @@
AND b.order_ticket_entities_id = #{entitiesId} AND b.order_ticket_entities_id = #{entitiesId}
</where> </where>
</select> </select>
<select id="selectingCount" resultType="java.lang.Integer">
SELECT COUNT(0)
FROM kylin_order_refunds AS a
INNER JOIN kylin_order_ticket_relations AS b ON a.order_tickets_id = b.order_id
WHERE (status = 0 OR status = 1 OR status = 7 OR status = 3)
AND b.performance_id = #{performanceId}
</select>
</mapper> </mapper>
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<result column="time_end" property="timeEnd"/> <result column="time_end" property="timeEnd"/>
<result column="total_general" property="totalGeneral"/> <result column="total_general" property="totalGeneral"/>
<result column="sale_general" property="saleGeneral"/> <result column="sale_general" property="saleGeneral"/>
<result column="refund_number" property="refundNumber"/>
<result column="total_sale_price" property="totalSalePrice"/> <result column="total_sale_price" property="totalSalePrice"/>
<result column="surplus_general" property="surplusGeneral"/> <result column="surplus_general" property="surplusGeneral"/>
<result column="status" property="status"/> <result column="status" property="status"/>
...@@ -171,6 +172,7 @@ ...@@ -171,6 +172,7 @@
<result column="total_member_number" property="totalMemberNumber"/> <result column="total_member_number" property="totalMemberNumber"/>
<result column="total_paying_number" property="totalPayingNumber"/> <result column="total_paying_number" property="totalPayingNumber"/>
<result column="total_buy_users" property="totalBuyUsers"/> <result column="total_buy_users" property="totalBuyUsers"/>
<result column="total_voucher_count" property="totalVoucherCount"/>
</resultMap> </resultMap>
<resultMap id="performanceOrderListDaoResult" type="com.liquidnet.service.kylin.dao.PerformanceOrderListDao"> <resultMap id="performanceOrderListDaoResult" type="com.liquidnet.service.kylin.dao.PerformanceOrderListDao">
<result column="performances_id" property="performancesId"/> <result column="performances_id" property="performancesId"/>
...@@ -514,6 +516,7 @@ ...@@ -514,6 +516,7 @@
IFNULL(ot.total_member_number , 0) AS 'total_member_number', IFNULL(ot.total_member_number , 0) AS 'total_member_number',
IFNULL(otp.total_paying_number , 0) AS 'total_paying_number', IFNULL(otp.total_paying_number , 0) AS 'total_paying_number',
IFNULL(ut.total_buy_users , 0) AS 'total_buy_users' IFNULL(ut.total_buy_users , 0) AS 'total_buy_users'
,IFNULL(ot.voucher_count, 0) AS 'total_voucher_count'
FROM FROM
(select t.performances_id,ktr.ticket_id from kylin_performances t inner join kylin_ticket_time_relation kttr (select t.performances_id,ktr.ticket_id from kylin_performances t inner join kylin_ticket_time_relation kttr
on t.performances_id = kttr.performance_id on t.performances_id = kttr.performance_id
...@@ -526,10 +529,12 @@ ...@@ -526,10 +529,12 @@
sum(kot.number)-sum(ifnull(kot.refund_number,0)) AS 'total_sale_general' , sum(kot.number)-sum(ifnull(kot.refund_number,0)) AS 'total_sale_general' ,
sum(kot.price_actual)-sum(ifnull(kot.price_refund,0)) AS 'total_sale_price', sum(kot.price_actual)-sum(ifnull(kot.price_refund,0)) AS 'total_sale_price',
sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number
,count(koc.order_id) as voucher_count
FROM FROM
kylin_order_ticket_relations kotr kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
LEFT JOIN kylin_order_coupons AS koc on kots.order_id = koc.order_id and koc.coupon_type = 1
WHERE 1>0 and kotr.performance_id = ${performancesId} WHERE 1>0 and kotr.performance_id = ${performancesId}
and kots.`status` in(1,3,6) and kot.coupon_type ='no' and kots.transfer_status in (0,1,2,5) and kots.`status` in(1,3,6) and kot.coupon_type ='no' and kots.transfer_status in (0,1,2,5)
group by kotr.performance_id,kotr.ticket_id group by kotr.performance_id,kotr.ticket_id
......
...@@ -181,6 +181,24 @@ create table candy_coupon_relate ...@@ -181,6 +181,24 @@ create table candy_coupon_relate
comment text comment text
) engine InnoDB comment '券适用关联配置'; ) engine InnoDB comment '券适用关联配置';
create index idx_ccr_coupon_id on candy_coupon_relate (coupon_id); create index idx_ccr_coupon_id on candy_coupon_relate (coupon_id);
# -- >>------------------------------------------------------------------------------------ |20240123 商品券业务
alter table candy_coupon add is_true_name smallint default 0 comment '是否实名[0-否|1-是,表示该商品需要实名关联]' after validity;
alter table candy_coupon_rule modify use_scope smallint null comment '适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]';
drop table if exists candy_user_coupon_assoc;
create table candy_user_coupon_assoc
(
mid bigint unsigned auto_increment primary key,
ucoupon_id varchar(64) not null comment '~candy_user_coupon.ucoupon_id',
id_type tinyint not null comment '关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证',
id_name varchar(30) not null comment '关联人姓名',
id_no varchar(30) not null comment '关联人证件号码',
comment text
) engine InnoDB comment '券关联适用人信息';
create index idx_cuca_ucoupon_id on candy_user_coupon_assoc (ucoupon_id);
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
\ No newline at end of file
...@@ -99,14 +99,24 @@ public class CandyCouponController { ...@@ -99,14 +99,24 @@ public class CandyCouponController {
@ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "类型 1可用 2过期/已使用 ", required = true), @ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "类型 1可用 2过期/已使用 ", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "isTrueName", value = "是否实名", required = false),
}) })
public ResponseDto<CandyMyCouponListVo> preUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal, public ResponseDto<CandyMyCouponListVo> preUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal,
@RequestParam("performanceId") @NotNull @NotBlank String performanceId, @RequestParam("performanceId") @NotNull @NotBlank String performanceId,
@RequestParam("timeId") @NotNull @NotBlank String timeId, @RequestParam("timeId") @NotNull @NotBlank String timeId,
@RequestParam("ticketId") @NotNull @NotBlank String ticketId, @RequestParam("ticketId") @NotNull @NotBlank String ticketId,
@RequestParam("type") @NotNull Integer type, @RequestParam("type") @NotNull Integer type,
@RequestParam(required = false, name = "page") Integer page) { @RequestParam(required = false, name = "page") Integer page,
CandyMyCouponListVo vo = candyCouponService.preUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId, type); @RequestParam(required = false, name = "perType") Integer perType,
@RequestParam(required = false, name = "isTrueName") Integer isTrueName) {
if (perType == null) {
perType = -1;
}
if (isTrueName == null) {
isTrueName = 1;
}
CandyMyCouponListVo vo = candyCouponService.preUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId, type,perType,isTrueName);
List<CandyCouponVo> list = vo.getMyCoupon(); List<CandyCouponVo> list = vo.getMyCoupon();
List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
if (page == null || page == 0) { if (page == null || page == 0) {
...@@ -133,13 +143,23 @@ public class CandyCouponController { ...@@ -133,13 +143,23 @@ public class CandyCouponController {
@ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "isTrueName", value = "是否实名", required = false),
}) })
public ResponseDto<HashMap<String, Integer>> preCanUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal, public ResponseDto<HashMap<String, Integer>> preCanUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal,
@RequestParam("performanceId") @NotNull @NotBlank String performanceId, @RequestParam("performanceId") @NotNull @NotBlank String performanceId,
@RequestParam("timeId") @NotNull @NotBlank String timeId, @RequestParam("timeId") @NotNull @NotBlank String timeId,
@RequestParam("ticketId") @NotNull @NotBlank String ticketId) { @RequestParam("ticketId") @NotNull @NotBlank String ticketId,
@RequestParam(required = false, name = "perType") Integer perType,
@RequestParam(required = false, name = "isTrueName") Integer isTrueName) {
if (perType == null) {
perType = -1;
}
if (isTrueName == null) {
isTrueName = 1;
}
HashMap<String, Integer> hashMap = CollectionUtil.mapStringInteger(); HashMap<String, Integer> hashMap = CollectionUtil.mapStringInteger();
hashMap.put("canUse", candyCouponService.preCanUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId)); hashMap.put("canUse", candyCouponService.preCanUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId,perType,isTrueName));
return ResponseDto.success(hashMap); return ResponseDto.success(hashMap);
} }
...@@ -255,6 +275,7 @@ public class CandyCouponController { ...@@ -255,6 +275,7 @@ public class CandyCouponController {
@ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "uid", value = "uid", required = false), @ApiImplicitParam(type = "form", dataType = "String", name = "uid", value = "uid", required = false),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false),
}) })
public ResponseDto<CandyUseResultVo> useCoupon(@RequestParam("uCouponId") @NotNull @NotBlank String uCouponId, public ResponseDto<CandyUseResultVo> useCoupon(@RequestParam("uCouponId") @NotNull @NotBlank String uCouponId,
@RequestParam("content") @NotNull @NotBlank String content, @RequestParam("content") @NotNull @NotBlank String content,
...@@ -263,12 +284,16 @@ public class CandyCouponController { ...@@ -263,12 +284,16 @@ public class CandyCouponController {
@RequestParam("performanceId") @NotNull @NotBlank String performanceId, @RequestParam("performanceId") @NotNull @NotBlank String performanceId,
@RequestParam("timeId") @NotNull @NotBlank String timeId, @RequestParam("timeId") @NotNull @NotBlank String timeId,
@RequestParam("ticketId") @NotNull @NotBlank String ticketId, @RequestParam("ticketId") @NotNull @NotBlank String ticketId,
@RequestParam(value = "uid", required = false) String uid @RequestParam(value = "uid", required = false) String uid,
@RequestParam(required = false, name = "perType") Integer perType
) { ) {
if (uid == null) { if (uid == null) {
uid = CurrentUtil.getCurrentUid(); uid = CurrentUtil.getCurrentUid();
} }
CandyUseResultVo result = candyCouponService.useCoupon(uCouponId, content, totalPrice, performanceId, timeId, ticketId, goodId, uid); if (perType == null) {
perType = -1;
}
CandyUseResultVo result = candyCouponService.useCoupon(uCouponId, content, totalPrice, performanceId, timeId, ticketId, goodId, uid,perType);
if (result == null) { if (result == null) {
return ResponseDto.failure(); return ResponseDto.failure();
} }
......
...@@ -67,7 +67,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -67,7 +67,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
continue; continue;
} }
if (type == 1) { if (type == 1) {
if (baseVo.getState().equals(3) || dtoItem.getState().equals(5)) { if (baseVo.getState().equals(3) || baseVo.getState().equals(5)|| dtoItem.getState().equals(2)) {
continue; continue;
} }
} else if (type == 2) { } else if (type == 2) {
...@@ -139,7 +139,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -139,7 +139,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type) { public CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type,int perType,int isTrueName) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime userCreateTime; LocalDateTime userCreateTime;
try { try {
...@@ -153,9 +153,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -153,9 +153,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
List<CandyCouponVo> myCoupon = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> myCoupon = ObjectUtil.getCandyCouponVoArrayList();
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId,perType,isTrueName);
if (type == 1) { if (type == 1) {
if (baseVo.getState().equals(3) || dtoItem.getState().equals(5) || baseVo.getState().equals(21)) { if (baseVo.getState().equals(3) || baseVo.getState().equals(5) || baseVo.getState().equals(21)|| baseVo.getState().equals(31)|| baseVo.getState().equals(2)) {
continue; continue;
} }
} else if (type == 2) { } else if (type == 2) {
...@@ -182,7 +182,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -182,7 +182,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId) { public Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId,int perType,int isTrueName) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime userCreateTime; LocalDateTime userCreateTime;
try { try {
...@@ -193,7 +193,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -193,7 +193,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid, userCreateTime); List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid, userCreateTime);
int canUse = 0; int canUse = 0;
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId,perType,isTrueName);
if (baseVo.getCouType().equals(101) || baseVo.getCouType().equals(3) || baseVo.getBusiType() == 2) { if (baseVo.getCouType().equals(101) || baseVo.getCouType().equals(3) || baseVo.getBusiType() == 2) {
continue; continue;
} }
...@@ -287,7 +287,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -287,7 +287,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
List<CandyCouponVo> advanceCoupon = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> advanceCoupon = ObjectUtil.getCandyCouponVoArrayList();
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
if (dtoItem.getBusiType().equals(3)) { if (dtoItem.getBusiType().equals(3)) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, BigDecimal.ZERO, performanceId, "-1", "-1"); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, BigDecimal.ZERO, performanceId, "-1", "-1",-1,0);
if (baseVo.getState().equals(1)) { if (baseVo.getState().equals(1)) {
advanceCoupon.add(baseVo); advanceCoupon.add(baseVo);
} else { } else {
...@@ -317,7 +317,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -317,7 +317,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public CandyUseResultVo useCoupon(String uCouponId, String content, String totalPrice, String performanceId, String timesId, String ticketId, String goodId, String uid) { public CandyUseResultVo useCoupon(String uCouponId, String content, String totalPrice, String performanceId, String timesId, String ticketId, String goodId, String uid,int perType) {
LocalDateTime userCreateTime; LocalDateTime userCreateTime;
try { try {
userCreateTime = getCreatedAt(uid); userCreateTime = getCreatedAt(uid);
...@@ -380,9 +380,15 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -380,9 +380,15 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
case 92://票 case 92://票
isTarget = CouponBaseUtil.isTargetCoupon(ruleItem.getBusiId(), dto.getCouType(), ticketId, new BigDecimal(totalPrice), dto.getValOver()); isTarget = CouponBaseUtil.isTargetCoupon(ruleItem.getBusiId(), dto.getCouType(), ticketId, new BigDecimal(totalPrice), dto.getValOver());
break; break;
case 100:// case 100://全场
isTarget = true; isTarget = true;
break; break;
//TODO 胡佳晨 20240123
case 101:
case 102:
case 103:
isTarget = ruleItem.getUseScope()==perType;
break;
default: default:
isTarget = false; isTarget = false;
break; break;
......
...@@ -74,7 +74,8 @@ public class CouponBaseUtil { ...@@ -74,7 +74,8 @@ public class CouponBaseUtil {
BigDecimal priceTotal, BigDecimal priceTotal,
String performanceId, String performanceId,
String timeId, String timeId,
String ticketId) { String ticketId,
int perType,int isTrueName) {
boolean isTarget = false; boolean isTarget = false;
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
CandyCouponVo vo = CandyCouponVo.getNew(); CandyCouponVo vo = CandyCouponVo.getNew();
...@@ -126,6 +127,12 @@ public class CouponBaseUtil { ...@@ -126,6 +127,12 @@ public class CouponBaseUtil {
isTarget = true; isTarget = true;
} }
break; break;
//TODO 胡佳晨 20240123
case 101:
case 102:
case 103:
isTarget = ruleItem.getUseScope() == perType && isTrueName ==1;
break;
default: default:
isTarget = false; isTarget = false;
break; break;
......
...@@ -141,6 +141,14 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin ...@@ -141,6 +141,14 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
String pre = GoblinStatusConst.MarketPreStatus.getPre(skuVo.getSkuId()); String pre = GoblinStatusConst.MarketPreStatus.getPre(skuVo.getSkuId());
incrSkuStock(pre, skuVo.getSkuId(), skuVo.getNum()); incrSkuStock(pre, skuVo.getSkuId(), skuVo.getNum());
decrSkuCountByUid(orderVo.getUserId(), skuVo.getSkuId(), skuVo.getNum()); decrSkuCountByUid(orderVo.getUserId(), skuVo.getSkuId(), skuVo.getNum());
if (Objects.equals(skuVo.getSkuType(), 2)) {// 券类商品
if (Objects.equals(skuVo.getIsTrueName(), 1)) {// 需关联实名人
// 这里默认券类商品需要关联实名人且都要求关联实名人限购
decrSkuCountByIdNo(skuVo.getIdType(), skuVo.getIdNo(), skuVo.getSkuId(), skuVo.getNum());
}
}
//mysql //mysql
sqlDataSku.add(new Object[]{ sqlDataSku.add(new Object[]{
skuVo.getStatus(), now, skuVo.getOrderSkuId(), now, now skuVo.getStatus(), now, skuVo.getOrderSkuId(), now, now
...@@ -475,6 +483,11 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin ...@@ -475,6 +483,11 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
return (int) redisDataSourceUtil.getRedisKylinUtil().decr(redisKey, number); return (int) redisDataSourceUtil.getRedisKylinUtil().decr(redisKey, number);
} }
// 减少 关联实名人sku购买个数
public long decrSkuCountByIdNo(int idType, String idNo, String skuId, int number) {
return redisDataSourceUtil.getRedisKylinUtil().decr(String.format(GoblinRedisConst.REDIS_GOBLIN_BUY_COUNT_IDNO, idType, idNo, skuId), number);
}
// 赋值 订单相关vo // 赋值 订单相关vo
public void setGoblinOrder(String orderId, GoblinStoreOrderVo vo) { public void setGoblinOrder(String orderId, GoblinStoreOrderVo vo) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER.concat(orderId); String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER.concat(orderId);
......
...@@ -1240,6 +1240,50 @@ create table goblin_store_erp_config ...@@ -1240,6 +1240,50 @@ create table goblin_store_erp_config
) engine = InnoDB comment '店铺ERP配置'; ) engine = InnoDB comment '店铺ERP配置';
create unique index idx_gsec_store_id on goblin_store_erp_config (store_id); create unique index idx_gsec_store_id on goblin_store_erp_config (store_id);
# -- >>------------------------------------------------------------------------------------ |20240123 商品券业务
alter table goblin_goods modify spu_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品|2-券类商品]';
drop table if exists goblin_goods_sku_coupon;
create table goblin_goods_sku_coupon
(
mid bigint auto_increment primary key,
sku_id varchar(64) not null comment '单品id',
busi_type smallint null comment '业务类别[1-演出]',
cou_type smallint null comment '券类型[1-代金券]',
use_scope smallint null comment '适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]',
val_face decimal(8, 2) comment '面值',
is_true_name smallint default 0 comment '是否实名[0-否|1-是,表示该商品需要实名关联]',
validity int default 0 comment '购买后(单位天)有效期,与生效/过期时间二选一',
effect_at datetime(3) null comment '生效时间',
expire_at datetime(3) null comment '过期时间',
comment varchar(255)
) engine = InnoDB comment '商品券信息';
create unique index uidx_ggsc_sku_id on goblin_goods_sku_coupon (sku_id);
drop table if exists goblin_order_sku_assoc;
create table goblin_order_sku_assoc
(
mid bigint unsigned auto_increment primary key,
order_sku_id varchar(64) default '' null comment '订单sku_id',
is_true_name smallint default 0 comment '是否实名[0-否|1-是,表示该商品需要实名关联]',
id_type tinyint not null comment '关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证',
id_name varchar(30) not null comment '关联人姓名',
id_no varchar(30) not null comment '关联人证件号码',
operator varchar(64) not null comment '操作人',
created_at datetime(3) not null,
updated_at datetime(3),
comment varchar(255)
) engine InnoDB comment '商品券关联人信息';
create index idx_gosa_order_sku_id on goblin_order_sku_assoc (order_sku_id);
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
......
...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
...@@ -59,6 +60,12 @@ public class GoblinOrderAppController { ...@@ -59,6 +60,12 @@ public class GoblinOrderAppController {
return goblinOrderAppService.orderDetails(orderId, uid); return goblinOrderAppService.orderDetails(orderId, uid);
} }
@GetMapping("couponState")
@ApiOperation(value = "券类商品订单查询已发放券状态", notes = "响应参数[1-可用,5-已用]")
public ResponseDto<Integer> couponState(@NotBlank(message = "子订单Id不能为空") @RequestParam String orderSkuId) {
return ResponseDto.success(goblinOrderAppService.couponState(orderSkuId, CurrentUtil.getCurrentUid()));
}
@PostMapping("getProduce") @PostMapping("getProduce")
@ApiOperation("已收货") @ApiOperation("已收货")
@ApiImplicitParams({ @ApiImplicitParams({
......
...@@ -563,7 +563,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -563,7 +563,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
Criteria.where("storeId").in(listStore), Criteria.where("storeId").in(listStore),
Criteria.where("extagVoList.tagName").is(name) Criteria.where("extagVoList.tagName").is(name)
), ),
new Criteria().orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").is(0))) new Criteria().orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").in(0, 2)))
)); ));
long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class.getSimpleName()); long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class.getSimpleName());
query.with(PageRequest.of(page, pageSize)).with(Sort.by( query.with(PageRequest.of(page, pageSize)).with(Sort.by(
......
...@@ -9,6 +9,8 @@ import com.liquidnet.service.base.ErrorMapping; ...@@ -9,6 +9,8 @@ import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.candy.constant.CandyRedisConst;
import com.liquidnet.service.candy.dto.CandyUserCouponBasicDto;
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.entity.GoblinBackOrder; import com.liquidnet.service.goblin.entity.GoblinBackOrder;
...@@ -28,6 +30,8 @@ import java.time.LocalDateTime; ...@@ -28,6 +30,8 @@ import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.IntStream;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS; import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
import static com.liquidnet.commons.lang.util.DateUtil.DTFYMDHMS; import static com.liquidnet.commons.lang.util.DateUtil.DTFYMDHMS;
...@@ -116,6 +120,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -116,6 +120,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
List<GoblinOrderSkuVo> skuVos = ObjectUtil.getGoblinOrderSkuVoArrayList(); List<GoblinOrderSkuVo> skuVos = ObjectUtil.getGoblinOrderSkuVoArrayList();
for (String orderSkuId : orderVo.getOrderSkuVoIds()) { for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVo.desensitize();// 商品订单页面展示-关联人信息脱敏
skuVos.add(orderSkuVo); skuVos.add(orderSkuVo);
} }
LocalDateTime canRefundTime = getCanRefundTime(orderVo); LocalDateTime canRefundTime = getCanRefundTime(orderVo);
...@@ -155,6 +160,21 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -155,6 +160,21 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
return ResponseDto.success(vo); return ResponseDto.success(vo);
} }
@Override
public Integer couponState(String orderSkuId, String uid) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
if (Objects.equals(orderSkuVo.getSkuType(), 2)) {// 券类商品-校验发放的券是否已使用
// 券类商品默认一个商品对应一个券,下单只可购买一张
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtils.get(CandyRedisConst.BASIC_USER_COUPON.concat(uid));
if (!CollectionUtil.isEmpty(vos)) {
CandyUserCouponBasicDto basicDto = vos.stream().filter(r -> r.getUcouponId().equals(orderSkuId)).findAny().orElse(null);
return (!Objects.isNull(basicDto) && basicDto.getState() == 5) ? 5 : 1;
}
}
return 1;
}
@Override @Override
public ResponseDto<Boolean> getProduce(String orderId, String uid) { public ResponseDto<Boolean> getProduce(String orderId, String uid) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
...@@ -207,11 +227,13 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -207,11 +227,13 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
sqls.add(SqlMapping.get("goblin_order.store.orderStatus")); sqls.add(SqlMapping.get("goblin_order.store.orderStatus"));
sqls.add(SqlMapping.get("goblin_order.store.orderSkuStatus")); sqls.add(SqlMapping.get("goblin_order.store.orderSkuStatus"));
sqls.add(SqlMapping.get("goblin_order.store.refundLog")); sqls.add(SqlMapping.get("goblin_order.store.refundLog"));
sqls.add(SqlMapping.get("candy_user_coupon.update_apply_refund"));
LinkedList<Object[]> applyRefund = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> applyRefund = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> orderStatus = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> orderStatus = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> orderSkuStatus = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> orderSkuStatus = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> refundLog = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> refundLog = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> updateCandyUserCouponObjs = CollectionUtil.linkedListObjectArr();
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
...@@ -331,6 +353,25 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -331,6 +353,25 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
} else if (orderVo.getStatus() == GoblinStatusConst.Status.ORDER_STATUS_4.getValue()) { } else if (orderVo.getStatus() == GoblinStatusConst.Status.ORDER_STATUS_4.getValue()) {
if (param.getOrderSkuId() != null) { if (param.getOrderSkuId() != null) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(param.getOrderSkuId()); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(param.getOrderSkuId());
if (Objects.equals(orderSkuVo.getSkuType(), 2)) {// 券类商品-校验发放的券是否已使用
// 券类商品默认一个商品对应一个券,下单只可购买一张
String ucKey = CandyRedisConst.BASIC_USER_COUPON.concat(orderVo.getUserId());
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtils.get(ucKey);
int idx = IntStream.range(0, vos.size())
.filter(i -> vos.get(i).getUcouponId().equals(orderSkuVo.getOrderSkuId())).findFirst().orElse(-1);
if (-1 != idx) {
CandyUserCouponBasicDto basicDto = vos.get(idx);
if (5 == basicDto.getState()) {// 券状态为'5-已使用',则不可退款
return ResponseDto.failure("券已使用,不可申请");
}
basicDto.setState(2);// 置为'2-无效',防止用户在后台审核过程中使用券,造成券已使用,订单也退款
vos.set(idx, basicDto);
redisUtils.redisUtil.set(ucKey, vos);
updateCandyUserCouponObjs.add(new Object[]{basicDto.getState(), orderVo.getUserId(), now, basicDto.getUcouponId()});
} else {
log.warn("券类商品订单申请退款,未找到对应券[orderSkuId={},uid={}]", orderSkuVo.getOrderSkuId(), orderVo.getUserId());
}
}
//订单款式状态修改 //订单款式状态修改
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_61.getValue()); orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_61.getValue());
GoblinBackOrderSkuVo backOrderSkuVo = GoblinBackOrderSkuVo.getNew(); GoblinBackOrderSkuVo backOrderSkuVo = GoblinBackOrderSkuVo.getNew();
...@@ -343,6 +384,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -343,6 +384,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
backOrderSkuVo.setRefundPrice(orderSkuVo.getSkuPriceActual()); backOrderSkuVo.setRefundPrice(orderSkuVo.getSkuPriceActual());
backOrderSkuVo.setSkuSpecs(orderSkuVo.getSkuSpecs()); backOrderSkuVo.setSkuSpecs(orderSkuVo.getSkuSpecs());
backOrderSkuVo.setCreatedAt(nowStr); backOrderSkuVo.setCreatedAt(nowStr);
backOrderSkuVo.setSkuType(orderSkuVo.getSkuType());
orderSkuVoList.add(backOrderSkuVo); orderSkuVoList.add(backOrderSkuVo);
backOrderLog(orderVo, orderSkuVo, now); backOrderLog(orderVo, orderSkuVo, now);
//redis //redis
...@@ -357,6 +399,24 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -357,6 +399,24 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
for (String orderSkuId : orderVo.getOrderSkuVoIds()) { for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
//订单款式状态修改 //订单款式状态修改
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
if (Objects.equals(orderSkuVo.getSkuType(), 2)) {// 券类商品-校验发放的券是否已使用
// 券类商品默认一个商品对应一个券,下单只可购买一张
String ucKey = CandyRedisConst.BASIC_USER_COUPON.concat(orderVo.getUserId());
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtils.get(ucKey);
int idx = IntStream.range(0, vos.size()).filter(i -> vos.get(i).getUcouponId().equals(orderSkuVo.getOrderSkuId())).findFirst().orElse(-1);
if (-1 != idx) {
CandyUserCouponBasicDto basicDto = vos.get(idx);
if (5 == basicDto.getState()) {// 券状态为'5-已使用',则不可退款
return ResponseDto.failure("券已使用,不可申请");
}
basicDto.setState(2);// 置为'2-无效',防止用户在后台审核过程中使用券,造成券已使用,订单也退款
vos.set(idx, basicDto);
redisUtils.redisUtil.set(ucKey, vos);
updateCandyUserCouponObjs.add(new Object[]{basicDto.getState(), orderVo.getUserId(), now, basicDto.getUcouponId()});
} else {
log.warn("券类商品订单申请退款,未找到对应券[orderSkuId={},uid={}]", orderSkuVo.getOrderSkuId(), orderVo.getUserId());
}
}
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_61.getValue()); orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_61.getValue());
GoblinBackOrderSkuVo backOrderSkuVo = GoblinBackOrderSkuVo.getNew(); GoblinBackOrderSkuVo backOrderSkuVo = GoblinBackOrderSkuVo.getNew();
backOrderSkuVo.setOrderSkuId(orderSkuId); backOrderSkuVo.setOrderSkuId(orderSkuId);
...@@ -368,6 +428,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -368,6 +428,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
backOrderSkuVo.setSkuPic(orderSkuVo.getSkuImage()); backOrderSkuVo.setSkuPic(orderSkuVo.getSkuImage());
backOrderSkuVo.setRefundPrice(orderSkuVo.getSkuPriceActual()); backOrderSkuVo.setRefundPrice(orderSkuVo.getSkuPriceActual());
backOrderSkuVo.setCreatedAt(nowStr); backOrderSkuVo.setCreatedAt(nowStr);
backOrderSkuVo.setSkuType(orderSkuVo.getSkuType());
orderSkuVoList.add(backOrderSkuVo); orderSkuVoList.add(backOrderSkuVo);
backOrderLog(orderVo, orderSkuVo, now); backOrderLog(orderVo, orderSkuVo, now);
//redis //redis
...@@ -409,7 +470,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -409,7 +470,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
backOrderLog.getBackOrderLogId(), backOrderLog.getBackOrderId(), backOrderLog.getOperationType(), backOrderLog.getBackOrderLogId(), backOrderLog.getBackOrderId(), backOrderLog.getOperationType(),
backOrderLog.getMessage(), backOrderLog.getOperationName(), backOrderLog.getStatus(), now backOrderLog.getMessage(), backOrderLog.getOperationName(), backOrderLog.getStatus(), now
}); });
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_USER_ORDER_OPERA.getKey(), SqlMapping.gets(sqls, applyRefund, orderStatus, orderSkuStatus, refundLog)); queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_USER_ORDER_OPERA.getKey(), SqlMapping.gets(sqls, applyRefund, orderStatus, orderSkuStatus, refundLog, updateCandyUserCouponObjs));
return ResponseDto.success(); return ResponseDto.success();
} }
......
...@@ -5,6 +5,8 @@ import com.liquidnet.commons.lang.util.*; ...@@ -5,6 +5,8 @@ import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.candy.constant.CandyRedisConst;
import com.liquidnet.service.candy.dto.CandyUserCouponBasicDto;
import com.liquidnet.service.dragon.constant.DragonConstant; import com.liquidnet.service.dragon.constant.DragonConstant;
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.*;
...@@ -25,6 +27,7 @@ import java.math.BigDecimal; ...@@ -25,6 +27,7 @@ import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.IntStream;
@Service @Service
@Slf4j @Slf4j
...@@ -102,6 +105,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -102,6 +105,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
for (String orderSkuVoId : orderVo.getOrderSkuVoIds()) { for (String orderSkuVoId : orderVo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuVoId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuVoId);
orderSkuVo.setStatus(vo.getStatus()); orderSkuVo.setStatus(vo.getStatus());
orderSkuVo.desensitize();// 商品订单页面展示-关联人信息脱敏
orderSkuVoList.add(orderSkuVo); orderSkuVoList.add(orderSkuVo);
} }
vo.setOrderSkuVoList(orderSkuVoList); vo.setOrderSkuVoList(orderSkuVoList);
...@@ -219,6 +223,32 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -219,6 +223,32 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
} }
GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId); GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId);
{// 券类商品-拒绝退款后,恢复已发放券状态
List<GoblinBackOrderSkuVo> backOrderSkuVos = backOrderVo.getBackOrderSkuVos();
for (GoblinBackOrderSkuVo backOrderSkuVo : backOrderSkuVos) {
if (2 == backOrderSkuVo.getSkuType()) {
// 券类商品默认一个商品对应一个券,下单只可购买一张
String ucKey = CandyRedisConst.BASIC_USER_COUPON.concat(backOrderVo.getUserId());
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtils.get(ucKey);
int idx = IntStream.range(0, vos.size())
.filter(i -> vos.get(i).getUcouponId().equals(backOrderSkuVo.getOrderSkuId())).findFirst().orElse(-1);
if (-1 != idx) {
CandyUserCouponBasicDto basicDto = vos.get(idx);
basicDto.setState(1);// 恢复状态
vos.set(idx, basicDto);
redisUtils.redisUtil.set(ucKey, vos);
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("candy_user_coupon.update_apply_refund",
basicDto.getState(), uid, now, basicDto.getUcouponId()
)
);
} else {
log.warn("券类商品订单拒绝退款,未找到对应券[orderSkuId={},operator={}]", backOrderSkuVo.getOrderSkuId(), uid);
}
}
}
}
backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_3.getValue()); backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_3.getValue());
backOrderVo.setRefuseAt(nowStr); backOrderVo.setRefuseAt(nowStr);
backOrderVo.setRefuseSize(backOrderVo.getRefuseSize() == null ? 1 : backOrderVo.getRefuseSize() + 1); backOrderVo.setRefuseSize(backOrderVo.getRefuseSize() == null ? 1 : backOrderVo.getRefuseSize() + 1);
......
...@@ -203,6 +203,13 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -203,6 +203,13 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
itemSkuVo.setStatus(orderSkuVo.getStatus()); itemSkuVo.setStatus(orderSkuVo.getStatus());
itemSkuVo.setPrice(orderSkuVo.getSkuPrice()); itemSkuVo.setPrice(orderSkuVo.getSkuPrice());
itemSkuVo.setPriceVoucher(orderSkuVo.getPriceVoucher()); itemSkuVo.setPriceVoucher(orderSkuVo.getPriceVoucher());
orderSkuVo.desensitize();// 商品订单页面展示-关联人信息脱敏
itemSkuVo.setSkuType(orderSkuVo.getSkuType());
itemSkuVo.setIsTrueName(orderSkuVo.getIsTrueName());
itemSkuVo.setIdType(orderSkuVo.getIdType());
itemSkuVo.setIdName(orderSkuVo.getIdName());
itemSkuVo.setIdNo(orderSkuVo.getIdNo());
orderListSkuVos.add(itemSkuVo); orderListSkuVos.add(itemSkuVo);
} }
vo.setStoreOrderListSkuVoList(orderListSkuVos); vo.setStoreOrderListSkuVoList(orderListSkuVos);
......
...@@ -593,7 +593,8 @@ public class GoblinMongoUtils { ...@@ -593,7 +593,8 @@ public class GoblinMongoUtils {
if (0 == filterParam.getSpuType()) { if (0 == filterParam.getSpuType()) {
criteria.orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").is(0))); criteria.orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").is(0)));
} else { } else {
criteria.and("spuType").is(1); // criteria.and("spuType").is(1);
criteria.and("spuType").is(filterParam.getSpuType());
} }
} }
if (StringUtils.isNotBlank(filterParam.getKeyword())) { if (StringUtils.isNotBlank(filterParam.getKeyword())) {
...@@ -895,8 +896,12 @@ public class GoblinMongoUtils { ...@@ -895,8 +896,12 @@ public class GoblinMongoUtils {
filterParam.setKeyword(null); filterParam.setKeyword(null);
} else if (0 == filterParam.getSkuType()) { } else if (0 == filterParam.getSkuType()) {
criteria.orOperator(Criteria.where("skuType").exists(false), (Criteria.where("skuType").is(0))); criteria.orOperator(Criteria.where("skuType").exists(false), (Criteria.where("skuType").is(0)));
} else if (1 == filterParam.getSkuType()) { }
criteria.and("skuType").is(1); // else if (1 == filterParam.getSkuType()) {
// criteria.and("skuType").is(1);
// }
else {
criteria.and("skuType").is(filterParam.getSkuType());
} }
} }
if (StringUtils.isNotBlank(filterParam.getKeyword())) { if (StringUtils.isNotBlank(filterParam.getKeyword())) {
......
...@@ -2268,7 +2268,7 @@ public class GoblinRedisUtils { ...@@ -2268,7 +2268,7 @@ public class GoblinRedisUtils {
} }
/** /**
* private int skuType 商品类型[0-常规|1-数字藏品] * private int skuType 商品类型[0-常规|1-数字藏品|2-券类商品]
* private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过]; * private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过];
* private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架]; * private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架];
* private String skuAppear 是否隐藏[0-默认展示|1-隐藏]; * private String skuAppear 是否隐藏[0-默认展示|1-隐藏];
......
...@@ -97,6 +97,8 @@ ...@@ -97,6 +97,8 @@
149022=\u5F00\u542FERP\u6258\u7BA1\u540E\uFF0C\u8BE5\u5546\u54C1\u5C5E\u6027`ERP\u5546\u54C1\u7F16\u7801`\u5FC5\u586B 149022=\u5F00\u542FERP\u6258\u7BA1\u540E\uFF0C\u8BE5\u5546\u54C1\u5C5E\u6027`ERP\u5546\u54C1\u7F16\u7801`\u5FC5\u586B
149023=\u5F00\u542FERP\u6258\u7BA1\u540E\uFF0C\u5BF9\u5E94\u89C4\u683C\u5C5E\u6027`ERP\u89C4\u683C\u7F16\u7801`\u5FC5\u586B 149023=\u5F00\u542FERP\u6258\u7BA1\u540E\uFF0C\u5BF9\u5E94\u89C4\u683C\u5C5E\u6027`ERP\u89C4\u683C\u7F16\u7801`\u5FC5\u586B
149024=\u5F00\u542FERP\u6258\u7BA1\u540E\uFF0C\u5BF9\u5E94\u89C4\u683C\u5C5E\u6027`ERP\u4ED3\u5E93\u7F16\u53F7`\u5FC5\u586B 149024=\u5F00\u542FERP\u6258\u7BA1\u540E\uFF0C\u5BF9\u5E94\u89C4\u683C\u5C5E\u6027`ERP\u4ED3\u5E93\u7F16\u53F7`\u5FC5\u586B
149025=\u9002\u7528\u5F00\u59CB/\u7ED3\u675F\u65F6\u95F4\u4E3A\u7A7A\uFF0C\u8BF7\u6838\u5B9E
149026=\u9002\u7528\u5F00\u59CB/\u7ED3\u675F\u65F6\u95F4\u65E0\u6548\uFF0C\u8BF7\u6838\u5B9E
148001=\u6B63\u5728\u4E0B\u5355\u5E93\u5B58\u4E0D\u8DB3 148001=\u6B63\u5728\u4E0B\u5355\u5E93\u5B58\u4E0D\u8DB3
......
...@@ -57,6 +57,7 @@ goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_b ...@@ -57,6 +57,7 @@ goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_b
goblin_goods_sku.insert_for_digital=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_type,name,subtitle,sku_pic,sku_watch,watch_type,sku_watch_pic,stock,sku_stock,hit_ratio,price,price_v,product_id,price_member,intro,details,buy_factor,buy_limit,store_id,shelves_handle,shelves_time,sale_start_time,virtual_flg,status,shelves_status,sku_appear,sku_canbuy,unbox,opening_time,shelves_at,created_by,created_at,sku_erp_code,erp_type,erp_hosting,erp_warehouse_no)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_goods_sku.insert_for_digital=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_type,name,subtitle,sku_pic,sku_watch,watch_type,sku_watch_pic,stock,sku_stock,hit_ratio,price,price_v,product_id,price_member,intro,details,buy_factor,buy_limit,store_id,shelves_handle,shelves_time,sale_start_time,virtual_flg,status,shelves_status,sku_appear,sku_canbuy,unbox,opening_time,shelves_at,created_by,created_at,sku_erp_code,erp_type,erp_hosting,erp_warehouse_no)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
#goblin_goods_sku.update_by_edit_for_market=UPDATE goblin_goods_sku SET sku_bar_code=?,name=?,sku_pic=?,sell_price=?,weight=?,stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' #goblin_goods_sku.update_by_edit_for_market=UPDATE goblin_goods_sku SET sku_bar_code=?,name=?,sku_pic=?,sell_price=?,weight=?,stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_for_market=UPDATE goblin_goods_sku SET sku_bar_code=?,name=?,sku_pic=?,sell_price=?,weight=?,stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,sku_validity=?,updated_by=?,updated_at=?,sku_erp_code=?,erp_hosting=?,erp_warehouse_no=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_edit_for_market=UPDATE goblin_goods_sku SET sku_bar_code=?,name=?,sku_pic=?,sell_price=?,weight=?,stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,sku_validity=?,updated_by=?,updated_at=?,sku_erp_code=?,erp_hosting=?,erp_warehouse_no=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_for_market2=UPDATE goblin_goods_sku SET stock=?,is_true_name=?,use_scope=?,val_face=?,effect_at=?,expire_at=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
#goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' #goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=?,sku_erp_code=?,erp_hosting=?,erp_warehouse_no=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=?,sku_erp_code=?,erp_hosting=?,erp_warehouse_no=? WHERE sku_id=? AND del_flg='0'
#goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_ratio=?,buy_factor=?,buy_limit=?,sku_appear=?,sku_canbuy=?,shelves_handle=?,shelves_time=?,sale_start_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' #goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_ratio=?,buy_factor=?,buy_limit=?,sku_appear=?,sku_canbuy=?,shelves_handle=?,shelves_time=?,sale_start_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
...@@ -64,8 +65,10 @@ goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_rati ...@@ -64,8 +65,10 @@ goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_rati
#goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,sku_watch_pic=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' #goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,sku_watch_pic=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,sku_watch_pic=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,updated_by=?,updated_at=?,sku_erp_code=?,erp_hosting=?,erp_warehouse_no=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,sku_watch_pic=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,updated_by=?,updated_at=?,sku_erp_code=?,erp_hosting=?,erp_warehouse_no=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_spu=UPDATE goblin_goods_sku SET sku_no=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0' goblin_goods_sku.update_by_edit_spu=UPDATE goblin_goods_sku SET sku_no=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_coupon_spu=UPDATE goblin_goods_sku SET sku_no=?,virtual_flg=?,logistics_template=?,sku_pic=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE sku_id=? AND store_id=? AND del_flg='0' goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE sku_id=? AND store_id=? AND del_flg='0'
goblin_goods_sku.update_by_soldout=UPDATE goblin_goods_sku SET soldout_status=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_soldout=UPDATE goblin_goods_sku SET soldout_status=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_for_coupon=UPDATE goblin_goods_sku SET price=?,price_member=?,stock=?,sku_stock=?,buy_limit=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? AND del_flg='0' goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? AND del_flg='0'
goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0' goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0'
...@@ -75,6 +78,13 @@ goblin_goods_sku_extra.del_ar=UPDATE goblin_goods_sku_extra SET del_flg='1',upda ...@@ -75,6 +78,13 @@ goblin_goods_sku_extra.del_ar=UPDATE goblin_goods_sku_extra SET del_flg='1',upda
#goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,series_id,series_hash,nft_hash,declare_at,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?) #goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,series_id,series_hash,nft_hash,declare_at,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,created_at)VALUES(?,?,?,?,?,?,?,?) goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,created_at)VALUES(?,?,?,?,?,?,?,?)
#goblin_goods_sku_nft.update_for_digital=UPDATE goblin_goods_sku_nft SET upchain=?,series_id=?,series_hash=?,nft_hash=?,declare_at=?,updated_at=? WHERE skuId=? AND upchain=9 #goblin_goods_sku_nft.update_for_digital=UPDATE goblin_goods_sku_nft SET upchain=?,series_id=?,series_hash=?,nft_hash=?,declare_at=?,updated_at=? WHERE skuId=? AND upchain=9
goblin_goods_sku_coupon.insert=INSERT INTO goblin_goods_sku_coupon (sku_id,busi_type,cou_type,use_scope,val_face,is_true_name,validity,effect_at,expire_at)VALUES(?,?,?,?,?,?,?,?,?)
goblin_goods_sku_coupon.update=UPDATE goblin_goods_sku_coupon SET use_scope=?,val_face=?,is_true_name=?,effect_at=?,expire_at=? WHERE sku_id=?
candy_coupon.goods_insert=INSERT INTO candy_coupon (coupon_id,state,title,notice,`exclusive`,busi_type,cou_type,bind_type,val_face,validity,is_true_name,effect_at,expire_at,operator,created_at) VALUES (?,1,?,?,0,?,?,1,?,?,?,?,?,?,?)
candy_coupon.goods_spu_update=UPDATE candy_coupon SET title=?,notice=?,operator=?,updated_at=? WHERE coupon_id=?
candy_coupon.goods_sku_update=UPDATE candy_coupon SET val_face=?,is_true_name=?,effect_at=?,expire_at=?,operator=?,updated_at=? WHERE coupon_id=?
candy_coupon_rule.goods_insert=INSERT INTO candy_coupon_rule (crule_id,coupon_id,use_scope,busi_name,busi_id,state) VALUES (?,?,?,?,?,1)
candy_coupon_rule.goods_sku_update=UPDATE candy_coupon_rule SET use_scope=?,busi_name=? WHERE coupon_id=?
goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,del_flg)VALUES(?,?,'0') goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,del_flg)VALUES(?,?,'0')
goblin_goods_image.delete=UPDATE goblin_goods_image SET del_flg='1' WHERE spu_id=? AND del_flg='0' goblin_goods_image.delete=UPDATE goblin_goods_image SET del_flg='1' WHERE spu_id=? AND del_flg='0'
goblin_goods_tag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0') goblin_goods_tag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0')
...@@ -180,5 +190,6 @@ goblin_nft_order.update_artwork=UPDATE goblin_nft_order SET artwork_id=? WHERE o ...@@ -180,5 +190,6 @@ goblin_nft_order.update_artwork=UPDATE goblin_nft_order SET artwork_id=? WHERE o
#---- #----
goblin_sku.stock=UPDATE goblin_goods_sku SET sku_stock = ? , stock = ?, updated_at = ? WHERE sku_erp_code = ? and erp_warehouse_no = ? goblin_sku.stock=UPDATE goblin_goods_sku SET sku_stock = ? , stock = ?, updated_at = ? WHERE sku_erp_code = ? and erp_warehouse_no = ?
#---- #----
candy_user_coupon.update_apply_refund=UPDATE candy_user_coupon SET state=?,operator=?,updated_at=? WHERE ucoupon_id=?
#---- #----
#---- #----
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.controller; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.controller;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.admin.OrderRefundPoundage;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderTicketPreVo; import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderTicketPreVo;
import com.liquidnet.service.kylin.dto.vo.returns.OrderRefundVo; import com.liquidnet.service.kylin.dto.vo.returns.OrderRefundVo;
import com.liquidnet.service.kylin.service.impl.KylinOrderTicketsRefundServiceImpl; import com.liquidnet.service.kylin.service.impl.KylinOrderTicketsRefundServiceImpl;
...@@ -38,13 +39,31 @@ public class KylinOrderTicketsRefundController { ...@@ -38,13 +39,31 @@ public class KylinOrderTicketsRefundController {
return kylinOrderTicketsRefundService.toOrderRefundDetails(orderId); return kylinOrderTicketsRefundService.toOrderRefundDetails(orderId);
} }
@GetMapping("getChargesRatioItem")
@ApiOperation("阶梯退款详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<OrderRefundPoundage> getChargesRatioItem(
@RequestParam(value = "performanceId", required = true) @NotNull(message = "演出id") String performanceId
) {
return kylinOrderTicketsRefundService.getChargesRatioItem(performanceId);
}
@GetMapping("getChargesRatioItem2")
@ApiOperation("阶梯退款注意事项")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> getChargesRatioItem2(
@RequestParam(value = "performanceId", required = true) @NotNull(message = "演出id") String performanceId
) {
return kylinOrderTicketsRefundService.getChargesRatioItem2(performanceId);
}
@PostMapping("sendOrderRefunds") @PostMapping("sendOrderRefunds")
@ApiOperation("发起退款申请") @ApiOperation("发起退款申请")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "orderId", value = "订单ID", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "orderId", value = "订单ID", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "orderTicketEntitiesId", value = "订单入场人ID", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "orderTicketEntitiesId", value = "订单入场人ID", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "reason", value = "退款申请备注", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "reason", value = "退款申请备注", required = false),
@ApiImplicitParam(type = "form", dataType = "String", name = "picList", value = "图片"), @ApiImplicitParam(type = "form", dataType = "String", name = "picList", value = "图片"),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketNum", value = "纸质票号"), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketNum", value = "纸质票号"),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "sendExpressType", value = "快递方式 1上门取件 2自主发货"), @ApiImplicitParam(type = "form", dataType = "Integer", name = "sendExpressType", value = "快递方式 1上门取件 2自主发货"),
...@@ -57,7 +76,7 @@ public class KylinOrderTicketsRefundController { ...@@ -57,7 +76,7 @@ public class KylinOrderTicketsRefundController {
public ResponseDto sendOrderRefund( public ResponseDto sendOrderRefund(
@RequestParam(value = "orderId", required = true) @NotNull(message = "订单ID不能为空") String orderId, @RequestParam(value = "orderId", required = true) @NotNull(message = "订单ID不能为空") String orderId,
@RequestParam(value = "orderTicketEntitiesId", required = true) @NotNull(message = "票单ID不能为空") String orderTicketEntitiesId, @RequestParam(value = "orderTicketEntitiesId", required = true) @NotNull(message = "票单ID不能为空") String orderTicketEntitiesId,
@RequestParam(value = "reason", required = true) @NotNull(message = "退款原因不能为空") String reason, @RequestParam(value = "reason", required = false) @NotNull(message = "退款原因不能为空") String reason,
@RequestParam(value = "picList", required = false) String picList, @RequestParam(value = "picList", required = false) String picList,
@RequestParam(value = "ticketNum", required = false) String ticketNum, @RequestParam(value = "ticketNum", required = false) String ticketNum,
......
...@@ -103,8 +103,9 @@ public class KylinRefundsStatusServiceImpl { ...@@ -103,8 +103,9 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setOrderRefundsId(orderRefundsId); kylinOrderRefunds.setOrderRefundsId(orderRefundsId);
kylinOrderRefunds.setOrderTicketsId(orderInfo.getOrderTicketsId()); kylinOrderRefunds.setOrderTicketsId(orderInfo.getOrderTicketsId());
String orderRefundCode = orderInfo.getOrderCode(); String orderRefundCode = orderInfo.getOrderCode();
String codeNum = StringUtils.leftPad(String.valueOf(refundCount), 3, "0"); // String codeNum = StringUtils.leftPad(String.valueOf(refundCount), 3, "0");
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(codeNum)); // long currentTime = System.currentTimeMillis()% 100;
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(dataUtils.incrOrderRefundCode(orderInfo.getOrderCode())+""));
kylinOrderRefunds.setPrice(refundPrice); kylinOrderRefunds.setPrice(refundPrice);
kylinOrderRefunds.setPriceExpress(priceExpress); kylinOrderRefunds.setPriceExpress(priceExpress);
kylinOrderRefunds.setPriceCharges(priceCharges); kylinOrderRefunds.setPriceCharges(priceCharges);
...@@ -261,8 +262,9 @@ public class KylinRefundsStatusServiceImpl { ...@@ -261,8 +262,9 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setOrderRefundsId(orderRefundsId); kylinOrderRefunds.setOrderRefundsId(orderRefundsId);
kylinOrderRefunds.setOrderTicketsId(orderInfo.getOrderTicketsId()); kylinOrderRefunds.setOrderTicketsId(orderInfo.getOrderTicketsId());
String orderRefundCode = orderInfo.getOrderCode(); String orderRefundCode = orderInfo.getOrderCode();
String codeNum = StringUtils.leftPad(String.valueOf(refundCount), 3, "0"); // String codeNum = StringUtils.leftPad(String.valueOf(refundCount), 3, "0");
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(codeNum)); // long currentTime = System.currentTimeMillis()% 100;
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(dataUtils.incrOrderRefundCode(orderInfo.getOrderCode())+""));
kylinOrderRefunds.setPrice(BigDecimal.valueOf(refundPrice)); kylinOrderRefunds.setPrice(BigDecimal.valueOf(refundPrice));
kylinOrderRefunds.setPriceExpress(orderInfo.getPriceExpress()); kylinOrderRefunds.setPriceExpress(orderInfo.getPriceExpress());
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY); kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY);
...@@ -351,5 +353,4 @@ public class KylinRefundsStatusServiceImpl { ...@@ -351,5 +353,4 @@ public class KylinRefundsStatusServiceImpl {
return ""; return "";
} }
} }
} }
\ No newline at end of file
...@@ -655,7 +655,7 @@ public class DataUtils { ...@@ -655,7 +655,7 @@ public class DataUtils {
try { try {
DateTimeFormatter df = DateTimeFormatter.ofPattern(DateUtil.DATE_FULL_STR); DateTimeFormatter df = DateTimeFormatter.ofPattern(DateUtil.DATE_FULL_STR);
LocalDateTime nowTime = LocalDateTime.parse(nowTimeTStr, df); LocalDateTime nowTime = LocalDateTime.parse(nowTimeTStr, df);
LocalDateTime endTime = LocalDateTime.parse(toDayEndTimeStr,df); LocalDateTime endTime = LocalDateTime.parse(toDayEndTimeStr, df);
LocalDateTime threeEndTime = DateUtil.asLocalDateTime(beforeDayEnd); LocalDateTime threeEndTime = DateUtil.asLocalDateTime(beforeDayEnd);
//查询预约(当天) //查询预约(当天)
...@@ -978,8 +978,8 @@ public class DataUtils { ...@@ -978,8 +978,8 @@ public class DataUtils {
public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) { public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) {
String redisKeyUid; String redisKeyUid;
String redisKeyIdCard; String redisKeyIdCard;
String performanceIdKeyIdCard=""; String performanceIdKeyIdCard = "";
String ticketIdKeyIdCard=""; String ticketIdKeyIdCard = "";
int isTrueName = getPerformanceIsTrueName(performanceId); int isTrueName = getPerformanceIsTrueName(performanceId);
...@@ -1092,30 +1092,11 @@ public class DataUtils { ...@@ -1092,30 +1092,11 @@ public class DataUtils {
} }
// 获取手续费 // 获取手续费
public ArrayList<OrderRefundPoundage> getRefundPoundage(Integer isRefundPoundage) { public ArrayList<OrderRefundPoundage> getRefundPoundage(Integer isRefundPoundage, String performanceId) {
ArrayList<OrderRefundPoundage> orderRefundPoundageArrayList = ObjectUtil.getOrderRefundPoundageArrayList(); ArrayList<OrderRefundPoundage> orderRefundPoundageArrayList = ObjectUtil.getOrderRefundPoundageArrayList();
if (null != isRefundPoundage && isRefundPoundage > 0) { // 开启了演出退票有手续费 if (null != isRefundPoundage && isRefundPoundage > 0) { // 开启了演出退票有手续费
Object obj = redisUtil.get(KylinRedisConst.ORDER_REFUND_POUNDAGE); Object obj = redisUtil.get(KylinRedisConst.ORDER_REFUND_POUNDAGE.concat(":").concat(performanceId));
if (obj == null) { if (obj == null) {
OrderRefundPoundage vo1 = OrderRefundPoundage.getNew();
vo1.setDay(15);
vo1.setContent("距离演出开始日期>15天");
vo1.setPresent(BigDecimal.valueOf(0.1));
vo1.setIsCanRefund(1);
OrderRefundPoundage vo2 = OrderRefundPoundage.getNew();
vo2.setDay(3);
vo2.setContent("距离演出开始日期>3天-15天(含15天)");
vo2.setPresent(BigDecimal.valueOf(0.5));
vo2.setIsCanRefund(1);
OrderRefundPoundage vo3 = OrderRefundPoundage.getNew();
vo3.setDay(0);
vo3.setContent("距离演出开始日期≤3天(含演出当天)");
vo3.setPresent(BigDecimal.valueOf(1));
vo3.setIsCanRefund(0);
orderRefundPoundageArrayList.add(vo1);
orderRefundPoundageArrayList.add(vo2);
orderRefundPoundageArrayList.add(vo3);
redisUtil.set(KylinRedisConst.ORDER_REFUND_POUNDAGE, orderRefundPoundageArrayList);
return orderRefundPoundageArrayList; return orderRefundPoundageArrayList;
} else { } else {
return (ArrayList<OrderRefundPoundage>) obj; return (ArrayList<OrderRefundPoundage>) obj;
...@@ -1126,17 +1107,15 @@ public class DataUtils { ...@@ -1126,17 +1107,15 @@ public class DataUtils {
} }
// 获取手续费ALL说明 // 获取手续费ALL说明
public OrderRefundPoundageAll getRefundPoundageAll(Integer isRefundPoundage) { public OrderRefundPoundageAll getRefundPoundageAll(Integer isRefundPoundage, String performanceId) {
ArrayList<OrderRefundPoundage> refundPoundage = getRefundPoundage(isRefundPoundage); ArrayList<OrderRefundPoundage> refundPoundage = getRefundPoundage(isRefundPoundage, performanceId);
OrderRefundPoundageAll aNew = OrderRefundPoundageAll.getNew(); OrderRefundPoundageAll aNew = OrderRefundPoundageAll.getNew();
aNew.setOrderRefundPoundageList(refundPoundage); aNew.setOrderRefundPoundageList(refundPoundage);
Object obj = redisUtil.get(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN); Object obj = redisUtil.get(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId));
if (null == obj) { if (null == obj) {
String explain = "1.存在异常订购行为的订单,平台有权不予办理退票。\n2.不支持退票示例:如演出时间为5月1日,则不支持退票的时间范围为4月28日-30日及5月1日(演出当天)。"; aNew.setExplain("");
redisUtil.set(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN, explain);
aNew.setExplain(explain);
} else { } else {
String explain = (String) obj; String explain = (String) obj;
aNew.setExplain(explain); aNew.setExplain(explain);
...@@ -1144,6 +1123,15 @@ public class DataUtils { ...@@ -1144,6 +1123,15 @@ public class DataUtils {
return aNew; return aNew;
} }
public String getExplain(String performanceId){
Object obj = redisUtil.get(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId));
if (null == obj) {
return "";
} else {
return (String) obj;
}
}
// 获取订单券的使用情况 // 获取订单券的使用情况
public ArrayList<KylinOrderCoupons> getOrderCoupon(String orderId) { public ArrayList<KylinOrderCoupons> getOrderCoupon(String orderId) {
String redisKey = KylinRedisConst.ORDER_COUPON.concat(orderId); String redisKey = KylinRedisConst.ORDER_COUPON.concat(orderId);
...@@ -1315,11 +1303,13 @@ public class DataUtils { ...@@ -1315,11 +1303,13 @@ public class DataUtils {
String rdk = KylinRedisConst.REDIS_WQ_ORDER_FIX.concat(orderId); String rdk = KylinRedisConst.REDIS_WQ_ORDER_FIX.concat(orderId);
redisUtil.del(rdk, orderId); redisUtil.del(rdk, orderId);
} }
// 万青补偿vo覆盖 // 万青补偿vo覆盖
public void setWqOrderVo(WqTempVo vo) { public void setWqOrderVo(WqTempVo vo) {
String rdk = KylinRedisConst.REDIS_WQ_ORDER_EXPRESS.concat(vo.getOrderId()); String rdk = KylinRedisConst.REDIS_WQ_ORDER_EXPRESS.concat(vo.getOrderId());
redisUtil.set(rdk, vo); redisUtil.set(rdk, vo);
} }
// 万青补偿vo获取 // 万青补偿vo获取
public WqTempVo getWqOrderVo(String orderId) { public WqTempVo getWqOrderVo(String orderId) {
String rdk = KylinRedisConst.REDIS_WQ_ORDER_EXPRESS.concat(orderId); String rdk = KylinRedisConst.REDIS_WQ_ORDER_EXPRESS.concat(orderId);
...@@ -1366,8 +1356,9 @@ public class DataUtils { ...@@ -1366,8 +1356,9 @@ public class DataUtils {
return (List<String>) obj; return (List<String>) obj;
} }
} }
//获得 admin配置的推荐活动 //获得 admin配置的推荐活动
public List<KylinRecommendActive> getRecommendActive(String id) { public List<KylinRecommendActive> getRecommendActive(String id) {
return (List<KylinRecommendActive>) redisUtil.get(KylinRedisConst.RECOMMEND_ACTIVE + id); return (List<KylinRecommendActive>) redisUtil.get(KylinRedisConst.RECOMMEND_ACTIVE + id);
} }
...@@ -1382,7 +1373,7 @@ public class DataUtils { ...@@ -1382,7 +1373,7 @@ public class DataUtils {
KylinOrderTicketVo data = dataSingle; KylinOrderTicketVo data = dataSingle;
KylinOrderListVo voItem = KylinOrderListVo.getNew().copy(data); KylinOrderListVo voItem = KylinOrderListVo.getNew().copy(data);
List<KylinOrderListVo> redisData = (List<KylinOrderListVo>) redisUtil.get(KylinRedisConst.ORDER_LIST + userId); List<KylinOrderListVo> redisData = (List<KylinOrderListVo>) redisUtil.get(KylinRedisConst.ORDER_LIST + userId);
if(redisData==null){ if (redisData == null) {
return false; return false;
} }
if (type == 1) { if (type == 1) {
...@@ -1432,32 +1423,36 @@ public class DataUtils { ...@@ -1432,32 +1423,36 @@ public class DataUtils {
} }
//删除 订单Ar激活码 //删除 订单Ar激活码
public void delOrderArCode(String orderId){ public void delOrderArCode(String orderId) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId); String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
redisUtil.del(rdk); redisUtil.del(rdk);
} }
//添加 订单Ar激活码 //添加 订单Ar激活码
public void addOrderArCode(String orderId,String arCode){ public void addOrderArCode(String orderId, String arCode) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId); String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
List<String> data = getOrderArCode(orderId); List<String> data = getOrderArCode(orderId);
data.add(arCode); data.add(arCode);
redisUtil.set(rdk,data); redisUtil.set(rdk, data);
} }
//获取 订单Ar激活码 //获取 订单Ar激活码
public List<String> getOrderArCode(String orderId){ public List<String> getOrderArCode(String orderId) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId); String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
Object obj = redisUtil.get(rdk); Object obj = redisUtil.get(rdk);
if(obj==null){ if (obj == null) {
return CollectionUtil.arrayListString(); return CollectionUtil.arrayListString();
}else{ } else {
return (List<String>) obj; return (List<String>) obj;
} }
} }
//添加激活码使用量 //添加激活码使用量
public void incrArCode() { public void incrArCode() {
redisUtil.incr(KylinRedisConst.ACTIVE_USE_AR_COUNT,1); redisUtil.incr(KylinRedisConst.ACTIVE_USE_AR_COUNT, 1);
}
public int incrOrderRefundCode(String orderCode) {
return (int) redisUtil.incr(KylinRedisConst.ORDER_REFUND_TEMP + orderCode,1);
} }
} }
...@@ -6,6 +6,7 @@ import com.liquidnet.commons.lang.util.*; ...@@ -6,6 +6,7 @@ import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.adam.dto.vo.AdamEntersVo; import com.liquidnet.service.adam.dto.vo.AdamEntersVo;
import com.liquidnet.service.base.*; import com.liquidnet.service.base.*;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.candy.dto.CandyUserCouponAssocDto;
import com.liquidnet.service.dragon.constant.DragonConstant; import com.liquidnet.service.dragon.constant.DragonConstant;
import com.liquidnet.service.dragon.dto.DragonPayBaseReqDto; import com.liquidnet.service.dragon.dto.DragonPayBaseReqDto;
import com.liquidnet.service.dragon.dto.DragonPayBaseRespDto; import com.liquidnet.service.dragon.dto.DragonPayBaseRespDto;
...@@ -261,7 +262,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -261,7 +262,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} else { } else {
if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1) { if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1) {
advanceMap = orderUtils.useCoupon(payOrderParam.getAdvanceCode(), "购买 " + performanceData.getTitle(), BigDecimal.ZERO, payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId()); advanceMap = orderUtils.useCoupon(payOrderParam.getAdvanceCode(), "购买 " + performanceData.getTitle(), BigDecimal.ZERO, payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId(),performanceData.getType());
if (advanceMap == null) { if (advanceMap == null) {
return ResponseDto.failure("优先券不可用"); return ResponseDto.failure("优先券不可用");
} }
...@@ -322,6 +323,22 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -322,6 +323,22 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
return ResponseDto.failure(ErrorMapping.get("20015"));//入场人数量错误 return ResponseDto.failure(ErrorMapping.get("20015"));//入场人数量错误
} }
//判断新商品券
if(payOrderParam.getVoucherCode()!=null) {
CandyUserCouponAssocDto couponAssocDto = dataUtils.getGoblinPlatformCoupon(payOrderParam.getVoucherCode());
if (couponAssocDto != null) {
boolean goblinPlatformCouponseCanUse = false;
for (AdamEntersVo adamEnters : entersVoList) {
if (couponAssocDto.getIdNo().equals(adamEnters.getIdCard())) {
goblinPlatformCouponseCanUse = true;
}
}
if (!goblinPlatformCouponseCanUse) {
return ResponseDto.failure("实名券与入场人信息不一致");
}
}
}
// 判断库存 // 判断库存
int surplusGeneral = orderUtils.changeSurplus(isPay, payOrderParam.getTicketId(), -payOrderParam.getNumber()); int surplusGeneral = orderUtils.changeSurplus(isPay, payOrderParam.getTicketId(), -payOrderParam.getNumber());
...@@ -406,7 +423,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -406,7 +423,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
if (e.getMessage() == null) { if (e.getMessage() == null) {
return ResponseDto.failure(ErrorMapping.get("20018"));//乱七八糟异常 return ResponseDto.failure(ErrorMapping.get("20018"));//乱七八糟异常
} else if (e.getMessage().equals("券不可用")) { } else if (e.getMessage().equals("券不可用")) {
return ResponseDto.failure(ErrorMapping.get("20030"));//券不可用 return ResponseDto.failure("请在“我的订单”中取消或支付“待支付订单”再进行操作");//券不可用
} else { } else {
return ResponseDto.failure(ErrorMapping.get("20018"));//乱七八糟异常 return ResponseDto.failure(ErrorMapping.get("20018"));//乱七八糟异常
} }
...@@ -476,7 +493,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -476,7 +493,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} }
if (payOrderParam.getVoucherCode() != null) { if (payOrderParam.getVoucherCode() != null) {
HashMap<String, Object> hashMap = orderUtils.useCoupon(payOrderParam.getVoucherCode(), content, orderTickets.getPriceTotal().subtract(priceExpress), payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId()); HashMap<String, Object> hashMap = orderUtils.useCoupon(payOrderParam.getVoucherCode(), content, orderTickets.getPriceTotal().subtract(priceExpress), payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId(),performanceData.getType());
if (null != hashMap) { if (null != hashMap) {
BigDecimal priceVoucher = (BigDecimal) hashMap.get("voucher"); BigDecimal priceVoucher = (BigDecimal) hashMap.get("voucher");
Integer typeVoucher = (Integer) hashMap.get("type"); Integer typeVoucher = (Integer) hashMap.get("type");
...@@ -1043,9 +1060,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -1043,9 +1060,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
SmsEnum.ADTemplate adTemplate = null; SmsEnum.ADTemplate adTemplate = null;
if (orderTicketData.getGetTicketType().equals("express")) { if (orderTicketData.getGetTicketType().equals("express")) {
adTemplate = SmsEnum.ADTemplate.SMS_225995308; adTemplate = SmsEnum.ADTemplate.SMS_463657321;
} else if (orderTicketData.getGetTicketType().equals("electronic")) { } else if (orderTicketData.getGetTicketType().equals("electronic")) {
adTemplate = ticketData.getIsShowCode() == 1 ? SmsEnum.ADTemplate.SMS_225995308 : SmsEnum.ADTemplate.SMS_225995308; adTemplate = ticketData.getIsShowCode() == 1 ? SmsEnum.ADTemplate.SMS_463657321 : SmsEnum.ADTemplate.SMS_463657321;
} }
if (null != adTemplate) { if (null != adTemplate) {
......
package com.liquidnet.service.order.service.impl; package com.liquidnet.service.order.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.liquidnet.commons.lang.util.CollectionUtil; import com.liquidnet.commons.lang.util.*;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.kylin.constant.KylinTableStatusConst; import com.liquidnet.service.kylin.constant.KylinTableStatusConst;
...@@ -124,8 +121,9 @@ public class KylinRefundsStatusServiceImpl { ...@@ -124,8 +121,9 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setOrderRefundsId(orderRefundsId); kylinOrderRefunds.setOrderRefundsId(orderRefundsId);
kylinOrderRefunds.setOrderTicketsId(orderTicketsId); kylinOrderRefunds.setOrderTicketsId(orderTicketsId);
String orderRefundCode = orderInfo.getOrderCode(); String orderRefundCode = orderInfo.getOrderCode();
String codeNum = StringUtils.leftPad(String.valueOf(5), 3, "0"); // long currentTime = System.currentTimeMillis()% 100;
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(codeNum)); // String codeNum = StringUtils.leftPad(String.valueOf(5), 3, "0");
kylinOrderRefunds.setOrderRefundCode(orderRefundCode.concat(dataUtils.incrOrderRefundCode(orderInfo.getOrderCode())+""));
kylinOrderRefunds.setPrice(entitiesPriceSum); kylinOrderRefunds.setPrice(entitiesPriceSum);
kylinOrderRefunds.setPriceExpress(RefundPriceExpress); kylinOrderRefunds.setPriceExpress(RefundPriceExpress);
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY); kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY);
......
...@@ -158,7 +158,7 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -158,7 +158,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
canBuyIds.add(skuId + "," + itemVo.getCount()); canBuyIds.add(skuId + "," + itemVo.getCount());
} }
} }
if (skuInfoVo.getSkuType() == 0) { if (skuInfoVo.getSkuType() == 0 || skuInfoVo.getSkuType() == 2) {
skuInfoList.add(skuInfoVo); skuInfoList.add(skuInfoVo);
skuMix.put(skuInfoVo.getSkuId() + "price", itemVo.getPrice()); skuMix.put(skuInfoVo.getSkuId() + "price", itemVo.getPrice());
skuMix.put(skuInfoVo.getSkuId() + "count", itemVo.getCount()); skuMix.put(skuInfoVo.getSkuId() + "count", itemVo.getCount());
......
package com.liquidnet.service.order.utils; package com.liquidnet.service.order.utils;
import com.fasterxml.jackson.databind.JsonNode;
import com.liquidnet.common.cache.redis.util.RedisUtil; import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.common.exception.LiquidnetServiceException;
import com.liquidnet.commons.lang.util.IdentityUtils;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.adam.constant.AdamRedisConst; import com.liquidnet.service.adam.constant.AdamRedisConst;
import com.liquidnet.service.adam.dto.vo.AdamUserInfoVo; import com.liquidnet.service.adam.dto.vo.AdamUserInfoVo;
import com.liquidnet.service.adam.dto.vo.AdamUserMemberVo; import com.liquidnet.service.adam.dto.vo.AdamUserMemberVo;
import com.liquidnet.service.base.ErrorMapping;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -34,4 +40,87 @@ public class AdamRedisUtils { ...@@ -34,4 +40,87 @@ public class AdamRedisUtils {
log.debug("#RDM耗时:{}ms", System.currentTimeMillis() - s); log.debug("#RDM耗时:{}ms", System.currentTimeMillis() - s);
return vo; return vo;
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证失败的<ID_TYPE+ID_NO, ID_NAME> */
private boolean setCertificationJunk(int idType, String idNo, String idName) {
return redisUtil.set(AdamRedisConst.INFO_CERTIFICATION_JUNK + idType + idNo, idName, 604800);
}
private boolean isCertificationJunk(int idType, String idNo, String idName) {
String o = (String) redisUtil.get(AdamRedisConst.INFO_CERTIFICATION_JUNK + idType + idNo);
return !StringUtils.isEmpty(o) && o.equals(idName);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证成功的<ID_TYPE+ID_NO, ID_NAME> */
/**
* 目前只针对身份证类型三方服务认证成功的标记
*
* @param idType
* @param idNo
* @param idName
* @return
*/
private boolean setCertification(int idType, String idNo, String idName) {
return redisUtil.set(AdamRedisConst.INFO_CERTIFICATION + idType + idNo, idName);
}
/**
* 目前只针对身份证类型三方服务认证成功的标记
*
* @param idType
* @param idNo
* @param idName
* @return
*/
private int isCertification(int idType, String idNo, String idName) {
String o = (String) redisUtil.get(AdamRedisConst.INFO_CERTIFICATION + idType + idNo);
if (StringUtils.isEmpty(o)) {
return -1;
}
return o.equals(idName) ? 1 : 0;
// return !StringUtils.isEmpty(o) && o.equals(idName);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证处理 */
/**
* 身份证实名处理
*
* @param uid
* @param name
* @param idCard
*/
public void identityHandler1(String uid, String name, String idCard) {
int rst = this.isCertification(1, idCard, name);
switch (rst) {
case -1:// 本地不存在
if (this.isCertificationJunk(1, idCard, name)) {
throw new LiquidnetServiceException("-1", "身份证号与姓名不符");
}
String respStr = IdentityUtils.aliThird(name, idCard), respErrorCode = null;
JsonNode respJNode = JsonUtils.fromJson(respStr, JsonNode.class);
if (null == respJNode || !"0".equals(respErrorCode = String.valueOf(respJNode.get("error_code")))) {
log.info("###实名认证失败[{}]", respStr);
// this.setCertificationJunk(1, idCard, name);
if (!StringUtils.isEmpty(respErrorCode) && org.apache.commons.lang3.StringUtils.indexOf("3000290033", respErrorCode) < 0) {
// 认证服务商'30002'、'90033'为运营商导致的失败,这里不做缓存标记
this.setCertificationJunk(1, idCard, name);
}
throw new LiquidnetServiceException("-1", "身份证号与姓名不符");
}
this.setCertification(1, idCard, name);
break;
case 0:// 本地存在,验证不通过
throw new LiquidnetServiceException("-1", "身份证号与姓名不符");
case 1:// 本地存在,验证通过
break;
}
}
} }
...@@ -5,6 +5,8 @@ import com.liquidnet.commons.lang.util.CollectionUtil; ...@@ -5,6 +5,8 @@ import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IPUtil; import com.liquidnet.commons.lang.util.IPUtil;
import com.liquidnet.service.adam.dto.vo.AdamEntersVo; import com.liquidnet.service.adam.dto.vo.AdamEntersVo;
import com.liquidnet.service.candy.constant.CandyRedisConst;
import com.liquidnet.service.candy.dto.CandyUserCouponAssocDto;
import com.liquidnet.service.goblin.constant.SmileRedisConst; import com.liquidnet.service.goblin.constant.SmileRedisConst;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dao.KylinFreightChargeDao; import com.liquidnet.service.kylin.dao.KylinFreightChargeDao;
...@@ -73,6 +75,10 @@ public class DataUtils { ...@@ -73,6 +75,10 @@ public class DataUtils {
redisUtil.set(KylinRedisConst.ORDER_LIST + userId, vo); redisUtil.set(KylinRedisConst.ORDER_LIST + userId, vo);
} }
public int incrOrderRefundCode(String orderCode) {
return (int) redisUtil.incr(KylinRedisConst.ORDER_REFUND_TEMP + orderCode,1);
}
public List<KylinOrderListVo> getOrderList(String userId) { public List<KylinOrderListVo> getOrderList(String userId) {
Object obj = redisUtil.get(KylinRedisConst.ORDER_LIST + userId); Object obj = redisUtil.get(KylinRedisConst.ORDER_LIST + userId);
if (obj != null) { if (obj != null) {
...@@ -126,8 +132,8 @@ public class DataUtils { ...@@ -126,8 +132,8 @@ public class DataUtils {
public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) { public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) {
String redisKeyUid; String redisKeyUid;
String redisKeyIdCard; String redisKeyIdCard;
String performanceIdKeyIdCard=""; String performanceIdKeyIdCard = "";
String ticketIdKeyIdCard=""; String ticketIdKeyIdCard = "";
int isTrueName = getPerformanceIsTrueName(performanceId); int isTrueName = getPerformanceIsTrueName(performanceId);
...@@ -380,7 +386,7 @@ public class DataUtils { ...@@ -380,7 +386,7 @@ public class DataUtils {
/** /**
* 获取演出ids * 获取演出ids
*/ */
public List<String> getShowIds(){ public List<String> getShowIds() {
String rdk = SmileRedisConst.SMILE_SHOW; String rdk = SmileRedisConst.SMILE_SHOW;
Object obj = redisUtil.get(rdk); Object obj = redisUtil.get(rdk);
if (obj == null) { if (obj == null) {
...@@ -389,4 +395,19 @@ public class DataUtils { ...@@ -389,4 +395,19 @@ public class DataUtils {
return (List<String>) obj; return (List<String>) obj;
} }
} }
/**
* 根据券id查询适用人证件信息
* @param ucouponId
* @return
*/
public CandyUserCouponAssocDto getGoblinPlatformCoupon(String ucouponId) {
String rdk = CandyRedisConst.BASIC_USER_COUPON_ASSOC.concat(ucouponId);
Object obj = redisUtil.get(rdk);
if (obj == null) {
return null;
} else {
return (CandyUserCouponAssocDto) obj;
}
}
} }
...@@ -429,7 +429,7 @@ public class GoblinNftOrderUtils { ...@@ -429,7 +429,7 @@ public class GoblinNftOrderUtils {
} }
/** /**
* private int skuType 商品类型[0-常规|1-数字藏品] * private int skuType 商品类型[0-常规|1-数字藏品|2-券类商品]
* private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过]; * private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过];
* private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架]; * private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架];
* private String skuAppear 是否隐藏[0-默认展示|1-隐藏]; 隐藏款 拼参数可购买 盲盒可抽 * private String skuAppear 是否隐藏[0-默认展示|1-隐藏]; 隐藏款 拼参数可购买 盲盒可抽
......
...@@ -25,7 +25,7 @@ import java.util.stream.Collectors; ...@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
@Component @Component
public class GoblinRedisUtils { public class GoblinRedisUtils {
@Autowired @Autowired
RedisUtil redisUtil; public RedisUtil redisUtil;
@Autowired @Autowired
GoblinMongoUtils goblinMongoUtils; GoblinMongoUtils goblinMongoUtils;
...@@ -361,6 +361,11 @@ public class GoblinRedisUtils { ...@@ -361,6 +361,11 @@ public class GoblinRedisUtils {
return (int) redisUtil.decr(redisKey, number); return (int) redisUtil.decr(redisKey, number);
} }
// 减少 关联实名人sku购买个数
public long decrSkuCountByIdNo(int idType, String idNo, String skuId, int number) {
return redisUtil.decr(String.format(GoblinRedisConst.REDIS_GOBLIN_BUY_COUNT_IDNO, idType, idNo, skuId), number);
}
// 增加 sku销量 // 增加 sku销量
public int incrSkuSaleCount(String spuId, String skuId, int number) { public int incrSkuSaleCount(String spuId, String skuId, int number) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_SALE_COUNT.concat(skuId); String redisKey = GoblinRedisConst.REDIS_GOBLIN_SALE_COUNT.concat(skuId);
......
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