Merge branch 'master' of https://git.cpopsz.com/smd/cpop_nftmate
This commit is contained in:
commit
289556054e
@ -0,0 +1,42 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_exchange_records")
|
||||||
|
public class ZExchangeRecords extends Model<ZExchangeRecords> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 记录ID
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long recordId;
|
||||||
|
// 用户ID
|
||||||
|
private Integer memberId;
|
||||||
|
// 标识
|
||||||
|
private String uniqudeCode;
|
||||||
|
// 兑换类别 1门票,2盲盒
|
||||||
|
private Integer type;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_show")
|
||||||
|
@ApiModel(description = "演出实体")
|
||||||
|
public class ZShow extends Model<ZShow> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// id
|
||||||
|
@ApiModelProperty(value = "演出id")
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long showId;
|
||||||
|
// 演出名称
|
||||||
|
@ApiModelProperty(value = "演出名称")
|
||||||
|
private String showName;
|
||||||
|
// 站点
|
||||||
|
@ApiModelProperty(value = "站点")
|
||||||
|
private String site;
|
||||||
|
// 地点
|
||||||
|
@ApiModelProperty(value = "地点")
|
||||||
|
private String place;
|
||||||
|
// 价格
|
||||||
|
@ApiModelProperty(value = "价格")
|
||||||
|
private String price;
|
||||||
|
// 演出时间
|
||||||
|
@ApiModelProperty(value = "演出时间")
|
||||||
|
private String showTime;
|
||||||
|
// 演出详情
|
||||||
|
@ApiModelProperty(value = "演出详情")
|
||||||
|
private String detail;
|
||||||
|
// 小图
|
||||||
|
@ApiModelProperty(value = "小图")
|
||||||
|
private String thumbnail;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
// 上架标记,0未上架,9已上架
|
||||||
|
@ApiModelProperty(value = "上架标记,0未上架,1已上架")
|
||||||
|
private Integer listFlag;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
// 温馨提示
|
||||||
|
@ApiModelProperty(value = "温馨提示")
|
||||||
|
private String hint;
|
||||||
|
// 经度
|
||||||
|
@ApiModelProperty(value = "经度")
|
||||||
|
private String longitude;
|
||||||
|
// 纬度
|
||||||
|
@ApiModelProperty(value = "纬度")
|
||||||
|
private String latitude;
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_show_schedule")
|
||||||
|
@ApiModel(description = "演出日程")
|
||||||
|
public class ZShowSchedule extends Model<ZShowSchedule> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 场次ID
|
||||||
|
@ApiModelProperty(value = "日程ID")
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long scheduleId;
|
||||||
|
// 演出ID
|
||||||
|
@ApiModelProperty(value = "演出ID")
|
||||||
|
private Long showId;
|
||||||
|
// 场次名称
|
||||||
|
@ApiModelProperty(value = "场次名称")
|
||||||
|
private String scheduleName;
|
||||||
|
// 场次时间
|
||||||
|
@ApiModelProperty(value = "场次时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp scheduleTime;
|
||||||
|
@ApiModelProperty(value = "场次状态,0待开售 1开售中 2已售罄")
|
||||||
|
// 场次状态,0待开售 1开售中 2已售罄
|
||||||
|
private Integer status;
|
||||||
|
// 总座位数
|
||||||
|
@ApiModelProperty(value = "总座位数")
|
||||||
|
private String seatsTotal;
|
||||||
|
// 可用座位数
|
||||||
|
@ApiModelProperty(value = "可用座位数")
|
||||||
|
private String seatsAvailable;
|
||||||
|
/*// 已售座位数
|
||||||
|
@ApiModelProperty(value = "已售座位数")
|
||||||
|
private String seatsSold;*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_ticket_blind_code")
|
||||||
|
public class ZTicketBlindCode extends Model<ZTicketBlindCode> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 唯一标识ID
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long codeId;
|
||||||
|
// 第一场演出ID
|
||||||
|
private Long firstShowId;
|
||||||
|
// 标识
|
||||||
|
private String uniqudeCode;
|
||||||
|
// 第一场票档ID
|
||||||
|
private Long firstTicketTierId;
|
||||||
|
// 状态 0未兑换,1兑换
|
||||||
|
private Integer status;
|
||||||
|
// 投放状态 0未投放,1已投放
|
||||||
|
private String deliveryStatus;
|
||||||
|
// 投放时间
|
||||||
|
private String deliveryTime;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票夹表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_ticket_folder")
|
||||||
|
public class ZTicketFolder extends Model<ZTicketFolder> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 票夹ID
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long folderId;
|
||||||
|
// 票夹状态:0待核销,1已核销,2 已过期,3 待投放
|
||||||
|
private Integer status;
|
||||||
|
// 用户ID
|
||||||
|
private Integer memberId;
|
||||||
|
// 演出ID
|
||||||
|
private Long showId;
|
||||||
|
// 门票唯一标识
|
||||||
|
private String uniqueCode;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
// 观众姓名
|
||||||
|
private String audienceName;
|
||||||
|
// 身份证
|
||||||
|
private String idNumber;
|
||||||
|
private String phone;
|
||||||
|
private Long ticketTierId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_ticket_tier")
|
||||||
|
@ApiModel(description = "票档实体")
|
||||||
|
public class ZTicketTier extends Model<ZTicketTier> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 票档ID
|
||||||
|
@ApiModelProperty(value = "票档ID")
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long tierId;
|
||||||
|
// 场次ID
|
||||||
|
@ApiModelProperty(value = "场次ID")
|
||||||
|
private Long scheduleId;
|
||||||
|
// 演出ID
|
||||||
|
@ApiModelProperty(value = "演出ID")
|
||||||
|
private Long showId;
|
||||||
|
// 票档名称
|
||||||
|
@ApiModelProperty(value = "票档名称")
|
||||||
|
private String tierName;
|
||||||
|
// 票档价格
|
||||||
|
@ApiModelProperty(value = "票档价格")
|
||||||
|
private BigDecimal tierPrice;
|
||||||
|
// 该票档的座位数
|
||||||
|
@ApiModelProperty(value = "该票档的座位数")
|
||||||
|
private Integer seatsInTier;
|
||||||
|
// 该票档的可用座位数
|
||||||
|
@ApiModelProperty(value = "该票档的可用座位数")
|
||||||
|
private Integer seatsAvailableInTier;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
@ApiModelProperty(value = "场次状态,0待开售 1开售中 2已售罄")
|
||||||
|
// 场次状态,0待开售 1开售中 2已售罄
|
||||||
|
private Integer status;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_ticket_unique_code")
|
||||||
|
public class ZTicketUniqueCode extends Model<ZTicketUniqueCode> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 唯一标识ID
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long codeId;
|
||||||
|
// 演出ID
|
||||||
|
private Long showId;
|
||||||
|
// 标识
|
||||||
|
private String uniqudeCode;
|
||||||
|
// 票档ID
|
||||||
|
private Long ticketTierId;
|
||||||
|
// 状态 0未兑换,1兑换
|
||||||
|
private Integer status;
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_ticket_verification_auth")
|
||||||
|
public class ZTicketVerificationAuth extends Model<ZTicketVerificationAuth> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 权限ID
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long authId;
|
||||||
|
// 用户ID
|
||||||
|
private Integer memberId;
|
||||||
|
// 演出ID
|
||||||
|
private Long showId;
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.cpop.nftmeta.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("z_ticket_verification_records")
|
||||||
|
public class ZTicketVerificationRecords extends Model<ZTicketVerificationRecords> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 记录ID
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long recordId;
|
||||||
|
// 门票ID
|
||||||
|
private Long folderId;
|
||||||
|
// 用户ID
|
||||||
|
private Long memberId;
|
||||||
|
// 演出ID
|
||||||
|
private Long showId;
|
||||||
|
// 核销人用户ID
|
||||||
|
private Integer writeOffUserId;
|
||||||
|
// 创建时间
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp creationTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.cpop.nftmeta.common.utils;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.Mode;
|
||||||
|
import cn.hutool.crypto.Padding;
|
||||||
|
import cn.hutool.crypto.symmetric.AES;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.crypto.spec.IvParameterSpec;
|
||||||
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class AESUtils {
|
||||||
|
private final String KEY_ALGORITHM = "AES";
|
||||||
|
private final String encodeKey = "thxdigitalcenter";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码加密
|
||||||
|
*
|
||||||
|
* @param str 密码
|
||||||
|
* @return {@link String }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/17
|
||||||
|
*/
|
||||||
|
public String encrypt(String str) {
|
||||||
|
AES aes = new AES(
|
||||||
|
Mode.CFB,
|
||||||
|
Padding.NoPadding,
|
||||||
|
new SecretKeySpec(encodeKey.getBytes(), KEY_ALGORITHM),
|
||||||
|
new IvParameterSpec(encodeKey.getBytes()));
|
||||||
|
// 加密
|
||||||
|
String encryptStr = aes.encryptHex(str);
|
||||||
|
return encryptStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解密
|
||||||
|
*
|
||||||
|
* @param str str
|
||||||
|
* @return {@link String }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/17
|
||||||
|
*/
|
||||||
|
public String decrypt(String str) {
|
||||||
|
AES aes = new AES(
|
||||||
|
Mode.CFB,
|
||||||
|
Padding.NoPadding,
|
||||||
|
new SecretKeySpec(encodeKey.getBytes(), KEY_ALGORITHM),
|
||||||
|
new IvParameterSpec(encodeKey.getBytes()));
|
||||||
|
String decryptStr = aes.decryptStr(str);
|
||||||
|
return decryptStr;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.admin.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZExchangeRecordsService;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zexchangerecords")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZExchangeRecordsController {
|
||||||
|
private final ZExchangeRecordsService zExchangeRecordsService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zExchangeRecordsService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zExchangeRecordsService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zExchangeRecordsService.getByZExchangeRecordsId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZExchangeRecords zExchangeRecords) {
|
||||||
|
return R.success(zExchangeRecordsService.add(zExchangeRecords), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZExchangeRecords zExchangeRecords) {
|
||||||
|
return R.success(zExchangeRecordsService.update(zExchangeRecords), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zExchangeRecordsService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.cpop.nftmeta.admin.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZShowService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zshow")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "演出模块")
|
||||||
|
public class ZShowController {
|
||||||
|
private final ZShowService zShowService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation(value = "查询演出列表")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zShowService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
@ApiOperation(value = "分页查询演出列表")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zShowService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
@ApiOperation(value = "根据ID查询演出")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zShowService.getByZShowId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "添加演出")
|
||||||
|
public R insert(@RequestBody ZShow zShow) {
|
||||||
|
return R.success(zShowService.add(zShow), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "更新演出")
|
||||||
|
public R update(@RequestBody ZShow zShow) {
|
||||||
|
return R.success(zShowService.update(zShow), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
@ApiOperation(value = "删除演出")
|
||||||
|
public R delete(@PathVariable Long Id) {
|
||||||
|
return R.success(zShowService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.cpop.nftmeta.admin.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZShowScheduleService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zshowschedule")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "演出日程")
|
||||||
|
public class ZShowScheduleController {
|
||||||
|
private final ZShowScheduleService zShowScheduleService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation(value = "查询所有日程")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zShowScheduleService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
@ApiOperation(value = "分页查询日程")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zShowScheduleService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
@ApiOperation(value = "根据ID查询日程")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zShowScheduleService.getByZShowScheduleId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "添加日程")
|
||||||
|
public R insert(@RequestBody ZShowSchedule zShowSchedule) {
|
||||||
|
return R.success(zShowScheduleService.add(zShowSchedule), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "更新日程")
|
||||||
|
public R update(@RequestBody ZShowSchedule zShowSchedule) {
|
||||||
|
return R.success(zShowScheduleService.update(zShowSchedule), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
@ApiOperation(value = "删除日程")
|
||||||
|
public R delete(@PathVariable Long Id) {
|
||||||
|
return R.success(zShowScheduleService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.cpop.nftmeta.admin.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZTicketTierService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ztickettier")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "票档模块")
|
||||||
|
public class ZTicketTierController {
|
||||||
|
private final ZTicketTierService zTicketTierService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation(value = "查询所有票档")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zTicketTierService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
@ApiOperation(value = "分页查询票档")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zTicketTierService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
@ApiOperation(value = "根据id查询票档")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketTierService.getByZTicketTierId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "添加票档")
|
||||||
|
public R insert(@RequestBody ZTicketTier zTicketTier) {
|
||||||
|
return R.success(zTicketTierService.add(zTicketTier), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "修改票档")
|
||||||
|
public R update(@RequestBody ZTicketTier zTicketTier) {
|
||||||
|
return R.success(zTicketTierService.update(zTicketTier), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
@ApiOperation(value = "删除票档")
|
||||||
|
public R delete(@PathVariable Long Id) {
|
||||||
|
return R.success(zTicketTierService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.cpop.nftmeta.admin.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZTicketVerificationAuthService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zticketverificationauth")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "门票核销权限")
|
||||||
|
public class ZTicketVerificationAuthController {
|
||||||
|
private final ZTicketVerificationAuthService zTicketVerificationAuthService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zTicketVerificationAuthService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
@ApiOperation(value = "分页查询该演出的核销人")
|
||||||
|
public R page(Page page,@RequestParam Long showId) {
|
||||||
|
return R.success(zTicketVerificationAuthService.getPage(page,showId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
@ApiOperation(value = "根据ID查询")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketVerificationAuthService.getByZTicketVerificationAuthId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
public R insert(@RequestBody ZTicketVerificationAuth zTicketVerificationAuth) {
|
||||||
|
return R.success(zTicketVerificationAuthService.add(zTicketVerificationAuth), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "更新")
|
||||||
|
public R update(@RequestBody ZTicketVerificationAuth zTicketVerificationAuth) {
|
||||||
|
return R.success(zTicketVerificationAuthService.update(zTicketVerificationAuth), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
public R delete(@PathVariable Long Id) {
|
||||||
|
return R.success(zTicketVerificationAuthService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZExchangeRecordsMapper extends BaseMapper<ZExchangeRecords> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowMapper extends BaseMapper<ZShow> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowScheduleMapper extends BaseMapper<ZShowSchedule> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketTierMapper extends BaseMapper<ZTicketTier> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketVerificationAuthMapper extends BaseMapper<ZTicketVerificationAuth> {
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZExchangeRecordsService extends IService<ZExchangeRecords> {
|
||||||
|
List<ZExchangeRecords> getList();
|
||||||
|
IPage<ZExchangeRecords> getPage(Page page);
|
||||||
|
ZExchangeRecords getByZExchangeRecordsId(Integer id);
|
||||||
|
|
||||||
|
ZExchangeRecords add(ZExchangeRecords zExchangeRecords);
|
||||||
|
ZExchangeRecords update(ZExchangeRecords zExchangeRecords);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowScheduleService extends IService<ZShowSchedule> {
|
||||||
|
List<ZShowSchedule> getList();
|
||||||
|
IPage<ZShowSchedule> getPage(Page page);
|
||||||
|
ZShowSchedule getByZShowScheduleId(Integer id);
|
||||||
|
|
||||||
|
ZShowSchedule add(ZShowSchedule zShowSchedule);
|
||||||
|
ZShowSchedule update(ZShowSchedule zShowSchedule);
|
||||||
|
Boolean remove(Long id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowService extends IService<ZShow> {
|
||||||
|
List<ZShow> getList();
|
||||||
|
IPage<ZShow> getPage(Page page);
|
||||||
|
ZShow getByZShowId(Integer id);
|
||||||
|
|
||||||
|
ZShow add(ZShow zShow);
|
||||||
|
ZShow update(ZShow zShow);
|
||||||
|
Boolean remove(Long id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketTierService extends IService<ZTicketTier> {
|
||||||
|
List<ZTicketTier> getList();
|
||||||
|
IPage<ZTicketTier> getPage(Page page);
|
||||||
|
ZTicketTier getByZTicketTierId(Integer id);
|
||||||
|
|
||||||
|
ZTicketTier add(ZTicketTier zTicketTier);
|
||||||
|
ZTicketTier update(ZTicketTier zTicketTier);
|
||||||
|
Boolean remove(Long id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketVerificationAuthService extends IService<ZTicketVerificationAuth> {
|
||||||
|
List<ZTicketVerificationAuth> getList();
|
||||||
|
IPage<ZTicketVerificationAuth> getPage(Page page,Long showId);
|
||||||
|
ZTicketVerificationAuth getByZTicketVerificationAuthId(Integer id);
|
||||||
|
|
||||||
|
ZTicketVerificationAuth add(ZTicketVerificationAuth zTicketVerificationAuth);
|
||||||
|
ZTicketVerificationAuth update(ZTicketVerificationAuth zTicketVerificationAuth);
|
||||||
|
Boolean remove(Long id);
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.admin.mapper.ZExchangeRecordsMapper;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZExchangeRecordsService;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZExchangeRecordsServiceImpl extends ServiceImpl<ZExchangeRecordsMapper,ZExchangeRecords> implements ZExchangeRecordsService {
|
||||||
|
@Override
|
||||||
|
public List<ZExchangeRecords> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZExchangeRecords> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZExchangeRecords::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZExchangeRecords getByZExchangeRecordsId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZExchangeRecords add(@NotNull(message = "实体不能为空") ZExchangeRecords zExchangeRecords) {
|
||||||
|
this.baseMapper.insert(zExchangeRecords);
|
||||||
|
return zExchangeRecords;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZExchangeRecords update(@NotNull(message = "实体不能为空") ZExchangeRecords zExchangeRecords) {
|
||||||
|
this.baseMapper.updateById(zExchangeRecords);
|
||||||
|
return zExchangeRecords;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZTicketTierService;
|
||||||
|
import com.cpop.nftmeta.admin.vo.ScheduleTierVO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
import com.cpop.nftmeta.admin.mapper.ZShowScheduleMapper;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZShowScheduleService;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZShowScheduleServiceImpl extends ServiceImpl<ZShowScheduleMapper,ZShowSchedule> implements ZShowScheduleService {
|
||||||
|
@Autowired
|
||||||
|
private ZTicketTierService zTicketTierService;
|
||||||
|
@Override
|
||||||
|
public List<ZShowSchedule> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZShowSchedule> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
Page schedulePage = this.page(page, lambdaQueryWrapper.orderByDesc(ZShowSchedule::getCreationTime));
|
||||||
|
List<ZShowSchedule> records = schedulePage.getRecords();
|
||||||
|
List<ScheduleTierVO> scheduleTierVOS = records.stream().map(e -> {
|
||||||
|
ScheduleTierVO scheduleTierVO = new ScheduleTierVO();
|
||||||
|
BeanUtils.copyProperties(e, scheduleTierVO);
|
||||||
|
LambdaQueryWrapper<ZTicketTier> ticketTierLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
ticketTierLambdaQueryWrapper.eq(ZTicketTier::getScheduleId,e.getScheduleId());
|
||||||
|
List<ZTicketTier> ticketTiers = zTicketTierService.list(ticketTierLambdaQueryWrapper);
|
||||||
|
scheduleTierVO.setTicketTiers(ticketTiers);
|
||||||
|
return scheduleTierVO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
schedulePage.setRecords(scheduleTierVOS);
|
||||||
|
return schedulePage;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShowSchedule getByZShowScheduleId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZShowSchedule add(@NotNull(message = "实体不能为空") ZShowSchedule zShowSchedule) {
|
||||||
|
this.baseMapper.insert(zShowSchedule);
|
||||||
|
return zShowSchedule;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShowSchedule update(@NotNull(message = "实体不能为空") ZShowSchedule zShowSchedule) {
|
||||||
|
this.baseMapper.updateById(zShowSchedule);
|
||||||
|
return zShowSchedule;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Long id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
import com.cpop.nftmeta.admin.mapper.ZShowMapper;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZShowService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZShowServiceImpl extends ServiceImpl<ZShowMapper,ZShow> implements ZShowService {
|
||||||
|
@Override
|
||||||
|
public List<ZShow> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZShow> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZShow::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShow getByZShowId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZShow add(@NotNull(message = "实体不能为空") ZShow zShow) {
|
||||||
|
this.baseMapper.insert(zShow);
|
||||||
|
return zShow;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShow update(@NotNull(message = "实体不能为空") ZShow zShow) {
|
||||||
|
this.baseMapper.updateById(zShow);
|
||||||
|
return zShow;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Long id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import com.cpop.nftmeta.admin.mapper.ZTicketTierMapper;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZTicketTierService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-27
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZTicketTierServiceImpl extends ServiceImpl<ZTicketTierMapper,ZTicketTier> implements ZTicketTierService {
|
||||||
|
@Override
|
||||||
|
public List<ZTicketTier> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketTier> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZTicketTier::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketTier getByZTicketTierId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketTier add(@NotNull(message = "实体不能为空") ZTicketTier zTicketTier) {
|
||||||
|
this.baseMapper.insert(zTicketTier);
|
||||||
|
return zTicketTier;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketTier update(@NotNull(message = "实体不能为空") ZTicketTier zTicketTier) {
|
||||||
|
this.baseMapper.updateById(zTicketTier);
|
||||||
|
return zTicketTier;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Long id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.cpop.nftmeta.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZMemberService;
|
||||||
|
import com.cpop.nftmeta.admin.vo.TicketVerificationAuthVO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZMember;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
import com.cpop.nftmeta.admin.mapper.ZTicketVerificationAuthMapper;
|
||||||
|
import com.cpop.nftmeta.admin.service.ZTicketVerificationAuthService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZTicketVerificationAuthServiceImpl extends ServiceImpl<ZTicketVerificationAuthMapper,ZTicketVerificationAuth> implements ZTicketVerificationAuthService {
|
||||||
|
@Autowired
|
||||||
|
private ZMemberService zMemberService;
|
||||||
|
@Override
|
||||||
|
public List<ZTicketVerificationAuth> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page,Long showId) {
|
||||||
|
LambdaQueryWrapper<ZTicketVerificationAuth> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(ZTicketVerificationAuth::getShowId,showId);
|
||||||
|
Page authPage = this.page(page, lambdaQueryWrapper);
|
||||||
|
List<ZTicketVerificationAuth> records = authPage.getRecords();
|
||||||
|
// 用户名 手机号 id
|
||||||
|
List<TicketVerificationAuthVO> authVOS = records.stream().map(e -> {
|
||||||
|
TicketVerificationAuthVO vo = new TicketVerificationAuthVO();
|
||||||
|
vo.setAuthId(e.getAuthId());
|
||||||
|
ZMember member = zMemberService.getById(e.getMemberId());
|
||||||
|
if (member != null) {
|
||||||
|
vo.setNickname(member.getNickname());
|
||||||
|
vo.setPhone(member.getUsername());
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
authPage.setRecords(authVOS);
|
||||||
|
return authPage;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationAuth getByZTicketVerificationAuthId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationAuth add(@NotNull(message = "实体不能为空") ZTicketVerificationAuth zTicketVerificationAuth) {
|
||||||
|
this.baseMapper.insert(zTicketVerificationAuth);
|
||||||
|
return zTicketVerificationAuth;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationAuth update(@NotNull(message = "实体不能为空") ZTicketVerificationAuth zTicketVerificationAuth) {
|
||||||
|
this.baseMapper.updateById(zTicketVerificationAuth);
|
||||||
|
return zTicketVerificationAuth;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Long id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.cpop.nftmeta.admin.vo;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/29
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "日程票档VO")
|
||||||
|
public class ScheduleTierVO extends ZShowSchedule {
|
||||||
|
private List<ZTicketTier> ticketTiers;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.cpop.nftmeta.admin.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/12/2
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "核销权限VO")
|
||||||
|
public class TicketVerificationAuthVO {
|
||||||
|
private Long authId;
|
||||||
|
private String nickname;
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
<?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.cpop.nftmeta.admin.mapper.ZExchangeRecordsMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 唯一标识兑换记录表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZExchangeRecords">
|
||||||
|
<result column="record_id" property="recordId" />
|
||||||
|
<result column="member_id" property="memberId" />
|
||||||
|
<result column="uniqude_code" property="uniqudeCode" />
|
||||||
|
<result column="type" property="type" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="del_flag" property="delFlag" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.api.dto.RealnameDTO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyDTO;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyService;
|
||||||
|
import com.cpop.nftmeta.common.service.ZExchangeRecordsService;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zexchangerecords")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "标识兑换记录")
|
||||||
|
public class ZExchangeRecordsController {
|
||||||
|
private final ZExchangeRecordsService zExchangeRecordsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名认证
|
||||||
|
*
|
||||||
|
* @param realnameDTO realname dto
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/26
|
||||||
|
*/
|
||||||
|
// @ApiOperation("检查实名认证信息")
|
||||||
|
// @PostMapping("/check-realname")
|
||||||
|
// public R checkExist(@RequestBody RealnameDTO realnameDTO) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zExchangeRecordsService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zExchangeRecordsService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zExchangeRecordsService.getByZExchangeRecordsId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZExchangeRecords zExchangeRecords) {
|
||||||
|
return R.success(zExchangeRecordsService.add(zExchangeRecords), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZExchangeRecords zExchangeRecords) {
|
||||||
|
return R.success(zExchangeRecordsService.update(zExchangeRecords), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zExchangeRecordsService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
import com.cpop.nftmeta.api.service.ZShowService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zshow")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZShowController {
|
||||||
|
private final ZShowService zShowService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zShowService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zShowService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zShowService.getByZShowId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZShow zShow) {
|
||||||
|
return R.success(zShowService.add(zShow), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZShow zShow) {
|
||||||
|
return R.success(zShowService.update(zShow), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zShowService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
import com.cpop.nftmeta.api.service.ZShowScheduleService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zshowschedule")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZShowScheduleController {
|
||||||
|
private final ZShowScheduleService zShowScheduleService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zShowScheduleService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zShowScheduleService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zShowScheduleService.getByZShowScheduleId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZShowSchedule zShowSchedule) {
|
||||||
|
return R.success(zShowScheduleService.add(zShowSchedule), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZShowSchedule zShowSchedule) {
|
||||||
|
return R.success(zShowScheduleService.update(zShowSchedule), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zShowScheduleService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeBlindDTO;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.api.vo.ChooseTicketTierVO;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketBlindCode;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketBlindCodeService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zticketblindcode")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "盲盒标识管理")
|
||||||
|
public class ZTicketBlindUniqueCodeController {
|
||||||
|
private final ZTicketBlindCodeService zTicketBlindCodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查盲盒标识是否有效
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@ApiOperation("检查盲盒标识是否有效")
|
||||||
|
@GetMapping("/check-unique-code/{uniqueCode}")
|
||||||
|
public R checkUniqueCodeEnable(@PathVariable String uniqueCode) {
|
||||||
|
return zTicketBlindCodeService.checkUniqueCodeEnable(uniqueCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询盲盒第一场演出票档
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询盲盒第一场演出票档")
|
||||||
|
@GetMapping("/first-ticket-tier")
|
||||||
|
public R<ChooseTicketTierVO> getFirstTicketTier(@RequestParam("uniqueCode") String uniqueCode, @RequestParam(value = "schedultId",required = false) Long schedultId) {
|
||||||
|
return zTicketBlindCodeService.getFirstTicketTier(uniqueCode,schedultId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 兑换盲盒
|
||||||
|
*
|
||||||
|
* @param exchangeBlindDTO 盲目交换
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@ApiOperation("兑换盲盒")
|
||||||
|
@PostMapping("/exchange")
|
||||||
|
public R exchange(@RequestBody ExchangeBlindDTO exchangeBlindDTO) {
|
||||||
|
return zTicketBlindCodeService.exchangeBlind(exchangeBlindDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zTicketBlindCodeService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zTicketBlindCodeService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketBlindCodeService.getByZTicketBlindCodeId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZTicketBlindCode zTicketBlindCode) {
|
||||||
|
return R.success(zTicketBlindCodeService.add(zTicketBlindCode), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZTicketBlindCode zTicketBlindCode) {
|
||||||
|
return R.success(zTicketBlindCodeService.update(zTicketBlindCode), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketBlindCodeService.remove(Id), "删除成功");
|
||||||
|
}*/
|
||||||
|
}
|
@ -0,0 +1,164 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.img.ImgUtil;
|
||||||
|
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.api.dto.RealnameDTO;
|
||||||
|
import com.cpop.nftmeta.api.dto.TicketRealnameDTO;
|
||||||
|
import com.cpop.nftmeta.api.service.ZShowService;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketTierService;
|
||||||
|
import com.cpop.nftmeta.api.vo.TicketFolderVO;
|
||||||
|
import com.cpop.nftmeta.common.context.CUserInfo;
|
||||||
|
import com.cpop.nftmeta.common.context.UserContext;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import com.cpop.nftmeta.common.utils.AESUtils;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketFolder;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketFolderService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票夹表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zticketfolder")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "票夹模块")
|
||||||
|
public class ZTicketFolderController {
|
||||||
|
private final ZTicketFolderService zTicketFolderService;
|
||||||
|
private final ZShowService zShowService;
|
||||||
|
private final ZTicketTierService zTicketTierService;
|
||||||
|
private final AESUtils aesUtils;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找票夹列表
|
||||||
|
*
|
||||||
|
* @param type 类型 0:待观看 1:历史票根
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/28
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查找票夹列表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public R<List<TicketFolderVO>> getTicketPageList(Page page, @RequestParam Integer type) {
|
||||||
|
List<TicketFolderVO> ticketFolderVOList = new ArrayList<>();
|
||||||
|
CUserInfo userInfo = UserContext.getUserInfo();
|
||||||
|
if (type == 1) {
|
||||||
|
// 待观看
|
||||||
|
LambdaQueryWrapper<ZTicketFolder> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ZTicketFolder::getMemberId, userInfo.getUserId())
|
||||||
|
.and(wrapper -> wrapper
|
||||||
|
.eq(ZTicketFolder::getStatus, 0)
|
||||||
|
.or()
|
||||||
|
.eq(ZTicketFolder::getStatus, 3))
|
||||||
|
.orderByDesc(ZTicketFolder::getCreationTime);
|
||||||
|
List<ZTicketFolder> zTicketFolders = zTicketFolderService.page(page, queryWrapper).getRecords();
|
||||||
|
ticketFolderVOList = zTicketFolders.stream().map(e -> {
|
||||||
|
TicketFolderVO vo = new TicketFolderVO();
|
||||||
|
// 门票数据
|
||||||
|
BeanUtils.copyProperties(e, vo,"audienceName","idNumber");
|
||||||
|
if (e.getStatus() != 3){
|
||||||
|
// 演出数据
|
||||||
|
ZShow show = zShowService.getById(e.getShowId());
|
||||||
|
BeanUtils.copyProperties(show, vo);
|
||||||
|
// 观演人
|
||||||
|
String audienceName = e.getAudienceName();
|
||||||
|
String newAudienceName = audienceName.substring(0, audienceName.length() - 1) + "*";
|
||||||
|
vo.setAudienceName(newAudienceName);
|
||||||
|
String idNumber = e.getIdNumber();
|
||||||
|
String newIdNumber = idNumber.substring(0, 3) + "***********" + idNumber.substring(idNumber.length() - 4,idNumber.length());
|
||||||
|
vo.setIdNumber(newIdNumber);
|
||||||
|
// 票档名称
|
||||||
|
ZTicketTier tier = zTicketTierService.getById(e.getTicketTierId());
|
||||||
|
vo.setTierName(tier.getTierName());
|
||||||
|
// 票据二维码 用户id和票夹id
|
||||||
|
String qrcodeString = userInfo.getUserId() + ":" + e.getFolderId();
|
||||||
|
String encrypt = aesUtils.encrypt(qrcodeString);
|
||||||
|
String qrcode = "data:image/png;base64," + ImgUtil.toBase64(
|
||||||
|
QrCodeUtil.generate(encrypt, 128, 128),"png");
|
||||||
|
vo.setQrCode(qrcode);
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
} else if (type == 2) {
|
||||||
|
// 历史票根
|
||||||
|
LambdaQueryWrapper<ZTicketFolder> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ZTicketFolder::getMemberId, userInfo.getUserId())
|
||||||
|
.and(wrapper -> wrapper
|
||||||
|
.eq(ZTicketFolder::getStatus, 1)
|
||||||
|
.or()
|
||||||
|
.eq(ZTicketFolder::getStatus, 2))
|
||||||
|
.orderByDesc(ZTicketFolder::getCreationTime);
|
||||||
|
List<ZTicketFolder> zTicketFolders = zTicketFolderService.page(page, queryWrapper).getRecords();
|
||||||
|
ticketFolderVOList = zTicketFolders.stream().map(e -> {
|
||||||
|
TicketFolderVO vo = new TicketFolderVO();
|
||||||
|
// 门票数据
|
||||||
|
BeanUtils.copyProperties(e, vo,"audienceName","idNumber");
|
||||||
|
// 观演人信息
|
||||||
|
String audienceName = e.getAudienceName();
|
||||||
|
String newAudienceName = audienceName.substring(0, audienceName.length() - 1) + "*";
|
||||||
|
vo.setAudienceName(newAudienceName);
|
||||||
|
String idNumber = e.getIdNumber();
|
||||||
|
String newIdNumber = idNumber.substring(0, 3) + "***********" + idNumber.substring(idNumber.length() - 4,idNumber.length());
|
||||||
|
vo.setIdNumber(newIdNumber);
|
||||||
|
// 演出数据
|
||||||
|
ZShow show = zShowService.getById(e.getShowId());
|
||||||
|
BeanUtils.copyProperties(show, vo);
|
||||||
|
// 票档名称
|
||||||
|
ZTicketTier tier = zTicketTierService.getById(e.getTicketTierId());
|
||||||
|
vo.setTierName(tier.getTierName());
|
||||||
|
// 票据二维码 用户id和票夹id
|
||||||
|
String qrcodeString = userInfo.getUserId() + ":" + e.getFolderId();
|
||||||
|
String encrypt = aesUtils.encrypt(qrcodeString);
|
||||||
|
String qrcode = "data:image/png;base64," + ImgUtil.toBase64(
|
||||||
|
QrCodeUtil.generate(encrypt, 128, 128),"png");
|
||||||
|
vo.setQrCode(qrcode);
|
||||||
|
return vo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return R.success(ticketFolderVOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名认证
|
||||||
|
*
|
||||||
|
* @param ticketRealnameDTO 机票实名制
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/12/02
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "实名认证")
|
||||||
|
@PostMapping("/real-name")
|
||||||
|
public R realNameTicket(@RequestBody TicketRealnameDTO ticketRealnameDTO) {
|
||||||
|
return zTicketFolderService.realNameTicket(ticketRealnameDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核销门票
|
||||||
|
*
|
||||||
|
* @param ticketData 票数据
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/29
|
||||||
|
*/
|
||||||
|
@ApiOperation("核销门票")
|
||||||
|
@DeleteMapping("/verification/{ticketData}")
|
||||||
|
public R verificationTicket(@PathVariable String ticketData) {
|
||||||
|
return zTicketFolderService.verificationTicket(ticketData);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketTierService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ztickettier")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZTicketTierController {
|
||||||
|
private final ZTicketTierService zTicketTierService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zTicketTierService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zTicketTierService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketTierService.getByZTicketTierId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZTicketTier zTicketTier) {
|
||||||
|
return R.success(zTicketTierService.add(zTicketTier), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZTicketTier zTicketTier) {
|
||||||
|
return R.success(zTicketTierService.update(zTicketTier), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketTierService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketUniqueCode;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketUniqueCodeService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zticketuniquecode")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "门票唯一标识模块")
|
||||||
|
public class ZTicketUniqueCodeController {
|
||||||
|
private final ZTicketUniqueCodeService zTicketUniqueCodeService;
|
||||||
|
/**
|
||||||
|
* 检查标识是否合法
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/26
|
||||||
|
*/
|
||||||
|
@ApiOperation("检查标识是否有效")
|
||||||
|
@GetMapping("/check-unique-code/{uniqueCode}")
|
||||||
|
public R checkUniqueCodeEnable(@PathVariable String uniqueCode) {
|
||||||
|
return zTicketUniqueCodeService.checkUniqueCodeEnable(uniqueCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 兑换门票
|
||||||
|
*
|
||||||
|
* @param exchangeTicketDTO 兑换机票
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@ApiOperation("兑换门票")
|
||||||
|
@PostMapping("/exchange")
|
||||||
|
public R exchange(@RequestBody ExchangeTicketDTO exchangeTicketDTO) {
|
||||||
|
return zTicketUniqueCodeService.exchangeTicket(exchangeTicketDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zTicketUniqueCodeService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zTicketUniqueCodeService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketUniqueCodeService.getByZTicketUniqueCodeId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZTicketUniqueCode zTicketUniqueCode) {
|
||||||
|
return R.success(zTicketUniqueCodeService.add(zTicketUniqueCode), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZTicketUniqueCode zTicketUniqueCode) {
|
||||||
|
return R.success(zTicketUniqueCodeService.update(zTicketUniqueCode), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketUniqueCodeService.remove(Id), "删除成功");
|
||||||
|
}*/
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationRecords;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketVerificationRecordsService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zticketverificationrecords")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZTicketVerificationRecordsController {
|
||||||
|
private final ZTicketVerificationRecordsService zTicketVerificationRecordsService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list() {
|
||||||
|
return R.success(zTicketVerificationRecordsService.getList());
|
||||||
|
}
|
||||||
|
@GetMapping("page")
|
||||||
|
public R page(Page page) {
|
||||||
|
return R.success(zTicketVerificationRecordsService.getPage(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{Id}")
|
||||||
|
public R getById(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketVerificationRecordsService.getByZTicketVerificationRecordsId(Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public R insert(@RequestBody ZTicketVerificationRecords zTicketVerificationRecords) {
|
||||||
|
return R.success(zTicketVerificationRecordsService.add(zTicketVerificationRecords), "添加成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
public R update(@RequestBody ZTicketVerificationRecords zTicketVerificationRecords) {
|
||||||
|
return R.success(zTicketVerificationRecordsService.update(zTicketVerificationRecords), "更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{Id}")
|
||||||
|
public R delete(@PathVariable Integer Id) {
|
||||||
|
return R.success(zTicketVerificationRecordsService.remove(Id), "删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.cpop.nftmeta.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/27
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "盲盒兑换DTO")
|
||||||
|
public class ExchangeBlindDTO extends RealnameDTO{
|
||||||
|
@ApiModelProperty(value = "盲盒编码")
|
||||||
|
private String uniqueCode;
|
||||||
|
@ApiModelProperty(value = "票档ID")
|
||||||
|
private Long ticketTierId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.cpop.nftmeta.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/27
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "兑换门票DTO")
|
||||||
|
public class ExchangeTicketDTO extends RealnameDTO{
|
||||||
|
@ApiModelProperty(value = "门票编码")
|
||||||
|
private String uniqueCode;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.cpop.nftmeta.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* realname dto
|
||||||
|
*
|
||||||
|
* @author yxz
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 2024/11/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "实名认证dto")
|
||||||
|
public class RealnameDTO {
|
||||||
|
@ApiModelProperty(value = "观众姓名")
|
||||||
|
@NotBlank(message = "观众姓名不能为空")
|
||||||
|
// 观众姓名
|
||||||
|
private String audienceName;
|
||||||
|
// 身份证
|
||||||
|
@NotBlank(message = "身份证不能为空")
|
||||||
|
@ApiModelProperty(value = "身份证")
|
||||||
|
private String idNumber;
|
||||||
|
@NotBlank(message = "手机号不能为空")
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.cpop.nftmeta.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/12/2
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("门票实名信息DTO")
|
||||||
|
public class TicketRealnameDTO extends RealnameDTO {
|
||||||
|
@ApiModelProperty("门票ID")
|
||||||
|
private Long folderId;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZExchangeRecordsMapper extends BaseMapper<ZExchangeRecords> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowMapper extends BaseMapper<ZShow> {
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.api.vo.ShowScheduleVO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowScheduleMapper extends BaseMapper<ZShowSchedule> {
|
||||||
|
/**
|
||||||
|
* 查找首场演出的日程安排
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link List }<{@link ShowScheduleVO }>
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
List<ShowScheduleVO> getFirstShowSchedule(String uniqueCode);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.api.vo.TicketTierVO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketBlindCode;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketBlindCodeMapper extends BaseMapper<ZTicketBlindCode> {
|
||||||
|
/**
|
||||||
|
* 查找第一场演出票档
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @param searchSchedultId 搜索计划id
|
||||||
|
* @return {@link List }<{@link TicketTierVO }>
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
List<TicketTierVO> getFirstTicketTier(@Param("uniqueCode") String uniqueCode, @Param("searchSchedultId") Long searchSchedultId);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketFolder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票夹表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketFolderMapper extends BaseMapper<ZTicketFolder> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketTierMapper extends BaseMapper<ZTicketTier> {
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketUniqueCode;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketUniqueCodeMapper extends BaseMapper<ZTicketUniqueCode> {
|
||||||
|
/**
|
||||||
|
* 检查重复观演人
|
||||||
|
*
|
||||||
|
* @param showId 显示id
|
||||||
|
* @param idNumber 身份证号码
|
||||||
|
* @return {@link Integer }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
Integer checkRepeatAudience(@Param("showId") Long showId, @Param("idNumber") String idNumber);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketVerificationAuthMapper extends BaseMapper<ZTicketVerificationAuth> {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cpop.nftmeta.api.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketVerificationRecordsMapper extends BaseMapper<ZTicketVerificationRecords> {
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.common.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZExchangeRecordsService extends IService<ZExchangeRecords> {
|
||||||
|
List<ZExchangeRecords> getList();
|
||||||
|
IPage<ZExchangeRecords> getPage(Page page);
|
||||||
|
ZExchangeRecords getByZExchangeRecordsId(Integer id);
|
||||||
|
|
||||||
|
ZExchangeRecords add(ZExchangeRecords zExchangeRecords);
|
||||||
|
ZExchangeRecords update(ZExchangeRecords zExchangeRecords);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowScheduleService extends IService<ZShowSchedule> {
|
||||||
|
List<ZShowSchedule> getList();
|
||||||
|
IPage<ZShowSchedule> getPage(Page page);
|
||||||
|
ZShowSchedule getByZShowScheduleId(Integer id);
|
||||||
|
|
||||||
|
ZShowSchedule add(ZShowSchedule zShowSchedule);
|
||||||
|
ZShowSchedule update(ZShowSchedule zShowSchedule);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZShowService extends IService<ZShow> {
|
||||||
|
List<ZShow> getList();
|
||||||
|
IPage<ZShow> getPage(Page page);
|
||||||
|
ZShow getByZShowId(Integer id);
|
||||||
|
|
||||||
|
ZShow add(ZShow zShow);
|
||||||
|
ZShow update(ZShow zShow);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeBlindDTO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketBlindCode;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketBlindCodeService extends IService<ZTicketBlindCode> {
|
||||||
|
List<ZTicketBlindCode> getList();
|
||||||
|
IPage<ZTicketBlindCode> getPage(Page page);
|
||||||
|
ZTicketBlindCode getByZTicketBlindCodeId(Integer id);
|
||||||
|
|
||||||
|
ZTicketBlindCode add(ZTicketBlindCode zTicketBlindCode);
|
||||||
|
ZTicketBlindCode update(ZTicketBlindCode zTicketBlindCode);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查盲盒标识是否有效
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
R checkUniqueCodeEnable(String uniqueCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询盲盒第一场演出票档
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
R getFirstTicketTier(String uniqueCode,Long schedultId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 兑换盲盒
|
||||||
|
*
|
||||||
|
* @param exchangeBlindDTO 盲目交换
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
R exchangeBlind(ExchangeBlindDTO exchangeBlindDTO);
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.api.dto.RealnameDTO;
|
||||||
|
import com.cpop.nftmeta.api.dto.TicketRealnameDTO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketFolder;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票夹表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketFolderService extends IService<ZTicketFolder> {
|
||||||
|
List<ZTicketFolder> getList();
|
||||||
|
IPage<ZTicketFolder> getPage(Page page);
|
||||||
|
ZTicketFolder getByZTicketFolderId(Integer id);
|
||||||
|
|
||||||
|
ZTicketFolder add(ZTicketFolder zTicketFolder);
|
||||||
|
ZTicketFolder update(ZTicketFolder zTicketFolder);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核销门票
|
||||||
|
*
|
||||||
|
* @param ticketData 票数据
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/29
|
||||||
|
*/
|
||||||
|
R verificationTicket(String ticketData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名认证
|
||||||
|
*
|
||||||
|
* @param realnameDTO realname dto
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/12/02
|
||||||
|
*/
|
||||||
|
R realNameTicket(TicketRealnameDTO realnameDTO);
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketTierService extends IService<ZTicketTier> {
|
||||||
|
List<ZTicketTier> getList();
|
||||||
|
IPage<ZTicketTier> getPage(Page page);
|
||||||
|
ZTicketTier getByZTicketTierId(Integer id);
|
||||||
|
|
||||||
|
ZTicketTier add(ZTicketTier zTicketTier);
|
||||||
|
ZTicketTier update(ZTicketTier zTicketTier);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档是否有效
|
||||||
|
*
|
||||||
|
* @param ticketTierId 票层id
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
R checkTicketTierEnable(Long ticketTierId,Long showId);
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketUniqueCode;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketUniqueCodeService extends IService<ZTicketUniqueCode> {
|
||||||
|
List<ZTicketUniqueCode> getList();
|
||||||
|
IPage<ZTicketUniqueCode> getPage(Page page);
|
||||||
|
ZTicketUniqueCode getByZTicketUniqueCodeId(Integer id);
|
||||||
|
|
||||||
|
ZTicketUniqueCode add(ZTicketUniqueCode zTicketUniqueCode);
|
||||||
|
ZTicketUniqueCode update(ZTicketUniqueCode zTicketUniqueCode);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 兑换门票
|
||||||
|
*
|
||||||
|
* @param exchangeTicketDTO 兑换机票
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
R exchangeTicket(ExchangeTicketDTO exchangeTicketDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查编码是否有效
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
R checkUniqueCodeEnable(String uniqueCode);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketVerificationAuthService extends IService<ZTicketVerificationAuth> {
|
||||||
|
List<ZTicketVerificationAuth> getList();
|
||||||
|
IPage<ZTicketVerificationAuth> getPage(Page page);
|
||||||
|
ZTicketVerificationAuth getByZTicketVerificationAuthId(Integer id);
|
||||||
|
|
||||||
|
ZTicketVerificationAuth add(ZTicketVerificationAuth zTicketVerificationAuth);
|
||||||
|
ZTicketVerificationAuth update(ZTicketVerificationAuth zTicketVerificationAuth);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.nftmeta.api.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationRecords;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
public interface ZTicketVerificationRecordsService extends IService<ZTicketVerificationRecords> {
|
||||||
|
List<ZTicketVerificationRecords> getList();
|
||||||
|
IPage<ZTicketVerificationRecords> getPage(Page page);
|
||||||
|
ZTicketVerificationRecords getByZTicketVerificationRecordsId(Integer id);
|
||||||
|
|
||||||
|
ZTicketVerificationRecords add(ZTicketVerificationRecords zTicketVerificationRecords);
|
||||||
|
ZTicketVerificationRecords update(ZTicketVerificationRecords zTicketVerificationRecords);
|
||||||
|
Boolean remove(Integer id);
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZExchangeRecordsMapper;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
import com.cpop.nftmeta.common.service.ZExchangeRecordsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唯一标识兑换记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZExchangeRecordsServiceImpl extends ServiceImpl<ZExchangeRecordsMapper,ZExchangeRecords> implements ZExchangeRecordsService {
|
||||||
|
@Override
|
||||||
|
public List<ZExchangeRecords> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZExchangeRecords> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZExchangeRecords::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZExchangeRecords getByZExchangeRecordsId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZExchangeRecords add(@NotNull(message = "实体不能为空") ZExchangeRecords zExchangeRecords) {
|
||||||
|
this.baseMapper.insert(zExchangeRecords);
|
||||||
|
return zExchangeRecords;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZExchangeRecords update(@NotNull(message = "实体不能为空") ZExchangeRecords zExchangeRecords) {
|
||||||
|
this.baseMapper.updateById(zExchangeRecords);
|
||||||
|
return zExchangeRecords;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShowSchedule;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZShowScheduleMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZShowScheduleService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZShowScheduleServiceImpl extends ServiceImpl<ZShowScheduleMapper,ZShowSchedule> implements ZShowScheduleService {
|
||||||
|
@Override
|
||||||
|
public List<ZShowSchedule> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZShowSchedule> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZShowSchedule::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShowSchedule getByZShowScheduleId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZShowSchedule add(@NotNull(message = "实体不能为空") ZShowSchedule zShowSchedule) {
|
||||||
|
this.baseMapper.insert(zShowSchedule);
|
||||||
|
return zShowSchedule;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShowSchedule update(@NotNull(message = "实体不能为空") ZShowSchedule zShowSchedule) {
|
||||||
|
this.baseMapper.updateById(zShowSchedule);
|
||||||
|
return zShowSchedule;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZShow;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZShowMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZShowService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZShowServiceImpl extends ServiceImpl<ZShowMapper,ZShow> implements ZShowService {
|
||||||
|
@Override
|
||||||
|
public List<ZShow> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZShow> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZShow::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShow getByZShowId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZShow add(@NotNull(message = "实体不能为空") ZShow zShow) {
|
||||||
|
this.baseMapper.insert(zShow);
|
||||||
|
return zShow;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZShow update(@NotNull(message = "实体不能为空") ZShow zShow) {
|
||||||
|
this.baseMapper.updateById(zShow);
|
||||||
|
return zShow;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,203 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.UUID;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeBlindDTO;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZShowScheduleMapper;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketUniqueCodeMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketFolderService;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketTierService;
|
||||||
|
import com.cpop.nftmeta.api.vo.ChooseTicketTierVO;
|
||||||
|
import com.cpop.nftmeta.api.vo.ShowScheduleVO;
|
||||||
|
import com.cpop.nftmeta.api.vo.TicketTierVO;
|
||||||
|
import com.cpop.nftmeta.common.context.UserContext;
|
||||||
|
import com.cpop.nftmeta.common.entity.*;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketBlindCodeMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketBlindCodeService;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyDTO;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyService;
|
||||||
|
import com.cpop.nftmeta.common.service.ZExchangeRecordsService;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.vo.ResultCode;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盲盒唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZTicketBlindCodeServiceImpl extends ServiceImpl<ZTicketBlindCodeMapper,ZTicketBlindCode> implements ZTicketBlindCodeService {
|
||||||
|
private final ZTicketBlindCodeMapper zTicketBlindCodeMapper;
|
||||||
|
private final ZShowScheduleMapper zShowScheduleMapper;
|
||||||
|
private final RealNameVerifyService realNameVerifyService;
|
||||||
|
private final ZTicketUniqueCodeMapper zTicketUniqueCodeMapper;
|
||||||
|
private final ZTicketFolderService zTicketFolderService;
|
||||||
|
private final ZExchangeRecordsService zExchangeRecordsService;
|
||||||
|
private final ZTicketTierService zTicketTierService;
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String env;
|
||||||
|
@Override
|
||||||
|
public List<ZTicketBlindCode> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketBlindCode> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZTicketBlindCode::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketBlindCode getByZTicketBlindCodeId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketBlindCode add(@NotNull(message = "实体不能为空") ZTicketBlindCode zTicketBlindCode) {
|
||||||
|
this.baseMapper.insert(zTicketBlindCode);
|
||||||
|
return zTicketBlindCode;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketBlindCode update(@NotNull(message = "实体不能为空") ZTicketBlindCode zTicketBlindCode) {
|
||||||
|
this.baseMapper.updateById(zTicketBlindCode);
|
||||||
|
return zTicketBlindCode;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查盲盒标识是否有效
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R checkUniqueCodeEnable(String uniqueCode) {
|
||||||
|
LambdaQueryWrapper<ZTicketBlindCode> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ZTicketBlindCode::getUniqudeCode, uniqueCode)
|
||||||
|
.eq(ZTicketBlindCode::getStatus, 0);
|
||||||
|
ZTicketBlindCode zTicketBlindCode = this.getOne(queryWrapper);
|
||||||
|
return zTicketBlindCode != null ? R.success("合法编码") : R.fail("未找到有效编码");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询盲盒第一场演出票档
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R getFirstTicketTier(String uniqueCode,Long schedultId) {
|
||||||
|
String code = this.checkUniqueCodeEnable(uniqueCode).getCode();
|
||||||
|
if (!ResultCode.SUCCESS.getCode().equals(code)){
|
||||||
|
return R.fail("未找到有效编码");
|
||||||
|
}
|
||||||
|
// 查找日程
|
||||||
|
List<ShowScheduleVO> showScheduleVOS = zShowScheduleMapper.getFirstShowSchedule(uniqueCode);
|
||||||
|
// 查找票档 默认查找第一天
|
||||||
|
if (schedultId == null) {
|
||||||
|
schedultId = showScheduleVOS.get(0).getScheduleId();
|
||||||
|
}
|
||||||
|
List<TicketTierVO> ticketTierVOS = zTicketBlindCodeMapper.getFirstTicketTier(uniqueCode,schedultId);
|
||||||
|
ChooseTicketTierVO chooseTicketTierVO = new ChooseTicketTierVO();
|
||||||
|
chooseTicketTierVO.setShowScheduleVOList(showScheduleVOS);
|
||||||
|
chooseTicketTierVO.setTicketTierVOList(ticketTierVOS);
|
||||||
|
return R.success(chooseTicketTierVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 兑换盲盒
|
||||||
|
*
|
||||||
|
* @param exchangeBlindDTO 盲目交换
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public R exchangeBlind(ExchangeBlindDTO exchangeBlindDTO) {
|
||||||
|
// 检查编码是否有效
|
||||||
|
String code = this.checkUniqueCodeEnable(exchangeBlindDTO.getUniqueCode()).getCode();
|
||||||
|
if (!ResultCode.SUCCESS.getCode().equals(code)){
|
||||||
|
return R.fail("未找到有效编码");
|
||||||
|
}
|
||||||
|
// 票档是否有效
|
||||||
|
LambdaQueryWrapper<ZTicketBlindCode> blindCodeLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
blindCodeLambdaQueryWrapper.eq(ZTicketBlindCode::getUniqudeCode, exchangeBlindDTO.getUniqueCode());
|
||||||
|
ZTicketBlindCode zTicketBlindCode = this.getOne(blindCodeLambdaQueryWrapper);
|
||||||
|
R result= zTicketTierService.checkTicketTierEnable(exchangeBlindDTO.getTicketTierId(), zTicketBlindCode.getFirstShowId());
|
||||||
|
if (result.getCode().equals(ResultCode.FAIL.getCode())){
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// 同一身份证只允许绑定一张票
|
||||||
|
ExchangeTicketDTO exchangeTicketDTO = new ExchangeTicketDTO();
|
||||||
|
BeanUtils.copyProperties(exchangeBlindDTO, exchangeTicketDTO);
|
||||||
|
Integer count = zTicketUniqueCodeMapper.checkRepeatAudience(zTicketBlindCode.getFirstShowId(),exchangeBlindDTO.getIdNumber());
|
||||||
|
if (ObjectUtil.isNotNull(count) && count > 0){
|
||||||
|
return R.fail("同一身份证只能绑定一张门票");
|
||||||
|
}
|
||||||
|
if ("prod".equals(env)){
|
||||||
|
// 检查实名信息
|
||||||
|
RealNameVerifyDTO realNameVerifyDTO = new RealNameVerifyDTO();
|
||||||
|
realNameVerifyDTO.setRealName(exchangeBlindDTO.getAudienceName());
|
||||||
|
realNameVerifyDTO.setIdCard(exchangeBlindDTO.getIdNumber());
|
||||||
|
Boolean aBoolean = realNameVerifyService.verify(realNameVerifyDTO);
|
||||||
|
if (!aBoolean){
|
||||||
|
return R.fail("实名认证失败,请检查身份信息");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 兑换盲盒
|
||||||
|
LambdaQueryWrapper<ZTicketBlindCode> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ZTicketBlindCode::getUniqudeCode, exchangeBlindDTO.getUniqueCode());
|
||||||
|
ZTicketBlindCode blindCode = this.baseMapper.selectOne(queryWrapper);
|
||||||
|
blindCode.setStatus(1);
|
||||||
|
blindCode.setFirstTicketTierId(exchangeBlindDTO.getTicketTierId());
|
||||||
|
this.updateById(blindCode);
|
||||||
|
// 插入票夹
|
||||||
|
// TODO Redis锁 更新票档数量
|
||||||
|
ZTicketFolder zTicketFolder = new ZTicketFolder();
|
||||||
|
zTicketFolder.setMemberId(UserContext.getUserInfo().getUserId());
|
||||||
|
BeanUtils.copyProperties(exchangeBlindDTO, zTicketFolder);
|
||||||
|
zTicketFolder.setShowId(blindCode.getFirstShowId());
|
||||||
|
UUID uuid = UUID.randomUUID();
|
||||||
|
zTicketFolder.setUniqueCode("blind-"+uuid.toString());
|
||||||
|
boolean save = zTicketFolderService.save(zTicketFolder);
|
||||||
|
// 其余三张未知门票
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
ZTicketFolder ticketFolder = new ZTicketFolder();
|
||||||
|
ticketFolder.setMemberId(UserContext.getUserInfo().getUserId());
|
||||||
|
ticketFolder.setStatus(3);
|
||||||
|
BeanUtils.copyProperties(exchangeBlindDTO, zTicketFolder,"uniqueCode");
|
||||||
|
// 盲盒门票编码
|
||||||
|
ticketFolder.setUniqueCode("blind-"+uuid.toString());
|
||||||
|
zTicketFolderService.save(ticketFolder);
|
||||||
|
}
|
||||||
|
// 兑换记录
|
||||||
|
ZExchangeRecords zExchangeRecords = new ZExchangeRecords();
|
||||||
|
zExchangeRecords.setMemberId(UserContext.getUserInfo().getUserId());
|
||||||
|
zExchangeRecords.setUniqudeCode(exchangeBlindDTO.getUniqueCode());
|
||||||
|
zExchangeRecords.setType(2);
|
||||||
|
zExchangeRecordsService.save(zExchangeRecords);
|
||||||
|
return save ? R.success("兑换成功") : R.fail("兑换失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,151 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.api.dto.RealnameDTO;
|
||||||
|
import com.cpop.nftmeta.api.dto.TicketRealnameDTO;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketUniqueCodeMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketVerificationAuthService;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketVerificationRecordsService;
|
||||||
|
import com.cpop.nftmeta.common.context.CUserInfo;
|
||||||
|
import com.cpop.nftmeta.common.context.UserContext;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketFolder;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketFolderMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketFolderService;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationRecords;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyDTO;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyService;
|
||||||
|
import com.cpop.nftmeta.common.utils.AESUtils;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票夹表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZTicketFolderServiceImpl extends ServiceImpl<ZTicketFolderMapper,ZTicketFolder> implements ZTicketFolderService {
|
||||||
|
private final ZTicketVerificationAuthService zTicketVerificationAuthService;
|
||||||
|
private final AESUtils aesUtils;
|
||||||
|
private final ZTicketVerificationRecordsService zTicketVerificationRecordsService;
|
||||||
|
private final RealNameVerifyService realNameVerifyService;
|
||||||
|
private final ZTicketUniqueCodeMapper zTicketUniqueCodeMapper;
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String env;
|
||||||
|
@Override
|
||||||
|
public List<ZTicketFolder> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketFolder> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZTicketFolder::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketFolder getByZTicketFolderId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketFolder add(@NotNull(message = "实体不能为空") ZTicketFolder zTicketFolder) {
|
||||||
|
this.baseMapper.insert(zTicketFolder);
|
||||||
|
return zTicketFolder;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketFolder update(@NotNull(message = "实体不能为空") ZTicketFolder zTicketFolder) {
|
||||||
|
this.baseMapper.updateById(zTicketFolder);
|
||||||
|
return zTicketFolder;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名认证
|
||||||
|
*
|
||||||
|
* @param realnameDTO realname dto
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/12/02
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R realNameTicket(TicketRealnameDTO realnameDTO) {
|
||||||
|
ZTicketFolder ticket = this.getById(realnameDTO.getFolderId());
|
||||||
|
if (ticket != null && (ticket.getAudienceName() != null || ticket.getIdNumber() != null)){
|
||||||
|
return R.fail("该门票已实名认证,请勿重复认证");
|
||||||
|
}
|
||||||
|
if ("prod".equals(env)){
|
||||||
|
// 检查实名信息
|
||||||
|
RealNameVerifyDTO realNameVerifyDTO = new RealNameVerifyDTO();
|
||||||
|
realNameVerifyDTO.setRealName(realnameDTO.getAudienceName());
|
||||||
|
realNameVerifyDTO.setIdCard(realnameDTO.getIdNumber());
|
||||||
|
Boolean aBoolean = realNameVerifyService.verify(realNameVerifyDTO);
|
||||||
|
if (!aBoolean){
|
||||||
|
return R.fail("实名认证失败,请检查身份信息");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 同一身份证只允许绑定一张票
|
||||||
|
Integer count = zTicketUniqueCodeMapper.checkRepeatAudience(ticket.getShowId(),realnameDTO.getIdNumber());
|
||||||
|
if (ObjectUtil.isNotNull(count) && count > 0){
|
||||||
|
return R.fail("同一身份证只能绑定一张门票");
|
||||||
|
}
|
||||||
|
// 绑定实名信息
|
||||||
|
BeanUtils.copyProperties(realnameDTO, ticket);
|
||||||
|
boolean b = this.updateById(ticket);
|
||||||
|
return b ? R.success("实名认证成功") : R.fail("实名认证失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核销门票
|
||||||
|
*
|
||||||
|
* @param ticketData 票数据
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/29
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public R verificationTicket(String ticketData) {
|
||||||
|
// 提取票据数据
|
||||||
|
String decrypt = aesUtils.decrypt(ticketData);
|
||||||
|
String[] parts = decrypt.split(":");
|
||||||
|
Long memberId = Long.parseLong(parts[0]);
|
||||||
|
Long folderId = Long.parseLong(parts[1]);
|
||||||
|
ZTicketFolder ticketFolderEntity = this.getBaseMapper().selectOne(new QueryWrapper<ZTicketFolder>().eq("member_id", memberId).eq("folder_id", folderId).eq("status",0));
|
||||||
|
if (ObjectUtil.isNull(ticketFolderEntity)) {
|
||||||
|
return R.fail("未找到有效票据,核销失败");
|
||||||
|
}
|
||||||
|
// 验证权限
|
||||||
|
CUserInfo userInfo = UserContext.getUserInfo();
|
||||||
|
ZTicketVerificationAuth auth = zTicketVerificationAuthService.getOne(new QueryWrapper<ZTicketVerificationAuth>().eq("member_id", userInfo.getUserId()).eq("show_id", ticketFolderEntity.getShowId()));
|
||||||
|
if (auth == null){
|
||||||
|
return R.fail("无核销权限,核销失败");
|
||||||
|
}
|
||||||
|
// 核销
|
||||||
|
ticketFolderEntity.setStatus(1);
|
||||||
|
boolean b = this.updateById(ticketFolderEntity);
|
||||||
|
// 核销记录
|
||||||
|
ZTicketVerificationRecords verificationRecords = new ZTicketVerificationRecords();
|
||||||
|
BeanUtil.copyProperties(ticketFolderEntity, verificationRecords);
|
||||||
|
verificationRecords.setWriteOffUserId(userInfo.getUserId());
|
||||||
|
zTicketVerificationRecordsService.save(verificationRecords);
|
||||||
|
return b ? R.success("核销成功") : R.fail("核销失败");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketTier;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketTierMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketTierService;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档和场次关联表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZTicketTierServiceImpl extends ServiceImpl<ZTicketTierMapper,ZTicketTier> implements ZTicketTierService {
|
||||||
|
@Override
|
||||||
|
public List<ZTicketTier> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketTier> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZTicketTier::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketTier getByZTicketTierId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketTier add(@NotNull(message = "实体不能为空") ZTicketTier zTicketTier) {
|
||||||
|
this.baseMapper.insert(zTicketTier);
|
||||||
|
return zTicketTier;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketTier update(@NotNull(message = "实体不能为空") ZTicketTier zTicketTier) {
|
||||||
|
this.baseMapper.updateById(zTicketTier);
|
||||||
|
return zTicketTier;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票档是否有效
|
||||||
|
*
|
||||||
|
* @param ticketTierId 票层id
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R checkTicketTierEnable(Long ticketTierId,Long showId) {
|
||||||
|
LambdaQueryWrapper<ZTicketTier> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(ZTicketTier::getShowId,showId)
|
||||||
|
.eq(ZTicketTier::getTierId,ticketTierId);
|
||||||
|
ZTicketTier zTicketTier = this.getOne(lambdaQueryWrapper);
|
||||||
|
if(zTicketTier==null){
|
||||||
|
return R.fail("不存在对应票档");
|
||||||
|
}
|
||||||
|
if (zTicketTier.getSeatsAvailableInTier() == 0) {
|
||||||
|
return R.fail("该票档已售罄");
|
||||||
|
}
|
||||||
|
return R.success("票档有效");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,142 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.api.dto.ExchangeTicketDTO;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketFolderService;
|
||||||
|
import com.cpop.nftmeta.common.context.UserContext;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZExchangeRecords;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketFolder;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketUniqueCode;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketUniqueCodeMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketUniqueCodeService;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyDTO;
|
||||||
|
import com.cpop.nftmeta.common.realname.RealNameVerifyService;
|
||||||
|
import com.cpop.nftmeta.common.service.ZExchangeRecordsService;
|
||||||
|
import com.cpop.nftmeta.common.vo.R;
|
||||||
|
import com.cpop.nftmeta.common.vo.ResultCode;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票唯一标识表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ZTicketUniqueCodeServiceImpl extends ServiceImpl<ZTicketUniqueCodeMapper,ZTicketUniqueCode> implements ZTicketUniqueCodeService {
|
||||||
|
private final RealNameVerifyService realNameVerifyService;
|
||||||
|
private final ZTicketUniqueCodeMapper zTicketUniqueCodeMapper;
|
||||||
|
private final ZTicketFolderService zTicketFolderService;
|
||||||
|
private final ZExchangeRecordsService zExchangeRecordsService;
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String env;
|
||||||
|
@Override
|
||||||
|
public List<ZTicketUniqueCode> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketUniqueCode> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZTicketUniqueCode::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketUniqueCode getByZTicketUniqueCodeId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketUniqueCode add(@NotNull(message = "实体不能为空") ZTicketUniqueCode zTicketUniqueCode) {
|
||||||
|
this.baseMapper.insert(zTicketUniqueCode);
|
||||||
|
return zTicketUniqueCode;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketUniqueCode update(@NotNull(message = "实体不能为空") ZTicketUniqueCode zTicketUniqueCode) {
|
||||||
|
this.baseMapper.updateById(zTicketUniqueCode);
|
||||||
|
return zTicketUniqueCode;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查门票编码是否启用
|
||||||
|
*
|
||||||
|
* @param uniqueCode 独特代码
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R checkUniqueCodeEnable(String uniqueCode) {
|
||||||
|
LambdaQueryWrapper<ZTicketUniqueCode> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ZTicketUniqueCode::getUniqudeCode, uniqueCode)
|
||||||
|
.eq(ZTicketUniqueCode::getStatus, 0);
|
||||||
|
ZTicketUniqueCode zTicketUniqueCode = this.getOne(queryWrapper);
|
||||||
|
return zTicketUniqueCode != null ? R.success("合法编码") : R.fail("未找到有效编码");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 兑换门票
|
||||||
|
*
|
||||||
|
* @param exchangeTicketDTO 兑换机票
|
||||||
|
* @return {@link R }
|
||||||
|
* @author yxz
|
||||||
|
* @since 2024/11/27
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R exchangeTicket(ExchangeTicketDTO exchangeTicketDTO) {
|
||||||
|
// 检查编码是否有效
|
||||||
|
String code = this.checkUniqueCodeEnable(exchangeTicketDTO.getUniqueCode()).getCode();
|
||||||
|
if (!ResultCode.SUCCESS.getCode().equals(code)){
|
||||||
|
return R.fail("未找到有效编码");
|
||||||
|
}
|
||||||
|
// 同一身份证只允许绑定一张票
|
||||||
|
LambdaQueryWrapper<ZTicketUniqueCode> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ZTicketUniqueCode::getUniqudeCode, exchangeTicketDTO.getUniqueCode());
|
||||||
|
ZTicketUniqueCode zTicketUniqueCode = this.getOne(queryWrapper);
|
||||||
|
Integer count = zTicketUniqueCodeMapper.checkRepeatAudience(zTicketUniqueCode.getShowId(),exchangeTicketDTO.getIdNumber());
|
||||||
|
if (ObjectUtil.isNotNull(count) && count > 0){
|
||||||
|
return R.fail("同一身份证只能绑定一张门票");
|
||||||
|
}
|
||||||
|
if ("prod".equals(env)){
|
||||||
|
// 检查实名信息
|
||||||
|
RealNameVerifyDTO realNameVerifyDTO = new RealNameVerifyDTO();
|
||||||
|
realNameVerifyDTO.setRealName(exchangeTicketDTO.getAudienceName());
|
||||||
|
realNameVerifyDTO.setIdCard(exchangeTicketDTO.getIdNumber());
|
||||||
|
Boolean aBoolean = realNameVerifyService.verify(realNameVerifyDTO);
|
||||||
|
if (!aBoolean){
|
||||||
|
return R.fail("实名认证失败,请检查身份信息");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 兑换门票
|
||||||
|
zTicketUniqueCode.setStatus(1);
|
||||||
|
this.update(zTicketUniqueCode);
|
||||||
|
// 插入票夹
|
||||||
|
ZTicketFolder zTicketFolder = new ZTicketFolder();
|
||||||
|
zTicketFolder.setMemberId(UserContext.getUserInfo().getUserId());
|
||||||
|
BeanUtils.copyProperties(exchangeTicketDTO, zTicketFolder);
|
||||||
|
zTicketFolder.setShowId(zTicketUniqueCode.getShowId());
|
||||||
|
zTicketFolder.setTicketTierId(zTicketUniqueCode.getTicketTierId());
|
||||||
|
boolean save = zTicketFolderService.save(zTicketFolder);
|
||||||
|
// 兑换记录
|
||||||
|
ZExchangeRecords zExchangeRecords = new ZExchangeRecords();
|
||||||
|
zExchangeRecords.setMemberId(UserContext.getUserInfo().getUserId());
|
||||||
|
zExchangeRecords.setUniqudeCode(exchangeTicketDTO.getUniqueCode());
|
||||||
|
zExchangeRecords.setType(1);
|
||||||
|
zExchangeRecordsService.save(zExchangeRecords);
|
||||||
|
return save ? R.success("兑换成功") : R.fail("兑换失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationAuth;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketVerificationAuthMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketVerificationAuthService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销权限表
|
||||||
|
* Created on 2024-11-29
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZTicketVerificationAuthServiceImpl extends ServiceImpl<ZTicketVerificationAuthMapper,ZTicketVerificationAuth> implements ZTicketVerificationAuthService {
|
||||||
|
@Override
|
||||||
|
public List<ZTicketVerificationAuth> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketVerificationAuth> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationAuth getByZTicketVerificationAuthId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationAuth add(@NotNull(message = "实体不能为空") ZTicketVerificationAuth zTicketVerificationAuth) {
|
||||||
|
this.baseMapper.insert(zTicketVerificationAuth);
|
||||||
|
return zTicketVerificationAuth;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationAuth update(@NotNull(message = "实体不能为空") ZTicketVerificationAuth zTicketVerificationAuth) {
|
||||||
|
this.baseMapper.updateById(zTicketVerificationAuth);
|
||||||
|
return zTicketVerificationAuth;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.cpop.nftmeta.api.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpop.nftmeta.common.entity.ZTicketVerificationRecords;
|
||||||
|
import com.cpop.nftmeta.api.mapper.ZTicketVerificationRecordsMapper;
|
||||||
|
import com.cpop.nftmeta.api.service.ZTicketVerificationRecordsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票核销记录表
|
||||||
|
* Created on 2024-11-26
|
||||||
|
* @author yxz
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZTicketVerificationRecordsServiceImpl extends ServiceImpl<ZTicketVerificationRecordsMapper,ZTicketVerificationRecords> implements ZTicketVerificationRecordsService {
|
||||||
|
@Override
|
||||||
|
public List<ZTicketVerificationRecords> getList() {
|
||||||
|
return this.list();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public IPage getPage(Page page) {
|
||||||
|
LambdaQueryWrapper<ZTicketVerificationRecords> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||||
|
return this.page(page, lambdaQueryWrapper.orderByDesc(ZTicketVerificationRecords::getCreationTime));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationRecords getByZTicketVerificationRecordsId(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationRecords add(@NotNull(message = "实体不能为空") ZTicketVerificationRecords zTicketVerificationRecords) {
|
||||||
|
this.baseMapper.insert(zTicketVerificationRecords);
|
||||||
|
return zTicketVerificationRecords;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ZTicketVerificationRecords update(@NotNull(message = "实体不能为空") ZTicketVerificationRecords zTicketVerificationRecords) {
|
||||||
|
this.baseMapper.updateById(zTicketVerificationRecords);
|
||||||
|
return zTicketVerificationRecords;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean remove(@NotNull(message = "Id不能为空") Integer id) {
|
||||||
|
return this.removeById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.api.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/27
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "选择门票页面VO")
|
||||||
|
public class ChooseTicketTierVO {
|
||||||
|
@ApiModelProperty(value = "演出日程集合")
|
||||||
|
private List<ShowScheduleVO> showScheduleVOList;
|
||||||
|
@ApiModelProperty(value = "票档集合")
|
||||||
|
private List<TicketTierVO> ticketTierVOList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.nftmeta.api.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/27
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "演出日程VO")
|
||||||
|
public class ShowScheduleVO {
|
||||||
|
@ApiModelProperty(value = "演出日程ID")
|
||||||
|
private Long scheduleId;
|
||||||
|
@ApiModelProperty(value = "演出日程名称")
|
||||||
|
private String scheduleName;
|
||||||
|
@ApiModelProperty(value = "演出日程状态 0待开售 1开售中 2已售罄")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.cpop.nftmeta.api.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/28
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "票夹VO")
|
||||||
|
public class TicketFolderVO {
|
||||||
|
@ApiModelProperty(value = "演出名称")
|
||||||
|
private String showName;
|
||||||
|
// 站点
|
||||||
|
@ApiModelProperty(value = "站点")
|
||||||
|
private String site;
|
||||||
|
// 地点
|
||||||
|
@ApiModelProperty(value = "地点")
|
||||||
|
private String place;
|
||||||
|
// 演出时间
|
||||||
|
@ApiModelProperty(value = "演出时间")
|
||||||
|
private String showTime;
|
||||||
|
// 小图
|
||||||
|
@ApiModelProperty(value = "小图")
|
||||||
|
private String thumbnail;
|
||||||
|
@ApiModelProperty(value = "票夹ID")
|
||||||
|
private Long folderId;
|
||||||
|
// 票夹状态:0待核销,1已核销,2 已过期,3 待投放
|
||||||
|
@ApiModelProperty(value = "票夹状态:0待核销,1已核销,2 已过期,3 待投放")
|
||||||
|
private Integer status;
|
||||||
|
// 观众姓名
|
||||||
|
@ApiModelProperty(value = "观众姓名")
|
||||||
|
private String audienceName;
|
||||||
|
// 身份证
|
||||||
|
@ApiModelProperty(value = "身份证")
|
||||||
|
private String idNumber;
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
|
private String phone;
|
||||||
|
@ApiModelProperty(value = "票档名称")
|
||||||
|
private String tierName;
|
||||||
|
@ApiModelProperty(value = "二维码数据")
|
||||||
|
private String qrCode;
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.cpop.nftmeta.api.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Version: 1.0
|
||||||
|
* @since: 2024/11/27
|
||||||
|
* @author: yxz
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "票档VO")
|
||||||
|
public class TicketTierVO {
|
||||||
|
@ApiModelProperty(value = "票档ID")
|
||||||
|
private String tierId;
|
||||||
|
// 票档名称
|
||||||
|
@ApiModelProperty(value = "票档名称")
|
||||||
|
private String tierName;
|
||||||
|
// 票档价格
|
||||||
|
@ApiModelProperty(value = "票档价格")
|
||||||
|
private String tierPrice;
|
||||||
|
// 场次状态,0待开售 1开售中 2已售罄
|
||||||
|
@ApiModelProperty(value = "场次状态,0待开售 1开售中 2已售罄")
|
||||||
|
private Integer status;
|
||||||
|
}
|
@ -13,9 +13,9 @@ spring:
|
|||||||
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
||||||
datasource:
|
datasource:
|
||||||
nft:
|
nft:
|
||||||
url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/smd_uthmeta_test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://10.0.0.2:3306/digitalcenter_test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: nft
|
||||||
password: Cpop2022@
|
password: nft
|
||||||
wxnft:
|
wxnft:
|
||||||
url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/wx_uthmeta?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/wx_uthmeta?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: root
|
||||||
@ -32,9 +32,9 @@ spring:
|
|||||||
# max-idle: 200
|
# max-idle: 200
|
||||||
# min-idle: 5
|
# min-idle: 5
|
||||||
redis:
|
redis:
|
||||||
host: gz-crs-lv77ii2t.sql.tencentcdb.com
|
host: 10.0.0.5
|
||||||
port: 27714
|
port: 6379
|
||||||
password: Cpop2022@
|
# password: Cpop2022@
|
||||||
database: 4
|
database: 4
|
||||||
lettuce:
|
lettuce:
|
||||||
pool:
|
pool:
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZExchangeRecordsMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 唯一标识兑换记录表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZExchangeRecords">
|
||||||
|
<result column="record_id" property="recordId" />
|
||||||
|
<result column="member_id" property="memberId" />
|
||||||
|
<result column="uniqude_code" property="uniqudeCode" />
|
||||||
|
<result column="type" property="type" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
28
java/nft-api/src/main/resources/mapper/ZShowMapper.xml
Normal file
28
java/nft-api/src/main/resources/mapper/ZShowMapper.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZShowMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 演出表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZShow">
|
||||||
|
<result column="show_id" property="showId" />
|
||||||
|
<result column="show_name" property="showName" />
|
||||||
|
<result column="site" property="site" />
|
||||||
|
<result column="place" property="place" />
|
||||||
|
<result column="price" property="price" />
|
||||||
|
<result column="show_time" property="showTime" />
|
||||||
|
<result column="detail" property="detail" />
|
||||||
|
<result column="thumbnail" property="thumbnail" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="list_flag" property="listFlag" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
<result column="hint" property="hint" />
|
||||||
|
<result column="longitude" property="longitude" />
|
||||||
|
<result column="latitude" property="latitude" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
@ -0,0 +1,32 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZShowScheduleMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 演出场次关联表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZShowSchedule">
|
||||||
|
<result column="schedule_id" property="scheduleId" />
|
||||||
|
<result column="show_id" property="showId" />
|
||||||
|
<result column="schedule_name" property="scheduleName" />
|
||||||
|
<result column="schedule_time" property="scheduleTime" />
|
||||||
|
<result column="status" property="status" />
|
||||||
|
<result column="seats_total" property="seatsTotal" />
|
||||||
|
<result column="seats_available" property="seatsAvailable" />
|
||||||
|
<result column="seats_sold" property="seatsSold" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
<select id="getFirstShowSchedule" resultType="com.cpop.nftmeta.api.vo.ShowScheduleVO">
|
||||||
|
SELECT * FROM z_show_schedule ss
|
||||||
|
INNER JOIN z_ticket_blind_code tbc
|
||||||
|
ON ss.show_id = tbc.first_show_id
|
||||||
|
WHERE tbc.uniqude_code = #{uniqueCode}
|
||||||
|
AND ss.deleted = 0 AND tbc.`status` = 0
|
||||||
|
ORDER BY ss.schedule_time ASC
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,32 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZTicketBlindCodeMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 盲盒唯一标识表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZTicketBlindCode">
|
||||||
|
<result column="code_id" property="codeId" />
|
||||||
|
<result column="first_show_id" property="firstShowId" />
|
||||||
|
<result column="uniqude_code" property="uniqudeCode" />
|
||||||
|
<result column="first_ticket_tier_id" property="firstTicketTierId" />
|
||||||
|
<result column="status" property="status" />
|
||||||
|
<result column="delivery_status" property="deliveryStatus" />
|
||||||
|
<result column="delivery_time" property="deliveryTime" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
<select id="getFirstTicketTier" resultType="com.cpop.nftmeta.api.vo.TicketTierVO">
|
||||||
|
SELECT * FROM `z_ticket_tier` tt
|
||||||
|
INNER JOIN z_ticket_blind_code tbc
|
||||||
|
ON tt.show_id = tbc.first_show_id
|
||||||
|
WHERE tbc.uniqude_code = #{uniqueCode}
|
||||||
|
AND tt.schedule_id = #{searchSchedultId}
|
||||||
|
AND tt.deleted = 0 AND tbc.`status` = 0
|
||||||
|
ORDER BY tt.tier_price ASC
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZTicketFolderMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 票夹表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZTicketFolder">
|
||||||
|
<result column="folder_id" property="folderId" />
|
||||||
|
<result column="status" property="status" />
|
||||||
|
<result column="member_id" property="memberId" />
|
||||||
|
<result column="show_id" property="showId" />
|
||||||
|
<result column="unique_code" property="uniqueCode" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
<result column="audience_name" property="audienceName" />
|
||||||
|
<result column="id_number" property="idNumber" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
24
java/nft-api/src/main/resources/mapper/ZTicketTierMapper.xml
Normal file
24
java/nft-api/src/main/resources/mapper/ZTicketTierMapper.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZTicketTierMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 票档和场次关联表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZTicketTier">
|
||||||
|
<result column="tier_id" property="tierId" />
|
||||||
|
<result column="schedule_id" property="scheduleId" />
|
||||||
|
<result column="show_id" property="showId" />
|
||||||
|
<result column="tier_name" property="tierName" />
|
||||||
|
<result column="tier_price" property="tierPrice" />
|
||||||
|
<result column="seats_in_tier" property="seatsInTier" />
|
||||||
|
<result column="seats_available_in_tier" property="seatsAvailableInTier" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="status" property="status" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZTicketUniqueCodeMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 门票唯一标识表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZTicketUniqueCode">
|
||||||
|
<result column="code_id" property="codeId" />
|
||||||
|
<result column="show_id" property="showId" />
|
||||||
|
<result column="uniqude_code" property="uniqudeCode" />
|
||||||
|
<result column="ticket_tier_id" property="ticketTierId" />
|
||||||
|
<result column="status" property="status" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
<select id="checkRepeatAudience" resultType="java.lang.Integer">
|
||||||
|
SELECT count(tf.folder_id) FROM `z_ticket_folder` tf
|
||||||
|
INNER JOIN z_ticket_unique_code tuc
|
||||||
|
ON tf.show_id = tuc.show_id
|
||||||
|
WHERE tuc.show_id = #{showId}
|
||||||
|
AND tf.id_number = #{idNumber}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,21 @@
|
|||||||
|
<?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.cpop.nftmeta.api.mapper.ZTicketVerificationRecordsMapper">
|
||||||
|
<!--********************************-->
|
||||||
|
<!-- 门票核销记录表 -->
|
||||||
|
<!-- Created on 2024-11-26 -->
|
||||||
|
<!-- Author yxz -->
|
||||||
|
<!--********************************-->
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.cpop.nftmeta.common.entity.ZTicketVerificationRecords">
|
||||||
|
<result column="record_id" property="recordId" />
|
||||||
|
<result column="folder_id" property="folderId" />
|
||||||
|
<result column="member_id" property="memberId" />
|
||||||
|
<result column="show_id" property="showId" />
|
||||||
|
<result column="write_off_user_id" property="writeOffUserId" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user