Commit 31320231 by 吕明尚

修改集点活动和活动配置表

parent de8b482a
...@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo; ...@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.system.domain.PointActivitiesConf; import share.system.domain.PointActivitiesConf;
import share.system.domain.vo.PointActivitiesConfVo;
import share.system.service.PointActivitiesConfService; import share.system.service.PointActivitiesConfService;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -32,9 +33,9 @@ public class PointActivitiesConfController extends BaseController { ...@@ -32,9 +33,9 @@ public class PointActivitiesConfController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('system:pointActivitiesConf:list')") @PreAuthorize("@ss.hasPermi('system:pointActivitiesConf:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(PointActivitiesConf pointActivitiesConf) { public TableDataInfo list(PointActivitiesConfVo pointActivitiesConf) {
startPage(); startPage();
List<PointActivitiesConf> list = pointActivitiesConfService.selectPointActivitiesConfList(pointActivitiesConf); List<PointActivitiesConfVo> list = pointActivitiesConfService.selectPointActivitiesConfList(pointActivitiesConf);
return getDataTable(list); return getDataTable(list);
} }
...@@ -44,9 +45,9 @@ public class PointActivitiesConfController extends BaseController { ...@@ -44,9 +45,9 @@ public class PointActivitiesConfController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:pointActivitiesConf:export')") @PreAuthorize("@ss.hasPermi('system:pointActivitiesConf:export')")
@Log(title = "用户集点活动配置", businessType = BusinessType.EXPORT) @Log(title = "用户集点活动配置", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, PointActivitiesConf pointActivitiesConf) { public void export(HttpServletResponse response, PointActivitiesConfVo pointActivitiesConf) {
List<PointActivitiesConf> list = pointActivitiesConfService.selectPointActivitiesConfList(pointActivitiesConf); List<PointActivitiesConfVo> list = pointActivitiesConfService.selectPointActivitiesConfList(pointActivitiesConf);
ExcelUtil<PointActivitiesConf> util = new ExcelUtil<PointActivitiesConf>(PointActivitiesConf.class); ExcelUtil<PointActivitiesConfVo> util = new ExcelUtil<PointActivitiesConfVo>(PointActivitiesConfVo.class);
util.exportExcel(response, list, "用户集点活动配置数据"); util.exportExcel(response, list, "用户集点活动配置数据");
} }
......
...@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo; ...@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.system.domain.PointActivities; import share.system.domain.PointActivities;
import share.system.domain.vo.PointActivitiesVo;
import share.system.service.PointActivitiesService; import share.system.service.PointActivitiesService;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -32,9 +33,9 @@ public class PointActivitiesController extends BaseController { ...@@ -32,9 +33,9 @@ public class PointActivitiesController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('system:pointActivities:list')") @PreAuthorize("@ss.hasPermi('system:pointActivities:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(PointActivities pointActivities) { public TableDataInfo list(PointActivitiesVo pointActivities) {
startPage(); startPage();
List<PointActivities> list = pointActivitiesService.selectPointActivitiesList(pointActivities); List<PointActivitiesVo> list = pointActivitiesService.selectPointActivitiesList(pointActivities);
return getDataTable(list); return getDataTable(list);
} }
...@@ -44,9 +45,9 @@ public class PointActivitiesController extends BaseController { ...@@ -44,9 +45,9 @@ public class PointActivitiesController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:pointActivities:export')") @PreAuthorize("@ss.hasPermi('system:pointActivities:export')")
@Log(title = "用户集点活动", businessType = BusinessType.EXPORT) @Log(title = "用户集点活动", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, PointActivities pointActivities) { public void export(HttpServletResponse response, PointActivitiesVo pointActivities) {
List<PointActivities> list = pointActivitiesService.selectPointActivitiesList(pointActivities); List<PointActivitiesVo> list = pointActivitiesService.selectPointActivitiesList(pointActivities);
ExcelUtil<PointActivities> util = new ExcelUtil<PointActivities>(PointActivities.class); ExcelUtil<PointActivitiesVo> util = new ExcelUtil<PointActivitiesVo>(PointActivitiesVo.class);
util.exportExcel(response, list, "用户集点活动数据"); util.exportExcel(response, list, "用户集点活动数据");
} }
......
...@@ -31,16 +31,22 @@ public class PointActivities extends BaseEntity { ...@@ -31,16 +31,22 @@ public class PointActivities extends BaseEntity {
/** /**
* 用户ID * 用户ID
*/ */
@Excel(name = "用户ID") // @Excel(name = "用户ID")
private Long consumerId; private Long consumerId;
/** /**
* 配置ID * 配置ID
*/ */
@Excel(name = "配置ID") // @Excel(name = "配置ID")
private Long confId; private Long confId;
/** /**
* 优惠券Id
*/
// @Excel(name = "优惠券Id")
private Long couponId;
/**
* 已累计点数 * 已累计点数
*/ */
@Excel(name = "已累计点数") @Excel(name = "已累计点数")
......
package share.system.domain.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
@Data
public class PointActivitiesConfVo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 配置名称
*/
@Excel(name = "配置名称")
private String name;
/**
* 集点所需的消费次数
*/
@Excel(name = "集点所需的消费次数")
private Long pointsRequired;
/**
* 每次消费的时间间隔(小时)
*/
@Excel(name = "每次消费的时间间隔(小时)")
private Long timeInterval;
/**
* 优惠券Id
*/
// @Excel(name = "优惠券Id")
private Long couponId;
//优惠券名称
@Excel(name = "优惠券名称")
private String couponName;
/**
* 优惠券的领取期限 (天)
*/
@Excel(name = "优惠券的领取期限 (天)")
private Long collectionDeadline;
/**
* 优惠券的使用期限 (天)
*/
@Excel(name = "优惠券的使用期限 (天)")
private Long couponDuration;
/**
* 集点活动的重置周期 (月)
*/
@Excel(name = "集点活动的重置周期 (月)")
private Long collectionResetPeriod;
/**
* 是否开启
*/
@Excel(name = "是否开启", dictType = "store_is_use_coupon")
private Long isOpen;
/**
* 是否删除(0:否,1:是)
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Long isDelete;
}
package share.system.domain.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity;
import java.util.Date;
@Data
public class PointActivitiesVo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 用户ID
*/
// @Excel(name = "用户ID")
private Long consumerId;
/**
* 配置ID
*/
// @Excel(name = "配置ID")
private Long confId;
/**
* 优惠券Id
*/
// @Excel(name = "优惠券Id")
private Long couponId;
//用户昵称
@Excel(name = "用户昵称")
private String nickName;
//用户头像
private String avatar;
//手机号
@Excel(name = "手机号")
private String phone;
//配置名称
@Excel(name = "配置名称")
private String confName;
//优惠券名称
@Excel(name = "优惠券名称")
private String couponName;
@Excel(name = "已累计点数")
private Long points;
/**
* 上次消费时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "上次消费时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date lastConsumptionTime;
/**
* 是否可领取
*/
@Excel(name = "是否可领取", dictType = "store_is_use_coupon")
private Long isReceive;
/**
* 是否已领取优惠券
*/
@Excel(name = "是否已领取", dictType = "store_is_use_coupon")
private Long couponReceived;
/**
* 优惠券领取日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "优惠券领取日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date receivedDate;
/**
* 优惠券过期日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "优惠券过期日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date couponExpirationDate;
/**
* 是否删除(0:否,1:是)
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField(select = false)
private Long isDelete;
}
...@@ -2,6 +2,7 @@ package share.system.mapper; ...@@ -2,6 +2,7 @@ package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.PointActivitiesConf; import share.system.domain.PointActivitiesConf;
import share.system.domain.vo.PointActivitiesConfVo;
import java.util.List; import java.util.List;
...@@ -26,7 +27,7 @@ public interface PointActivitiesConfMapper extends BaseMapper<PointActivitiesCon ...@@ -26,7 +27,7 @@ public interface PointActivitiesConfMapper extends BaseMapper<PointActivitiesCon
* @param pointActivitiesConf 用户集点活动配置 * @param pointActivitiesConf 用户集点活动配置
* @return 用户集点活动配置集合 * @return 用户集点活动配置集合
*/ */
public List<PointActivitiesConf> selectPointActivitiesConfList(PointActivitiesConf pointActivitiesConf); public List<PointActivitiesConfVo> selectPointActivitiesConfList(PointActivitiesConfVo pointActivitiesConf);
/** /**
* 新增用户集点活动配置 * 新增用户集点活动配置
......
...@@ -2,6 +2,7 @@ package share.system.mapper; ...@@ -2,6 +2,7 @@ package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.PointActivities; import share.system.domain.PointActivities;
import share.system.domain.vo.PointActivitiesVo;
import java.util.List; import java.util.List;
...@@ -26,7 +27,7 @@ public interface PointActivitiesMapper extends BaseMapper<PointActivities> { ...@@ -26,7 +27,7 @@ public interface PointActivitiesMapper extends BaseMapper<PointActivities> {
* @param pointActivities 用户集点活动 * @param pointActivities 用户集点活动
* @return 用户集点活动集合 * @return 用户集点活动集合
*/ */
public List<PointActivities> selectPointActivitiesList(PointActivities pointActivities); public List<PointActivitiesVo> selectPointActivitiesList(PointActivitiesVo pointActivities);
/** /**
* 新增用户集点活动 * 新增用户集点活动
......
...@@ -2,6 +2,7 @@ package share.system.service; ...@@ -2,6 +2,7 @@ package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.PointActivitiesConf; import share.system.domain.PointActivitiesConf;
import share.system.domain.vo.PointActivitiesConfVo;
import java.util.List; import java.util.List;
...@@ -26,7 +27,7 @@ public interface PointActivitiesConfService extends IService<PointActivitiesConf ...@@ -26,7 +27,7 @@ public interface PointActivitiesConfService extends IService<PointActivitiesConf
* @param pointActivitiesConf 用户集点活动配置 * @param pointActivitiesConf 用户集点活动配置
* @return 用户集点活动配置集合 * @return 用户集点活动配置集合
*/ */
public List<PointActivitiesConf> selectPointActivitiesConfList(PointActivitiesConf pointActivitiesConf); public List<PointActivitiesConfVo> selectPointActivitiesConfList(PointActivitiesConfVo pointActivitiesConf);
/** /**
* 新增用户集点活动配置 * 新增用户集点活动配置
......
...@@ -2,6 +2,7 @@ package share.system.service; ...@@ -2,6 +2,7 @@ package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.PointActivities; import share.system.domain.PointActivities;
import share.system.domain.vo.PointActivitiesVo;
import java.util.List; import java.util.List;
...@@ -26,7 +27,7 @@ public interface PointActivitiesService extends IService<PointActivities> { ...@@ -26,7 +27,7 @@ public interface PointActivitiesService extends IService<PointActivities> {
* @param pointActivities 用户集点活动 * @param pointActivities 用户集点活动
* @return 用户集点活动集合 * @return 用户集点活动集合
*/ */
public List<PointActivities> selectPointActivitiesList(PointActivities pointActivities); public List<PointActivitiesVo> selectPointActivitiesList(PointActivitiesVo pointActivities);
/** /**
* 新增用户集点活动 * 新增用户集点活动
......
...@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import share.system.domain.PointActivitiesConf; import share.system.domain.PointActivitiesConf;
import share.system.domain.vo.PointActivitiesConfVo;
import share.system.mapper.PointActivitiesConfMapper; import share.system.mapper.PointActivitiesConfMapper;
import share.system.service.PointActivitiesConfService; import share.system.service.PointActivitiesConfService;
...@@ -39,7 +40,7 @@ public class PointActivitiesConfServiceImpl extends ServiceImpl<PointActivitiesC ...@@ -39,7 +40,7 @@ public class PointActivitiesConfServiceImpl extends ServiceImpl<PointActivitiesC
* @return 用户集点活动配置 * @return 用户集点活动配置
*/ */
@Override @Override
public List<PointActivitiesConf> selectPointActivitiesConfList(PointActivitiesConf pointActivitiesConf) { public List<PointActivitiesConfVo> selectPointActivitiesConfList(PointActivitiesConfVo pointActivitiesConf) {
return pointActivitiesConfMapper.selectPointActivitiesConfList(pointActivitiesConf); return pointActivitiesConfMapper.selectPointActivitiesConfList(pointActivitiesConf);
} }
......
...@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import share.system.domain.PointActivities; import share.system.domain.PointActivities;
import share.system.domain.vo.PointActivitiesVo;
import share.system.mapper.PointActivitiesMapper; import share.system.mapper.PointActivitiesMapper;
import share.system.service.PointActivitiesService; import share.system.service.PointActivitiesService;
...@@ -39,7 +40,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe ...@@ -39,7 +40,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
* @return 用户集点活动 * @return 用户集点活动
*/ */
@Override @Override
public List<PointActivities> selectPointActivitiesList(PointActivities pointActivities) { public List<PointActivitiesVo> selectPointActivitiesList(PointActivitiesVo pointActivities) {
return pointActivitiesMapper.selectPointActivitiesList(pointActivities); return pointActivitiesMapper.selectPointActivitiesList(pointActivities);
} }
......
...@@ -4,12 +4,13 @@ ...@@ -4,12 +4,13 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.PointActivitiesConfMapper"> <mapper namespace="share.system.mapper.PointActivitiesConfMapper">
<resultMap type="PointActivitiesConf" id="PointActivitiesConfResult"> <resultMap type="PointActivitiesConfVo" id="PointActivitiesConfResult">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="name" column="name"/> <result property="name" column="name"/>
<result property="pointsRequired" column="points_required"/> <result property="pointsRequired" column="points_required"/>
<result property="timeInterval" column="time_interval"/> <result property="timeInterval" column="time_interval"/>
<result property="couponId" column="coupon_id"/> <result property="couponId" column="coupon_id"/>
<result property="couponName" column="coupon_name"/>
<result property="collectionDeadline" column="collection_deadline"/> <result property="collectionDeadline" column="collection_deadline"/>
<result property="couponDuration" column="coupon_duration"/> <result property="couponDuration" column="coupon_duration"/>
<result property="collectionResetPeriod" column="collection_reset_period"/> <result property="collectionResetPeriod" column="collection_reset_period"/>
...@@ -43,17 +44,34 @@ ...@@ -43,17 +44,34 @@
<select id="selectPointActivitiesConfList" parameterType="PointActivitiesConf" <select id="selectPointActivitiesConfList" parameterType="PointActivitiesConf"
resultMap="PointActivitiesConfResult"> resultMap="PointActivitiesConfResult">
<include refid="selectPointActivitiesConfVo"/> select p.id,
p.name,
p.points_required,
p.time_interval,
p.coupon_id,
c.name as coupon_name,
p.collection_deadline,
p.coupon_duration,
p.collection_reset_period,
p.is_open,
p.is_delete,
p.create_by,
p.create_time,
p.update_by,
p.update_time,
p. remark
from s_point_activities_conf p left join s_coupon c on p.coupon_id = c.id
<where> <where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">and p.name like concat('%', #{name}, '%')</if>
<if test="pointsRequired != null ">and points_required = #{pointsRequired}</if> <if test="couponName != null and couponName != ''">and c.name like concat('%', #{couponName}, '%')</if>
<if test="timeInterval != null ">and time_interval = #{timeInterval}</if> <if test="pointsRequired != null ">and p.points_required = #{pointsRequired}</if>
<if test="couponId != null ">and coupon_id = #{couponId}</if> <if test="timeInterval != null ">and p.time_interval = #{timeInterval}</if>
<if test="collectionDeadline != null ">and collection_deadline = #{collectionDeadline}</if> <if test="couponId != null ">and p.coupon_id = #{couponId}</if>
<if test="couponDuration != null ">and coupon_duration = #{couponDuration}</if> <if test="collectionDeadline != null ">and p.collection_deadline = #{collectionDeadline}</if>
<if test="collectionResetPeriod != null ">and collection_reset_period = #{collectionResetPeriod}</if> <if test="couponDuration != null ">and p.coupon_duration = #{couponDuration}</if>
<if test="isOpen != null ">and is_open = #{isOpen}</if> <if test="collectionResetPeriod != null ">and p.collection_reset_period = #{collectionResetPeriod}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if> <if test="isOpen != null ">and p.is_open = #{isOpen}</if>
<if test="isDelete != null ">and p.is_delete = #{isDelete}</if>
</where> </where>
</select> </select>
......
...@@ -4,10 +4,16 @@ ...@@ -4,10 +4,16 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.PointActivitiesMapper"> <mapper namespace="share.system.mapper.PointActivitiesMapper">
<resultMap type="PointActivities" id="PointActivitiesResult"> <resultMap type="PointActivitiesVo" id="PointActivitiesResult">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="consumerId" column="consumer_id"/> <result property="consumerId" column="consumer_id"/>
<result property="nickName" column="nick_name"/>
<result property="avatar" column="avatar"/>
<result property="phone" column="phone"/>
<result property="confId" column="conf_id"/> <result property="confId" column="conf_id"/>
<result property="confName" column="conf_name"/>
<result property="couponId" column="coupon_id"/>
<result property="couponName" column="coupon_name"/>
<result property="points" column="points"/> <result property="points" column="points"/>
<result property="lastConsumptionTime" column="last_consumption_time"/> <result property="lastConsumptionTime" column="last_consumption_time"/>
<result property="isReceive" column="is_receive"/> <result property="isReceive" column="is_receive"/>
...@@ -26,6 +32,7 @@ ...@@ -26,6 +32,7 @@
select id, select id,
consumer_id, consumer_id,
conf_id, conf_id,
coupon_id,
points, points,
last_consumption_time, last_consumption_time,
is_receive, is_receive,
...@@ -42,17 +49,45 @@ ...@@ -42,17 +49,45 @@
</sql> </sql>
<select id="selectPointActivitiesList" parameterType="PointActivities" resultMap="PointActivitiesResult"> <select id="selectPointActivitiesList" parameterType="PointActivities" resultMap="PointActivitiesResult">
<include refid="selectPointActivitiesVo"/> select
p.id,
p.consumer_id,
c.nick_name as 'nick_name',
c.avatar as 'avatar',
c.phone as 'phone',
p.conf_id,
c2.name as 'conf_name',
p. coupon_id,
c1.name as 'coupon_name',
p.points,
p. last_consumption_time,
p.is_receive,
p.coupon_received,
p.received_date,
p. coupon_expiration_date,
p.is_delete,
p. create_by,
p. create_time,
p. update_by,
p. update_time,
p. remark
from s_point_activities p left join s_consumer c on p.consumer_id = c.id
left join s_coupon c1 on p.coupon_id = c1.id
left join s_point_activities_conf c2 on p.conf_id = c2.id
<where> <where>
<if test="consumerId != null ">and consumer_id = #{consumerId}</if> <if test="consumerId != null ">and p.consumer_id = #{consumerId}</if>
<if test="confId != null ">and conf_id = #{confId}</if> <if test="nickName != null ">and c.nick_name like concat('%', #{nickName}, '%')</if>
<if test="points != null ">and points = #{points}</if> <if test="confName != null ">and c2.name like concat('%', #{confName}, '%')</if>
<if test="lastConsumptionTime != null ">and last_consumption_time = #{lastConsumptionTime}</if> <if test="couponName != null ">and c1.name like concat('%', #{couponName}, '%')</if>
<if test="isReceive != null ">and is_receive = #{isReceive}</if> <if test="confId != null ">and p.conf_id = #{confId}</if>
<if test="couponReceived != null ">and coupon_received = #{couponReceived}</if> <if test="couponId != null ">and p.coupon_id = #{couponId}</if>
<if test="receivedDate != null ">and received_date = #{receivedDate}</if> <if test="points != null ">and p.points = #{points}</if>
<if test="couponExpirationDate != null ">and coupon_expiration_date = #{couponExpirationDate}</if> <if test="lastConsumptionTime != null ">and p.last_consumption_time = #{lastConsumptionTime}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if> <if test="isReceive != null ">and p.is_receive = #{isReceive}</if>
<if test="couponReceived != null ">and p.coupon_received = #{couponReceived}</if>
<if test="receivedDate != null ">and p.received_date = #{receivedDate}</if>
<if test="couponExpirationDate != null ">and p.coupon_expiration_date = #{couponExpirationDate}</if>
<if test="isDelete != null ">and p.is_delete = #{isDelete}</if>
</where> </where>
</select> </select>
...@@ -66,6 +101,7 @@ ...@@ -66,6 +101,7 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="consumerId != null">consumer_id,</if> <if test="consumerId != null">consumer_id,</if>
<if test="confId != null">conf_id,</if> <if test="confId != null">conf_id,</if>
<if test="couponId != null">coupon_id,</if>
<if test="points != null">points,</if> <if test="points != null">points,</if>
<if test="lastConsumptionTime != null">last_consumption_time,</if> <if test="lastConsumptionTime != null">last_consumption_time,</if>
<if test="isReceive != null">is_receive,</if> <if test="isReceive != null">is_receive,</if>
...@@ -82,6 +118,7 @@ ...@@ -82,6 +118,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="consumerId != null">#{consumerId},</if> <if test="consumerId != null">#{consumerId},</if>
<if test="confId != null">#{confId},</if> <if test="confId != null">#{confId},</if>
<if test="couponId != null">#{couponId},</if>
<if test="points != null">#{points},</if> <if test="points != null">#{points},</if>
<if test="lastConsumptionTime != null">#{lastConsumptionTime},</if> <if test="lastConsumptionTime != null">#{lastConsumptionTime},</if>
<if test="isReceive != null">#{isReceive},</if> <if test="isReceive != null">#{isReceive},</if>
...@@ -102,6 +139,7 @@ ...@@ -102,6 +139,7 @@
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="consumerId != null">consumer_id = #{consumerId},</if> <if test="consumerId != null">consumer_id = #{consumerId},</if>
<if test="confId != null">conf_id = #{confId},</if> <if test="confId != null">conf_id = #{confId},</if>
<if test="couponId != null">coupon_id = #{couponId},</if>
<if test="points != null">points = #{points},</if> <if test="points != null">points = #{points},</if>
<if test="lastConsumptionTime != null">last_consumption_time = #{lastConsumptionTime},</if> <if test="lastConsumptionTime != null">last_consumption_time = #{lastConsumptionTime},</if>
<if test="isReceive != null">is_receive = #{isReceive},</if> <if test="isReceive != null">is_receive = #{isReceive},</if>
......
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