|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.qw.mapper.QwCompanyMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="QwCompany" id="QwCompanyResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="corpId" column="corp_id" />
|
|
@@ -28,15 +28,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="isBuy" column="is_buy" />
|
|
|
<result property="msgSecret" column="msg_secret" />
|
|
|
<result property="msgPrivateKey" column="msg_private_key" />
|
|
|
+ <result property="miniAppId" column="mini_app_id" />
|
|
|
+ <result property="companyServerNum" column="company_server_num" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectQwCompanyVo">
|
|
|
- select id, corp_id, corp_name, open_secret, open_corp_id, server_agent_id, server_book_corp_id, server_book_secret, token, encoding_aes_key, provider_secret, realm_name_url, notify_url, chat_toolbar, chat_toolbar_oauth, company_ids, status, create_time, update_time, create_by,is_buy from qw_company
|
|
|
+ select id, corp_id, corp_name, open_secret, open_corp_id, server_agent_id, server_book_corp_id, server_book_secret, token, encoding_aes_key, provider_secret, realm_name_url, notify_url, chat_toolbar, chat_toolbar_oauth, company_ids, status, create_time, update_time, create_by,is_buy,mini_app_id,company_server_num from qw_company
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectQwCompanyList" parameterType="QwCompany" resultMap="QwCompanyResult">
|
|
|
<include refid="selectQwCompanyVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="corpId != null and corpId != ''"> and corp_id = #{corpId}</if>
|
|
|
<if test="corpName != null and corpName != ''"> and corp_name like concat('%', #{corpName}, '%')</if>
|
|
|
<if test="openSecret != null and openSecret != ''"> and open_secret = #{openSecret}</if>
|
|
@@ -56,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isBuy != null "> and isBuy = #{isBuy}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectQwCompanyById" parameterType="Long" resultMap="QwCompanyResult">
|
|
|
<include refid="selectQwCompanyVo"/>
|
|
|
where id = #{id}
|
|
@@ -91,6 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="isBuy != null">is_buy,</if>
|
|
|
+ <if test="miniAppId != null">mini_app_id,</if>
|
|
|
+ <if test="companyServerNum != null">company_server_num,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="corpId != null">#{corpId},</if>
|
|
@@ -113,6 +117,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="isBuy != null">#{isBuy},</if>
|
|
|
+ <if test="miniAppId != null">#{miniAppId},</if>
|
|
|
+ <if test="companyServerNum != null">#{companyServerNum},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -139,6 +145,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="isBuy != null">is_buy = #{isBuy},</if>
|
|
|
+ <if test="miniAppId != null">mini_app_id = #{miniAppId},</if>
|
|
|
+ <if test="companyServerNum != null">company_server_num = #{companyServerNum},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
@@ -148,9 +156,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteQwCompanyByIds" parameterType="String">
|
|
|
- delete from qw_company where id in
|
|
|
+ delete from qw_company where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|