Merge branch 'master' of gitee.com:darlk/ShengTangManage into develop

This commit is contained in:
huangdeliang
2021-05-18 14:03:40 +08:00
29 changed files with 1043 additions and 24 deletions

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.stdiet.custom.mapper.SysImportFanRecordMapper">
<resultMap type="SysImportFanRecord" id="SysImportFanRecordResult">
<result property="id" column="id" />
<result property="importFanDate" column="import_fan_date" />
<result property="importFanChannel" column="import_fan_channel" />
<result property="importFanLive" column="import_fan_live" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSysImportFanRecordVo">
select id, import_fan_date, import_fan_channel, import_fan_live, create_time, create_by, update_time, update_by, del_flag from sys_import_fan_record
</sql>
<select id="selectSysImportFanRecordList" parameterType="SysImportFanRecord" resultMap="SysImportFanRecordResult">
<include refid="selectSysImportFanRecordVo"/>
where del_flag = 0
<if test="importFanDate != null "> and import_fan_date = #{importFanDate}</if>
<if test="importFanChannel != null "> and import_fan_channel = #{importFanChannel}</if>
<if test="importFanLive != null "> and import_fan_live = #{importFanLive}</if>
</select>
<select id="selectSysImportFanRecordById" parameterType="Long" resultMap="SysImportFanRecordResult">
<include refid="selectSysImportFanRecordVo"/>
where id = #{id} and del_flag = 0
</select>
<insert id="insertSysImportFanRecord" parameterType="SysImportFanRecord" useGeneratedKeys="true" keyProperty="id">
insert into sys_import_fan_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="importFanDate != null">import_fan_date,</if>
<if test="importFanChannel != null">import_fan_channel,</if>
<if test="importFanLive != null">import_fan_live,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="importFanDate != null">#{importFanDate},</if>
<if test="importFanChannel != null">#{importFanChannel},</if>
<if test="importFanLive != null">#{importFanLive},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSysImportFanRecord" parameterType="SysImportFanRecord">
update sys_import_fan_record
<trim prefix="SET" suffixOverrides=",">
<if test="importFanDate != null">import_fan_date = #{importFanDate},</if>
<if test="importFanChannel != null">import_fan_channel = #{importFanChannel},</if>
<if test="importFanLive != null">import_fan_live = #{importFanLive},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<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="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSysImportFanRecordById" parameterType="Long">
update sys_import_fan_record set del_flag = 1 where id = #{id}
</update>
<update id="deleteSysImportFanRecordByIds" parameterType="String">
update sys_import_fan_record set del_flag = 1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.stdiet.custom.mapper.SysImportFanWxAccountMapper">
<resultMap type="SysImportFanWxAccount" id="SysImportFanWxAccountResult">
<result property="id" column="id" />
<result property="importFanRecordId" column="import_fan_record_id" />
<result property="importWxAccountId" column="import_wx_account_id" />
<result property="importFanNum" column="import_fan_num" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSysImportFanWxAccountVo">
select id, import_fan_record_id, import_wx_account_id, import_fan_num, create_time, create_by, update_time, update_by, del_flag from sys_import_fan_wx_account
</sql>
<select id="selectSysImportFanWxAccountList" parameterType="SysImportFanWxAccount" resultMap="SysImportFanWxAccountResult">
<include refid="selectSysImportFanWxAccountVo"/> where del_flag = 0
<if test="importFanRecordId != null "> and import_fan_record_id = #{importFanRecordId}</if>
<if test="importWxAccountId != null "> and import_wx_account_id = #{importWxAccountId}</if>
<if test="importFanNum != null "> and import_fan_num = #{importFanNum}</if>
</select>
<select id="selectSysImportFanWxAccountById" parameterType="Long" resultMap="SysImportFanWxAccountResult">
<include refid="selectSysImportFanWxAccountVo"/>
where id = #{id} and del_flag = 0
</select>
<insert id="insertSysImportFanWxAccount" parameterType="SysImportFanWxAccount" useGeneratedKeys="true" keyProperty="id">
insert into sys_import_fan_wx_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="importFanRecordId != null">import_fan_record_id,</if>
<if test="importWxAccountId != null">import_wx_account_id,</if>
<if test="importFanNum != null">import_fan_num,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="importFanRecordId != null">#{importFanRecordId},</if>
<if test="importWxAccountId != null">#{importWxAccountId},</if>
<if test="importFanNum != null">#{importFanNum},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSysImportFanWxAccount" parameterType="SysImportFanWxAccount">
update sys_import_fan_wx_account
<trim prefix="SET" suffixOverrides=",">
<if test="importFanRecordId != null">import_fan_record_id = #{importFanRecordId},</if>
<if test="importWxAccountId != null">import_wx_account_id = #{importWxAccountId},</if>
<if test="importFanNum != null">import_fan_num = #{importFanNum},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<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="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSysImportFanWxAccountById" parameterType="Long">
update sys_import_fan_wx_account set del_flag = 1 where id = #{id}
</update>
<update id="deleteSysImportFanWxAccountByIds" parameterType="String">
update sys_import_fan_wx_account set del_flag = 1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@ -28,7 +28,7 @@
<result property="fanChannelName" column="fan_channel_name"></result>
<!-- 根据渠道查询对应微信号(微信账号分配表中) -->
<association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/>
<!--<association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/>-->
</resultMap>
<resultMap type="SysLiveSchedul" id="SysLiveSchedulResultSigle">
@ -60,7 +60,7 @@
su_operator.nick_name as live_operator_name,fc.dict_label as fan_channel_name
from sys_live_schedul slc
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sys_live_type') AS slt ON slt.dict_value = slc.live_room
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS fc ON fc.dict_value = slc.fan_channel
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS fc ON fc.dict_value = slc.fan_channel
left join sys_user su_nutritionist on su_nutritionist.user_id = slc.live_nutritionist_id and su_nutritionist.del_flag = 0
left join sys_user su_plan on su_plan.user_id = slc.live_planner_id and su_plan.del_flag = 0
left join sys_user su_operator on su_operator.user_id = slc.live_operator_id and su_operator.del_flag = 0
@ -193,4 +193,22 @@
from sys_live_schedul
where id <![CDATA[ < ]]> #{id} and del_flag = 0 and live_room = #{liveRoom} order by live_start_time desc limit 1
</select>
<!-- 根据时间查询所有直播计划 -->
<select id="getAllLiveSchedulByDate" parameterType="SysLiveSchedul" resultMap="SysLiveSchedulResultSigle">
select
<include refid="selectSysLiveSchedulVo"/>
from sys_live_schedul where del_flag = 0 and live_schedul_date = #{liveSchedulDate}
order by live_start_time asc
</select>
<!-- 查最后一次直播计划 -->
<select id="getLastLiveSchedul" resultMap="SysLiveSchedulResultSigle">
select
<include refid="selectSysLiveSchedulVo"/>
from sys_live_schedul
where del_flag = 0 order by live_schedul_date desc limit 1
</select>
</mapper>

View File

@ -48,6 +48,7 @@
<result property="mainOrderId" column="main_order_id"/>
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
<result property="commissStartTime" column="commiss_start_time"/>
<result property="recipesPlanContinue" column="recipes_plan_continue" />
<result property="delFlag" column="del_flag"/>
<result property="counted" column="counted"/>
@ -393,6 +394,7 @@
<result property="mainOrderId" column="main_order_id"/>
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
<result property="commissStartTime" column="commiss_start_time"/>
<result property="recipesPlanContinue" column="recipes_plan_continue" />
<result property="delFlag" column="del_flag"/>
<!-- 非持久化字段 -->

View File

@ -234,7 +234,7 @@
<!-- 根据cusId查询食谱计划-->
<select id="selectPlanListByCusId" parameterType="Long" resultMap="SysRecipesPlanResult">
<include refid="selectSysRecipesPlanVo"/>
where cus_id=#{cusId} and del_flag = 0 order by id asc
where cus_id=#{cusId} and del_flag = 0 order by start_date asc
</select>
<select id="getCusIdByOutId" parameterType="String" resultType="Long">