| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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.fs.company.mapper.CompanyMiniappMapper">
-
- <resultMap type="CompanyMiniapp" id="CompanyMiniappResult">
- <result property="id" column="id" />
- <result property="companyId" column="company_id" />
- <result property="appId" column="app_id" />
- <result property="type" column="type" />
- <result property="sortNum" column="sort_num" />
- <result property="createTime" column="create_time" />
- <result property="createBy" column="create_by" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <sql id="selectCompanyMiniappVo">
- select id, company_id, app_id, type, sort_num, create_time, create_by, update_by, update_time, remark from company_miniapp
- </sql>
- <select id="selectCompanyMiniappList" parameterType="CompanyMiniapp" resultMap="CompanyMiniappResult">
- <include refid="selectCompanyMiniappVo"/>
- <where>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="appId != null and appId != ''"> and app_id = #{appId}</if>
- <if test="type != null "> and type = #{type}</if>
- <if test="sortNum != null "> and sort_num = #{sortNum}</if>
- </where>
- </select>
-
- <select id="selectCompanyMiniappById" parameterType="Long" resultMap="CompanyMiniappResult">
- <include refid="selectCompanyMiniappVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertCompanyMiniapp" parameterType="CompanyMiniapp" useGeneratedKeys="true" keyProperty="id">
- insert into company_miniapp
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="companyId != null">company_id,</if>
- <if test="appId != null">app_id,</if>
- <if test="type != null">type,</if>
- <if test="sortNum != null">sort_num,</if>
- <if test="createTime != null">create_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="companyId != null">#{companyId},</if>
- <if test="appId != null">#{appId},</if>
- <if test="type != null">#{type},</if>
- <if test="sortNum != null">#{sortNum},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateCompanyMiniapp" parameterType="CompanyMiniapp">
- update company_miniapp
- <trim prefix="SET" suffixOverrides=",">
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="appId != null">app_id = #{appId},</if>
- <if test="type != null">type = #{type},</if>
- <if test="sortNum != null">sort_num = #{sortNum},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteCompanyMiniappById" parameterType="Long">
- delete from company_miniapp where id = #{id}
- </delete>
- <delete id="deleteCompanyMiniappByIds" parameterType="String">
- delete from company_miniapp where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|