|
|
@@ -0,0 +1,79 @@
|
|
|
+<?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.hisStore.mapper.FsUserCompanyPackageScrmMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsUserCompanyPackageScrm" id="FsUserCompanyPackageScrmResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
+ <result property="packageId" column="package_id" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsUserCompanyPackageScrmVo">
|
|
|
+ select id, company_id, company_user_id, package_id, user_id, create_time, update_time from fs_user_company_package_scrm
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsUserCompanyPackageScrmList" parameterType="FsUserCompanyPackageScrm" resultMap="FsUserCompanyPackageScrmResult">
|
|
|
+ <include refid="selectFsUserCompanyPackageScrmVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="packageId != null "> and package_id = #{packageId}</if>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsUserCompanyPackageScrmById" parameterType="Long" resultMap="FsUserCompanyPackageScrmResult">
|
|
|
+ <include refid="selectFsUserCompanyPackageScrmVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsUserCompanyPackageScrm" parameterType="FsUserCompanyPackageScrm" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_user_company_package_scrm
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
+ <if test="packageId != null">package_id,</if>
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
+ <if test="packageId != null">#{packageId},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsUserCompanyPackageScrm" parameterType="FsUserCompanyPackageScrm">
|
|
|
+ update fs_user_company_package_scrm
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
+ <if test="packageId != null">package_id = #{packageId},</if>
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserCompanyPackageScrmById" parameterType="Long">
|
|
|
+ delete from fs_user_company_package_scrm where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserCompanyPackageScrmByIds" parameterType="String">
|
|
|
+ delete from fs_user_company_package_scrm where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|