Commit 5a95d87d authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'dev' into test

parents e5c84ce7 1cfbe91a
...@@ -295,17 +295,33 @@ public interface CouponMapper extends BaseMapperX<CouponDO> { ...@@ -295,17 +295,33 @@ public interface CouponMapper extends BaseMapperX<CouponDO> {
@ResultType(CouponDO.class) @ResultType(CouponDO.class)
@Select({ @Select({
"<script>", "<script>",
"select c.*, ", "select c.*, ",
"c.coupon_id,", "c.coupon_id,",
"cr.nickname as creator_name, ", "cr.nickname as creator_name, ",
"up.nickname as updater_name", "up.nickname as updater_name",
"from ecw_coupon c ", "from ecw_coupon c ",
"left join system_user cr on cr.id = c.creator ", "left join system_user cr on cr.id = c.creator ",
"left join system_user up on up.id = c.updater ", "left join system_user up on up.id = c.updater ",
"where c.deleted = 0", "where c.deleted = 0",
"<when test = 'reqVO.status != null'>", "<when test = 'reqVO.status != null'>",
"AND c.status = #{reqVO.status}", "AND c.status = #{reqVO.status}",
"</when>", "</when>",
"<when test=\"reqVO.statusList != null and reqVO.statusList.size()>0\">" +
" <when test=\"reqVO.statusList != null and reqVO.statusList.size()==1 \">" +
" AND c.`status` =\n" +
" <foreach item='statusId' index='index' collection='reqVO.statusList' >\n" +
" #{statusId}" +
" </foreach>" +
" </when>" +
" <when test=\"reqVO.types != null and reqVO.statusList.size()>1 \">" +
" AND c.`status` in " +
" <foreach item='statusId' index='index' collection='reqVO.statusList' open='(' separator=',' close=')'>" +
" #{statusId}" +
" </foreach>" +
" </when>" +
"</when>",
"<when test = 'reqVO.overdueStatus != null'>", "<when test = 'reqVO.overdueStatus != null'>",
"AND c.overdue_status = #{reqVO.overdueStatus}", "AND c.overdue_status = #{reqVO.overdueStatus}",
"</when>", "</when>",
...@@ -315,24 +331,56 @@ public interface CouponMapper extends BaseMapperX<CouponDO> { ...@@ -315,24 +331,56 @@ public interface CouponMapper extends BaseMapperX<CouponDO> {
"<when test = 'reqVO.type != null'>", "<when test = 'reqVO.type != null'>",
"AND c.type = #{reqVO.type}", "AND c.type = #{reqVO.type}",
"</when>", "</when>",
"<when test = 'reqVO.validDays != null'>",
"AND c.valid_days = #{reqVO.validDays}",
"</when>",
"<when test=\"reqVO.types != null and reqVO.types.size()>0\">" +
" <when test=\"reqVO.types != null and reqVO.types.size()==1 \">" +
" AND c.`type` =\n" +
" <foreach item='typeId' index='index' collection='reqVO.types' >\n" +
" #{typeId}" +
" </foreach>" +
" </when>" +
" <when test=\"reqVO.types != null and reqVO.types.size()>1 \">" +
" AND c.`type` in " +
" <foreach item='typeId' index='index' collection='reqVO.types' open='(' separator=',' close=')'>" +
" #{typeId}" +
" </foreach>" +
" </when>" +
"</when>",
"<when test = 'reqVO.costType != null'>", "<when test = 'reqVO.costType != null'>",
"AND c.cost_type = #{reqVO.costType}", "AND c.cost_type = #{reqVO.costType}",
"</when>", "</when>",
"<when test = 'reqVO.searchKey != null and reqVO.searchKey != \"\"'>", "<when test = 'reqVO.searchKey != null and reqVO.searchKey != \"\"'>",
"and (c.title_zh like CONCAT('%',#{reqVO.searchKey},'%') or c.title_en like CONCAT('%',#{reqVO.searchKey},'%'))", "and (c.title_zh like CONCAT('%',#{reqVO.searchKey},'%') or c.title_en like CONCAT('%',#{reqVO.searchKey},'%'))",
"</when>", "</when>",
"<when test = 'reqVO.titleZh != null and reqVO.titleZh != \"\"'>", "<when test = 'reqVO.titleZh != null and reqVO.titleZh != \"\"'>",
"and c.title_zh like CONCAT('%',#{reqVO.titleZh},'%')", "and c.title_zh like CONCAT('%',#{reqVO.titleZh},'%')",
"</when>", "</when>",
"<when test = 'reqVO.titleEn != null and reqVO.titleEn != \"\"'>", "<when test = 'reqVO.titleEn != null and reqVO.titleEn != \"\"'>",
"and c.title_en like CONCAT('%',#{reqVO.titleEn},'%')", "and c.title_en like CONCAT('%',#{reqVO.titleEn},'%')",
"</when>", "</when>",
"<when test = 'reqVO.beginStartTime != null and reqVO.endStartTime != null'>", "<when test = 'reqVO.beginStartTime != null and reqVO.endStartTime != null'>",
"AND c.start_time between #{reqVO.beginStartTime} and #{reqVO.endStartTime} ", "AND c.start_time between #{reqVO.beginStartTime} and #{reqVO.endStartTime} ",
"</when>", "</when>",
"<when test = 'reqVO.beginEndTime != null and reqVO.endEndTime != null'>", "<when test = 'reqVO.beginEndTime != null and reqVO.endEndTime != null'>",
"AND DATE_FORMAT(c.end_time,'%Y-%m-%d 23:59:59') between #{reqVO.beginEndTime} and #{reqVO.endEndTime} ", "AND DATE_FORMAT(c.end_time,'%Y-%m-%d 23:59:59') between #{reqVO.beginEndTime} and #{reqVO.endEndTime} ",
"</when>",
" <when test='reqVO.beginCreateTime != null' >",
"AND <![CDATA[ c.create_time >= #{reqVO.beginCreateTime} ]]> ",
"</when>",
" <when test='reqVO.endCreateTime != null' >",
"AND <![CDATA[ c.create_time <= #{reqVO.endCreateTime} ]]> ",
"</when>", "</when>",
"<when test=\"reqVO.creator != null and reqVO.creator != '' \">" +
"AND cr.`nickname` like concat('%',concat(#{reqVO.creator},'%'))",
"</when>",
" order by c.coupon_id desc", " order by c.coupon_id desc",
"</script>" "</script>"
}) })
......
...@@ -196,19 +196,19 @@ public interface ProductMapper extends BaseMapperX<ProductDO> { ...@@ -196,19 +196,19 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
"</when>", "</when>",
"<when test=\"query.titleZhKey != null and query.titleZhKey != '' \">" + "<when test=\"query.titleZhKey != null and query.titleZhKey != '' \">" +
"AND c.`title_zh` like concat('%',concat(#{query.titleZhKey},'%'))", "AND t.`title_zh` like concat('%',concat(#{query.titleZhKey},'%'))",
"</when>", "</when>",
"<when test=\"query.notTitleZhKey != null and query.notTitleZhKey != '' \">" + "<when test=\"query.notTitleZhKey != null and query.notTitleZhKey != '' \">" +
"AND c.`title_zh` not like concat('%',concat(#{query.notTitleZhKey},'%'))", "AND t.`title_zh` not like concat('%',concat(#{query.notTitleZhKey},'%'))",
"</when>", "</when>",
"<when test=\"query.eqTitleZhKey != null and query.eqTitleZhKey != '' \">" + "<when test=\"query.eqTitleZhKey != null and query.eqTitleZhKey != '' \">" +
"AND c.`title_zh` = #{query.eqTitleZhKey} ", "AND t.`title_zh` = #{query.eqTitleZhKey} ",
"</when>", "</when>",
"<when test=\"query.notEqTitleZhKey != null and query.notEqTitleZhKey != '' \">" + "<when test=\"query.notEqTitleZhKey != null and query.notEqTitleZhKey != '' \">" +
"AND c.`title_zh` != #{query.notEqTitleZhKey} ", "AND t.`title_zh` != #{query.notEqTitleZhKey} ",
"</when>", "</when>",
"order by t.id desc", "order by t.id desc",
......
...@@ -26,6 +26,9 @@ public class CouponPageReqVO extends PageParam { ...@@ -26,6 +26,9 @@ public class CouponPageReqVO extends PageParam {
@ApiModelProperty(value = "类型 1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价") @ApiModelProperty(value = "类型 1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价")
private Integer type; private Integer type;
@ApiModelProperty(value = "类型ids")
private List<Integer> types;
@ApiModelProperty(value = "使用条件(优惠卷专用)") @ApiModelProperty(value = "使用条件(优惠卷专用)")
private BigDecimal cashCondition; private BigDecimal cashCondition;
...@@ -115,6 +118,9 @@ public class CouponPageReqVO extends PageParam { ...@@ -115,6 +118,9 @@ public class CouponPageReqVO extends PageParam {
@ApiModelProperty(value = "优惠券状态(0:草稿 1:发布)") @ApiModelProperty(value = "优惠券状态(0:草稿 1:发布)")
private Integer status; private Integer status;
@ApiModelProperty(value = "优惠券状态ids")
private List<Integer> statusList;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间") @ApiModelProperty(value = "开始创建时间")
private Date beginCreateTime; private Date beginCreateTime;
...@@ -123,6 +129,9 @@ public class CouponPageReqVO extends PageParam { ...@@ -123,6 +129,9 @@ public class CouponPageReqVO extends PageParam {
@ApiModelProperty(value = "结束创建时间") @ApiModelProperty(value = "结束创建时间")
private Date endCreateTime; private Date endCreateTime;
@ApiModelProperty(value = "创建人")
private String creator;
@ApiModelProperty(value = "关键字") @ApiModelProperty(value = "关键字")
private String searchKey; private String searchKey;
......
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