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

Commit 39deaa68 authored by 张国柄's avatar 张国柄

Merge branch 'test'

parents c41cb0ad 8c070131
......@@ -14,7 +14,7 @@ public class AdamAddressesParam implements java.io.Serializable {
@ApiModelProperty(position = 10, required = false, value = "收获地址ID,编辑时必传[64]")
private String addressesId;
@ApiModelProperty(position = 11, required = true, value = "姓名[50]", example = "Swagger")
@Size(min = 1, max = 30)
@Size(min = 1, max = 30, message = "姓名长度限制1-30位")
private String name;
@ApiModelProperty(position = 12, required = true, value = "手机号[11]", example = "13111111111")
@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
......@@ -23,13 +23,12 @@ public class AdamAddressesParam implements java.io.Serializable {
@Pattern(regexp = LnsRegex.Valid.CN_PCD, message = "省份必须为2~30位汉字")
private String province;
@ApiModelProperty(position = 14, required = true, value = "城市[30]", example = "北京城区")
@NotNull()
@Pattern(regexp = LnsRegex.Valid.CN_PCD, message = "城市必须为2~30位汉字")
private String city;
@ApiModelProperty(position = 15, required = true, value = "区县[30]", example = "朝阳区")
@Pattern(regexp = LnsRegex.Valid.CN_PCD, message = "区县必须为2~30位汉字")
private String county;
@ApiModelProperty(position = 16, required = true, value = "详细地址[100]", example = "广渠路1号创1958园区")
@Size(max = 100)
@Size(max = 100, message = "已超出详细地址长度限制")
private String address;
}
......@@ -14,17 +14,16 @@ public class AdamEntersParam implements java.io.Serializable {
@ApiModelProperty(position = 10, required = false, value = "入场人ID,编辑时必传[50]")
private String entersId;
@ApiModelProperty(position = 11, required = true, value = "入场人姓名[50]", example = "测试")
// @Pattern(regexp = LnsRegex.Valid.CHINESE_HANZI, message = "姓名必须为2~20位汉字")
@Size(min = 1, max = 30)
@Size(min = 1, max = 30, message = "姓名长度限制1-30位")
private String name;
@ApiModelProperty(position = 12, required = true, value = "入场人手机号[11]", example = "13100000000")
@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
private String mobile;
@ApiModelProperty(position = 13, required = true, value = "证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证", allowableValues = "1,2,3,4,5")
@NotNull @Min(1) @Max(5)
@NotNull(message = "证件类型不能位空") @Min(value = 1, message = "证件类型无效") @Max(value = 5, message = "证件类型无效")
private Integer type;
@ApiModelProperty(position = 14, required = true, value = "入场人证件号[30]", example = "110101110001010111")
@Pattern(regexp = LnsRegex.Valid.LETTER_NUMBER, message = "证件号格式有误")
@Size(min = 1, max = 30)
@Size(min = 1, max = 30, message = "证件号长度限制1-30位")
private String idCard;
}
......@@ -13,12 +13,12 @@ import java.io.Serializable;
public class AdamMemberOrderCodeParam implements Serializable {
private static final long serialVersionUID = 2500742355642406263L;
@ApiModelProperty(position = 10, required = true, value = "类型:2-会员码,3-礼包码", example = "3")
@NotNull
@Min(2)
@Max(3)
@NotNull(message = "兑换码类型不能位空")
@Min(value = 2, message = "兑换码类型无效")
@Max(value = 3, message = "兑换码类型无效")
private Integer mode;
@ApiModelProperty(position = 11, required = true, value = "兑换码")
@NotBlank
@NotBlank(message = "兑换码不能为空")
private String memberCode;
@ApiModelProperty(position = 12, required = true, value = "生日", example = "2021-05-27")
@Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "生日格式有误")
......
......@@ -13,31 +13,31 @@ import java.math.BigDecimal;
@Data
public class AdamMemberOrderParam implements Serializable {
private static final long serialVersionUID = -2605176979349053352L;
@ApiModelProperty(position = 10, required = true, value = "会员ID[50]", example = "1")
@NotBlank
@ApiModelProperty(position = 10, required = true, value = "会员类型ID[50]", example = "1")
@NotBlank(message = "会员类型ID不能为空")
private String memberId;
@ApiModelProperty(position = 11, required = true, value = "会员价格ID", example = "1")
@NotBlank
@NotBlank(message = "会员价格ID不能为空")
private String memberPriceId;
@ApiModelProperty(position = 12, required = true, value = "购买方式:0-购买会员,1-购买会员码", allowableValues = "0,1")
@NotNull
@Min(0)
@Max(1)
@NotNull(message = "购买方式不能为空")
@Min(value = 0, message = "购买方式无效")
@Max(value = 1, message = "购买方式无效")
private Integer mode;
@ApiModelProperty(position = 13, required = true, value = "应付金额", example = "0.01")
@DecimalMin("0.01")
@DecimalMin(value = "0.01", message = "应付金额有误")
private BigDecimal price;
@ApiModelProperty(position = 14, required = true, value = "实付金额", example = "0.01")
@DecimalMin("0.01")
@DecimalMin(value = "0.01", message = "实付金额有误")
private BigDecimal pricePaid;
@ApiModelProperty(position = 15, required = true, value = "用户生日", example = "2021-05-27")
@Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "生日格式有误")
private String birthday;
@ApiModelProperty(position = 16, required = true, value = "支付终端", allowableValues = "app,wap,js,applet")
@NotBlank
@NotBlank(message = "支付终端不能为空")
private String deviceFrom;
@ApiModelProperty(position = 17, required = true, value = "支付方式", allowableValues = "alipay,wepay")
@NotBlank
@NotBlank(message = "支付方式不能为空")
private String payType;
@ApiModelProperty(position = 18, required = false, value = "App内Apple支付必传")
private String productId;
......
......@@ -19,25 +19,25 @@ public class AdamMemberPriceParam implements Serializable {
@ApiModelProperty(position = 1, value = "会员价格ID")
private String memberPriceId;
@ApiModelProperty(position = 2, value = "会员类型ID", example = "1")
@NotBlank
@NotBlank(message = "会员类型ID不能为空")
private String memberId;
@ApiModelProperty(position = 3, value = "状态:0-不可用,1-上线中,2-已下线", allowableValues = "0,1,2")
@NotNull
@Min(1)
@Max(2)
@NotNull(message = "状态不能为空")
@Min(value = 1, message = "状态无效")
@Max(value = 2, message = "状态无效")
private Integer state;
@ApiModelProperty(position = 4, value = "会员价格包名称", example = "年卡")
@Size(min = 1, max = 30)
@Size(min = 1, max = 30, message = "会员价格包名称长度限制1-30位")
private String name;
@ApiModelProperty(position = 5, value = "原价", example = "199")
@DecimalMin("0.01")
@DecimalMin(value = "0.01", message = "原价有误")
private BigDecimal price;
@ApiModelProperty(position = 6, value = "折扣价", example = "199")
@DecimalMin("0.01")
@DecimalMin(value = "0.01", message = "折扣价有误")
private BigDecimal priceFixed;
@ApiModelProperty(position = 7, value = "会员包有效天数", example = "365")
@NotNull
@Min(30)
@ApiModelProperty(position = 7, value = "有效天数", example = "365")
@NotNull(message = "有效天数不能为空")
@Min(value = 30, message = "有效天数不得少于30天")
private Integer days;
@ApiModelProperty(position = 8, value = "会员包须知", example = "会员包须知")
private String detail;
......
......@@ -13,13 +13,12 @@ import java.io.Serializable;
public class AdamThirdPartParam implements Serializable {
private static final long serialVersionUID = 675588088506034208L;
@ApiModelProperty(position = 11, required = true, value = "第三方OPENID[64]")
@NotBlank
@NotBlank(message = "OPENID不能为空")
private String openId;
@ApiModelProperty(position = 12, required = true, value = "昵称[64]", example = "Swagger")
// @Size(min = 2, max = 64)
private String nickname;
@ApiModelProperty(position = 13, required = true, value = "头像[255]", example = "http://pic.zhengzai.tv/default/avatar.png")
@Size(max = 255)
@Size(max = 255, message = "已超出头像链接长度限制")
private String avatar;
@ApiModelProperty(position = 14, required = true, value = "平台类型[255]", allowableValues = "WEIBO,WECHAT,QQ")
//@Pattern(regexp = "\\b(WEIBO,WECHAT,QQ)\\b", message = "平台类型无效")
......
......@@ -18,25 +18,25 @@ import java.util.List;
public class AdamUserInfoParam implements java.io.Serializable {
private static final long serialVersionUID = -1084524066864012398L;
@ApiModelProperty(position = 11, required = true, value = "头像[255]", example = "http://pic.zhengzai.tv/default/avatar.png")
@Size(max = 255)
@Size(max = 255, message = "已超出头像链接长度限制")
private String avatar;
@ApiModelProperty(position = 12, required = true, value = "背景[255]", example = "https://img.zhengzai.tv/files/2021/01/13/5ffeab3584b7d.png")
@Size(max = 255)
@Size(max = 255, message = "已超出背景链接长度限制")
private String background;
@ApiModelProperty(position = 13, required = true, value = "昵称[32]", example = "Swagger")
@Size(min = 2, max = 64)
@ApiModelProperty(position = 13, required = true, value = "昵称[14]", example = "Swagger")
@Size(min = 2, max = 14, message = "昵称限制2-14位且不能包含特殊字符")
private String nickname;
@ApiModelProperty(position = 14, required = true, value = "性别[32]", example = "{\"val\":\"MS00\",\"desc\":\"其他性别\"}")
@NotNull
@NotNull(message = "性别不能为空")
private AdamTagVo sex;
@ApiModelProperty(position = 15, required = true, value = "生日[YYYY-MM-DD]", example = "2021-05-17")
@Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "时间格式有误")
@Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "生日格式有误")
private String birthday;
@ApiModelProperty(position = 16, required = true, value = "常住地/区域[100]", example = "北京 北京市 朝阳区")
@NotBlank
@NotBlank(message = "常住地不能为空")
private String area;
@ApiModelProperty(position = 17, required = true, value = "签名[255]", example = "...................")
@Size(max = 255)
@ApiModelProperty(position = 17, required = true, value = "签名[15]", example = "...................")
@Size(max = 15, message = "已超出签名长度限制")
private String signature;
@ApiModelProperty(position = 18, required = true, value = "标签[500]", example = "[{\"val\":\"MMS01\",\"desc\":\"民歌\",\"tagVos\":[{\"val\":\"MMS0101\",\"desc\":\"A\"},{\"val\":\"MMS0102\",\"desc\":\"B\"}]},{\"val\":\"MMS02\",\"desc\":\"house\",\"tagVos\":[{\"val\":\"MMS0201\",\"desc\":\"C\"}]}]")
// @NotNull
......
......@@ -112,4 +112,21 @@ public class DragonConstant {
this.message = message;
}
}
/**
* CHANNEL_REFUND_URL
*/
public enum channelRefundUrlEnum{
JSAPI_REFUND_URL("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds","JSAPI-退款-接口"),
APP_REFUND_URL("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds","APP-退款-接口"),
H5_REFUND_URL("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds","H5-退款-接口"),
NATIVE_REFUND_URL ("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds","NATIVE-退款-接口"),
MCH_REFUND_URL("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds","小程序-退款-接口");
private String code;
private String message;
channelRefundUrlEnum(String code, String message) {
this.code = code;
this.message = message;
}
}
}
......@@ -29,10 +29,10 @@ public class BannersSearchParam implements Serializable {
private Integer promotionType;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "页数不能为空")
private Integer pageSize;
@ApiModelProperty(value = "数量", example = "20")
@NotNull(message = "不能为空")
@NotNull(message = "数量不能为空")
private Integer pageNum;
}
......@@ -8,9 +8,9 @@ import javax.validation.constraints.NotNull;
@Data
public class CheckPerformanceRelationParam {
@ApiModelProperty(value = "演出id")
@NotNull
@NotNull(message = "演出ID不能为空")
private String performanceId;
@ApiModelProperty(value = "可下载时间")
@NotNull
@NotNull(message = "可下载时间不能为空")
private String canDownTime;
}
......@@ -9,11 +9,11 @@ import java.util.List;
@Data
public class CheckUserParam {
@ApiModelProperty(value = "演出id")
@NotNull
@ApiModelProperty(value = "验票用户ID")
@NotNull(message = "验票用户ID不能为空")
private String checkUserId;
@ApiModelProperty(value = "可下载时间")
@NotNull
@ApiModelProperty(value = "关联演出")
@NotNull(message = "关联演出不能为空")
@Size(min = 1)
private List<CheckPerformanceRelationParam> checkPerformanceRelationParamList;
}
......@@ -13,7 +13,7 @@ public class CreateRoadShowParam implements Serializable {
@ApiModelProperty(value = "巡演主键", example = "")
private String roadShowsId;
@ApiModelProperty(value = "标题", example = "")
@NotNull(message = "不能为空")
@NotNull(message = "标题不能为空")
private String title;
// @ApiModelProperty(value = "场地主键", example = "测试场地")
// private String imgPoster;
......
......@@ -15,7 +15,7 @@ public class CreateTicketTimesParam implements Serializable {
private String ticketTimesId;
@ApiModelProperty(value = "演出Id", example = "1")
@NotNull(message = "不能为空")
@NotNull(message = "演出ID不能为空")
private String PerformancesId;
@ApiModelProperty(value = "场次标题", example = "测试标题")
......
......@@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
@Data
public class PayAgainParam {
@ApiModelProperty(value = "订单id")
@NotNull(message = "订单id不能为空")
@NotNull(message = "订单ID不能为空")
private String orderId;
@ApiModelProperty(value = "支付类型")
@NotNull(message = "支付类型不能为空")
......
......@@ -14,18 +14,17 @@ import java.util.List;
@Data
public class PayOrderParam {
@ApiModelProperty(value = "演出id")
@NotNull(message = "演出id不能为空")
@NotNull(message = "演出ID不能为空")
private String performanceId;
@ApiModelProperty(value = "场次id")
@NotNull(message = "场次id不能为空")
@NotNull(message = "场次ID不能为空")
private String timeId;
@ApiModelProperty(value = "票种id")
@NotNull(message = "票种id不能为空")
@NotNull(message = "必传")
@NotNull(message = "票种ID不能为空")
private String ticketId;
@ApiModelProperty(value = "数量")
@NotNull(message = "数量不能为空")
@Min(value = 1,message = "不能小于0")
@Min(value = 1,message = "数量不能小于0")
private Integer number;
// @ApiModelProperty(value = "是否学生票")
......@@ -41,12 +40,12 @@ public class PayOrderParam {
@ApiModelProperty(value = "入场人id数组")
private List<String> enterIdList;
@ApiModelProperty(value = "代理id")
@NotNull(message = "代理id不能为空")
@NotNull(message = "代理ID不能为空")
private String agentId;
@ApiModelProperty(value = "快递类型 1寄付 2到付")
@NotNull(message = "快递方式不能为空")
@Max(2)
@Min(1)
@Max(value = 2, message = "快递方式无效")
@Min(value = 1, message = "快递方式无效")
private Integer expressType;
......@@ -54,7 +53,7 @@ public class PayOrderParam {
@NotNull(message = "支付类型不能为空")
private String payType;
@ApiModelProperty(value = "支付来源")
@NotNull(message = "支付来源")
@NotNull(message = "支付来源不能为空")
private String deviceFrom;
@ApiModelProperty(value = "openId")
private String openId;
......
......@@ -12,22 +12,22 @@ public class PerformanceAdminListParam {
@ApiModelProperty(value = "演出名称", example = "")
private String title;
@ApiModelProperty(value = "-2全部状态:-1删除;0未提交;1审核中;2审核中(自动上线);3审核通过;4审核未通过;6上线;7下架;8活动结束;9活动取消退款中;10活动取消退", example = "-2")
@NotNull(message = "不能为空")
@NotNull(message = "演出状态不能为空")
private Integer status;
@ApiModelProperty(value = "城市名称", example = "")
private String cityName;
@ApiModelProperty(value = "-2全部,0审核中,2审核拒绝", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "审核状态不能为空")
private Integer auditStatus;
@ApiModelProperty(value = "停售时间(天)-2全部", example = "-2")
private long stopSellDay;
@ApiModelProperty(value = "停售时间", example = "2000-01-01 12:00:00", hidden = true)
private String stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "页数不能为空")
private Integer pageSize;
@ApiModelProperty(value = "数量", example = "20")
@NotNull(message = "不能为空")
@NotNull(message = "数量不能为空")
private Integer pageNum;
@ApiModelProperty(value = "排序字段", hidden = true)
private String orderItem;
......
......@@ -15,27 +15,27 @@ public class PerformancePartnerListParam {
@ApiModelProperty(value = "演出名称", example = "")
private String title;
@ApiModelProperty(value = "-2全部(不包括未提交)0未发布演出列表;3审核通过;6上线;7下架;8已结束;", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "演出状态不能为空")
private Integer status;
@ApiModelProperty(value = "-2全部,-1未提交审核,0审核中,1审核通过,2审核拒绝", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "审核状态不能为空")
private Integer auditStatus;
@ApiModelProperty(value = "演出开始时间", example = "2000-01-01 12:00:00")
private String timeStart;
@ApiModelProperty(value = "演出结束时间", example = "2000-01-01 12:00:00")
private String timeEnd;
@ApiModelProperty(value = "排序类型 1创建时间倒序 2创建时间正序 3演出时间倒序 4演出时间正序", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "排序类型不能为空")
private Integer orderType;
@ApiModelProperty(value = "停售时间(单位天 -2全部)", example = "-2")
private long stopSellDay;
@ApiModelProperty(value = "停售时间(单位天 -2全部)", example = "-2", hidden = true)
private String stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "页数不能为空")
private Integer page;
@ApiModelProperty(value = "数量", example = "20")
@NotNull(message = "不能为空")
@NotNull(message = "数量不能为空")
private Integer size;
@ApiModelProperty(value = "排序字段", hidden = true)
private String orderItem;
......
......@@ -15,31 +15,31 @@ public class PerformanceStep1Param implements Serializable {
private String performancesId;
@ApiModelProperty(value = "封面图", example = "https://img.zhengzai.tv/partner/2019/05/14/5cda2d0520177.png")
@NotNull(message = "不能为空")
@NotNull(message = "封面图不能为空")
private String imgPoster;
@ApiModelProperty(value = "第三方id", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "第三方ID不能为空")
private String merchantId;
@ApiModelProperty(value = "演出名称", example = "测试演出")
@NotNull(message = "不能为空")
@NotNull(message = "演出名称不能为空")
private String title;
@ApiModelProperty(value = "1音乐节 2演唱会 3小型演出 4展览 6舞台剧 101音乐节 102小型演出(livehouse演出) 103巡演", example = "3")
@NotNull(message = "不能为空")
@NotNull(message = "演出类型不能为空")
private Integer type;
@ApiModelProperty(value = "演出开始时间", example = "2021-05-01 12:00:00")
@NotNull(message = "不能为空")
@NotNull(message = "演出开始时间不能为空")
private String timeStart;
@ApiModelProperty(value = "演出结束时间", example = "2021-05-04 12:00:00")
@NotNull(message = "不能为空")
@NotNull(message = "演出结束时间不能为空")
private String timeEnd;
@ApiModelProperty(value = "场地id", example = "1")
@NotNull(message = "不能为空")
@NotNull(message = "场地ID不能为空")
private String fieldId;
@ApiModelProperty(value = "场地名称", example = "")
......@@ -49,7 +49,7 @@ public class PerformanceStep1Param implements Serializable {
private String notice;
@ApiModelProperty(value = "主办方id", example = "1")
@NotNull(message = "不能为空")
@NotNull(message = "主办方ID不能为空")
private String sponsorId;
@ApiModelProperty(value = "主办方类型", example = "1")
......@@ -59,30 +59,30 @@ public class PerformanceStep1Param implements Serializable {
private String sponsor;
@ApiModelProperty(value = "联系人", example = "联系人")
@NotNull(message = "不能为空")
@NotNull(message = "联系人不能为空")
private String contacts;
@ApiModelProperty(value = "联系方式", example = "手机号")
@NotNull(message = "不能为空")
@NotNull(message = "联系方式不能为空")
private String mobile;
@ApiModelProperty(value = "演出详情", example = "<p>演出详情</p>")
@NotNull(message = "不能为空")
@NotNull(message = "演出详情不能为空")
private String details;
@ApiModelProperty(value = "演出批文地址", example = "这是一个演出批文地址")
@NotNull(message = "不能为空")
@NotNull(message = "演出批文地址不能为空")
private String approvalUrl;
@ApiModelProperty(value = "待支付时间", example = "5")
@NotNull(message = "不能为空")
@NotNull(message = "待支付时间不能为空")
private Integer payCountdownMinute;
@ApiModelProperty(value = "购票须知",hidden = true,example = "[{\"id\":1,\"title\":\"\\u95e8\\u7968\\u4e0d\\u9000\\u4e0d\\u6362\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c45722882a13.png\",\"text\":\"\\u95e8\\u7968\\u4e3a\\u6709\\u4ef7\\u8bc1\\u5238\\uff0c\\u5e76\\u975e\\u5546\\u54c1\\uff0c\\u4e00\\u7ecf\\u552e\\u51fa\\u4e0d\\u4e88\\u9000\\u6362\\u3002\\u56e0\\u201c\\u4e0d\\u53ef\\u6297\\u529b\\u201d\\u5bfc\\u81f4\\u7684\\u6f14\\u51fa\\u53d6\\u6d88\\u6216\\u5ef6\\u671f\\u9664\\u5916\\u3002\",\"sort\":1},{\"id\":3,\"title\":\"\\u4ec5\\u8bbe\\u7ad9\\u5e2d\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e93db0b9.png\",\"text\":\"\\u672c\\u573a\\u6f14\\u51fa\\u4e0d\\u8bbe\\u5ea7\\u4f4d\\uff0c\\u5747\\u4e3a\\u7ad9\\u5e2d\\u89c2\\u6f14\\u3002\",\"sort\":2},{\"id\":4,\"title\":\"\\u7981\\u6b62\\u4e2a\\u4eba\\u7968\\u52a1\\u4e70\\u5356\",\"type\":\"image\",\"url\":\"http:\\/\\/img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com\\/partner\\/2019\\/01\\/21\\/5c456e5c27644.png\",\"text\":\"\\u4e3a\\u9632\\u6b62\\u4e0d\\u6cd5\\u5206\\u5b50\\u5229\\u7528\\u7968\\u52a1\\u8f6c\\u8ba9\\u8bc8\\u9a97\\u94b1\\u6b3e\\uff0c\\u5efa\\u8bae\\u5e7f\\u5927\\u4e50\\u8ff7\\u4e0d\\u8981\\u8fdb\\u884c\\u4e2a\\u4eba\\u95f4\\u7968\\u52a1\\u4e70\\u5356\\uff0c\\u4e0d\\u8981\\u8f7b\\u6613\\u76f8\\u4fe1\\u6765\\u6e90\\u4e0d\\u660e\\u7684\\u8f6c\\u7968\\uff0c\\u4ee5\\u514d\\u81ea\\u8eab\\u5229\\u76ca\\u53d7\\u5230\\u4fb5\\u5bb3\\u3002\",\"sort\":3}]")
private String noticeImage;
@ApiModelProperty(value = "购票须知 Id 数组")
@NotNull(message = "不能为空")
@NotNull(message = "购票须知不能为空")
private List<String> noticeIds;
@ApiModelProperty(value = "演出简介", example = "")
......
......@@ -26,11 +26,11 @@ public class RefundBatchSearchParam implements Serializable {
private String createdAt;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "页数不能为空")
private Integer pageSize;
@ApiModelProperty(value = "数量", example = "20")
@NotNull(message = "不能为空")
@NotNull(message = "数量不能为空")
private Integer pageNum;
}
......@@ -28,11 +28,11 @@ public class RefundSearchParam implements Serializable {
private Integer status;
@ApiModelProperty(value = "页数", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "页数不能为空")
private Integer pageSize;
@ApiModelProperty(value = "数量", example = "20")
@NotNull(message = "不能为空")
@NotNull(message = "数量不能为空")
private Integer pageNum;
}
......@@ -24,59 +24,59 @@ public class TicketCreateParam implements Serializable {
private String ticketsId;
@ApiModelProperty(value = "场次Id")
@NotNull(message = "不能为空")
@NotNull(message = "场次ID不能为空")
private String timesId;
@ApiModelProperty(value = "票种名称", example = "测试票")
@NotNull(message = "不能为空")
@NotNull(message = "票种名称不能为空")
private String title;
// @ApiModelProperty(value = "类型", example = "2")
// private int type;
@ApiModelProperty(value = "是否学生票 0否 1是", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "是否学生票不能为空")
private Integer isStudent;
@ApiModelProperty(value = "是否电子票", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "是否电子票不能为空")
private Integer isElectronic;
@ApiModelProperty(value = "是否电子票", example = "0")
private String describeExpress;
@ApiModelProperty(value = "是否快递票", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "是否快递票不能为空")
private Integer isExpress;
@ApiModelProperty(value = "是否电子票", example = "0")
private String describeElectronic;
@ApiModelProperty(value = "价格", example = "100.00")
@NotNull(message = "不能为空")
@NotNull(message = "价格不能为空")
private BigDecimal price;
@ApiModelProperty(value = "快递票截止日期", example = "2020-12-01T12:00:00")
private LocalDateTime timeEndExpress;
@ApiModelProperty(value = "总库存", example = "100")
@NotNull(message = "不能为空")
@NotNull(message = "总库存不能为空")
private Integer totalGeneral;
@ApiModelProperty(value = "总兑换库存", example = "100")
@NotNull(message = "不能为空")
@NotNull(message = "总兑换库存不能为空")
private Integer totalExchange;
@ApiModelProperty(value = "限购数量", example = "0")
@NotNull(message = "不能为空")
@NotNull(message = "限购数量不能为空")
private Integer limitCount;
@ApiModelProperty(value = "票种开售时间", example = "2020-12-01T12:00:00")
@NotNull(message = "不能为空")
@NotNull(message = "票种开售时间不能为空")
private LocalDateTime timeStart;
@ApiModelProperty(value = "票种结售时间", example = "2020-12-01T14:00:00")
@NotNull(message = "不能为空")
@NotNull(message = "票种结售时间不能为空")
private LocalDateTime timeEnd;
@ApiModelProperty(value = "票种说明", example = "这是票种说明")
......@@ -89,11 +89,11 @@ public class TicketCreateParam implements Serializable {
private LocalDateTime qrCodeShowTime;
@ApiModelProperty(value = "次数", example = "1")
@NotNull(message = "不能为空")
@NotNull(message = "次数不能为空")
private Integer counts;
@ApiModelProperty(value = "是否开启缺票登记", example = "1")
@NotNull(message = "不能为空")
@NotNull(message = "是否开启缺票登记不能为空")
private Integer isLackRegister;
@ApiModelProperty(value = "", hidden = true)
......
......@@ -71,7 +71,7 @@ public class AdamMemberAdminController {
@RequiresPermissions("adam:member:info")
@ApiOperation(value = "会员卡详情")
@PostMapping("info")
public ResponseDto<Object> info(@NotBlank @RequestParam String memberId) {
public ResponseDto<Object> info(@NotBlank(message = "会员类型ID不能为空") @RequestParam String memberId) {
return ResponseDto.success(adamMemberService.getOne(
Wrappers.lambdaQuery(AdamMember.class).eq(AdamMember::getMemberId, memberId)
));
......
......@@ -37,7 +37,7 @@ public class AdamMemberPriceAdminController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "memberId", value = "会员卡ID[64]"),
})
@GetMapping("list")
public ResponseDto<List<AdamMemberPriceVo>> list(@NotBlank @RequestParam String memberId) {
public ResponseDto<List<AdamMemberPriceVo>> list(@NotBlank(message = "会员类型ID不能为空") @RequestParam String memberId) {
List<AdamMemberPrice> list = adamMemberPriceService.list(
Wrappers.lambdaQuery(AdamMemberPrice.class).eq(AdamMemberPrice::getMemberId, memberId)
);
......@@ -55,7 +55,8 @@ public class AdamMemberPriceAdminController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "memberPriceId", value = "会员卡价格ID[64]"),
})
@GetMapping("info")
public ResponseDto<AdamMemberPriceVo> query(@NotBlank @RequestParam String memberId, @NotBlank @RequestParam String memberPriceId) {
public ResponseDto<AdamMemberPriceVo> query(@NotBlank(message = "会员类型ID不能为空") @RequestParam String memberId,
@NotBlank(message = "会员价格ID不能为空") @RequestParam String memberPriceId) {
AdamMemberPrice one = adamMemberPriceService.getOne(
Wrappers.lambdaQuery(AdamMemberPrice.class)
.eq(AdamMemberPrice::getMemberPriceId, memberPriceId)
......
......@@ -39,7 +39,7 @@ public class AdamUserMemberAdminController {
@RequiresPermissions("adam:umember:blk:add")
@ApiOperation(value = "添加会员黑名单")
@PostMapping("blk/add")
public ResponseDto<List<String>> addBlack(@NotBlank @RequestParam String opts) {
public ResponseDto<List<String>> addBlack(@NotBlank(message = "会员ID不能为空") @RequestParam String opts) {
String[] uidArr = opts.split(",");
List<String> invalidList = new ArrayList<>(), existList = new ArrayList<>();
for (String uid : uidArr) {
......@@ -66,7 +66,7 @@ public class AdamUserMemberAdminController {
@RequiresPermissions("adam:umember:blk:del")
@ApiOperation(value = "删除会员黑名单")
@PostMapping("blk/del")
public ResponseDto<Object> delBlack(@NotBlank @RequestParam String opts) {
public ResponseDto<Object> delBlack(@NotBlank(message = "会员ID不能为空") @RequestParam String opts) {
String[] uidArr = opts.split(",");
List<String> blacklist = (List<String>) redisUtil.get(AdamRedisConst.BLK_LIST_MEMBER_UID);
if (!CollectionUtils.isEmpty(blacklist)) {
......
......@@ -27,13 +27,14 @@ public class OrderSwitchAdminController {
IKylinOrderRefundsService kylinOrderRefundsService;
@RequiresPermissions("order:switch:search:code")
@ApiOperation(value = "开放/限制校验证码")
@ApiOperation(value = "根据截取订单号获取全量订单号")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "订单号", example = ""),
@ApiImplicitParam(type = "form", required = true, dataType = "int", name = "type", value = "1退款单号 2订单号", example = ""),
})
@PostMapping("search/code")
public ResponseDto<Object> loginSmsSwitch(@RequestParam @NotNull String code,@RequestParam @NotNull int type) {
public ResponseDto<Object> loginSmsSwitch(@NotNull(message = "订单号不能为空") @RequestParam String code,
@NotNull(message = "类型不能为空") @RequestParam int type) {
String codeNum = kylinOrderRefundsService.getOrderRefundCode(code,type);
if(codeNum==null){
return ResponseDto.success("未查询到");
......
......@@ -50,13 +50,15 @@ public class RestControllerAdviceHandler {
ConstraintViolationException ygex = (ConstraintViolationException) rex;
ConstraintViolation violation = (ConstraintViolation) ygex.getConstraintViolations().toArray()[0];
String violationNode = violation.getPropertyPath().toString();
String message = violationNode.substring(violationNode.indexOf(".") + 1) + violation.getMessage();
// String message = violationNode.substring(violationNode.indexOf(".") + 1) + violation.getMessage();
String message = violation.getMessage();
return new ResponseEntity<Error>(new Error(ErrorCode.HTTP_PARAM_ERROR.getCode(), message), HttpStatus.OK);
}
if (rex instanceof MethodArgumentNotValidException) {
MethodArgumentNotValidException ygex = (MethodArgumentNotValidException) rex;
FieldError fieldError = ygex.getBindingResult().getFieldErrors().get(0);
String message = fieldError.getField() + " " + fieldError.getDefaultMessage();
// String message = fieldError.getField() + " " + fieldError.getDefaultMessage();
String message = fieldError.getDefaultMessage();
return new ResponseEntity<Error>(new Error(ErrorCode.HTTP_PARAM_ERROR.getCode(), message), HttpStatus.OK);
}
if (rex instanceof LiquidnetFeignException) {
......
......@@ -66,7 +66,7 @@ public class AdamAddressesController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "设置默认收货地址")
@PostMapping("def/{addrId}")
public ResponseDto<Object> def(@NotBlank @PathVariable String addrId) {
public ResponseDto<Object> def(@NotBlank(message = "收货地址ID不能为空") @PathVariable String addrId) {
String currentUid = CurrentUtil.getCurrentUid();
AdamAddressesVo vo = adamRdmService.getAddressesVoByUidAddressesId(currentUid, addrId);
......@@ -96,7 +96,7 @@ public class AdamAddressesController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "删除收货地址")
@PostMapping("del/{addrId}")
public ResponseDto<Object> del(@NotBlank @PathVariable String addrId) {
public ResponseDto<Object> del(@NotBlank(message = "收货地址ID不能为空") @PathVariable String addrId) {
String currentUid = CurrentUtil.getCurrentUid();
AdamAddressesVo vo = adamRdmService.getAddressesVoByUidAddressesId(currentUid, addrId);
......@@ -110,7 +110,7 @@ public class AdamAddressesController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "收货地址详情")
@PostMapping("query/{id}")
public ResponseDto<AdamAddressesVo> query(@NotBlank @PathVariable(name = "id") String addrId) {
public ResponseDto<AdamAddressesVo> query(@NotBlank(message = "收货地址ID不能为空") @PathVariable(name = "id") String addrId) {
AdamAddressesVo vo = adamRdmService.getAddressesVoByUidAddressesId(CurrentUtil.getCurrentUid(), addrId);
if (null != vo) {
vo.setPhone(SensitizeUtil.custom(vo.getPhone(), 3, 4));
......@@ -136,8 +136,8 @@ public class AdamAddressesController {
@ApiOperationSupport(order = 99)
@ApiOperation(value = "@API:收货地址", notes = "查取用户指定收货地址详情")
@GetMapping("query/depth")
public ResponseDto<AdamAddressesVo> queryForDepth(@NotBlank @RequestParam String addrId,
@NotBlank @RequestParam String uid) {
public ResponseDto<AdamAddressesVo> queryForDepth(@NotBlank(message = "收货地址ID不能为空") @RequestParam String addrId,
@NotBlank(message = "用户ID不能为空") @RequestParam String uid) {
AdamAddressesVo vo = adamRdmService.getAddressesVoByUidAddressesId(uid, addrId);
return null == vo ? ResponseDto.failure(ErrorMapping.get("10106")) : ResponseDto.success(vo);
}
......
......@@ -46,7 +46,7 @@ public class AdamCollectionController {
@PostMapping("add")
public ResponseDto<Object> add(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type,
@Size(min = 1, max = 64)
@Size(min = 1, max = 64, message = "收藏内容ID长度限制1-64位")
@RequestParam String contentId) {
String currentUid = CurrentUtil.getCurrentUid();
......@@ -72,7 +72,7 @@ public class AdamCollectionController {
@PostMapping("del")
public ResponseDto<Object> del(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type,
@NotBlank @RequestParam String contentIds) {
@NotBlank(message = "内容ID不能为空") @RequestParam String contentIds) {
adamCollectionService.del(CurrentUtil.getCurrentUid(), type, contentIds.split(","));
return ResponseDto.success();
......@@ -120,7 +120,7 @@ public class AdamCollectionController {
@GetMapping("state")
public ResponseDto<Boolean> state(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type,
@Size(min = 1, max = 64)
@Size(min = 1, max = 64, message = "收藏内容ID长度限制1-64位")
@RequestParam String contentId) {
return ResponseDto.success(adamCollectionService.queryState(CurrentUtil.getCurrentUid(), type, contentId));
}
......
......@@ -47,7 +47,7 @@ public class AdamDisposedController {
@PostMapping("add")
public ResponseDto<Object> add(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效")
@RequestParam String type,
@Size(min = 1, max = 64)
@Size(min = 1, max = 64, message = "内容ID长度限制1-64位")
@RequestParam String contentId) {
String currentUid = CurrentUtil.getCurrentUid();
......@@ -74,7 +74,7 @@ public class AdamDisposedController {
@PostMapping("del")
public ResponseDto<Object> del(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效")
@RequestParam String type,
@NotBlank @RequestParam String contentIds) {
@NotBlank(message = "内容ID不能为空") @RequestParam String contentIds) {
adamDisposedService.del(CurrentUtil.getCurrentUid(), type, contentIds.split(","));
return ResponseDto.success();
......@@ -109,7 +109,7 @@ public class AdamDisposedController {
@PostMapping("list/user")
public ResponseDto<PageInfo<AdamDisposedUserVo>> listUser(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效")
@RequestParam String type,
@Size(min = 1, max = 64)
@Size(min = 1, max = 64, message = "内容ID长度限制1-64位")
@RequestParam String contentId,
@RequestParam(defaultValue = "1", required = false) int pageNo,
@RequestParam(defaultValue = "10", required = false) int pageSize) {
......@@ -128,7 +128,7 @@ public class AdamDisposedController {
@GetMapping("state")
public ResponseDto<Boolean> state(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效")
@RequestParam String type,
@Size(min = 1, max = 64)
@Size(min = 1, max = 64, message = "内容ID长度限制1-64位")
@RequestParam String contentId) {
return ResponseDto.success(adamDisposedService.queryState(CurrentUtil.getCurrentUid(), type, contentId));
}
......
......@@ -54,10 +54,10 @@ public class AdamEntersController {
switch (parameter.getType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
case 1:
if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, parameter.getName())) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "姓名必须为2~20位汉字");
return ResponseDto.failure(ErrorMapping.get("10103"));
}
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, parameter.getIdCard())) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "身份证号码不合规");
return ResponseDto.failure(ErrorMapping.get("10104"));
}
break;
case 2:
......@@ -114,7 +114,7 @@ public class AdamEntersController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "设置默认入场人")
@PostMapping("def/{entersId}")
public ResponseDto<Object> def(@NotBlank @PathVariable String entersId) {
public ResponseDto<Object> def(@NotBlank(message = "入场人ID不能为空") @PathVariable String entersId) {
String currentUid = CurrentUtil.getCurrentUid();
AdamEntersVo vo = adamRdmService.getEntersVoByUidEntersId(currentUid, entersId);
......@@ -132,7 +132,7 @@ public class AdamEntersController {
public ResponseDto<Object> edit(@RequestBody @Valid AdamEntersParam parameter) {
if (1 == parameter.getType()) {
if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, parameter.getName())) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "姓名必须为2~20位汉字");
return ResponseDto.failure(ErrorMapping.get("10103"));
}
}
if (StringUtils.isBlank(parameter.getEntersId())) {
......@@ -150,7 +150,7 @@ public class AdamEntersController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "删除入场人")
@PostMapping("del/{entersId}")
public ResponseDto<Object> del(@NotBlank @PathVariable String entersId) {
public ResponseDto<Object> del(@NotBlank(message = "入场人ID不能为空") @PathVariable String entersId) {
String currentUid = CurrentUtil.getCurrentUid();
AdamEntersVo enters = adamRdmService.getEntersVoByUidEntersId(currentUid, entersId);
......@@ -164,7 +164,7 @@ public class AdamEntersController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "入场人详情")
@PostMapping("query")
public ResponseDto<List<AdamEntersVo>> query(@NotBlank @RequestParam String entersIds) {
public ResponseDto<List<AdamEntersVo>> query(@NotBlank(message = "入场人ID不能为空") @RequestParam String entersIds) {
List<AdamEntersVo> vos = adamRdmService.getEntersVoByUidEntersIds(CurrentUtil.getCurrentUid(), entersIds.split(","));
if (!CollectionUtils.isEmpty(vos)) {
for (AdamEntersVo vo : vos) {
......@@ -190,8 +190,8 @@ public class AdamEntersController {
}
@GetMapping("query/depth")
public ResponseDto<AdamEntersVo> queryForDepth(@NotBlank @RequestParam String entersId,
@NotBlank @RequestParam String uid) {
public ResponseDto<AdamEntersVo> queryForDepth(@NotBlank(message = "入场人ID不能为空") @RequestParam String entersId,
@NotBlank(message = "用户ID不能为空") @RequestParam String uid) {
AdamEntersVo vo = adamRdmService.getEntersVoByUidEntersId(uid, entersId);
return null == vo ? ResponseDto.failure(ErrorMapping.get("10105")) : ResponseDto.success(vo);
}
......
......@@ -68,7 +68,7 @@ public class AdamMemberController {
@ApiOperationSupport(order = 99)
@ApiOperation(value = "@API:是否会员", notes = "根据UID判断用户是否会员,响应参数[`data`:true-是,false-否]")
@GetMapping("check/depth")
public ResponseDto<Boolean> isMember(@NotBlank @RequestParam String uid) {
public ResponseDto<Boolean> isMember(@NotBlank(message = "用户ID不能为空") @RequestParam String uid) {
AdamUserMemberVo userMemberInfo = adamRdmService.getUserMemberVoByUid(uid);
return ResponseDto.success(null != userMemberInfo && userMemberInfo.isActive());
}
......
......@@ -59,8 +59,8 @@ public class AdamMemberOrderController {
@ApiOperationSupport(order = 0)
@ApiOperation(value = "购买会员预览")
@GetMapping("preview/{mno}/{id}")
public ResponseDto<AdamMemberOrderPreviewVo> preview(@NotBlank @PathVariable String mno,
@NotBlank @PathVariable String id) {
public ResponseDto<AdamMemberOrderPreviewVo> preview(@NotBlank(message = "会员类型ID不能为空") @PathVariable String mno,
@NotBlank(message = "会员价格ID不能为空") @PathVariable String id) {
AdamMemberVo memberVo = adamRdmService.getMemberVoByMemberId(mno);
if (null == memberVo) {
return ResponseDto.failure(ErrorMapping.get("10201"));
......@@ -183,7 +183,7 @@ public class AdamMemberOrderController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "兑换码校验", notes = "响应参数[`code`:0-当前兑换码可用,否则不可用]")
@GetMapping("check/code")
public ResponseDto<Integer> checkMemberCode(@NotBlank @RequestParam String mCode) {
public ResponseDto<Integer> checkMemberCode(@NotBlank(message = "兑换码不能为空") @RequestParam String mCode) {
AdamMemberCodeVo vo = adamRdmService.getMemberCodeVoByCode(mCode);
if (null == vo) {
return ResponseDto.failure(ErrorMapping.get("10207"));
......@@ -247,7 +247,7 @@ public class AdamMemberOrderController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "会员订单详情")
@GetMapping("info/{orderNo}")
public ResponseDto<AdamMemberOrderVo> getMemberOrderList(@NotBlank @PathVariable String orderNo) {
public ResponseDto<AdamMemberOrderVo> getMemberOrderList(@NotBlank(message = "订单号不能为空") @PathVariable String orderNo) {
AdamMemberOrderVo mOrderVo = adamRdmService.getShotMemberOrderVoByOrderNo(orderNo);
if (null != mOrderVo) {
AdamMemberVo memberVo = adamRdmService.getMemberVoByMemberId(mOrderVo.getMemberId());
......@@ -265,7 +265,7 @@ public class AdamMemberOrderController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "会员订单状态", notes = "响应参数[`data`:0-未支付|1-已支付]")
@GetMapping("check")
public ResponseDto<Integer> checkOrderResult(@NotBlank @RequestParam String orderNo) {
public ResponseDto<Integer> checkOrderResult(@NotBlank(message = "订单号不能为空") @RequestParam String orderNo) {
AdamMemberOrderVo memberOrderInfo = adamRdmService.getShotMemberOrderVoByOrderNo(orderNo);
if (null == memberOrderInfo) {
return ResponseDto.failure(ErrorMapping.get("10211"));
......
......@@ -202,11 +202,14 @@ public class AdamUserController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "idCard", value = "证件号"),
})
@PostMapping(value = {"identity"})
public ResponseDto<AdamRealInfoVo> identity(@Pattern(regexp = LnsRegex.Valid.CN_HANZI, message = "姓名必须为2~20位汉字")
@RequestParam String name,
@Pattern(regexp = LnsRegex.Valid.CN_ID_CARD_REF, message = "身份证号码不合规")
@RequestParam String idCard) {
public ResponseDto<AdamRealInfoVo> identity(@RequestParam String name, @RequestParam String idCard) {
log.debug("name:{},idCard:{}", name, idCard);
if (!java.util.regex.Pattern.matches(LnsRegex.Valid.CN_HANZI, name)) {
return ResponseDto.failure(ErrorMapping.get("10103"));
}
if (!java.util.regex.Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, idCard)) {
return ResponseDto.failure(ErrorMapping.get("10104"));
}
AdamRealInfoVo vo = adamUserService.identity(CurrentUtil.getCurrentUid(), name, idCard);
if (null == vo) {
return ResponseDto.failure(ErrorMapping.get("10000"));
......@@ -235,7 +238,7 @@ public class AdamUserController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "绑定第三方账号")
@PostMapping(value = {"tpa/bind"})
public ResponseDto<List<AdamThirdPartInfoVo>> bindTpa(@RequestBody @Valid AdamThirdPartParam parameter) {
public ResponseDto<List<AdamThirdPartInfoVo>> bindTpa(@Valid @RequestBody AdamThirdPartParam parameter) {
log.debug("login by tpa:{}", JsonUtils.toJson(parameter));
if (StringUtils.isBlank(parameter.getOpenId())) {
......
40001=非法TOKEN
40002=被踢下线喽
40003=TOKEN失效
40001=登录信息有误
40002=账号已在另一台设备登录
40003=登录已过期
# ------------------------ 4开头错误码作系统保留
10000=请求频繁,稍后再试
......@@ -27,8 +27,8 @@
10101=姓名或身份证件号无效
10102=身份证号与姓名不符
10103=
10104=
10103=已超出姓名长度限制
10104=身份证号码不合规
10105=入场人不存在
10106=收获地址不存在
......
......@@ -24,6 +24,13 @@
<artifactId>liquidnet-service-dragon-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-apache-httpclient</artifactId>
<version>0.2.2</version>
</dependency>
</dependencies>
<build>
......
......@@ -15,11 +15,4 @@ public class PayController {
@Autowired
IDragonOrdersService dragonOrdersService;
@PostMapping("pre")
@ApiOperation("发送测试redis")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> checkCanOrder() {
dragonOrdersService.sendRedisQueue();
return ResponseDto.success();
}
}
package com.liquidnet.service.dragon.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.service.IDragonOrderRefundsService;
import com.liquidnet.service.dragon.utils.PayUtils;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.ByteArrayOutputStream;
@RestController
@RequestMapping("refund")
public class RefundController {
......@@ -16,8 +25,8 @@ public class RefundController {
@Autowired
IDragonOrderRefundsService orderRefundsService;
@PostMapping("pre")
@ApiOperation("发送测试redis")
@PostMapping("preTest")
@ApiOperation("发送测试退款redis")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> checkCanOrder() {
orderRefundsService.sendRedisQueue();
......
package com.liquidnet.service.dragon.service.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.service.IDragonOrderRefundsService;
import com.liquidnet.service.dragon.utils.PayUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.stream.MapRecord;
import org.springframework.data.redis.connection.stream.StreamRecords;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.io.ByteArrayOutputStream;
import java.util.HashMap;
@Service
......@@ -17,11 +26,43 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
@Override
public void sendRedisQueue() {
// try {
// HashMap<String ,String> map = new HashMap<>();
// map.put("message","测试 redis 订阅信息1");
// MapRecord<String, String, String> record = StreamRecords.mapBacked(map).withStreamKey("dragon-refund");
// stringRedisTemplate.opsForStream().add(record);
// }catch (Exception e){
// e.printStackTrace();
// }
try {
HashMap<String ,String> map = new HashMap<>();
map.put("message","测试 redis 订阅信息1");
MapRecord<String, String, String> record = StreamRecords.mapBacked(map).withStreamKey("dragon-refund");
stringRedisTemplate.opsForStream().add(record);
PayUtils payUtils = new PayUtils();
HttpPost httpPost = new HttpPost("https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi");
httpPost.addHeader("Accept", "application/json");
httpPost.addHeader("Content-type", "application/json; charset=utf-8");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectMapper objectMapper = new ObjectMapper();
ObjectNode rootNode = objectMapper.createObjectNode();
rootNode.put("mchid", "1551961491")
.put("appid", "wx3498304dda39c5a1")
.put("description", "Image形象店-深圳腾大-QQ公仔")
.put("notify_url", "https://www.weixin.qq.com/wxpay/pay.php")
.put("out_trade_no", "1217752501201407033233368018");
rootNode.putObject("amount")
.put("total", 1);
rootNode.putObject("payer")
.put("openid", "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o");
objectMapper.writeValue(bos, rootNode);
httpPost.setEntity(new StringEntity(bos.toString("UTF-8"), "UTF-8"));
CloseableHttpResponse response = payUtils.getHttpClient().execute(httpPost);
String bodyAsString = EntityUtils.toString(response.getEntity());
System.out.println(bodyAsString);
}catch (Exception e){
e.printStackTrace();
}
......
package com.liquidnet.service.dragon.utils;
import com.wechat.pay.contrib.apache.httpclient.WechatPayHttpClientBuilder;
import com.wechat.pay.contrib.apache.httpclient.auth.AutoUpdateCertificatesVerifier;
import com.wechat.pay.contrib.apache.httpclient.auth.PrivateKeySigner;
import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Credentials;
import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Validator;
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.util.EntityUtils;
import java.security.PrivateKey;
import java.util.Objects;
public class PayUtils {
private String merchantId = "1551961491";
private String merchantSerialNumber = "6D25ECC819EAE0BCEA7DB18F143F0752431D9295";
// private static PayUtils instance = new PayUtils();
private CloseableHttpClient httpClient;
private String openId = "wx3498304dda39c5a1";
public PayUtils() {
try {
PrivateKey merchantPrivateKey = PemUtil.loadPrivateKey(
Objects.requireNonNull(PayUtils.class.getClassLoader().getResourceAsStream("wepay_apiclient_key.pem"))
);
CloseableHttpClient httpClientTemp = WechatPayHttpClientBuilder.create()
.withMerchant(merchantId, merchantSerialNumber, merchantPrivateKey)
.withValidator(response -> true) // NOTE: 设置一个空的应答签名验证器,**不要**用在业务请求
.build();
URIBuilder uriBuilder = new URIBuilder("https://api.mch.weixin.qq.com/v3/certificates");
HttpGet httpGet = new HttpGet(uriBuilder.build());
httpGet.addHeader("Accept", "application/json");
CloseableHttpResponse response = httpClientTemp.execute(httpGet);
String bodyAsString = EntityUtils.toString(response.getEntity());
AutoUpdateCertificatesVerifier verifier = new AutoUpdateCertificatesVerifier(
new WechatPay2Credentials(merchantId, new PrivateKeySigner(merchantSerialNumber, merchantPrivateKey)),
bodyAsString.getBytes("utf-8"));
WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
.withMerchant(merchantId, merchantSerialNumber, merchantPrivateKey)
.withValidator(new WechatPay2Validator(verifier));
httpClient = builder.build();
} catch (Exception e) {
e.printStackTrace();
}
}
// private static PayUtils getInstance() {
// return instance;
// }
public CloseableHttpClient getHttpClient() {
return httpClient;
}
}
-----BEGIN CERTIFICATE-----
MIID+TCCAuGgAwIBAgIUbSXsyBnq4LzqfbGPFD8HUkMdkpUwDQYJKoZIhvcNAQEL
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
Q0EwHhcNMTkwODIxMDczOTE3WhcNMjQwODE5MDczOTE3WjCBijETMBEGA1UEAwwK
MTU1MTk2MTQ5MTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTYwNAYDVQQL
DC3ljJfkuqzmraPlnKjmmKDnlLvkupLogZTnvZHnp5HmioDmnInpmZDlhazlj7gx
CzAJBgNVBAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAO+ZZzoLW7wEFuwFSHnBYpBi0QHcs4aCgIO7GaAxdztA
KDFsuUuu45GX5rla4O9QfeW9xut9jT6LlEIAPXczZ8Ne3b/xf/kOErGAuaCjHkO1
m4EOf8H/y4uu7Dwgousmf51HDvPFjpkk8QMJ1sf4CTQFIzeXFHXAuBxvt16OdQnJ
LDUz/XuuZTqWUROuPfJh8FV/PhfA3ZRKT5qa4EuGSamesR/tYH0+TYzBYkSTdCHd
PxTrhTAn4UUluWBCB1juK7cgB6Gv2lq8gTVVB/N1QNHBxJ8GKNPDiHHNBEI97KGr
nFHl4uYhtPxXB19PB9B/Io3ITiHIWmFGgnJHqa1myOcCAwEAAaOBgTB/MAkGA1Ud
EwQCMAAwCwYDVR0PBAQDAgTwMGUGA1UdHwReMFwwWqBYoFaGVGh0dHA6Ly9ldmNh
Lml0cnVzLmNvbS5jbi9wdWJsaWMvaXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0
QjA2QUQzOTc1NDk4NDZDMDFDM0U4RUJEMjANBgkqhkiG9w0BAQsFAAOCAQEAfWQf
0u9iwj/7Om0GxQZgcZ2xdzn3b2M6ftAFJA66XnOsq3OVCIYu36OEt7AVJanfHFp0
dDKijvhrWgkwxVnzuuDZ4+GHfKa3z6r+XkDoaKv/1MPa9X8HMtrFSNCBiYiRzSBQ
nJrYBt05NbVkG68nnpfHqTnE5ffRNQz0dvOGZBf9ddx52wTbkO9OMlYWlcSZWT6E
grhOVeuwmL6MX+0kpNs8BGAOQbSZXJNfdvl/L2NgwGaL3sTR7HzDegwkq6lhdgfN
WQCQP43tRm7fM69viPZjlwi/Dt3hVlq7p8vuur+n5pPRR4EhC01CzbQQ2MMZC1bi
z4iu9HJAOme5K9M2Nw==
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDvmWc6C1u8BBbs
BUh5wWKQYtEB3LOGgoCDuxmgMXc7QCgxbLlLruORl+a5WuDvUH3lvcbrfY0+i5RC
AD13M2fDXt2/8X/5DhKxgLmgox5DtZuBDn/B/8uLruw8IKLrJn+dRw7zxY6ZJPED
CdbH+Ak0BSM3lxR1wLgcb7dejnUJySw1M/17rmU6llETrj3yYfBVfz4XwN2USk+a
muBLhkmpnrEf7WB9Pk2MwWJEk3Qh3T8U64UwJ+FFJblgQgdY7iu3IAehr9pavIE1
VQfzdUDRwcSfBijTw4hxzQRCPeyhq5xR5eLmIbT8VwdfTwfQfyKNyE4hyFphRoJy
R6mtZsjnAgMBAAECggEADtI4dni5ZfoCyPrSruVtiWzzbOAQIuPzuzJZtXUZ4Qpo
8hW9qJba8OiqlxCuFV+vSgThRzPvBs1vkF2fb744TveRVAxGVEuwkFZcJTmx55JW
WjdhY8jE+JELf/Ss30r0XfBFVoMD/Skx13RGWvxW5Wbj9M5dr6MKQIgQmcLKLp6q
fvtIRueTzTKVoh/CnZKBPGRU1VhCKkCjgzI3K/PijcSuO/eWhF8Uv4yVjmdYBS1f
jqqTcGNsPlfc17XNCtH4WLbSpn+84/lX2Ss+nGqUgfwZRGJFzl0Om87cp3pgQVB+
8Za8jrQeu8ZCNZu+AnfDQrhRt+jjDw+znbHDvliKAQKBgQD6UOFTlKJyTevN7/S/
Hrqf3oP2tmB8iByoat8weHDUULu8VmXPPrunZPe/43sAydGTWU30IypWdO1pW7Yu
hx+i76CqCb0a6eY+vrZMUW15PeO3Cn2AkFtEW0e2gTTcyHJ66azORuPKkQODgZ/O
a7cxSEo5005v/xO+oz5HB+sagQKBgQD1Cjm0PzW1PlrEg//r3Iy9x5XJW8AkRHSE
+I81LnRmd18692LI8V6VkiuRxbIf9NDlsyUzZ73512l+JHVRpQjPFRhZV6O5xpOW
SnldDzNLA9pPunON09WTeRBznv86TZ6nx5iM4+dQF+irqEPFcQvHsJ4BGGI8uzAy
Oo2GgdmfZwKBgQDTHegNQC0KTuH0nM9FajtonpmaORODtKDHAuwey1YOG9Fa9VuE
wZovgp7Z/pg9f/n8VrPClu4cYR3jYHB1KY3rNEPDZddSnbeNb/f8wiicuzAVrwlO
p3HyYzJGoQ7er0iulesjRvLUZB4cifUoefzV2eyQfMGJAA+9F51s9ya5AQKBgQDW
MY0FUSeaeZoQI65mtxBTqA33yHrpeOk9fqR4AVaAZyJYQf0Y11wtdGsfbmdo5bBg
yTrgd3Op3DF7sVTX/GH52l/BYQleEAXcntb9kJbuoLyJatstg5ky4uWNm9NQXJ8t
3BwuM91ztqKMwnYTNeDtOiazoGPm4F2d2m7xv7nCSwKBgQCFFGkqgh7Z8vzlTxHM
LBD/xN39zI5pr/28p6r6V+uOhplC7j0eJ1JaiKAXSP3gP/ZnChW3DiPlkep7nHg7
p4f+GHqKmBF0UsacwMJERa2lwE+fPsuN4ILTo0Iuiy/hQJx3GduMYlw+ngAuIDPB
vmE8c9N3rQJ0bm8TM5oqiXka9A==
-----END PRIVATE KEY-----
......@@ -76,7 +76,7 @@ public class KylinOrderTicketsController {
@GetMapping("details")
@ApiOperation("订单详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<OrderDetailsVo> orderDetails(@RequestParam(value = "orderId", required = false) @NotNull(message = "订单id不能为空") String orderId) {
public ResponseDto<OrderDetailsVo> orderDetails(@RequestParam(value = "orderId", required = false) @NotNull(message = "订单ID不能为空") String orderId) {
OrderDetailsVo vo = orderTicketsService.orderDetails(orderId);
if (null == vo) {
return ResponseDto.failure(ErrorMapping.get("20003"));
......@@ -88,15 +88,15 @@ public class KylinOrderTicketsController {
@GetMapping("toOrderRefundDetails")
@ApiOperation("想要退款订单详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<KylinOrderTicketPreVo> toOrderRefundDetails(@RequestParam(value = "orderId", required = false) @NotNull(message = "订单id不能为空") String orderId) {
public ResponseDto<KylinOrderTicketPreVo> toOrderRefundDetails(@RequestParam(value = "orderId", required = false) @NotNull(message = "订单ID不能为空") String orderId) {
return orderTicketsService.toOrderRefundDetails(orderId);
}
@PostMapping("sendOrderRefunds")
@ApiOperation("发起退款申请")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<HashMap<String, String>> sendOrderRefund(@RequestParam(value = "orderId", required = true) @NotNull(message = "订单id不能为空") String orderId,
@RequestParam(value = "orderTicketEntitiesId", required = true) @NotNull(message = "票单id不能为空") String orderTicketEntitiesId,
public ResponseDto<HashMap<String, String>> sendOrderRefund(@RequestParam(value = "orderId", required = true) @NotNull(message = "订单ID不能为空") String orderId,
@RequestParam(value = "orderTicketEntitiesId", required = true) @NotNull(message = "票单ID不能为空") String orderTicketEntitiesId,
@RequestParam(value = "reason", required = true) @NotNull(message = "退款原因不能为空") String reason,
@RequestParam(value = "picList", required = false) String picList) {
String orderRefundId = orderTicketsService.sendOrderRefund(orderId, orderTicketEntitiesId, reason, picList);
......@@ -112,15 +112,15 @@ public class KylinOrderTicketsController {
@GetMapping("orderRefundDetails")
@ApiOperation("退款申请详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<OrderRefundVo> orderRefundDetails(@RequestParam(value = "orderId", required = true) @NotNull(message = "订单id不能为空") String orderId,
@RequestParam(value = "orderRefundId", required = true) @NotNull(message = "退款订单id不能为空") String orderRefundId) {
public ResponseDto<OrderRefundVo> orderRefundDetails(@RequestParam(value = "orderId", required = true) @NotNull(message = "订单ID不能为空") String orderId,
@RequestParam(value = "orderRefundId", required = true) @NotNull(message = "退款订单ID不能为空") String orderRefundId) {
return orderTicketsService.orderRefundDetails(orderId, orderRefundId);
}
@PostMapping("orderRefundWithdraw")
@ApiOperation("发起退款撤回")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<Boolean> orderRefundWithdraw(@RequestParam(value = "orderRefundId", required = true) @NotNull(message = "退款订单id不能为空") String orderRefundId) {
public ResponseDto<Boolean> orderRefundWithdraw(@RequestParam(value = "orderRefundId", required = true) @NotNull(message = "退款订单ID不能为空") String orderRefundId) {
return orderTicketsService.orderRefundWithdraw(orderRefundId);
}
......
40001=非法TOKEN
40002=被踢下线喽
40003=TOKEN失效
40001=登录信息有误
40002=账号已在另一台设备登录
40003=登录已过期
# ------------------------ 4开头错误码作系统保留
#APP ERROR
......
......@@ -76,7 +76,7 @@ public class KylinOrderTicketsController {
@GetMapping("checkPayment")
@ApiOperation("订单状态")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<HashMap> checkOrderResult(@RequestParam("orderId") @NotNull(message = "订单id不能为空") String orderId) {
public ResponseDto<HashMap> checkOrderResult(@RequestParam("orderId") @NotNull(message = "订单ID不能为空") String orderId) {
Integer status = orderTicketsOrderService.checkOrderResult(orderId).getData();
if (null == status) {
return ResponseDto.failure(ErrorMapping.get("20003"));
......
40001=非法TOKEN
40002=被踢下线喽
40003=TOKEN失效
40001=登录信息有误
40002=账号已在另一台设备登录
40003=登录已过期
# ------------------------ 4开头错误码作系统保留
#APP ERROR
......
......@@ -46,7 +46,7 @@ public class KylinCheckUserPerformancesPartnerController {
@DeleteMapping(value = "")
@ApiOperation(value = "删除关联关系", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> delPerformance(@RequestParam("performanceIds") @Size(min = 1) @NotNull List<String> performanceIds,
public ResponseDto<String> delPerformance(@RequestParam("performanceIds") @Size(min = 1) @NotNull(message = "演出ID不能为空") List<String> performanceIds,
@RequestParam("checkUserId") String checkUserId) {
return userPerformancesPartnerService.delPerformance(performanceIds, checkUserId);
}
......@@ -54,10 +54,10 @@ public class KylinCheckUserPerformancesPartnerController {
@GetMapping(value = "relation")
@ApiOperation(value = "关联演出列表", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PageInfo<ChildPerformanceDao>> childPerformanceList(@RequestParam("merchantId") @NotNull String merchantId,
@RequestParam("checkUserId") @NotNull String checkUserId,
@RequestParam("page") @NotNull @Min(1) int page,
@RequestParam("size") @NotNull @Min(1)int size,
public ResponseDto<PageInfo<ChildPerformanceDao>> childPerformanceList(@RequestParam("merchantId") @NotNull(message = "商户ID不能为空") String merchantId,
@RequestParam("checkUserId") @NotNull(message = "验票用户ID不能为空") String checkUserId,
@RequestParam("page") @NotNull(message = "页数不能为空") @Min(1) int page,
@RequestParam("size") @NotNull(message = "数量不能为空") @Min(1)int size,
@RequestParam("name") String name) {
return userPerformancesPartnerService.childPerformanceList(merchantId, checkUserId, page, size,name);
}
......@@ -65,10 +65,10 @@ public class KylinCheckUserPerformancesPartnerController {
@GetMapping(value = "unRelation")
@ApiOperation(value = "未关联演出列表", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PageInfo<ChildPerformanceDao>> unChildPerformanceList(@RequestParam("merchantId") @NotNull String merchantId,
@RequestParam("checkUserId") @NotNull String checkUserId,
@RequestParam("page") @NotNull @Min(1) int page,
@RequestParam("size") @NotNull @Min(1) int size,
public ResponseDto<PageInfo<ChildPerformanceDao>> unChildPerformanceList(@RequestParam("merchantId") @NotNull(message = "商户ID不能为空") String merchantId,
@RequestParam("checkUserId") @NotNull(message = "验票用户ID不能为空") String checkUserId,
@RequestParam("page") @NotNull(message = "页数不能为空") @Min(1) int page,
@RequestParam("size") @NotNull(message = "数量不能为空") @Min(1) int size,
@RequestParam("name") String name) {
return userPerformancesPartnerService.unChildPerformanceList(merchantId, checkUserId, page, size,name);
}
......
......@@ -42,7 +42,7 @@ public class KylinTicketTimesPartnerController {
@DeleteMapping(value = "")
@ApiOperation(value = "删除场次",position = 2)
@ApiResponse(response = KylinTicketTimesPartnerVo.class, code = 200, message = "接口返回对象参数")
public ResponseDto<String> deleteTimes(@RequestParam("ticketTimesId") @NotNull String ticketTimesId) {
public ResponseDto<String> deleteTimes(@RequestParam("ticketTimesId") @NotNull(message = "场次ID不能为空") String ticketTimesId) {
return ticketTimesPartnerService.deleteTimes(ticketTimesId);
}
......@@ -56,7 +56,7 @@ public class KylinTicketTimesPartnerController {
@GetMapping(value = "/details")
@ApiOperation(value = "获取场次详情",position = 4)
@ApiResponse(response = KylinTicketTimesPartnerVo.class, code = 200, message = "接口返回对象参数")
public ResponseDto<KylinTicketTimesPartnerVo> getTimesMongo(@RequestParam("ticketTimesId") @NotNull String ticketTimesId) {
public ResponseDto<KylinTicketTimesPartnerVo> getTimesMongo(@RequestParam("ticketTimesId") @NotNull(message = "场次ID不能为空") String ticketTimesId) {
KylinTicketTimesPartnerVo result = null;
result = ticketTimesPartnerService.getTimesMongo(ticketTimesId);
if (null == result) {
......
......@@ -49,21 +49,22 @@ public class KylinTicketsPartnerController {
@DeleteMapping(value = "")
@ApiOperation(value = "删除票务",position = 3)
@ApiResponse( code = 200, message = "接口返回对象参数")
public ResponseDto<String> deleteTicket(@RequestParam("ticketsId") @NotNull String ticketsId) {
public ResponseDto<String> deleteTicket(@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId) {
return ticketsPartnerService.deleteTicket(ticketsId);
}
@PostMapping(value = "/copy")
@ApiOperation(value = "复制票务",position = 4)
@ApiResponse(response = KylinTicketPartnerVo.class, code = 200, message = "接口返回对象参数")
public ResponseDto<KylinTicketPartnerVo> copyTicket(@RequestParam("performancesId") @NotNull String performancesId,@RequestParam("ticketsId") @NotNull String ticketsId) {
public ResponseDto<KylinTicketPartnerVo> copyTicket(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId,
@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId) {
return ticketsPartnerService.copyTicket(performancesId,ticketsId);
}
@GetMapping(value = "/details")
@ApiOperation(value = "获取票务详情",position = 5)
@ApiResponse(response = KylinTicketPartnerVo.class, code = 200, message = "接口返回对象参数")
public ResponseDto<KylinTicketPartnerVo> getTicketsMongo(@RequestParam("ticketsId") @NotNull String ticketsId) {
public ResponseDto<KylinTicketPartnerVo> getTicketsMongo(@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId) {
KylinTicketPartnerVo result = null;
result = ticketsPartnerService.getTicketsMongo(ticketsId);
if (null == result) {
......@@ -76,14 +77,16 @@ public class KylinTicketsPartnerController {
@PostMapping(value = "/onLine")
@ApiOperation(value = "票上线",position = 6)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> onLine(@RequestParam("ticketsId") @NotNull String ticketsId,@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<String> onLine(@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId,
@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return ticketsPartnerService.onLine(ticketsId,performancesId);
}
@PostMapping(value = "/outLine")
@ApiOperation(value = "票下线",position = 7)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> outLine(@RequestParam("ticketsId") @NotNull String ticketsId,@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<String> outLine(@RequestParam("ticketsId") @NotNull(message = "票务ID不能为空") String ticketsId,
@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return ticketsPartnerService.outLine(ticketsId,performancesId);
}
}
......@@ -41,7 +41,7 @@ public class PerformancePartnerController {
@PostMapping(value = "copy")
@ApiOperation(value = "复制演出",position = 6)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<Map<String, String>> copyPerformance(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<Map<String, String>> copyPerformance(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
String result = performancesPartnerService.copyPerformance(performancesId);
if (null == result) {
return ResponseDto.failure("复制失败");
......@@ -56,7 +56,7 @@ public class PerformancePartnerController {
@GetMapping(value = "step1")
@ApiOperation(value = "获取演出第一步数据",position = 3)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PerformancePartnerVo> getStep1(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<PerformancePartnerVo> getStep1(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return performancesPartnerService.getStep1(performancesId);
}
......@@ -87,35 +87,35 @@ public class PerformancePartnerController {
@GetMapping(value = "step2")
@ApiOperation(value = "获取演出第二步数据",position = 5)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PerformanceStep2Param> getStep2(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<PerformanceStep2Param> getStep2(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return performancesPartnerService.getStep2(performancesId);
}
@PostMapping(value = "online")
@ApiOperation(value = "演出上线",position = 7)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> onLinePerformance(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<String> onLinePerformance(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return performancesPartnerService.onLinePerformance(performancesId);
}
@PostMapping(value = "outline")
@ApiOperation(value = "演出下线",position = 8)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> outLinePerformance(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<String> outLinePerformance(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return performancesPartnerService.outLinePerformance(performancesId);
}
@PostMapping(value = "withdraw")
@ApiOperation(value = "演出撤回",position = 9)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<String> withdraw(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<String> withdraw(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return performancesPartnerService.withdraw(performancesId);
}
@GetMapping(value = "orderStatistical")
@ApiOperation(value = "演出订单统计",position = 9)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<List<PerformanceOrderStatisticalVo>> performanceOrderStatisticalList(@RequestParam("performancesId") @NotNull String performancesId) {
public ResponseDto<List<PerformanceOrderStatisticalVo>> performanceOrderStatisticalList(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
List<PerformanceOrderStatisticalVo> list =performancesPartnerService.getPerformanceOrderStatisticalList(performancesId);
return ResponseDto.success(list);
}
......
......@@ -41,8 +41,8 @@ public class DMEntersProcessor extends DataMigrationProcessorService {
if (null != dg) {
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "id,user_id,type,`name`,mobile,idcode,if(is_default='no', 0, 1),created_at";
// 1-id,2-user_id,3-type,4-`name`,5-mobile,6-idcode,7-if(is_default='no', 0, 1),8-created_at
String field = "id,user_id,type,`name`,mobile,idcode,if(is_default='no', 0, 1),created_at,updated_at";
// 1-id,2-user_id,3-type,4-`name`,5-mobile,6-idcode,7-if(is_default='no', 0, 1),8-created_at,9-updated_at
String sql = sqlCount.replace("count(1)", field);
boolean smFlg = "1".equals(flg);
if (smFlg) {
......@@ -88,6 +88,7 @@ public class DMEntersProcessor extends DataMigrationProcessorService {
enters.setIsDefault(row.getBoolean(7));
enters.setState(1);
enters.setCreatedAt(row.getLocalDateTime(8));
enters.setUpdatedAt(row.getLocalDateTime(9));
AdamEntersVo vo = AdamEntersVo.getNew().copy(enters);
......
40001=非法TOKEN
40002=被踢下线喽
40003=TOKEN失效
40001=登录信息有误
40002=账号已在另一台设备登录
40003=登录已过期
# ------------------------ 4开头错误码作系统保留
30000=请求频繁,稍后再试
......
40001=非法TOKEN
40002=被踢下线喽
40003=TOKEN失效
40001=登录信息有误
40002=账号已在另一台设备登录
40003=登录已过期
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment