| @@ -22,16 +22,15 @@ | ||||
|  | ||||
|     <select id="selectSysImportFanRecordList" parameterType="SysImportFanRecord" resultMap="SysImportFanRecordResult"> | ||||
|         <include refid="selectSysImportFanRecordVo"/> | ||||
|         <where> | ||||
|             <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> | ||||
|         </where> | ||||
|         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} | ||||
|         where id = #{id} and del_flag = 0 | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysImportFanRecord" parameterType="SysImportFanRecord" useGeneratedKeys="true" keyProperty="id"> | ||||
| @@ -73,15 +72,15 @@ | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysImportFanRecordById" parameterType="Long"> | ||||
|         delete from sys_import_fan_record where id = #{id} | ||||
|     </delete> | ||||
|     <update id="deleteSysImportFanRecordById" parameterType="Long"> | ||||
|         update sys_import_fan_record set del_flag = 1 where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysImportFanRecordByIds" parameterType="String"> | ||||
|         delete from sys_import_fan_record where id in | ||||
|     <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> | ||||
|     </delete> | ||||
|     </update> | ||||
|  | ||||
| </mapper> | ||||
| @@ -2,13 +2,13 @@ | ||||
| <!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"> | ||||
| <mapper namespace="com.stdiet.custom.mapper.SysImportFanWxAccountMapper"> | ||||
|  | ||||
|     <resultMap type="SysImportFanRecord" id="SysImportFanRecordResult"> | ||||
|     <resultMap type="SysImportFanWxAccount" id="SysImportFanWxAccountResult"> | ||||
|         <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="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"    /> | ||||
| @@ -16,30 +16,28 @@ | ||||
|         <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 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="selectSysImportFanRecordList" parameterType="SysImportFanRecord" resultMap="SysImportFanRecordResult"> | ||||
|         <include refid="selectSysImportFanRecordVo"/> | ||||
|         <where> | ||||
|             <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> | ||||
|         </where> | ||||
|     <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="selectSysImportFanRecordById" parameterType="Long" resultMap="SysImportFanRecordResult"> | ||||
|         <include refid="selectSysImportFanRecordVo"/> | ||||
|         where id = #{id} | ||||
|     <select id="selectSysImportFanWxAccountById" parameterType="Long" resultMap="SysImportFanWxAccountResult"> | ||||
|         <include refid="selectSysImportFanWxAccountVo"/> | ||||
|         where id = #{id} and del_flag = 0 | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysImportFanRecord" parameterType="SysImportFanRecord" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sys_import_fan_record | ||||
|     <insert id="insertSysImportFanWxAccount" parameterType="SysImportFanWxAccount" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sys_import_fan_wx_account | ||||
|         <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="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> | ||||
| @@ -47,9 +45,9 @@ | ||||
|             <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="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> | ||||
| @@ -58,12 +56,12 @@ | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSysImportFanRecord" parameterType="SysImportFanRecord"> | ||||
|         update sys_import_fan_record | ||||
|     <update id="updateSysImportFanWxAccount" parameterType="SysImportFanWxAccount"> | ||||
|         update sys_import_fan_wx_account | ||||
|         <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="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> | ||||
| @@ -73,15 +71,15 @@ | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysImportFanRecordById" parameterType="Long"> | ||||
|         delete from sys_import_fan_record where id = #{id} | ||||
|     </delete> | ||||
|     <update id="deleteSysImportFanWxAccountById" parameterType="Long"> | ||||
|         update sys_import_fan_wx_account set del_flag = 1 where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysImportFanRecordByIds" parameterType="String"> | ||||
|         delete from sys_import_fan_record where id in | ||||
|     <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> | ||||
|     </delete> | ||||
|     </update> | ||||
|  | ||||
| </mapper> | ||||
		Reference in New Issue
	
	Block a user