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

修改bug

parent d018db35
......@@ -109,5 +109,17 @@ public class CustRecharge extends CyIdIncreEntity<CustRecharge> {
*/
@TableField(exist = false)
private String store;
/**
* 客户名称
*/
@TableField(exist = false)
private String customerName;
/**
* 客户电话
*/
@TableField(exist = false)
private String customerTelephone;
}
......@@ -39,13 +39,13 @@
and customer_birthday &gt;= #{entity.beginTime}
</if>
<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 test="entity.startTime !=null and entity.startTime != '' ">
and cio.create_date &gt;= #{entity.startTime}
</if>
<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 test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and customer_telephone like concat('%',#{entity.customerTelephone},'%')
......@@ -81,13 +81,13 @@
and customer_birthday &gt;= #{entity.beginTime}
</if>
<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 test="entity.startTime !=null and entity.startTime != '' ">
and cio.create_date &gt;= #{entity.startTime}
</if>
<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 test="entity.customerTelephone !=null and entity.customerTelephone != '' ">
and customer_telephone like concat('%',#{entity.customerTelephone},'%')
......
......@@ -23,9 +23,10 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<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
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
and cre.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
......@@ -50,17 +51,23 @@
and cre.create_date &gt;= #{entity.beginTime}
</if>
<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 test="entity.customerBalance !=null and entity.customerBalance != '' ">
and customer_balance = #{entity.customerBalance}
and cre.customer_balance = #{entity.customerBalance}
</if>
<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 test="entity.isRecharge !=null and entity.isRecharge != '' ">
and is_recharge = #{entity.isRecharge}
</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 != '' ">
and create_tb.name like concat('%',#{entity.createName},'%')
</if>
......@@ -68,9 +75,10 @@
</select>
<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
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
and cre.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
......@@ -95,17 +103,23 @@
and cre.create_date &gt;= #{entity.beginTime}
</if>
<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 test="entity.customerBalance !=null and entity.customerBalance != '' ">
and customer_balance = #{entity.customerBalance}
and cre.customer_balance = #{entity.customerBalance}
</if>
<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 test="entity.isRecharge !=null and entity.isRecharge != '' ">
and is_recharge = #{entity.isRecharge}
</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 != '' ">
and create_tb.name like concat('%',#{entity.createName},'%')
</if>
......
......@@ -42,7 +42,7 @@
and wgp.update_date >= #{entity.beginTime}
</if>
<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>
ORDER BY wgp.business_id DESC
</select>
......@@ -72,7 +72,7 @@
and wgp.update_date >= #{entity.beginTime}
</if>
<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>
ORDER BY wgp.business_id DESC
</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