<?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.gic.haoban.manage.service.dao.mapper.chat.GroupChatInitMapper">
	<resultMap type="com.gic.haoban.manage.service.entity.chat.TabGroupChatInit"
		id="result-map-tabHaobanGroupChatInit">
		<result column="wx_enterprise_id" property="wxEnterpriseId" />
		<result column="status_flag" property="statusFlag" />
	</resultMap>
	<sql id="Base_Column_List">
		wx_enterprise_id,
		status_flag
	</sql>

	<!-- ==================更新 ========== -->
	<update id="update">
  <![CDATA[
  UPDATE tab_haoban_group_chat_init SET
	  status_flag=#{statusFlag}
  where wx_enterprise_id = #{wxEnterpriseId}
  ]]>
	</update>

	<!-- ============ 查询============= -->
	<select id="selectById" resultMap="result-map-tabHaobanGroupChatInit">
		SELECT
		<include refid="Base_Column_List" />
		FROM tab_haoban_group_chat_init WHERE wx_enterprise_id =
		#{wxEnterpriseId}
	</select>

	<select id="listAllInit" resultMap="result-map-tabHaobanGroupChatInit">
		select
		<include refid="Base_Column_List" />
		from tab_haoban_group_chat_init where status_flag = 1
	</select>
</mapper> 