!205 完善客户档案

Merge pull request !205 from 德仔/develop
This commit is contained in:
德仔
2021-04-15 15:35:57 +08:00
committed by Gitee
5 changed files with 77 additions and 15 deletions

View File

@ -97,4 +97,9 @@ public class SysCustomer extends BaseEntity
/** 体征数据,非持久化字段 */
private SysCustomerPhysicalSigns sign;
@Excel(name = "进粉渠道")
private Long channelId;
private String[] channels;
}

View File

@ -26,10 +26,11 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="channelId" column="channel_id" />
</resultMap>
<sql id="selectSysCustomerVo">
select id, name, phone, email, fans_time, fans_channel, address, pay_date, start_date, purchase_num, pay_total, main_dietitian, assistant_dietitian, after_dietitian, salesman, charge_person, follow_status, create_time, create_by, update_time, update_by from sys_customer
select id, name, phone, email, fans_time, fans_channel, address, pay_date, start_date, purchase_num, pay_total, main_dietitian, assistant_dietitian, after_dietitian, salesman, charge_person, follow_status, create_time, create_by, update_time, update_by, channel_id from sys_customer
</sql>
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
@ -45,6 +46,13 @@
<if test="assistantDietitian != null and assistantDietitian != ''"> and assistant_dietitian = #{assistantDietitian}</if>
<if test="assistantDietitian == 0"> and (isnull(assistant_dietitian) or assistant_dietitian=0)</if>
<if test="fansChannel != null "> and fans_channel = #{fansChannel}</if>
<if test="channelId != null "> and channel_id = #{channelId}</if>
<if test="channels != null">
and channel_id in
<foreach collection="channels" item="cn" separator="," open="(" close=")">
#{cn}
</foreach>
</if>
order by create_time desc
</select>
@ -76,6 +84,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="channelId != null">channel_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
@ -98,6 +107,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="channelId != null">#{channelId},</if>
</trim>
</insert>
@ -124,6 +134,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="channelId != null">channel_id = #{channelId},</if>
</trim>
where id = #{id}
</update>