| | |
| | | <sql id="Base_Column_List"> |
| | | id, money, insertTime, companyId, name, type, totalMoney, laveMoney, startMoney, endMoney, effective, companyType |
| | | </sql> |
| | | <select id="getList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT |
| | | c.id, |
| | | c.money, |
| | | c.insertTime, |
| | | c.companyId, |
| | | c.state, |
| | | c.userId, |
| | | u.nickName, |
| | | u.phone |
| | | FROM |
| | | t_user_red_packet_record c |
| | | LEFT JOIN t_user u ON c.userId = u.id |
| | | |
| | | WHERE 1=1 |
| | | <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
| | | and (c.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="userName != null and userName !=''"> |
| | | and u.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="userPhone != null and userPhone !=''"> |
| | | and u.phone like CONCAT('%',#{userPhone},'%') |
| | | </if> |
| | | <if test="couponActivityId != null"> |
| | | and c.redPacketActivityId=#{couponActivityId} |
| | | </if> |
| | | <if test="state != null and state !=''"> |
| | | and c.state=#{state} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |