Commit db15fcec authored by 罗林杰's avatar 罗林杰

修改bug

parent d018db35
...@@ -109,5 +109,17 @@ public class CustRecharge extends CyIdIncreEntity<CustRecharge> { ...@@ -109,5 +109,17 @@ public class CustRecharge extends CyIdIncreEntity<CustRecharge> {
*/ */
@TableField(exist = false) @TableField(exist = false)
private String store; private String store;
/**
* 客户名称
*/
@TableField(exist = false)
private String customerName;
/**
* 客户电话
*/
@TableField(exist = false)
private String customerTelephone;
} }
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
and customer_birthday &gt;= #{entity.beginTime} and customer_birthday &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and customer_birthday &lt;= #{entity.endTime} and customer_birthday &lt;= DATE_ADD(#{entity.endTime}, INTERVAL 1 DAY)
</if> </if>
<if test="entity.startTime !=null and entity.startTime != '' "> <if test="entity.startTime !=null and entity.startTime != '' ">
and cio.create_date &gt;= #{entity.startTime} and cio.create_date &gt;= #{entity.startTime}
</if> </if>
<if test="entity.finishTime !=null and entity.finishTime != '' "> <if test="entity.finishTime !=null and entity.finishTime != '' ">
and cio.create_date &lt;= #{entity.finishTime} and cio.create_date &lt;= DATE_ADD(#{entity.finishTime}, INTERVAL 1 DAY)
</if> </if>
<if test="entity.customerTelephone !=null and entity.customerTelephone != '' "> <if test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and customer_telephone like concat('%',#{entity.customerTelephone},'%') and customer_telephone like concat('%',#{entity.customerTelephone},'%')
...@@ -81,13 +81,13 @@ ...@@ -81,13 +81,13 @@
and customer_birthday &gt;= #{entity.beginTime} and customer_birthday &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and customer_birthday &lt;= #{entity.endTime} and customer_birthday &lt;= DATE_ADD(#{entity.endTime}, INTERVAL 1 DAY)
</if> </if>
<if test="entity.startTime !=null and entity.startTime != '' "> <if test="entity.startTime !=null and entity.startTime != '' ">
and cio.create_date &gt;= #{entity.startTime} and cio.create_date &gt;= #{entity.startTime}
</if> </if>
<if test="entity.finishTime !=null and entity.finishTime != '' "> <if test="entity.finishTime !=null and entity.finishTime != '' ">
and cio.create_date &lt;= #{entity.finishTime} and cio.create_date &lt;= DATE_ADD(#{entity.finishTime}, INTERVAL 1 DAY)
</if> </if>
<if test="entity.customerTelephone !=null and entity.customerTelephone != '' "> <if test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and customer_telephone like concat('%',#{entity.customerTelephone},'%') and customer_telephone like concat('%',#{entity.customerTelephone},'%')
......
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryCustRecharges" resultMap="BaseResultMap"> <select id="queryCustRecharges" resultMap="BaseResultMap">
select *,create_tb.name as create_name select *,create_tb.name as create_name,cio.customer_name as customer_name,cio.customer_telephone as customer_telephone
from cust_recharge as cre from cust_recharge as cre
left join sys_user as create_tb on cre.create_by = create_tb.business_id left join sys_user as create_tb on cre.create_by = create_tb.business_id
left join cust_info cio on cre.customer_id = cio.business_id
where 1=1 where 1=1
and cre.del_flag = '0' and cre.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
...@@ -50,17 +51,23 @@ ...@@ -50,17 +51,23 @@
and cre.create_date &gt;= #{entity.beginTime} and cre.create_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and cre.create_date &lt;= #{entity.endTime} and cre.create_date &lt;= DATE_ADD(#{entity.endTime}, INTERVAL 1 DAY)
</if> </if>
<if test="entity.customerBalance !=null and entity.customerBalance != '' "> <if test="entity.customerBalance !=null and entity.customerBalance != '' ">
and customer_balance = #{entity.customerBalance} and cre.customer_balance = #{entity.customerBalance}
</if> </if>
<if test="entity.storeId !=null and entity.storeId != '' "> <if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%') and cre.store_id like concat('%',#{entity.storeId},'%')
</if> </if>
<if test="entity.isRecharge !=null and entity.isRecharge != '' "> <if test="entity.isRecharge !=null and entity.isRecharge != '' ">
and is_recharge = #{entity.isRecharge} and is_recharge = #{entity.isRecharge}
</if> </if>
<if test="entity.customerName !=null and entity.customerName != '' ">
and cio.customer_name like concat('%',#{entity.customerName},'%')
</if>
<if test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and cio.customer_telephone like concat('%',#{entity.customerTelephone},'%')
</if>
<if test="entity.createName !=null and entity.createName != '' "> <if test="entity.createName !=null and entity.createName != '' ">
and create_tb.name like concat('%',#{entity.createName},'%') and create_tb.name like concat('%',#{entity.createName},'%')
</if> </if>
...@@ -68,9 +75,10 @@ ...@@ -68,9 +75,10 @@
</select> </select>
<select id="queryCustRechargesPaged" resultMap="BaseResultMap"> <select id="queryCustRechargesPaged" resultMap="BaseResultMap">
select *,create_tb.name as create_name select *,create_tb.name as create_name,cio.customer_name as customer_name,cio.customer_telephone as customer_telephone
from cust_recharge as cre from cust_recharge as cre
left join sys_user as create_tb on cre.create_by = create_tb.business_id left join sys_user as create_tb on cre.create_by = create_tb.business_id
left join cust_info cio on cre.customer_id = cio.business_id
where 1=1 where 1=1
and cre.del_flag = '0' and cre.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
...@@ -95,17 +103,23 @@ ...@@ -95,17 +103,23 @@
and cre.create_date &gt;= #{entity.beginTime} and cre.create_date &gt;= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and cre.create_date &lt;= #{entity.endTime} and cre.create_date &lt;= DATE_ADD(#{entity.endTime}, INTERVAL 1 DAY)
</if> </if>
<if test="entity.customerBalance !=null and entity.customerBalance != '' "> <if test="entity.customerBalance !=null and entity.customerBalance != '' ">
and customer_balance = #{entity.customerBalance} and cre.customer_balance = #{entity.customerBalance}
</if> </if>
<if test="entity.storeId !=null and entity.storeId != '' "> <if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%') and cre.store_id like concat('%',#{entity.storeId},'%')
</if> </if>
<if test="entity.isRecharge !=null and entity.isRecharge != '' "> <if test="entity.isRecharge !=null and entity.isRecharge != '' ">
and is_recharge = #{entity.isRecharge} and is_recharge = #{entity.isRecharge}
</if> </if>
<if test="entity.customerName !=null and entity.customerName != '' ">
and cio.customer_name like concat('%',#{entity.customerName},'%')
</if>
<if test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and cio.customer_telephone like concat('%',#{entity.customerTelephone},'%')
</if>
<if test="entity.createName !=null and entity.createName != '' "> <if test="entity.createName !=null and entity.createName != '' ">
and create_tb.name like concat('%',#{entity.createName},'%') and create_tb.name like concat('%',#{entity.createName},'%')
</if> </if>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
and wgp.update_date >= #{entity.beginTime} and wgp.update_date >= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and wgp.update_date &lt;= #{entity.endTime} and wgp.update_date &lt;= DATE_ADD(#{entity.endTime}, INTERVAL 1 DAY)
</if> </if>
ORDER BY wgp.business_id DESC ORDER BY wgp.business_id DESC
</select> </select>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
and wgp.update_date >= #{entity.beginTime} and wgp.update_date >= #{entity.beginTime}
</if> </if>
<if test="entity.endTime !=null and entity.endTime != '' "> <if test="entity.endTime !=null and entity.endTime != '' ">
and wgp.update_date &lt;= #{entity.endTime} and wgp.update_date &lt;= DATE_ADD(#{entity.endTime}, INTERVAL 1 DAY)
</if> </if>
ORDER BY wgp.business_id DESC ORDER BY wgp.business_id DESC
</select> </select>
......
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