Commit b6c1dac2 by 徐高华

好办

parent 92c5d7ac
package com.gic.haoban.manage.service.dao.mapper.hm;
import java.util.List;
import com.gic.haoban.manage.service.entity.hm.TabHmLink;
/**
*
* @ClassName: TabHaobanHmLinkMapper
* @Description: TODO
* @Author 徐高华
* @Date 2022年07月01日 14:07:23
* @Modify
* @CopyRight
*/
public interface HmLinkMapper {
/**
* 新增
* @Title: insert
* @Description: TODO
* @Param @param TabHaobanHmLink
*/
public int insert(TabHmLink link);
/**
* 更新
* @Title: update
* @Description: TODO
* @Param @param TabHaobanHmLink
* @Throws
*/
public int updateByPrimaryKey(TabHmLink tabHaobanHmLink);
/**
* 通过主键查询
* @Title: selectById
* @Description: TODO
* @Param @param id
* @Param @return
* @Return TabHaobanHmLink
* @Throws
*/
public TabHmLink selectByPrimaryKey(Long linkId);
/**
* 通过条件查询
* @Title: listAll
* @Description: TODO
* @Param @param TabHaobanHmLink
* @Param @return
* @Return List
* @Throws
*/
public List<TabHmLink> listAll(TabHmLink tabHaobanHmLink);
}
\ No newline at end of file
package com.gic.haoban.manage.service.entity.hm;
import java.io.Serializable;
/**
*
* @ClassName: TabHaobanHmLink
* @Description: TODO
* @Author 徐高华
* @Date 2022年07月01日 14:07:23
* @Modify
* @CopyRight
*/
public class TabHmLink implements Serializable {
private static final long serialVersionUID = 1967119533845800L;
private Long linkId;
private String linkCode;
/**1通用链接 2专用链接*/
private Integer linkType;
private String wxEnterpriseId;
private String enterpriseId;
private String name;
private String remark;
private String welcomeId;
private Long pageId;
private String creatorId;
private String creatorName;
private String modifierId;
private String modifierName;
private java.util.Date createTime;
private java.util.Date updateTime;
/**会员门店规则*/
private String storeRuleJson;
/**推荐门店规则*/
private String customRuleJson;
/**会员活动标签*/
private String memberLabelId;
/**0删除 1正常*/
private Integer statusFlag;
public void setLinkId(Long linkId) {
this.linkId = linkId;
}
public Long getLinkId() {
return linkId;
}
public void setLinkCode(String linkCode) {
this.linkCode = linkCode;
}
public String getLinkCode() {
return linkCode;
}
public void setLinkType(Integer linkType) {
this.linkType = linkType;
}
public Integer getLinkType() {
return linkType;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getRemark() {
return remark;
}
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
public String getWelcomeId() {
return welcomeId;
}
public void setPageId(Long pageId) {
this.pageId = pageId;
}
public Long getPageId() {
return pageId;
}
public void setCreatorId(String creatorId) {
this.creatorId = creatorId;
}
public String getCreatorId() {
return creatorId;
}
public void setCreatorName(String creatorName) {
this.creatorName = creatorName;
}
public String getCreatorName() {
return creatorName;
}
public void setModifierId(String modifierId) {
this.modifierId = modifierId;
}
public String getModifierId() {
return modifierId;
}
public void setModifierName(String modifierName) {
this.modifierName = modifierName;
}
public String getModifierName() {
return modifierName;
}
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
public java.util.Date getCreateTime() {
return createTime;
}
public void setUpdateTime(java.util.Date updateTime) {
this.updateTime = updateTime;
}
public java.util.Date getUpdateTime() {
return updateTime;
}
public void setStoreRuleJson(String storeRuleJson) {
this.storeRuleJson = storeRuleJson;
}
public String getStoreRuleJson() {
return storeRuleJson;
}
public void setCustomRuleJson(String customRuleJson) {
this.customRuleJson = customRuleJson;
}
public String getCustomRuleJson() {
return customRuleJson;
}
public void setMemberLabelId(String memberLabelId) {
this.memberLabelId = memberLabelId;
}
public String getMemberLabelId() {
return memberLabelId;
}
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
public Integer getStatusFlag() {
return statusFlag;
}
}
\ No newline at end of file
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<bean class="com.gic.haoban.common.init.HaobanSqlSessionFactoryBean" id="sqlSessionFactory"> <bean class="com.gic.haoban.common.init.HaobanSqlSessionFactoryBean" id="sqlSessionFactory">
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
<property name="typeAliasesPackage" value="com.gic.haoban.**.entity,com.gic.haoban.*.entity" /> <property name="typeAliasesPackage" value="com.gic.haoban.**.entity,com.gic.haoban.*.entity" />
<property name="mapperLocations" value="classpath*:mapper/*.xml" /> <property name="mapperLocations" value="classpath*:mapper/**/*.xml" />
<property name="plugins"> <property name="plugins">
<array> <array>
<bean class="com.github.pagehelper.PageHelper"> <bean class="com.github.pagehelper.PageHelper">
......
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!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.ExternalUseridLogMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.ExternalUseridLogMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabExternalUseridLog"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabExternalUseridLog">
<result column="id" property="id"/> <result column="id" property="id"/>
<result column="old_external_user_id" property="oldExternalUserId"/> <result column="old_external_user_id" property="oldExternalUserId"/>
<result column="new_external_user_id" property="newExternalUserId"/> <result column="new_external_user_id" property="newExternalUserId"/>
<result column="wx_enterprise_id" property="wxEnterpriseId"/> <result column="wx_enterprise_id" property="wxEnterpriseId"/>
<result column="status_flag" property="statusFlag"/> <result column="status_flag" property="statusFlag"/>
<result column="creator_id" property="creatorId"/> <result column="creator_id" property="creatorId"/>
<result column="creator_name" property="creatorName"/> <result column="creator_name" property="creatorName"/>
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/> <result column="update_time" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
old_external_user_id, old_external_user_id,
new_external_user_id, new_external_user_id,
wx_enterprise_id, wx_enterprise_id,
status_flag, status_flag,
creator_id, creator_id,
creator_name, creator_name,
create_time, create_time,
update_time update_time
</sql> </sql>
<insert id="insertBatch"> <insert id="insertBatch">
insert into tab_external_userid_log (id, insert into tab_external_userid_log (id,
old_external_user_id, old_external_user_id,
new_external_user_id, new_external_user_id,
wx_enterprise_id, wx_enterprise_id,
status_flag, status_flag,
creator_id, creator_id,
creator_name, creator_name,
create_time, create_time,
update_time) update_time)
values values
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
(#{item.id}, #{item.oldExternalUserId},#{item.newExternalUserId}, #{item.wxEnterpriseId}, 1, #{item.creatorId}, (#{item.id}, #{item.oldExternalUserId},#{item.newExternalUserId}, #{item.wxEnterpriseId}, 1, #{item.creatorId},
#{item.creatorName},now(),now()) #{item.creatorName},now(),now())
</foreach> </foreach>
</insert> </insert>
<update id="update" parameterType="com.gic.haoban.manage.service.entity.TabExternalUseridLog"> <update id="update" parameterType="com.gic.haoban.manage.service.entity.TabExternalUseridLog">
UPDATE tab_external_userid_log UPDATE tab_external_userid_log
<set> <set>
<if test="null != oldExternalUserId and '' != oldExternalUserId"> <if test="null != oldExternalUserId and '' != oldExternalUserId">
old_external_user_id = #{oldExternalUserId}, old_external_user_id = #{oldExternalUserId},
</if> </if>
<if test="null != newExternalUserId and '' != newExternalUserId"> <if test="null != newExternalUserId and '' != newExternalUserId">
new_external_user_id = #{newExternalUserId}, new_external_user_id = #{newExternalUserId},
</if> </if>
<if test="null != wxEnterpriseId and '' != wxEnterpriseId"> <if test="null != wxEnterpriseId and '' != wxEnterpriseId">
wx_enterprise_id = #{wxEnterpriseId}, wx_enterprise_id = #{wxEnterpriseId},
</if> </if>
<if test="null != statusFlag "> <if test="null != statusFlag ">
status_flag = #{statusFlag}, status_flag = #{statusFlag},
</if> </if>
<if test="null != creatorId and '' != creatorId"> <if test="null != creatorId and '' != creatorId">
creator_id = #{creatorId}, creator_id = #{creatorId},
</if> </if>
<if test="null != creatorName and '' != creatorName"> <if test="null != creatorName and '' != creatorName">
creator_name = #{creatorName}, creator_name = #{creatorName},
</if> </if>
<if test="null != createTime "> <if test="null != createTime ">
create_time = #{createTime}, create_time = #{createTime},
</if> </if>
<if test="null != updateTime "> <if test="null != updateTime ">
update_time = #{updateTime} update_time = #{updateTime}
</if> </if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="selectByWxEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="selectByWxEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_external_userid_log from tab_external_userid_log
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
</select> </select>
<update id="updateStatusFlagByWxEnterpriseId"> <update id="updateStatusFlagByWxEnterpriseId">
update tab_external_userid_log update tab_external_userid_log
set status_flag = #{statusFlag}, set status_flag = #{statusFlag},
update_time = now() update_time = now()
where wx_enterprise_id = #{wxEnterpriseId} where wx_enterprise_id = #{wxEnterpriseId}
</update> </update>
<update id="updateOldExternalUserId"> <update id="updateOldExternalUserId">
UPDATE tab_haoban_external_clerk_related a UPDATE tab_haoban_external_clerk_related a
JOIN tab_external_userid_log b ON a.wx_enterprise_id = b.wx_enterprise_id JOIN tab_external_userid_log b ON a.wx_enterprise_id = b.wx_enterprise_id
AND a.external_user_id = b.new_external_user_id AND a.external_user_id = b.new_external_user_id
SET a.external_user_id = b.old_external_user_id,a.update_time = now() SET a.external_user_id = b.old_external_user_id,a.update_time = now()
WHERE WHERE
a.wx_enterprise_id = #{wxEnterpriseId} a.wx_enterprise_id = #{wxEnterpriseId}
AND b.wx_enterprise_id = #{wxEnterpriseId} AND b.wx_enterprise_id = #{wxEnterpriseId}
AND a.status_flag = 1 and b.status_flag = 1; AND a.status_flag = 1 and b.status_flag = 1;
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.HandoverExternalMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.HandoverExternalMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHandoverExternal"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHandoverExternal">
<id column="handover_external_id" jdbcType="VARCHAR" property="handoverExternalId"/> <id column="handover_external_id" jdbcType="VARCHAR" property="handoverExternalId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="staff_id" jdbcType="VARCHAR" property="staffId"/> <result column="staff_id" jdbcType="VARCHAR" property="staffId"/>
<result column="user_id" jdbcType="VARCHAR" property="userId"/> <result column="user_id" jdbcType="VARCHAR" property="userId"/>
<result column="external_user_id" jdbcType="VARCHAR" property="externalUserId"/> <result column="external_user_id" jdbcType="VARCHAR" property="externalUserId"/>
<result column="external_user_name" jdbcType="VARCHAR" property="externalUserName"/> <result column="external_user_name" jdbcType="VARCHAR" property="externalUserName"/>
<result column="relation_id" jdbcType="VARCHAR" property="relationId"/> <result column="relation_id" jdbcType="VARCHAR" property="relationId"/>
<result column="haoban_friend_flag" jdbcType="INTEGER" property="haobanFriendFlag"/> <result column="haoban_friend_flag" jdbcType="INTEGER" property="haobanFriendFlag"/>
<result column="external_head_url" jdbcType="VARCHAR" property="externalHeadUrl"/> <result column="external_head_url" jdbcType="VARCHAR" property="externalHeadUrl"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="handover_transfer_id" jdbcType="VARCHAR" property="handoverTransferId"/> <result column="handover_transfer_id" jdbcType="VARCHAR" property="handoverTransferId"/>
<result column="takeover_time" jdbcType="TIMESTAMP" property="takeoverTime"/> <result column="takeover_time" jdbcType="TIMESTAMP" property="takeoverTime"/>
<result column="transfer_status" jdbcType="INTEGER" property="transferStatus"/> <result column="transfer_status" jdbcType="INTEGER" property="transferStatus"/>
<result column="transfer_time" jdbcType="TIMESTAMP" property="transferTime"/> <result column="transfer_time" jdbcType="TIMESTAMP" property="transferTime"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<resultMap id="FiendCountResultMap" type="com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO"> <resultMap id="FiendCountResultMap" type="com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO">
<result column="staff_id" jdbcType="VARCHAR" property="staffId"/> <result column="staff_id" jdbcType="VARCHAR" property="staffId"/>
<result column="friendCount" jdbcType="INTEGER" property="friendCount"/> <result column="friendCount" jdbcType="INTEGER" property="friendCount"/>
<result column="haobanFriendCount" jdbcType="INTEGER" property="haobanFriendCount"/> <result column="haobanFriendCount" jdbcType="INTEGER" property="haobanFriendCount"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
handover_external_id, wx_enterprise_id, staff_id, user_id, external_user_id, external_user_name, relation_id, handover_external_id, wx_enterprise_id, staff_id, user_id, external_user_id, external_user_name, relation_id,
haoban_friend_flag, external_head_url, status_flag, handover_transfer_id, takeover_time, haoban_friend_flag, external_head_url, status_flag, handover_transfer_id, takeover_time,
transfer_status, transfer_time, create_time, update_time transfer_status, transfer_time, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_external from tab_haoban_handover_external
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR} where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_handover_external delete from tab_haoban_handover_external
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR} where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal">
insert into tab_haoban_handover_external (handover_external_id, wx_enterprise_id, insert into tab_haoban_handover_external (handover_external_id, wx_enterprise_id,
staff_id, user_id, external_user_id, staff_id, user_id, external_user_id,
external_user_name,relation_id, haoban_friend_flag, external_head_url, external_user_name,relation_id, haoban_friend_flag, external_head_url,
status_flag, handover_transfer_id, takeover_time, status_flag, handover_transfer_id, takeover_time,
transfer_status, transfer_time, create_time, transfer_status, transfer_time, create_time,
update_time) update_time)
values (#{handoverExternalId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{handoverExternalId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{staffId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{externalUserId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{externalUserId,jdbcType=VARCHAR},
#{externalUserName,jdbcType=VARCHAR},#{relationId}, #{haobanFriendFlag,jdbcType=INTEGER}, #{externalHeadUrl,jdbcType=VARCHAR}, #{externalUserName,jdbcType=VARCHAR},#{relationId}, #{haobanFriendFlag,jdbcType=INTEGER}, #{externalHeadUrl,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}, #{handoverTransferId,jdbcType=VARCHAR}, #{takeoverTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}, #{handoverTransferId,jdbcType=VARCHAR}, #{takeoverTime,jdbcType=TIMESTAMP},
#{transferStatus}, #{transferTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{transferStatus}, #{transferTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal">
insert into tab_haoban_handover_external insert into tab_haoban_handover_external
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="handoverExternalId != null"> <if test="handoverExternalId != null">
handover_external_id, handover_external_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
staff_id, staff_id,
</if> </if>
<if test="userId != null"> <if test="userId != null">
user_id, user_id,
</if> </if>
<if test="externalUserId != null"> <if test="externalUserId != null">
external_user_id, external_user_id,
</if> </if>
<if test="externalUserName != null"> <if test="externalUserName != null">
external_user_name, external_user_name,
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id, relation_id,
</if> </if>
<if test="haobanFriendFlag != null"> <if test="haobanFriendFlag != null">
haoban_friend_flag, haoban_friend_flag,
</if> </if>
<if test="externalHeadUrl != null"> <if test="externalHeadUrl != null">
external_head_url, external_head_url,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="handoverTransferId != null"> <if test="handoverTransferId != null">
handover_transfer_id, handover_transfer_id,
</if> </if>
<if test="takeoverTime != null"> <if test="takeoverTime != null">
takeover_time, takeover_time,
</if> </if>
<if test="transferStatus != null"> <if test="transferStatus != null">
transfer_status, transfer_status,
</if> </if>
<if test="transferTime != null"> <if test="transferTime != null">
transfer_time, transfer_time,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="handoverExternalId != null"> <if test="handoverExternalId != null">
#{handoverExternalId,jdbcType=VARCHAR}, #{handoverExternalId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
#{staffId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR},
</if> </if>
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
</if> </if>
<if test="externalUserId != null"> <if test="externalUserId != null">
#{externalUserId,jdbcType=VARCHAR}, #{externalUserId,jdbcType=VARCHAR},
</if> </if>
<if test="externalUserName != null"> <if test="externalUserName != null">
#{externalUserName,jdbcType=VARCHAR}, #{externalUserName,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
#{relationId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="haobanFriendFlag != null"> <if test="haobanFriendFlag != null">
#{haobanFriendFlag,jdbcType=INTEGER}, #{haobanFriendFlag,jdbcType=INTEGER},
</if> </if>
<if test="externalHeadUrl != null"> <if test="externalHeadUrl != null">
#{externalHeadUrl,jdbcType=VARCHAR}, #{externalHeadUrl,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="handoverTransferId != null"> <if test="handoverTransferId != null">
#{handoverTransferId,jdbcType=VARCHAR}, #{handoverTransferId,jdbcType=VARCHAR},
</if> </if>
<if test="takeoverTime != null"> <if test="takeoverTime != null">
#{takeoverTime,jdbcType=TIMESTAMP}, #{takeoverTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="transferStatus != null"> <if test="transferStatus != null">
#{transferStatus}, #{transferStatus},
</if> </if>
<if test="transferTime != null"> <if test="transferTime != null">
#{transferTime,jdbcType=TIMESTAMP}, #{transferTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal">
update tab_haoban_handover_external update tab_haoban_handover_external
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
staff_id = #{staffId,jdbcType=VARCHAR}, staff_id = #{staffId,jdbcType=VARCHAR},
</if> </if>
<if test="userId != null"> <if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR}, user_id = #{userId,jdbcType=VARCHAR},
</if> </if>
<if test="externalUserId != null"> <if test="externalUserId != null">
external_user_id = #{externalUserId,jdbcType=VARCHAR}, external_user_id = #{externalUserId,jdbcType=VARCHAR},
</if> </if>
<if test="externalUserName != null"> <if test="externalUserName != null">
external_user_name = #{externalUserName,jdbcType=VARCHAR}, external_user_name = #{externalUserName,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="haobanFriendFlag != null"> <if test="haobanFriendFlag != null">
haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER}, haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER},
</if> </if>
<if test="externalHeadUrl != null"> <if test="externalHeadUrl != null">
external_head_url = #{externalHeadUrl,jdbcType=VARCHAR}, external_head_url = #{externalHeadUrl,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="handoverTransferId != null"> <if test="handoverTransferId != null">
handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}, handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR},
</if> </if>
<if test="takeoverTime != null"> <if test="takeoverTime != null">
takeover_time = #{takeoverTime,jdbcType=TIMESTAMP}, takeover_time = #{takeoverTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="transferStatus != null"> <if test="transferStatus != null">
transfer_status = #{transferStatus}, transfer_status = #{transferStatus},
</if> </if>
<if test="transferTime != null"> <if test="transferTime != null">
transfer_time = #{transferTime,jdbcType=TIMESTAMP}, transfer_time = #{transferTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR} where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHandoverExternal">
update tab_haoban_handover_external update tab_haoban_handover_external
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR}, staff_id = #{staffId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR}, user_id = #{userId,jdbcType=VARCHAR},
external_user_id = #{externalUserId,jdbcType=VARCHAR}, external_user_id = #{externalUserId,jdbcType=VARCHAR},
external_user_name = #{externalUserName,jdbcType=VARCHAR}, external_user_name = #{externalUserName,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER}, haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER},
external_head_url = #{externalHeadUrl,jdbcType=VARCHAR}, external_head_url = #{externalHeadUrl,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}, handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR},
takeover_time = #{takeoverTime,jdbcType=TIMESTAMP}, takeover_time = #{takeoverTime,jdbcType=TIMESTAMP},
transfer_status = #{transferStatus}, transfer_status = #{transferStatus},
transfer_time = #{transferTime,jdbcType=TIMESTAMP}, transfer_time = #{transferTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR} where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</update> </update>
<insert id="insertBatch"> <insert id="insertBatch">
insert into tab_haoban_handover_external (handover_external_id, wx_enterprise_id, insert into tab_haoban_handover_external (handover_external_id, wx_enterprise_id,
staff_id, user_id, external_user_id, staff_id, user_id, external_user_id,
external_user_name,relation_id, haoban_friend_flag, external_head_url, external_user_name,relation_id, haoban_friend_flag, external_head_url,
status_flag, create_time, status_flag, create_time,
update_time) update_time)
values values
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
(#{item.handoverExternalId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,jdbcType=VARCHAR}, (#{item.handoverExternalId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,jdbcType=VARCHAR},
#{item.staffId,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR}, #{item.externalUserId,jdbcType=VARCHAR}, #{item.staffId,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR}, #{item.externalUserId,jdbcType=VARCHAR},
#{item.externalUserName,jdbcType=VARCHAR},#{item.relationId}, #{item.haobanFriendFlag,jdbcType=INTEGER}, #{item.externalUserName,jdbcType=VARCHAR},#{item.relationId}, #{item.haobanFriendFlag,jdbcType=INTEGER},
#{item.externalHeadUrl,jdbcType=VARCHAR}, #{item.externalHeadUrl,jdbcType=VARCHAR},
#{item.statusFlag,jdbcType=INTEGER}, now(), #{item.statusFlag,jdbcType=INTEGER}, now(),
now()) now())
</foreach> </foreach>
</insert> </insert>
<select id="listByStaffIds" resultMap="BaseResultMap"> <select id="listByStaffIds" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_external from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if test="staffIds!=null and staffIds.size>0"> <if test="staffIds!=null and staffIds.size>0">
and staff_id in and staff_id in
<foreach collection="staffIds" item="item" separator="," open="(" close=")"> <foreach collection="staffIds" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
and status_flag = #{status} and status_flag = #{status}
<if test="search!=null and search!=''"> <if test="search!=null and search!=''">
and external_user_name like CONCAT('%',#{search},'%') and external_user_name like CONCAT('%',#{search},'%')
</if> </if>
<if test="transferIds!=null and transferIds.size>0"> <if test="transferIds!=null and transferIds.size>0">
and handover_transfer_id in and handover_transfer_id in
<foreach collection="transferIds" item="item" separator="," open="(" close=")"> <foreach collection="transferIds" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
order by create_time desc order by create_time desc
</select> </select>
<select id="listIdByStaffIds" resultMap="BaseResultMap"> <select id="listIdByStaffIds" resultMap="BaseResultMap">
select select
handover_external_id handover_external_id
from tab_haoban_handover_external from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if test="staffIds!=null and staffIds.size>0"> <if test="staffIds!=null and staffIds.size>0">
and staff_id in and staff_id in
<foreach collection="staffIds" item="item" separator="," open="(" close=")"> <foreach collection="staffIds" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
and status_flag=1 and status_flag=1
</select> </select>
<select id="listByIds" resultMap="BaseResultMap"> <select id="listByIds" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_external from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_external_id in and handover_external_id in
<foreach collection="ids" item="item" separator="," open="(" close=")"> <foreach collection="ids" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
and status_flag=1 and status_flag=1
</select> </select>
<update id="updateAfterTransfer"> <update id="updateAfterTransfer">
update tab_haoban_handover_external update tab_haoban_handover_external
set set
status_flag = 2, status_flag = 2,
handover_transfer_id = #{transferId,jdbcType=VARCHAR}, handover_transfer_id = #{transferId,jdbcType=VARCHAR},
transfer_status = 0, transfer_status = 0,
transfer_time = now(), transfer_time = now(),
update_time = now() update_time = now()
where handover_external_id in where handover_external_id in
<foreach collection="ids" item="item" separator="," open="(" close=")"> <foreach collection="ids" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</update> </update>
<select id="getByTransferId" resultMap="BaseResultMap"> <select id="getByTransferId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_external from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_transfer_id = #{transferId,jdbcType=VARCHAR} and handover_transfer_id = #{transferId,jdbcType=VARCHAR}
and external_user_id=#{externalUserId} and external_user_id=#{externalUserId}
and status_flag=2 and status_flag=2
</select> </select>
<select id="getByExternalUserIdAndStaffId" resultMap="BaseResultMap"> <select id="getByExternalUserIdAndStaffId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_external from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id = #{staffId,jdbcType=VARCHAR} and staff_id = #{staffId,jdbcType=VARCHAR}
and external_user_id=#{externalUserId} and external_user_id=#{externalUserId}
and status_flag!=0 and status_flag!=0
</select> </select>
<update id="delNoTransferExternal"> <update id="delNoTransferExternal">
update tab_haoban_handover_external update tab_haoban_handover_external
set set
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where where
wx_enterprise_id=#{wxEnterpriseId} wx_enterprise_id=#{wxEnterpriseId}
<if test="userIds!=null and userIds.size>0"> <if test="userIds!=null and userIds.size>0">
and user_id in and user_id in
<foreach collection="userIds" item="item" separator="," open="(" close=")"> <foreach collection="userIds" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
and status_flag=1 and status_flag=1
</update> </update>
<select id="listPreCountByStaffIds" resultMap="FiendCountResultMap"> <select id="listPreCountByStaffIds" resultMap="FiendCountResultMap">
select select
staff_id , staff_id ,
COUNT(external_user_id) friendCount, COUNT(external_user_id) friendCount,
sum(haoban_friend_flag) haobanFriendCount sum(haoban_friend_flag) haobanFriendCount
from tab_haoban_handover_external from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id in and staff_id in
<foreach collection="staffIds" item="item" separator="," open="(" close=")"> <foreach collection="staffIds" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
and status_flag=1 and status_flag=1
group by staff_id group by staff_id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.HandoverStaffMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.HandoverStaffMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHandoverStaff"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHandoverStaff">
<id column="handover_staff_id" jdbcType="VARCHAR" property="handoverStaffId"/> <id column="handover_staff_id" jdbcType="VARCHAR" property="handoverStaffId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="staff_id" jdbcType="VARCHAR" property="staffId"/> <result column="staff_id" jdbcType="VARCHAR" property="staffId"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/> <result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="handover_user_id" jdbcType="VARCHAR" property="handoverUserId"/> <result column="handover_user_id" jdbcType="VARCHAR" property="handoverUserId"/>
<result column="dimission_time" jdbcType="TIMESTAMP" property="dimissionTime"/> <result column="dimission_time" jdbcType="TIMESTAMP" property="dimissionTime"/>
<result column="friend_count" jdbcType="INTEGER" property="friendCount"/> <result column="friend_count" jdbcType="INTEGER" property="friendCount"/>
<result column="haoban_friend_count" jdbcType="INTEGER" property="haobanFriendCount"/> <result column="haoban_friend_count" jdbcType="INTEGER" property="haobanFriendCount"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
handover_staff_id, wx_enterprise_id, staff_id,store_id, handover_user_id, dimission_time, handover_staff_id, wx_enterprise_id, staff_id,store_id, handover_user_id, dimission_time,
friend_count, haoban_friend_count, status_flag, create_time, update_time friend_count, haoban_friend_count, status_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_staff from tab_haoban_handover_staff
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR} where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_handover_staff delete from tab_haoban_handover_staff
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR} where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff">
insert into tab_haoban_handover_staff (handover_staff_id, wx_enterprise_id, insert into tab_haoban_handover_staff (handover_staff_id, wx_enterprise_id,
staff_id,store_id, handover_user_id, dimission_time, staff_id,store_id, handover_user_id, dimission_time,
friend_count, haoban_friend_count, status_flag, friend_count, haoban_friend_count, status_flag,
create_time, update_time) create_time, update_time)
values (#{handoverStaffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{handoverStaffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{staffId,jdbcType=VARCHAR},#{storeId,jdbcType=VARCHAR}, #{handoverUserId,jdbcType=VARCHAR}, #{dimissionTime,jdbcType=TIMESTAMP}, #{staffId,jdbcType=VARCHAR},#{storeId,jdbcType=VARCHAR}, #{handoverUserId,jdbcType=VARCHAR}, #{dimissionTime,jdbcType=TIMESTAMP},
#{friendCount,jdbcType=INTEGER}, #{haobanFriendCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{friendCount,jdbcType=INTEGER}, #{haobanFriendCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff">
insert into tab_haoban_handover_staff insert into tab_haoban_handover_staff
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="handoverStaffId != null"> <if test="handoverStaffId != null">
handover_staff_id, handover_staff_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
staff_id, staff_id,
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id, store_id,
</if> </if>
<if test="handoverUserId != null"> <if test="handoverUserId != null">
handover_user_id, handover_user_id,
</if> </if>
<if test="dimissionTime != null"> <if test="dimissionTime != null">
dimission_time, dimission_time,
</if> </if>
<if test="friendCount != null"> <if test="friendCount != null">
friend_count, friend_count,
</if> </if>
<if test="haobanFriendCount != null"> <if test="haobanFriendCount != null">
haoban_friend_count, haoban_friend_count,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="handoverStaffId != null"> <if test="handoverStaffId != null">
#{handoverStaffId,jdbcType=VARCHAR}, #{handoverStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
#{staffId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
#{storeId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="handoverUserId != null"> <if test="handoverUserId != null">
#{handoverUserId,jdbcType=VARCHAR}, #{handoverUserId,jdbcType=VARCHAR},
</if> </if>
<if test="dimissionTime != null"> <if test="dimissionTime != null">
#{dimissionTime,jdbcType=TIMESTAMP}, #{dimissionTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="friendCount != null"> <if test="friendCount != null">
#{friendCount,jdbcType=INTEGER}, #{friendCount,jdbcType=INTEGER},
</if> </if>
<if test="haobanFriendCount != null"> <if test="haobanFriendCount != null">
#{haobanFriendCount,jdbcType=INTEGER}, #{haobanFriendCount,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff">
update tab_haoban_handover_staff update tab_haoban_handover_staff
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
staff_id = #{staffId,jdbcType=VARCHAR}, staff_id = #{staffId,jdbcType=VARCHAR},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="handoverUserId != null"> <if test="handoverUserId != null">
handover_user_id = #{handoverUserId,jdbcType=VARCHAR}, handover_user_id = #{handoverUserId,jdbcType=VARCHAR},
</if> </if>
<if test="dimissionTime != null"> <if test="dimissionTime != null">
dimission_time = #{dimissionTime,jdbcType=TIMESTAMP}, dimission_time = #{dimissionTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="friendCount != null"> <if test="friendCount != null">
friend_count = #{friendCount,jdbcType=INTEGER}, friend_count = #{friendCount,jdbcType=INTEGER},
</if> </if>
<if test="haobanFriendCount != null"> <if test="haobanFriendCount != null">
haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER}, haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR} where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHandoverStaff">
update tab_haoban_handover_staff update tab_haoban_handover_staff
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR}, staff_id = #{staffId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
handover_user_id = #{handoverUserId,jdbcType=VARCHAR}, handover_user_id = #{handoverUserId,jdbcType=VARCHAR},
dimission_time = #{dimissionTime,jdbcType=TIMESTAMP}, dimission_time = #{dimissionTime,jdbcType=TIMESTAMP},
friend_count = #{friendCount,jdbcType=INTEGER}, friend_count = #{friendCount,jdbcType=INTEGER},
haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER}, haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR} where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</update> </update>
<select id="getByStaffId" resultMap="BaseResultMap"> <select id="getByStaffId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_staff from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id=#{staffId} and staff_id=#{staffId}
and status_flag = 1 and status_flag = 1
</select> </select>
<select id="listByStoreId" resultMap="BaseResultMap"> <select id="listByStoreId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_staff from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and store_id=#{storeId} and store_id=#{storeId}
and status_flag=1 and status_flag=1
</select> </select>
<select id="listByWxEnterpriseId" resultMap="BaseResultMap"> <select id="listByWxEnterpriseId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_staff from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<update id="delByUserIds"> <update id="delByUserIds">
update tab_haoban_handover_staff update tab_haoban_handover_staff
set set
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where where
wx_enterprise_id=#{wxEnterpriseId} wx_enterprise_id=#{wxEnterpriseId}
and status_flag=1 and status_flag=1
<if test="userIds!=null and userIds.size>0"> <if test="userIds!=null and userIds.size>0">
and handover_user_id in and handover_user_id in
<foreach collection="userIds" item="item" open="(" close=")" separator=","> <foreach collection="userIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.HandoverTransferMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.HandoverTransferMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHandoverTransfer"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHandoverTransfer">
<id column="handover_transfer_id" jdbcType="VARCHAR" property="handoverTransferId"/> <id column="handover_transfer_id" jdbcType="VARCHAR" property="handoverTransferId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/> <result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="handover_staff_id" jdbcType="VARCHAR" property="handoverStaffId"/> <result column="handover_staff_id" jdbcType="VARCHAR" property="handoverStaffId"/>
<result column="takeover_staff_id" jdbcType="VARCHAR" property="takeoverStaffId"/> <result column="takeover_staff_id" jdbcType="VARCHAR" property="takeoverStaffId"/>
<result column="external_count" jdbcType="INTEGER" property="externalCount"/> <result column="external_count" jdbcType="INTEGER" property="externalCount"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
handover_transfer_id, wx_enterprise_id, store_id, handover_staff_id, takeover_staff_id, handover_transfer_id, wx_enterprise_id, store_id, handover_staff_id, takeover_staff_id,
external_count, status_flag, create_time, update_time external_count, status_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR} where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_handover_transfer delete from tab_haoban_handover_transfer
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR} where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer">
insert into tab_haoban_handover_transfer (handover_transfer_id, wx_enterprise_id, insert into tab_haoban_handover_transfer (handover_transfer_id, wx_enterprise_id,
store_id, handover_staff_id, takeover_staff_id, store_id, handover_staff_id, takeover_staff_id,
external_count, status_flag, create_time, external_count, status_flag, create_time,
update_time) update_time)
values (#{handoverTransferId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{handoverTransferId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{storeId,jdbcType=VARCHAR}, #{handoverStaffId,jdbcType=VARCHAR}, #{takeoverStaffId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR}, #{handoverStaffId,jdbcType=VARCHAR}, #{takeoverStaffId,jdbcType=VARCHAR},
#{externalCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{externalCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer">
insert into tab_haoban_handover_transfer insert into tab_haoban_handover_transfer
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="handoverTransferId != null"> <if test="handoverTransferId != null">
handover_transfer_id, handover_transfer_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id, store_id,
</if> </if>
<if test="handoverStaffId != null"> <if test="handoverStaffId != null">
handover_staff_id, handover_staff_id,
</if> </if>
<if test="takeoverStaffId != null"> <if test="takeoverStaffId != null">
takeover_staff_id, takeover_staff_id,
</if> </if>
<if test="externalCount != null"> <if test="externalCount != null">
external_count, external_count,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="handoverTransferId != null"> <if test="handoverTransferId != null">
#{handoverTransferId,jdbcType=VARCHAR}, #{handoverTransferId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
#{storeId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="handoverStaffId != null"> <if test="handoverStaffId != null">
#{handoverStaffId,jdbcType=VARCHAR}, #{handoverStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="takeoverStaffId != null"> <if test="takeoverStaffId != null">
#{takeoverStaffId,jdbcType=VARCHAR}, #{takeoverStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="externalCount != null"> <if test="externalCount != null">
#{externalCount,jdbcType=INTEGER}, #{externalCount,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer">
update tab_haoban_handover_transfer update tab_haoban_handover_transfer
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="handoverStaffId != null"> <if test="handoverStaffId != null">
handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}, handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="takeoverStaffId != null"> <if test="takeoverStaffId != null">
takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR}, takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="externalCount != null"> <if test="externalCount != null">
external_count = #{externalCount,jdbcType=INTEGER}, external_count = #{externalCount,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR} where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHandoverTransfer">
update tab_haoban_handover_transfer update tab_haoban_handover_transfer
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}, handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR},
takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR}, takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR},
external_count = #{externalCount,jdbcType=INTEGER}, external_count = #{externalCount,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR} where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</update> </update>
<select id="getByHandoverStaffIdAndTakeoverStaffId" resultMap="BaseResultMap"> <select id="getByHandoverStaffIdAndTakeoverStaffId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId} where wx_enterprise_id=#{wxEnterpriseId}
and handover_staff_id = #{handoverStaffId} and handover_staff_id = #{handoverStaffId}
and takeover_staff_id = #{takeoverStaffId} and takeover_staff_id = #{takeoverStaffId}
and status_flag=1 and status_flag=1
</select> </select>
<update id="addCount"> <update id="addCount">
update tab_haoban_handover_transfer update tab_haoban_handover_transfer
set set
external_count =external_count+${count}, external_count =external_count+${count},
update_time = now() update_time = now()
where handover_transfer_id = #{id} where handover_transfer_id = #{id}
</update> </update>
<select id="listTransferByStoreId" resultMap="BaseResultMap"> <select id="listTransferByStoreId" resultMap="BaseResultMap">
select select
handover_staff_id, handover_staff_id,
max(update_time) as update_time, max(update_time) as update_time,
sum(external_count) as external_count sum(external_count) as external_count
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId} where wx_enterprise_id=#{wxEnterpriseId}
and store_id = #{storeId} and store_id = #{storeId}
and status_flag=1 and status_flag=1
group by handover_staff_id group by handover_staff_id
</select> </select>
<select id="listTransferByHandoverStaffId" resultMap="BaseResultMap"> <select id="listTransferByHandoverStaffId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId} where wx_enterprise_id=#{wxEnterpriseId}
and handover_staff_id = #{handoverStaffId} and handover_staff_id = #{handoverStaffId}
and status_flag=1 and status_flag=1
</select> </select>
<select id="listTransferByTakeoverStaffId" resultMap="BaseResultMap"> <select id="listTransferByTakeoverStaffId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId} where wx_enterprise_id=#{wxEnterpriseId}
and takeover_staff_id = #{takeoverStaffId} and takeover_staff_id = #{takeoverStaffId}
and status_flag=1 and status_flag=1
</select> </select>
<select id="listTransferByIds" resultMap="BaseResultMap"> <select id="listTransferByIds" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId} where wx_enterprise_id=#{wxEnterpriseId}
and handover_transfer_id in and handover_transfer_id in
<foreach collection="ids" open="(" close=")" separator="," item="item"> <foreach collection="ids" open="(" close=")" separator="," item="item">
#{item} #{item}
</foreach> </foreach>
and status_flag=1 and status_flag=1
</select> </select>
<select id="listTransferByWxEnterpriseId" resultMap="BaseResultMap"> <select id="listTransferByWxEnterpriseId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_handover_transfer from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId} where wx_enterprise_id=#{wxEnterpriseId}
and create_time > #{date} and create_time > #{date}
and status_flag=1 and status_flag=1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.NoticeMessageMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.NoticeMessageMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabNoticeMessage"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabNoticeMessage">
<id column="notice_message_id" jdbcType="BIGINT" property="noticeMessageId"/> <id column="notice_message_id" jdbcType="BIGINT" property="noticeMessageId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/> <result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="clerk_id" jdbcType="VARCHAR" property="clerkId"/> <result column="clerk_id" jdbcType="VARCHAR" property="clerkId"/>
<result column="category_type" jdbcType="INTEGER" property="categoryType"/> <result column="category_type" jdbcType="INTEGER" property="categoryType"/>
<result column="message_type" jdbcType="INTEGER" property="messageType"/> <result column="message_type" jdbcType="INTEGER" property="messageType"/>
<result column="template_code" jdbcType="VARCHAR" property="templateCode"/> <result column="template_code" jdbcType="VARCHAR" property="templateCode"/>
<result column="title" jdbcType="VARCHAR" property="title"/> <result column="title" jdbcType="VARCHAR" property="title"/>
<result column="description" jdbcType="VARCHAR" property="description"/> <result column="description" jdbcType="VARCHAR" property="description"/>
<result column="relation_id" jdbcType="VARCHAR" property="relationId"/> <result column="relation_id" jdbcType="VARCHAR" property="relationId"/>
<result column="message_content" jdbcType="VARCHAR" property="messageContent"/> <result column="message_content" jdbcType="VARCHAR" property="messageContent"/>
<result column="read_flag" jdbcType="INTEGER" property="readFlag"/> <result column="read_flag" jdbcType="INTEGER" property="readFlag"/>
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
notice_message_id, enterprise_id, store_id, clerk_id, category_type, message_type, notice_message_id, enterprise_id, store_id, clerk_id, category_type, message_type,
template_code, title, description, relation_id, message_content, read_flag, delete_flag, template_code, title, description, relation_id, message_content, read_flag, delete_flag,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_notice_message from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT} where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tab_haoban_notice_message delete from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT} where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
insert into tab_haoban_notice_message (notice_message_id, enterprise_id, store_id, insert into tab_haoban_notice_message (notice_message_id, enterprise_id, store_id,
clerk_id, category_type, message_type, clerk_id, category_type, message_type,
template_code, title, description, template_code, title, description,
relation_id, message_content, read_flag, relation_id, message_content, read_flag,
delete_flag, create_time, update_time delete_flag, create_time, update_time
) )
values (#{noticeMessageId,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR}, values (#{noticeMessageId,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{clerkId,jdbcType=VARCHAR}, #{categoryType,jdbcType=INTEGER}, #{messageType,jdbcType=INTEGER}, #{clerkId,jdbcType=VARCHAR}, #{categoryType,jdbcType=INTEGER}, #{messageType,jdbcType=INTEGER},
#{templateCode,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{templateCode,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR}, #{messageContent,jdbcType=VARCHAR}, #{readFlag,jdbcType=INTEGER}, #{relationId,jdbcType=VARCHAR}, #{messageContent,jdbcType=VARCHAR}, #{readFlag,jdbcType=INTEGER},
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
insert into tab_haoban_notice_message insert into tab_haoban_notice_message
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noticeMessageId != null"> <if test="noticeMessageId != null">
notice_message_id, notice_message_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id, store_id,
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
clerk_id, clerk_id,
</if> </if>
<if test="categoryType != null"> <if test="categoryType != null">
category_type, category_type,
</if> </if>
<if test="messageType != null"> <if test="messageType != null">
message_type, message_type,
</if> </if>
<if test="templateCode != null"> <if test="templateCode != null">
template_code, template_code,
</if> </if>
<if test="title != null"> <if test="title != null">
title, title,
</if> </if>
<if test="description != null"> <if test="description != null">
description, description,
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id, relation_id,
</if> </if>
<if test="messageContent != null"> <if test="messageContent != null">
message_content, message_content,
</if> </if>
<if test="readFlag != null"> <if test="readFlag != null">
read_flag, read_flag,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noticeMessageId != null"> <if test="noticeMessageId != null">
#{noticeMessageId,jdbcType=BIGINT}, #{noticeMessageId,jdbcType=BIGINT},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
#{storeId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
#{clerkId,jdbcType=VARCHAR}, #{clerkId,jdbcType=VARCHAR},
</if> </if>
<if test="categoryType != null"> <if test="categoryType != null">
#{categoryType,jdbcType=INTEGER}, #{categoryType,jdbcType=INTEGER},
</if> </if>
<if test="messageType != null"> <if test="messageType != null">
#{messageType,jdbcType=INTEGER}, #{messageType,jdbcType=INTEGER},
</if> </if>
<if test="templateCode != null"> <if test="templateCode != null">
#{templateCode,jdbcType=VARCHAR}, #{templateCode,jdbcType=VARCHAR},
</if> </if>
<if test="title != null"> <if test="title != null">
#{title,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
</if> </if>
<if test="description != null"> <if test="description != null">
#{description,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
#{relationId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="messageContent != null"> <if test="messageContent != null">
#{messageContent,jdbcType=VARCHAR}, #{messageContent,jdbcType=VARCHAR},
</if> </if>
<if test="readFlag != null"> <if test="readFlag != null">
#{readFlag,jdbcType=INTEGER}, #{readFlag,jdbcType=INTEGER},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
update tab_haoban_notice_message update tab_haoban_notice_message
<set> <set>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
clerk_id = #{clerkId,jdbcType=VARCHAR}, clerk_id = #{clerkId,jdbcType=VARCHAR},
</if> </if>
<if test="categoryType != null"> <if test="categoryType != null">
category_type = #{categoryType,jdbcType=INTEGER}, category_type = #{categoryType,jdbcType=INTEGER},
</if> </if>
<if test="messageType != null"> <if test="messageType != null">
message_type = #{messageType,jdbcType=INTEGER}, message_type = #{messageType,jdbcType=INTEGER},
</if> </if>
<if test="templateCode != null"> <if test="templateCode != null">
template_code = #{templateCode,jdbcType=VARCHAR}, template_code = #{templateCode,jdbcType=VARCHAR},
</if> </if>
<if test="title != null"> <if test="title != null">
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
</if> </if>
<if test="description != null"> <if test="description != null">
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="messageContent != null"> <if test="messageContent != null">
message_content = #{messageContent,jdbcType=VARCHAR}, message_content = #{messageContent,jdbcType=VARCHAR},
</if> </if>
<if test="readFlag != null"> <if test="readFlag != null">
read_flag = #{readFlag,jdbcType=INTEGER}, read_flag = #{readFlag,jdbcType=INTEGER},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT} where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
update tab_haoban_notice_message update tab_haoban_notice_message
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR}, clerk_id = #{clerkId,jdbcType=VARCHAR},
category_type = #{categoryType,jdbcType=INTEGER}, category_type = #{categoryType,jdbcType=INTEGER},
message_type = #{messageType,jdbcType=INTEGER}, message_type = #{messageType,jdbcType=INTEGER},
template_code = #{templateCode,jdbcType=VARCHAR}, template_code = #{templateCode,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
message_content = #{messageContent,jdbcType=VARCHAR}, message_content = #{messageContent,jdbcType=VARCHAR},
read_flag = #{readFlag,jdbcType=INTEGER}, read_flag = #{readFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT} where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update> </update>
<select id="listNoticeMessage" resultMap="BaseResultMap"> <select id="listNoticeMessage" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_notice_message from tab_haoban_notice_message
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and store_id = #{storeId} and store_id = #{storeId}
and delete_flag=0 and delete_flag=0
<if test="clerkId != null"> <if test="clerkId != null">
and clerk_id =#{clerkId} and clerk_id =#{clerkId}
</if> </if>
<if test="categoryType != -1"> <if test="categoryType != -1">
and category_type =#{categoryType} and category_type =#{categoryType}
</if> </if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY) and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
order by create_time desc order by create_time desc
</select> </select>
<select id="countUnreadNoticeMessage" resultType="Integer"> <select id="countUnreadNoticeMessage" resultType="Integer">
select select
count(*) count(*)
from tab_haoban_notice_message from tab_haoban_notice_message
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and read_flag=0 and read_flag=0
and delete_flag=0 and delete_flag=0
and store_id = #{storeId} and store_id = #{storeId}
<if test="clerkId != null"> <if test="clerkId != null">
and clerk_id =#{clerkId} and clerk_id =#{clerkId}
</if> </if>
<if test="categoryType != -1"> <if test="categoryType != -1">
and category_type =#{categoryType} and category_type =#{categoryType}
</if> </if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY) and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
order by create_time desc order by create_time desc
</select> </select>
<update id="updateNoticeMessageReadFlag"> <update id="updateNoticeMessageReadFlag">
update tab_haoban_notice_message update tab_haoban_notice_message
set read_flag=1,update_time = now() set read_flag=1,update_time = now()
WHERE enterprise_id = #{enterpriseId} WHERE enterprise_id = #{enterpriseId}
and clerk_id = #{clerkId} and clerk_id = #{clerkId}
and read_flag=0 and read_flag=0
and delete_flag=0 and delete_flag=0
<if test="categoryType!=-1"> <if test="categoryType!=-1">
and category_type=#{categoryType} and category_type=#{categoryType}
</if> </if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY) and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.NoticeMessageTemplateMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.NoticeMessageTemplateMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate">
<id column="notice_message_template_id" jdbcType="INTEGER" property="noticeMessageTemplateId"/> <id column="notice_message_template_id" jdbcType="INTEGER" property="noticeMessageTemplateId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="template_code" jdbcType="VARCHAR" property="templateCode"/> <result column="template_code" jdbcType="VARCHAR" property="templateCode"/>
<result column="content" jdbcType="VARCHAR" property="content"/> <result column="content" jdbcType="VARCHAR" property="content"/>
<result column="notice_content" jdbcType="VARCHAR" property="noticeContent"/> <result column="notice_content" jdbcType="VARCHAR" property="noticeContent"/>
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
notice_message_template_id, enterprise_id, template_code, content,notice_content, delete_flag, create_time, notice_message_template_id, enterprise_id, template_code, content,notice_content, delete_flag, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_notice_message_template from tab_haoban_notice_message_template
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER} where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_haoban_notice_message_template delete from tab_haoban_notice_message_template
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER} where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate">
insert into tab_haoban_notice_message_template (notice_message_template_id, enterprise_id, insert into tab_haoban_notice_message_template (notice_message_template_id, enterprise_id,
template_code, content, delete_flag, template_code, content, delete_flag,
create_time, update_time) create_time, update_time)
values (#{noticeMessageTemplateId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR}, values (#{noticeMessageTemplateId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR},
#{templateCode,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER}, #{templateCode,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate">
insert into tab_haoban_notice_message_template insert into tab_haoban_notice_message_template
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noticeMessageTemplateId != null"> <if test="noticeMessageTemplateId != null">
notice_message_template_id, notice_message_template_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="templateCode != null"> <if test="templateCode != null">
template_code, template_code,
</if> </if>
<if test="content != null"> <if test="content != null">
content, content,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noticeMessageTemplateId != null"> <if test="noticeMessageTemplateId != null">
#{noticeMessageTemplateId,jdbcType=INTEGER}, #{noticeMessageTemplateId,jdbcType=INTEGER},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="templateCode != null"> <if test="templateCode != null">
#{templateCode,jdbcType=VARCHAR}, #{templateCode,jdbcType=VARCHAR},
</if> </if>
<if test="content != null"> <if test="content != null">
#{content,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" <update id="updateByPrimaryKeySelective"
parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"> parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate">
update tab_haoban_notice_message_template update tab_haoban_notice_message_template
<set> <set>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="templateCode != null"> <if test="templateCode != null">
template_code = #{templateCode,jdbcType=VARCHAR}, template_code = #{templateCode,jdbcType=VARCHAR},
</if> </if>
<if test="content != null"> <if test="content != null">
content = #{content,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER} where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate">
update tab_haoban_notice_message_template update tab_haoban_notice_message_template
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
template_code = #{templateCode,jdbcType=VARCHAR}, template_code = #{templateCode,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER} where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</update> </update>
<select id="getByCode" resultMap="BaseResultMap"> <select id="getByCode" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_notice_message_template from tab_haoban_notice_message_template
where template_code = #{templateCode,jdbcType=VARCHAR} and enterprise_id=#{enterpriseId} and delete_flag=0 where template_code = #{templateCode,jdbcType=VARCHAR} and enterprise_id=#{enterpriseId} and delete_flag=0
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.PendingTaskMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.PendingTaskMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabPendingTask"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabPendingTask">
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="relation_id" jdbcType="VARCHAR" property="relationId"/> <result column="relation_id" jdbcType="VARCHAR" property="relationId"/>
<result column="business_id" jdbcType="VARCHAR" property="businessId"/> <result column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="task_type" jdbcType="INTEGER" property="taskType"/> <result column="task_type" jdbcType="INTEGER" property="taskType"/>
<result column="title" jdbcType="VARCHAR" property="title"/> <result column="title" jdbcType="VARCHAR" property="title"/>
<result column="description" jdbcType="VARCHAR" property="description"/> <result column="description" jdbcType="VARCHAR" property="description"/>
<result column="task_status_flag" jdbcType="INTEGER" property="taskStatusFlag"/> <result column="task_status_flag" jdbcType="INTEGER" property="taskStatusFlag"/>
<result column="overdue_time" jdbcType="TIMESTAMP" property="overdueTime"/> <result column="overdue_time" jdbcType="TIMESTAMP" property="overdueTime"/>
<result column="invalid_time" jdbcType="TIMESTAMP" property="invalidTime"/> <result column="invalid_time" jdbcType="TIMESTAMP" property="invalidTime"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/> <result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="clerk_id" jdbcType="VARCHAR" property="clerkId"/> <result column="clerk_id" jdbcType="VARCHAR" property="clerkId"/>
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime"/> <result column="finish_time" jdbcType="TIMESTAMP" property="finishTime"/>
<result column="finish_flag" jdbcType="INTEGER" property="finishFlag"/> <result column="finish_flag" jdbcType="INTEGER" property="finishFlag"/>
<result column="overdue_flag" jdbcType="INTEGER" property="overdueFlag"/> <result column="overdue_flag" jdbcType="INTEGER" property="overdueFlag"/>
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, enterprise_id, relation_id,business_id, task_type, title, description, task_status_flag, id, enterprise_id, relation_id,business_id, task_type, title, description, task_status_flag,
overdue_time, invalid_time, store_id, clerk_id, finish_time, finish_flag, overdue_flag, overdue_time, invalid_time, store_id, clerk_id, finish_time, finish_flag, overdue_flag,
delete_flag, create_time, update_time delete_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pending_task from tab_haoban_pending_task
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_haoban_pending_task delete from tab_haoban_pending_task
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask">
insert into tab_haoban_pending_task (id, enterprise_id, relation_id, insert into tab_haoban_pending_task (id, enterprise_id, relation_id,
task_type, title, description, task_type, title, description,
task_status_flag, overdue_time, invalid_time, task_status_flag, overdue_time, invalid_time,
store_id, clerk_id, finish_time, store_id, clerk_id, finish_time,
finish_flag, overdue_flag, delete_flag, finish_flag, overdue_flag, delete_flag,
create_time, update_time) create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
#{taskType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{taskType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{taskStatusFlag,jdbcType=INTEGER}, #{overdueTime,jdbcType=TIMESTAMP}, #{invalidTime,jdbcType=TIMESTAMP}, #{taskStatusFlag,jdbcType=INTEGER}, #{overdueTime,jdbcType=TIMESTAMP}, #{invalidTime,jdbcType=TIMESTAMP},
#{storeId,jdbcType=VARCHAR}, #{clerkId,jdbcType=VARCHAR}, #{finishTime,jdbcType=TIMESTAMP}, #{storeId,jdbcType=VARCHAR}, #{clerkId,jdbcType=VARCHAR}, #{finishTime,jdbcType=TIMESTAMP},
#{finishFlag,jdbcType=INTEGER}, #{overdueFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{finishFlag,jdbcType=INTEGER}, #{overdueFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask">
insert into tab_haoban_pending_task insert into tab_haoban_pending_task
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id, relation_id,
</if> </if>
<if test="businessId != null"> <if test="businessId != null">
business_id, business_id,
</if> </if>
<if test="taskType != null"> <if test="taskType != null">
task_type, task_type,
</if> </if>
<if test="title != null"> <if test="title != null">
title, title,
</if> </if>
<if test="description != null"> <if test="description != null">
description, description,
</if> </if>
<if test="taskStatusFlag != null"> <if test="taskStatusFlag != null">
task_status_flag, task_status_flag,
</if> </if>
<if test="overdueTime != null"> <if test="overdueTime != null">
overdue_time, overdue_time,
</if> </if>
<if test="invalidTime != null"> <if test="invalidTime != null">
invalid_time, invalid_time,
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id, store_id,
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
clerk_id, clerk_id,
</if> </if>
<if test="finishTime != null"> <if test="finishTime != null">
finish_time, finish_time,
</if> </if>
<if test="finishFlag != null"> <if test="finishFlag != null">
finish_flag, finish_flag,
</if> </if>
<if test="overdueFlag != null"> <if test="overdueFlag != null">
overdue_flag, overdue_flag,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag, delete_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=INTEGER}, #{id,jdbcType=INTEGER},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
#{relationId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="businessId != null"> <if test="businessId != null">
#{businessId,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR},
</if> </if>
<if test="taskType != null"> <if test="taskType != null">
#{taskType,jdbcType=INTEGER}, #{taskType,jdbcType=INTEGER},
</if> </if>
<if test="title != null"> <if test="title != null">
#{title,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
</if> </if>
<if test="description != null"> <if test="description != null">
#{description,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
</if> </if>
<if test="taskStatusFlag != null"> <if test="taskStatusFlag != null">
#{taskStatusFlag,jdbcType=INTEGER}, #{taskStatusFlag,jdbcType=INTEGER},
</if> </if>
<if test="overdueTime != null"> <if test="overdueTime != null">
#{overdueTime,jdbcType=TIMESTAMP}, #{overdueTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="invalidTime != null"> <if test="invalidTime != null">
#{invalidTime,jdbcType=TIMESTAMP}, #{invalidTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
#{storeId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
#{clerkId,jdbcType=VARCHAR}, #{clerkId,jdbcType=VARCHAR},
</if> </if>
<if test="finishTime != null"> <if test="finishTime != null">
#{finishTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="finishFlag != null"> <if test="finishFlag != null">
#{finishFlag,jdbcType=INTEGER}, #{finishFlag,jdbcType=INTEGER},
</if> </if>
<if test="overdueFlag != null"> <if test="overdueFlag != null">
#{overdueFlag,jdbcType=INTEGER}, #{overdueFlag,jdbcType=INTEGER},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask">
update tab_haoban_pending_task update tab_haoban_pending_task
<set> <set>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="businessId != null"> <if test="businessId != null">
business_id = #{businessId,jdbcType=VARCHAR}, business_id = #{businessId,jdbcType=VARCHAR},
</if> </if>
<if test="taskType != null"> <if test="taskType != null">
task_type = #{taskType,jdbcType=INTEGER}, task_type = #{taskType,jdbcType=INTEGER},
</if> </if>
<if test="title != null"> <if test="title != null">
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
</if> </if>
<if test="description != null"> <if test="description != null">
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
</if> </if>
<if test="taskStatusFlag != null"> <if test="taskStatusFlag != null">
task_status_flag = #{taskStatusFlag,jdbcType=INTEGER}, task_status_flag = #{taskStatusFlag,jdbcType=INTEGER},
</if> </if>
<if test="overdueTime != null"> <if test="overdueTime != null">
overdue_time = #{overdueTime,jdbcType=TIMESTAMP}, overdue_time = #{overdueTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="invalidTime != null"> <if test="invalidTime != null">
invalid_time = #{invalidTime,jdbcType=TIMESTAMP}, invalid_time = #{invalidTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="storeId != null"> <if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
clerk_id = #{clerkId,jdbcType=VARCHAR}, clerk_id = #{clerkId,jdbcType=VARCHAR},
</if> </if>
<if test="finishTime != null"> <if test="finishTime != null">
finish_time = #{finishTime,jdbcType=TIMESTAMP}, finish_time = #{finishTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="finishFlag != null"> <if test="finishFlag != null">
finish_flag = #{finishFlag,jdbcType=INTEGER}, finish_flag = #{finishFlag,jdbcType=INTEGER},
</if> </if>
<if test="overdueFlag != null"> <if test="overdueFlag != null">
overdue_flag = #{overdueFlag,jdbcType=INTEGER}, overdue_flag = #{overdueFlag,jdbcType=INTEGER},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabPendingTask">
update tab_haoban_pending_task update tab_haoban_pending_task
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
business_id = #{businessId,jdbcType=VARCHAR}, business_id = #{businessId,jdbcType=VARCHAR},
task_type = #{taskType,jdbcType=INTEGER}, task_type = #{taskType,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
task_status_flag = #{taskStatusFlag,jdbcType=INTEGER}, task_status_flag = #{taskStatusFlag,jdbcType=INTEGER},
overdue_time = #{overdueTime,jdbcType=TIMESTAMP}, overdue_time = #{overdueTime,jdbcType=TIMESTAMP},
invalid_time = #{invalidTime,jdbcType=TIMESTAMP}, invalid_time = #{invalidTime,jdbcType=TIMESTAMP},
store_id = #{storeId,jdbcType=VARCHAR}, store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR}, clerk_id = #{clerkId,jdbcType=VARCHAR},
finish_time = #{finishTime,jdbcType=TIMESTAMP}, finish_time = #{finishTime,jdbcType=TIMESTAMP},
finish_flag = #{finishFlag,jdbcType=INTEGER}, finish_flag = #{finishFlag,jdbcType=INTEGER},
overdue_flag = #{overdueFlag,jdbcType=INTEGER}, overdue_flag = #{overdueFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<select id="getByRelationId" resultMap="BaseResultMap"> <select id="getByRelationId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pending_task from tab_haoban_pending_task
where relation_id = #{relationId} where relation_id = #{relationId}
</select> </select>
<select id="listByRelationId" resultMap="BaseResultMap"> <select id="listByRelationId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pending_task from tab_haoban_pending_task
where relation_id in where relation_id in
<foreach collection="relationIds" open="(" separator="," close=")" item="item"> <foreach collection="relationIds" open="(" separator="," close=")" item="item">
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="listPendingTask" resultMap="BaseResultMap"> <select id="listPendingTask" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pending_task from tab_haoban_pending_task
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and store_id =#{storeId} and store_id =#{storeId}
and task_status_flag=0 and task_status_flag=0
and delete_flag=0 and delete_flag=0
<if test="finishFlag != -1"> <if test="finishFlag != -1">
and finish_flag = #{finishFlag} and finish_flag = #{finishFlag}
</if> </if>
<if test="overdueFlag != -1"> <if test="overdueFlag != -1">
and overdue_flag = #{overdueFlag} and overdue_flag = #{overdueFlag}
</if> </if>
<if test="clerkId != null"> <if test="clerkId != null">
and clerk_id = #{clerkId} and clerk_id = #{clerkId}
</if> </if>
<if test="taskType!=-1"> <if test="taskType!=-1">
and task_type = #{taskType} and task_type = #{taskType}
</if> </if>
order by overdue_time desc order by overdue_time desc
</select> </select>
<select id="listPendingTaskByCreateTime" resultMap="BaseResultMap"> <select id="listPendingTaskByCreateTime" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pending_task from tab_haoban_pending_task
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and store_id =#{storeId} and store_id =#{storeId}
and task_status_flag=0 and task_status_flag=0
and delete_flag=0 and delete_flag=0
and finish_flag =0 and finish_flag =0
<if test="clerkId != null"> <if test="clerkId != null">
and clerk_id = #{clerkId} and clerk_id = #{clerkId}
</if> </if>
<if test="startDate != null"> <if test="startDate != null">
and create_time <![CDATA[ >= ]]> #{startDate} and create_time <![CDATA[ >= ]]> #{startDate}
</if> </if>
<if test="endDate != null"> <if test="endDate != null">
and create_time <![CDATA[ <= ]]> #{endDate} and create_time <![CDATA[ <= ]]> #{endDate}
</if> </if>
order by create_time desc limit 20 order by create_time desc limit 20
</select> </select>
<update id="deleteByRelationIds"> <update id="deleteByRelationIds">
update tab_haoban_pending_task update tab_haoban_pending_task
set set
delete_flag = 1, delete_flag = 1,
update_time = now() update_time = now()
where relation_id in where relation_id in
<foreach collection="relationIds" item="item" separator="," open="(" close=")"> <foreach collection="relationIds" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</update> </update>
<update id="updateInvalidTimeByBusinessId"> <update id="updateInvalidTimeByBusinessId">
update tab_haoban_pending_task update tab_haoban_pending_task
set set
update_time = now(), update_time = now(),
invalid_time = #{invalidTime}, invalid_time = #{invalidTime},
overdue_time = #{invalidTime} overdue_time = #{invalidTime}
where business_id = #{businessId} where business_id = #{businessId}
</update> </update>
<update id="deleteByBusinessId"> <update id="deleteByBusinessId">
update tab_haoban_pending_task update tab_haoban_pending_task
set set
delete_flag = 1, delete_flag = 1,
update_time = now() update_time = now()
where business_id = #{businessId} and delete_flag=0 where business_id = #{businessId} and delete_flag=0
</update> </update>
<insert id="insertBatch" > <insert id="insertBatch" >
insert into tab_haoban_pending_task ( enterprise_id, relation_id,business_id, task_type, title, description, insert into tab_haoban_pending_task ( enterprise_id, relation_id,business_id, task_type, title, description,
task_status_flag, overdue_time, invalid_time, task_status_flag, overdue_time, invalid_time,
store_id, clerk_id, finish_time, store_id, clerk_id, finish_time,
finish_flag, overdue_flag, delete_flag, finish_flag, overdue_flag, delete_flag,
create_time, update_time) create_time, update_time)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
( #{item.enterpriseId,jdbcType=VARCHAR}, #{item.relationId,jdbcType=VARCHAR},#{item.businessId,jdbcType=VARCHAR}, ( #{item.enterpriseId,jdbcType=VARCHAR}, #{item.relationId,jdbcType=VARCHAR},#{item.businessId,jdbcType=VARCHAR},
#{item.taskType,jdbcType=INTEGER}, #{item.title,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR}, #{item.taskType,jdbcType=INTEGER}, #{item.title,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR},
0, #{item.overdueTime,jdbcType=TIMESTAMP}, #{item.invalidTime,jdbcType=TIMESTAMP}, 0, #{item.overdueTime,jdbcType=TIMESTAMP}, #{item.invalidTime,jdbcType=TIMESTAMP},
#{item.storeId,jdbcType=VARCHAR}, #{item.clerkId,jdbcType=VARCHAR}, #{item.finishTime,jdbcType=TIMESTAMP}, #{item.storeId,jdbcType=VARCHAR}, #{item.clerkId,jdbcType=VARCHAR}, #{item.finishTime,jdbcType=TIMESTAMP},
0, 0, 0, 0, 0, 0,
now(), now()) now(), now())
</foreach> </foreach>
</insert> </insert>
<update id="updateDelToNormalByRelationIds"> <update id="updateDelToNormalByRelationIds">
update tab_haoban_pending_task update tab_haoban_pending_task
set set
delete_flag=0, delete_flag=0,
update_time = now(), update_time = now(),
invalid_time = #{invalidTime}, invalid_time = #{invalidTime},
overdue_time = #{invalidTime} overdue_time = #{invalidTime}
where where
relation_id in relation_id in
<foreach collection="relationIds" open="(" separator="," close=")" item="item"> <foreach collection="relationIds" open="(" separator="," close=")" item="item">
#{item} #{item}
</foreach> </foreach>
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.PreDealLogMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.PreDealLogMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog">
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="data_id" jdbcType="VARCHAR" property="dataId"/> <result column="data_id" jdbcType="VARCHAR" property="dataId"/>
<result column="data_content" jdbcType="VARCHAR" property="dataContent"/> <result column="data_content" jdbcType="VARCHAR" property="dataContent"/>
<result column="reason" jdbcType="VARCHAR" property="reason"/> <result column="reason" jdbcType="VARCHAR" property="reason"/>
<result column="p_data_id" jdbcType="VARCHAR" property="pDataId"/> <result column="p_data_id" jdbcType="VARCHAR" property="pDataId"/>
<result column="task_id" jdbcType="VARCHAR" property="taskId"/> <result column="task_id" jdbcType="VARCHAR" property="taskId"/>
<result column="data_type" jdbcType="INTEGER" property="dataType"/> <result column="data_type" jdbcType="INTEGER" property="dataType"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, wx_enterprise_id,enterprise_id, data_id, p_data_id, task_id, data_type, status_flag,reason, create_time, id, wx_enterprise_id,enterprise_id, data_id, p_data_id, task_id, data_type, status_flag,reason, create_time,
update_time update_time
</sql> </sql>
<sql id="Base_Column_List_data"> <sql id="Base_Column_List_data">
id, wx_enterprise_id,enterprise_id, data_id,data_content, p_data_id, task_id, data_type, status_flag, create_time,reason, id, wx_enterprise_id,enterprise_id, data_id,data_content, p_data_id, task_id, data_type, status_flag, create_time,reason,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_haoban_pre_deal_log delete from tab_haoban_pre_deal_log
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog">
insert into tab_haoban_pre_deal_log ( wx_enterprise_id,enterprise_id, data_id,data_content, insert into tab_haoban_pre_deal_log ( wx_enterprise_id,enterprise_id, data_id,data_content,
p_data_id, task_id, data_type, p_data_id, task_id, data_type,
status_flag, create_time, update_time status_flag, create_time, update_time
) )
values (#{wxEnterpriseId,jdbcType=VARCHAR},#{enterpriseId,jdbcType=VARCHAR}, values (#{wxEnterpriseId,jdbcType=VARCHAR},#{enterpriseId,jdbcType=VARCHAR},
#{dataId,jdbcType=VARCHAR},#{dataContent} #{dataId,jdbcType=VARCHAR},#{dataContent}
#{pDataId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{dataType,jdbcType=INTEGER}, #{pDataId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{dataType,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, now(), now() #{statusFlag,jdbcType=INTEGER}, now(), now()
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog">
insert into tab_haoban_pre_deal_log insert into tab_haoban_pre_deal_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="dataId != null"> <if test="dataId != null">
data_id, data_id,
</if> </if>
<if test="dataContent != null"> <if test="dataContent != null">
data_content, data_content,
</if> </if>
<if test="pDataId != null"> <if test="pDataId != null">
p_data_id, p_data_id,
</if> </if>
<if test="taskId != null"> <if test="taskId != null">
task_id, task_id,
</if> </if>
<if test="dataType != null"> <if test="dataType != null">
data_type, data_type,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
create_time, create_time,
update_time update_time
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=INTEGER}, #{id,jdbcType=INTEGER},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="dataId != null"> <if test="dataId != null">
#{dataId,jdbcType=VARCHAR}, #{dataId,jdbcType=VARCHAR},
</if> </if>
<if test="dataContent != null"> <if test="dataContent != null">
#{dataContent}, #{dataContent},
</if> </if>
<if test="pDataId != null"> <if test="pDataId != null">
#{pDataId,jdbcType=VARCHAR}, #{pDataId,jdbcType=VARCHAR},
</if> </if>
<if test="taskId != null"> <if test="taskId != null">
#{taskId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR},
</if> </if>
<if test="dataType != null"> <if test="dataType != null">
#{dataType,jdbcType=INTEGER}, #{dataType,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
now(), now(),
now() now()
</trim> </trim>
</insert> </insert>
<insert id="insertSelectiveBatch"> <insert id="insertSelectiveBatch">
insert into tab_haoban_pre_deal_log ( wx_enterprise_id,enterprise_id, data_id,data_content, insert into tab_haoban_pre_deal_log ( wx_enterprise_id,enterprise_id, data_id,data_content,
p_data_id, task_id, data_type, p_data_id, task_id, data_type,
status_flag, create_time, update_time status_flag, create_time, update_time
) )
values values
<foreach collection="list" separator="," item="item" index="index"> <foreach collection="list" separator="," item="item" index="index">
(#{item.wxEnterpriseId,jdbcType=VARCHAR},#{item.enterpriseId,jdbcType=VARCHAR}, (#{item.wxEnterpriseId,jdbcType=VARCHAR},#{item.enterpriseId,jdbcType=VARCHAR},
#{item.dataId,jdbcType=VARCHAR},#{item.dataContent}, #{item.dataId,jdbcType=VARCHAR},#{item.dataContent},
#{item.pDataId,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.dataType,jdbcType=INTEGER}, #{item.pDataId,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.dataType,jdbcType=INTEGER},
#{item.statusFlag,jdbcType=INTEGER}, now(), now() #{item.statusFlag,jdbcType=INTEGER}, now(), now()
) )
</foreach> </foreach>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog">
update tab_haoban_pre_deal_log update tab_haoban_pre_deal_log
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="dataId != null"> <if test="dataId != null">
data_id = #{dataId,jdbcType=VARCHAR}, data_id = #{dataId,jdbcType=VARCHAR},
</if> </if>
<if test="pDataId != null"> <if test="pDataId != null">
p_data_id = #{pDataId,jdbcType=VARCHAR}, p_data_id = #{pDataId,jdbcType=VARCHAR},
</if> </if>
<if test="taskId != null"> <if test="taskId != null">
task_id = #{taskId,jdbcType=VARCHAR}, task_id = #{taskId,jdbcType=VARCHAR},
</if> </if>
<if test="dataType != null"> <if test="dataType != null">
data_type = #{dataType,jdbcType=INTEGER}, data_type = #{dataType,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanPreDealLog">
update tab_haoban_pre_deal_log update tab_haoban_pre_deal_log
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
data_id = #{dataId,jdbcType=VARCHAR}, data_id = #{dataId,jdbcType=VARCHAR},
p_data_id = #{pDataId,jdbcType=VARCHAR}, p_data_id = #{pDataId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=VARCHAR}, task_id = #{taskId,jdbcType=VARCHAR},
data_type = #{dataType,jdbcType=INTEGER}, data_type = #{dataType,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<select id="getByDataId" resultMap="BaseResultMap"> <select id="getByDataId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List_data"/> <include refid="Base_Column_List_data"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_id=#{dataId} where task_id = #{taskId} and data_id=#{dataId}
<if test="status!=-1"> <if test="status!=-1">
and status_flag=#{status} and status_flag=#{status}
</if> </if>
<if test="dataType!=-1"> <if test="dataType!=-1">
and data_type=#{dataType} and data_type=#{dataType}
</if> </if>
</select> </select>
<select id="listByPDataId" resultMap="BaseResultMap"> <select id="listByPDataId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType} where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
<if test="status!=-1"> <if test="status!=-1">
and status_flag=#{status} and status_flag=#{status}
</if> </if>
</select> </select>
<select id="listReByPDataId" resultMap="BaseResultMap"> <select id="listReByPDataId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType} where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
and status_flag in(0,1,3) and status_flag in(0,1,3)
</select> </select>
<update id="updateStatusByDataId"> <update id="updateStatusByDataId">
update tab_haoban_pre_deal_log update tab_haoban_pre_deal_log
<set> <set>
status_flag = #{status,jdbcType=INTEGER}, status_flag = #{status,jdbcType=INTEGER},
reason=#{reason}, reason=#{reason},
update_time = now() update_time = now()
</set> </set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId} where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
<if test="dataType!=-1"> <if test="dataType!=-1">
and data_type=#{dataType} and data_type=#{dataType}
</if> </if>
</update> </update>
<select id="checkTask" resultType="Integer"> <select id="checkTask" resultType="Integer">
select select
count(*) count(*)
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType} where task_id = #{taskId} and data_type=#{dataType}
and status_flag=#{status} and status_flag=#{status}
</select> </select>
<select id="listByTaskId" resultMap="BaseResultMap"> <select id="listByTaskId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType} where task_id = #{taskId} and data_type=#{dataType}
and status_flag=#{status} and status_flag=#{status}
</select> </select>
<select id="countByTaskId" resultType="Integer"> <select id="countByTaskId" resultType="Integer">
select select
COUNT(*) COUNT(*)
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
<if test="dataType!=-1"> <if test="dataType!=-1">
and data_type=#{dataType} and data_type=#{dataType}
</if> </if>
<if test="status!=-1"> <if test="status!=-1">
and status_flag=#{status} and status_flag=#{status}
</if> </if>
</select> </select>
<select id="countExcepAndPreByTaskId" resultType="Integer"> <select id="countExcepAndPreByTaskId" resultType="Integer">
select select
COUNT(*) COUNT(*)
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
<if test="dataType!=-1"> <if test="dataType!=-1">
and data_type=#{dataType} and data_type=#{dataType}
</if> </if>
and status_flag in(0,3) and status_flag in(0,3)
</select> </select>
<select id="listRebuildDepartByTaskId" resultMap="BaseResultMap"> <select id="listRebuildDepartByTaskId" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM FROM
tab_haoban_pre_deal_log a tab_haoban_pre_deal_log a
WHERE WHERE
a.task_id = #{taskId} a.task_id = #{taskId}
AND data_type = 0 AND data_type = 0
AND status_flag in(0,3) AND status_flag in(0,3)
AND EXISTS ( AND EXISTS (
SELECT SELECT
1 1
FROM FROM
tab_haoban_pre_deal_log b tab_haoban_pre_deal_log b
WHERE WHERE
b.task_id = #{taskId} b.task_id = #{taskId}
AND data_type = 0 AND data_type = 0
AND a.p_data_id = b.data_id AND a.p_data_id = b.data_id
AND b.status_flag = 2 AND b.status_flag = 2
) )
</select> </select>
<select id="listRebuildByTaskId" resultMap="BaseResultMap"> <select id="listRebuildByTaskId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType} where task_id = #{taskId} and data_type=#{dataType}
and status_flag in(0,3) and status_flag in(0,3)
</select> </select>
<update id="updateExceptionToPre"> <update id="updateExceptionToPre">
update tab_haoban_pre_deal_log update tab_haoban_pre_deal_log
<set> <set>
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
</set> </set>
where status_flag = 3 and task_id=#{taskId} where status_flag = 3 and task_id=#{taskId}
</update> </update>
<select id="listExceptionByTask" resultMap="BaseResultMap"> <select id="listExceptionByTask" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List_data"/> <include refid="Base_Column_List_data"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and status_flag =3 and status_flag =3
</select> </select>
<select id="countByDataId" resultType="integer"> <select id="countByDataId" resultType="integer">
select select
count(*) count(*)
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and data_id =#{dataId} and data_id =#{dataId}
<if test="dataType!=-1"> <if test="dataType!=-1">
and data_type=#{dataType} and data_type=#{dataType}
</if> </if>
</select> </select>
<select id="listDataIdByTaskIdAndDataType" resultType="java.lang.String"> <select id="listDataIdByTaskIdAndDataType" resultType="java.lang.String">
select select
data_id data_id
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and data_type =#{dataType} and data_type =#{dataType}
</select> </select>
<select id="getLastPreDataByTaskId" resultMap="BaseResultMap"> <select id="getLastPreDataByTaskId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId,jdbcType=INTEGER} order by update_time desc limit 1 where task_id = #{taskId,jdbcType=INTEGER} order by update_time desc limit 1
</select> </select>
<select id="getRootDataIdByWxEnterpriseIdAndTaskId" resultType="java.lang.String"> <select id="getRootDataIdByWxEnterpriseIdAndTaskId" resultType="java.lang.String">
select select
data_id data_id
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and p_data_id =0 and p_data_id =0
and wx_enterprise_id =#{wxEnterpriseId} limit 1 and wx_enterprise_id =#{wxEnterpriseId} limit 1
</select> </select>
<update id="updateFriendStatusByDataId"> <update id="updateFriendStatusByDataId">
update tab_haoban_pre_deal_log update tab_haoban_pre_deal_log
<set> <set>
status_flag = #{status,jdbcType=INTEGER}, status_flag = #{status,jdbcType=INTEGER},
reason=#{reason}, reason=#{reason},
data_content = #{dataContent}, data_content = #{dataContent},
update_time = now() update_time = now()
</set> </set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId} where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
</update> </update>
<update id="updateFriendStatusAndRelationKeyByDataId"> <update id="updateFriendStatusAndRelationKeyByDataId">
update tab_haoban_pre_deal_log update tab_haoban_pre_deal_log
<set> <set>
status_flag = #{status,jdbcType=INTEGER}, status_flag = #{status,jdbcType=INTEGER},
reason=#{reason}, reason=#{reason},
<if test="dataContent !=null"> <if test="dataContent !=null">
data_content = #{dataContent}, data_content = #{dataContent},
</if> </if>
relation_key=#{relationKey}, relation_key=#{relationKey},
update_time = now() update_time = now()
</set> </set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId} where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
</update> </update>
<select id="countFailStaffTaskByTaskIdAndPDataId" resultType="integer"> <select id="countFailStaffTaskByTaskIdAndPDataId" resultType="integer">
select select
count(*) count(*)
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and p_data_id =#{pDataId} and p_data_id =#{pDataId}
and status_flag != 2 and status_flag != 2
and status_flag != 3 and status_flag != 3
</select> </select>
<select id="listByPDataIdAndTaskId" resultMap="BaseResultMap"> <select id="listByPDataIdAndTaskId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List_data"/> <include refid="Base_Column_List_data"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and p_data_id =#{pDataId} and p_data_id =#{pDataId}
</select> </select>
<select id="getByRelationKey" resultMap="BaseResultMap"> <select id="getByRelationKey" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List_data"/> <include refid="Base_Column_List_data"/>
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
and relation_key =#{relationKey} and relation_key =#{relationKey}
and data_type =#{dataType} and data_type =#{dataType}
</select> </select>
<select id="checkTaskFriend" resultType="Integer"> <select id="checkTaskFriend" resultType="Integer">
select select
count(*) count(*)
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} where task_id = #{taskId}
<if test="pDataId!=null"> <if test="pDataId!=null">
and p_data_id=#{pDataId} and p_data_id=#{pDataId}
</if> </if>
and data_type=#{dataType} and data_type=#{dataType}
and status_flag in(0,1) and status_flag in(0,1)
</select> </select>
<select id="listReDataIdByPDataId" resultType="String"> <select id="listReDataIdByPDataId" resultType="String">
select select
data_id data_id
from tab_haoban_pre_deal_log from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType} where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
and status_flag in(0,1,3) and status_flag in(0,1,3)
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.QywxSyncLogMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.QywxSyncLogMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxSyncLog"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
<id column="qywx_sync_log_id" jdbcType="VARCHAR" property="qywxSyncLogId"/> <id column="qywx_sync_log_id" jdbcType="VARCHAR" property="qywxSyncLogId"/>
<result column="qywx_tag_relation_id" jdbcType="VARCHAR" property="qywxTagRelationId"/> <result column="qywx_tag_relation_id" jdbcType="VARCHAR" property="qywxTagRelationId"/>
<result column="member_tag_id" jdbcType="VARCHAR" property="memberTagId"/> <result column="member_tag_id" jdbcType="VARCHAR" property="memberTagId"/>
<result column="member_tag_name" jdbcType="VARCHAR" property="memberTagName"/> <result column="member_tag_name" jdbcType="VARCHAR" property="memberTagName"/>
<result column="business_type" jdbcType="INTEGER" property="businessType"/> <result column="business_type" jdbcType="INTEGER" property="businessType"/>
<result column="change_code" jdbcType="VARCHAR" property="changeCode"/> <result column="change_code" jdbcType="VARCHAR" property="changeCode"/>
<result column="log_content" jdbcType="VARCHAR" property="logContent"/> <result column="log_content" jdbcType="VARCHAR" property="logContent"/>
<result column="opt_code" jdbcType="VARCHAR" property="optCode"/> <result column="opt_code" jdbcType="VARCHAR" property="optCode"/>
<result column="opt_staff_id" jdbcType="VARCHAR" property="optStaffId"/> <result column="opt_staff_id" jdbcType="VARCHAR" property="optStaffId"/>
<result column="sync_task_id" jdbcType="VARCHAR" property="syncTaskId"/> <result column="sync_task_id" jdbcType="VARCHAR" property="syncTaskId"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
qywx_sync_log_id, qywx_tag_relation_id, member_tag_id, member_tag_name, business_type, qywx_sync_log_id, qywx_tag_relation_id, member_tag_id, member_tag_name, business_type,
change_code, log_content, opt_code, opt_staff_id, sync_task_id, status_flag, create_time, change_code, log_content, opt_code, opt_staff_id, sync_task_id, status_flag, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_sync_log from tab_haoban_qywx_sync_log
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR} where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_qywx_sync_log delete from tab_haoban_qywx_sync_log
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR} where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
insert into tab_haoban_qywx_sync_log (qywx_sync_log_id, qywx_tag_relation_id, insert into tab_haoban_qywx_sync_log (qywx_sync_log_id, qywx_tag_relation_id,
member_tag_id, member_tag_name, business_type, member_tag_id, member_tag_name, business_type,
change_code, log_content, opt_code, change_code, log_content, opt_code,
opt_staff_id, sync_task_id, status_flag, opt_staff_id, sync_task_id, status_flag,
create_time, update_time) create_time, update_time)
values (#{qywxSyncLogId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR}, values (#{qywxSyncLogId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR},
#{memberTagId,jdbcType=VARCHAR}, #{memberTagName,jdbcType=VARCHAR}, #{businessType,jdbcType=INTEGER}, #{memberTagId,jdbcType=VARCHAR}, #{memberTagName,jdbcType=VARCHAR}, #{businessType,jdbcType=INTEGER},
#{changeCode,jdbcType=VARCHAR}, #{logContent,jdbcType=VARCHAR}, #{optCode,jdbcType=VARCHAR}, #{changeCode,jdbcType=VARCHAR}, #{logContent,jdbcType=VARCHAR}, #{optCode,jdbcType=VARCHAR},
#{optStaffId,jdbcType=VARCHAR}, #{syncTaskId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{optStaffId,jdbcType=VARCHAR}, #{syncTaskId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
insert into tab_haoban_qywx_sync_log insert into tab_haoban_qywx_sync_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="qywxSyncLogId != null"> <if test="qywxSyncLogId != null">
qywx_sync_log_id, qywx_sync_log_id,
</if> </if>
<if test="qywxTagRelationId != null"> <if test="qywxTagRelationId != null">
qywx_tag_relation_id, qywx_tag_relation_id,
</if> </if>
<if test="memberTagId != null"> <if test="memberTagId != null">
member_tag_id, member_tag_id,
</if> </if>
<if test="memberTagName != null"> <if test="memberTagName != null">
member_tag_name, member_tag_name,
</if> </if>
<if test="businessType != null"> <if test="businessType != null">
business_type, business_type,
</if> </if>
<if test="changeCode != null"> <if test="changeCode != null">
change_code, change_code,
</if> </if>
<if test="logContent != null"> <if test="logContent != null">
log_content, log_content,
</if> </if>
<if test="optCode != null"> <if test="optCode != null">
opt_code, opt_code,
</if> </if>
<if test="optStaffId != null"> <if test="optStaffId != null">
opt_staff_id, opt_staff_id,
</if> </if>
<if test="syncTaskId != null"> <if test="syncTaskId != null">
sync_task_id, sync_task_id,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="qywxSyncLogId != null"> <if test="qywxSyncLogId != null">
#{qywxSyncLogId,jdbcType=VARCHAR}, #{qywxSyncLogId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagRelationId != null"> <if test="qywxTagRelationId != null">
#{qywxTagRelationId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR},
</if> </if>
<if test="memberTagId != null"> <if test="memberTagId != null">
#{memberTagId,jdbcType=VARCHAR}, #{memberTagId,jdbcType=VARCHAR},
</if> </if>
<if test="memberTagName != null"> <if test="memberTagName != null">
#{memberTagName,jdbcType=VARCHAR}, #{memberTagName,jdbcType=VARCHAR},
</if> </if>
<if test="businessType != null"> <if test="businessType != null">
#{businessType,jdbcType=INTEGER}, #{businessType,jdbcType=INTEGER},
</if> </if>
<if test="changeCode != null"> <if test="changeCode != null">
#{changeCode,jdbcType=VARCHAR}, #{changeCode,jdbcType=VARCHAR},
</if> </if>
<if test="logContent != null"> <if test="logContent != null">
#{logContent,jdbcType=VARCHAR}, #{logContent,jdbcType=VARCHAR},
</if> </if>
<if test="optCode != null"> <if test="optCode != null">
#{optCode,jdbcType=VARCHAR}, #{optCode,jdbcType=VARCHAR},
</if> </if>
<if test="optStaffId != null"> <if test="optStaffId != null">
#{optStaffId,jdbcType=VARCHAR}, #{optStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="syncTaskId != null"> <if test="syncTaskId != null">
#{syncTaskId,jdbcType=VARCHAR}, #{syncTaskId,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
update tab_haoban_qywx_sync_log update tab_haoban_qywx_sync_log
<set> <set>
<if test="qywxTagRelationId != null"> <if test="qywxTagRelationId != null">
qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}, qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
</if> </if>
<if test="memberTagId != null"> <if test="memberTagId != null">
member_tag_id = #{memberTagId,jdbcType=VARCHAR}, member_tag_id = #{memberTagId,jdbcType=VARCHAR},
</if> </if>
<if test="memberTagName != null"> <if test="memberTagName != null">
member_tag_name = #{memberTagName,jdbcType=VARCHAR}, member_tag_name = #{memberTagName,jdbcType=VARCHAR},
</if> </if>
<if test="businessType != null"> <if test="businessType != null">
business_type = #{businessType,jdbcType=INTEGER}, business_type = #{businessType,jdbcType=INTEGER},
</if> </if>
<if test="changeCode != null"> <if test="changeCode != null">
change_code = #{changeCode,jdbcType=VARCHAR}, change_code = #{changeCode,jdbcType=VARCHAR},
</if> </if>
<if test="logContent != null"> <if test="logContent != null">
log_content = #{logContent,jdbcType=VARCHAR}, log_content = #{logContent,jdbcType=VARCHAR},
</if> </if>
<if test="optCode != null"> <if test="optCode != null">
opt_code = #{optCode,jdbcType=VARCHAR}, opt_code = #{optCode,jdbcType=VARCHAR},
</if> </if>
<if test="optStaffId != null"> <if test="optStaffId != null">
opt_staff_id = #{optStaffId,jdbcType=VARCHAR}, opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
</if> </if>
<if test="syncTaskId != null"> <if test="syncTaskId != null">
sync_task_id = #{syncTaskId,jdbcType=VARCHAR}, sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR} where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxSyncLog">
update tab_haoban_qywx_sync_log update tab_haoban_qywx_sync_log
set qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}, set qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
member_tag_id = #{memberTagId,jdbcType=VARCHAR}, member_tag_id = #{memberTagId,jdbcType=VARCHAR},
member_tag_name = #{memberTagName,jdbcType=VARCHAR}, member_tag_name = #{memberTagName,jdbcType=VARCHAR},
business_type = #{businessType,jdbcType=INTEGER}, business_type = #{businessType,jdbcType=INTEGER},
change_code = #{changeCode,jdbcType=VARCHAR}, change_code = #{changeCode,jdbcType=VARCHAR},
log_content = #{logContent,jdbcType=VARCHAR}, log_content = #{logContent,jdbcType=VARCHAR},
opt_code = #{optCode,jdbcType=VARCHAR}, opt_code = #{optCode,jdbcType=VARCHAR},
opt_staff_id = #{optStaffId,jdbcType=VARCHAR}, opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
sync_task_id = #{syncTaskId,jdbcType=VARCHAR}, sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR} where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.QywxTagItemMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.QywxTagItemMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxTagItem"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxTagItem">
<id column="qywx_tag_item_id" jdbcType="VARCHAR" property="qywxTagItemId"/> <id column="qywx_tag_item_id" jdbcType="VARCHAR" property="qywxTagItemId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="qywx_tag_id" jdbcType="VARCHAR" property="qywxTagId"/> <result column="qywx_tag_id" jdbcType="VARCHAR" property="qywxTagId"/>
<result column="qywx_group_key" jdbcType="VARCHAR" property="qywxGroupKey"/> <result column="qywx_group_key" jdbcType="VARCHAR" property="qywxGroupKey"/>
<result column="qywx_tag_key" jdbcType="VARCHAR" property="qywxTagKey"/> <result column="qywx_tag_key" jdbcType="VARCHAR" property="qywxTagKey"/>
<result column="qywx_tag_name" jdbcType="VARCHAR" property="qywxTagName"/> <result column="qywx_tag_name" jdbcType="VARCHAR" property="qywxTagName"/>
<result column="order" jdbcType="BIGINT" property="order"/> <result column="order" jdbcType="BIGINT" property="order"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
qywx_tag_item_id, wx_enterprise_id, qywx_tag_id, qywx_group_key, qywx_tag_key, qywx_tag_name, qywx_tag_item_id, wx_enterprise_id, qywx_tag_id, qywx_group_key, qywx_tag_key, qywx_tag_name,
`order`, status_flag, create_time, update_time `order`, status_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_item from tab_haoban_qywx_tag_item
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR} where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_qywx_tag_item delete from tab_haoban_qywx_tag_item
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR} where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem">
insert into tab_haoban_qywx_tag_item (qywx_tag_item_id, wx_enterprise_id, qywx_tag_id, insert into tab_haoban_qywx_tag_item (qywx_tag_item_id, wx_enterprise_id, qywx_tag_id,
qywx_group_key, qywx_tag_key, qywx_tag_name, qywx_group_key, qywx_tag_key, qywx_tag_name,
`order`, status_flag, create_time, `order`, status_flag, create_time,
update_time) update_time)
values (#{qywxTagItemId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR}, values (#{qywxTagItemId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR},
#{qywxGroupKey,jdbcType=VARCHAR}, #{qywxTagKey,jdbcType=VARCHAR}, #{qywxTagName,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR}, #{qywxTagKey,jdbcType=VARCHAR}, #{qywxTagName,jdbcType=VARCHAR},
#{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem">
insert into tab_haoban_qywx_tag_item insert into tab_haoban_qywx_tag_item
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="qywxTagItemId != null"> <if test="qywxTagItemId != null">
qywx_tag_item_id, qywx_tag_item_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="qywxTagId != null"> <if test="qywxTagId != null">
qywx_tag_id, qywx_tag_id,
</if> </if>
<if test="qywxGroupKey != null"> <if test="qywxGroupKey != null">
qywx_group_key, qywx_group_key,
</if> </if>
<if test="qywxTagKey != null"> <if test="qywxTagKey != null">
qywx_tag_key, qywx_tag_key,
</if> </if>
<if test="qywxTagName != null"> <if test="qywxTagName != null">
qywx_tag_name, qywx_tag_name,
</if> </if>
<if test="order != null"> <if test="order != null">
`order`, `order`,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="qywxTagItemId != null"> <if test="qywxTagItemId != null">
#{qywxTagItemId,jdbcType=VARCHAR}, #{qywxTagItemId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagId != null"> <if test="qywxTagId != null">
#{qywxTagId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxGroupKey != null"> <if test="qywxGroupKey != null">
#{qywxGroupKey,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagKey != null"> <if test="qywxTagKey != null">
#{qywxTagKey,jdbcType=VARCHAR}, #{qywxTagKey,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagName != null"> <if test="qywxTagName != null">
#{qywxTagName,jdbcType=VARCHAR}, #{qywxTagName,jdbcType=VARCHAR},
</if> </if>
<if test="order != null"> <if test="order != null">
#{order,jdbcType=BIGINT}, #{order,jdbcType=BIGINT},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem">
update tab_haoban_qywx_tag_item update tab_haoban_qywx_tag_item
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagId != null"> <if test="qywxTagId != null">
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}, qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxGroupKey != null"> <if test="qywxGroupKey != null">
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR}, qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagKey != null"> <if test="qywxTagKey != null">
qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR}, qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagName != null"> <if test="qywxTagName != null">
qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR}, qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR},
</if> </if>
<if test="order != null"> <if test="order != null">
`order` = #{order,jdbcType=BIGINT}, `order` = #{order,jdbcType=BIGINT},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR} where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagItem">
update tab_haoban_qywx_tag_item update tab_haoban_qywx_tag_item
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}, qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR}, qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR}, qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR},
qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR}, qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR},
`order` = #{order,jdbcType=BIGINT}, `order` = #{order,jdbcType=BIGINT},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR} where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</update> </update>
<select id="listByQywxTagId" resultMap="BaseResultMap"> <select id="listByQywxTagId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_item from tab_haoban_qywx_tag_item
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</select> </select>
<select id="listByQywxTagGroupKey" resultMap="BaseResultMap"> <select id="listByQywxTagGroupKey" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_item from tab_haoban_qywx_tag_item
where qywx_group_key = #{qywxTagGroupKey} where qywx_group_key = #{qywxTagGroupKey}
and status_flag=1 and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</select> </select>
<update id="delByQywxTagGroupKey"> <update id="delByQywxTagGroupKey">
update tab_haoban_qywx_tag_item update tab_haoban_qywx_tag_item
set set
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where qywx_group_key = #{qywxTagGroupKey} where qywx_group_key = #{qywxTagGroupKey}
and status_flag=1 and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</update> </update>
<select id="getByQywxTagKey" resultMap="BaseResultMap"> <select id="getByQywxTagKey" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_item from tab_haoban_qywx_tag_item
where qywx_tag_key = #{qywxTagKey} where qywx_tag_key = #{qywxTagKey}
and status_flag=1 and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</select> </select>
<select id="listByQywxTagItemsIds" resultMap="BaseResultMap"> <select id="listByQywxTagItemsIds" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_item from tab_haoban_qywx_tag_item
where qywx_tag_item_id in where qywx_tag_item_id in
<foreach collection="ids" open="(" close=")" separator="," item="item"> <foreach collection="ids" open="(" close=")" separator="," item="item">
#{item} #{item}
</foreach> </foreach>
and status_flag=1 and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</select> </select>
<select id="listByQywxTagItemsKeys" resultMap="BaseResultMap"> <select id="listByQywxTagItemsKeys" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_item from tab_haoban_qywx_tag_item
where qywx_tag_key in where qywx_tag_key in
<foreach collection="qywxTagKeys" open="(" close=")" separator="," item="item"> <foreach collection="qywxTagKeys" open="(" close=")" separator="," item="item">
#{item} #{item}
</foreach> </foreach>
and status_flag=1 and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.QywxTagMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.QywxTagMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxTag"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxTag">
<id column="qywx_tag_id" jdbcType="VARCHAR" property="qywxTagId"/> <id column="qywx_tag_id" jdbcType="VARCHAR" property="qywxTagId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="qywx_group_key" jdbcType="VARCHAR" property="qywxGroupKey"/> <result column="qywx_group_key" jdbcType="VARCHAR" property="qywxGroupKey"/>
<result column="qywx_group_name" jdbcType="VARCHAR" property="qywxGroupName"/> <result column="qywx_group_name" jdbcType="VARCHAR" property="qywxGroupName"/>
<result column="order" jdbcType="BIGINT" property="order"/> <result column="order" jdbcType="BIGINT" property="order"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
qywx_tag_id, wx_enterprise_id, qywx_group_key, qywx_group_name, `order`, status_flag, qywx_tag_id, wx_enterprise_id, qywx_group_key, qywx_group_name, `order`, status_flag,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag from tab_haoban_qywx_tag
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_qywx_tag delete from tab_haoban_qywx_tag
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag">
insert into tab_haoban_qywx_tag (qywx_tag_id, wx_enterprise_id, qywx_group_key, insert into tab_haoban_qywx_tag (qywx_tag_id, wx_enterprise_id, qywx_group_key,
qywx_group_name, `order`, status_flag, qywx_group_name, `order`, status_flag,
create_time, update_time) create_time, update_time)
values (#{qywxTagId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR}, values (#{qywxTagId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR},
#{qywxGroupName,jdbcType=VARCHAR}, #{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER}, #{qywxGroupName,jdbcType=VARCHAR}, #{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag">
insert into tab_haoban_qywx_tag insert into tab_haoban_qywx_tag
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="qywxTagId != null"> <if test="qywxTagId != null">
qywx_tag_id, qywx_tag_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="qywxGroupKey != null"> <if test="qywxGroupKey != null">
qywx_group_key, qywx_group_key,
</if> </if>
<if test="qywxGroupName != null"> <if test="qywxGroupName != null">
qywx_group_name, qywx_group_name,
</if> </if>
<if test="order != null"> <if test="order != null">
`order`, `order`,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="qywxTagId != null"> <if test="qywxTagId != null">
#{qywxTagId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxGroupKey != null"> <if test="qywxGroupKey != null">
#{qywxGroupKey,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR},
</if> </if>
<if test="qywxGroupName != null"> <if test="qywxGroupName != null">
#{qywxGroupName,jdbcType=VARCHAR}, #{qywxGroupName,jdbcType=VARCHAR},
</if> </if>
<if test="order != null"> <if test="order != null">
#{order,jdbcType=BIGINT}, #{order,jdbcType=BIGINT},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag">
update tab_haoban_qywx_tag update tab_haoban_qywx_tag
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxGroupKey != null"> <if test="qywxGroupKey != null">
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR}, qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
</if> </if>
<if test="qywxGroupName != null"> <if test="qywxGroupName != null">
qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR}, qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR},
</if> </if>
<if test="order != null"> <if test="order != null">
`order` = #{order,jdbcType=BIGINT}, `order` = #{order,jdbcType=BIGINT},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxTag">
update tab_haoban_qywx_tag update tab_haoban_qywx_tag
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR}, qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR}, qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR},
`order` = #{order,jdbcType=BIGINT}, `order` = #{order,jdbcType=BIGINT},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</update> </update>
<select id="getByQywxGroupKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="getByQywxGroupKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag from tab_haoban_qywx_tag
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_group_key=#{qywxTagGroupKey} and qywx_group_key=#{qywxTagGroupKey}
and status_flag=1 and status_flag=1
</select> </select>
<update id="delByGroupKey"> <update id="delByGroupKey">
UPDATE UPDATE
tab_haoban_qywx_tag tab_haoban_qywx_tag
SET SET
status_flag=0, status_flag=0,
update_time=now() update_time=now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_group_key=#{qywxTagGroupKey} and qywx_group_key=#{qywxTagGroupKey}
and status_flag=1 and status_flag=1
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.QywxTagRelationMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.QywxTagRelationMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxTagRelation"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabQywxTagRelation">
<id column="qywx_tag_relation_id" jdbcType="VARCHAR" property="qywxTagRelationId"/> <id column="qywx_tag_relation_id" jdbcType="VARCHAR" property="qywxTagRelationId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="member_tag_id" jdbcType="VARCHAR" property="memberTagId"/> <result column="member_tag_id" jdbcType="VARCHAR" property="memberTagId"/>
<result column="tag_item_id" jdbcType="VARCHAR" property="tagItemId"/> <result column="tag_item_id" jdbcType="VARCHAR" property="tagItemId"/>
<result column="relation_type" jdbcType="INTEGER" property="relationType"/> <result column="relation_type" jdbcType="INTEGER" property="relationType"/>
<result column="sync_flag" jdbcType="INTEGER" property="syncFlag"/> <result column="sync_flag" jdbcType="INTEGER" property="syncFlag"/>
<result column="order" jdbcType="BIGINT" property="order"/> <result column="order" jdbcType="BIGINT" property="order"/>
<result column="qywx_tag_id" jdbcType="VARCHAR" property="qywxTagId"/> <result column="qywx_tag_id" jdbcType="VARCHAR" property="qywxTagId"/>
<result column="qywx_tag_item_id" jdbcType="VARCHAR" property="qywxTagItemId"/> <result column="qywx_tag_item_id" jdbcType="VARCHAR" property="qywxTagItemId"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
qywx_tag_relation_id, wx_enterprise_id, enterprise_id, member_tag_id, tag_item_id, qywx_tag_relation_id, wx_enterprise_id, enterprise_id, member_tag_id, tag_item_id,
relation_type, sync_flag, `order`, qywx_tag_id, qywx_tag_item_id, status_flag, create_time, relation_type, sync_flag, `order`, qywx_tag_id, qywx_tag_item_id, status_flag, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR} where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_qywx_tag_relation delete from tab_haoban_qywx_tag_relation
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR} where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation">
insert into tab_haoban_qywx_tag_relation (qywx_tag_relation_id, wx_enterprise_id, insert into tab_haoban_qywx_tag_relation (qywx_tag_relation_id, wx_enterprise_id,
enterprise_id, member_tag_id, tag_item_id, enterprise_id, member_tag_id, tag_item_id,
relation_type, sync_flag, `order`, relation_type, sync_flag, `order`,
qywx_tag_id, qywx_tag_item_id, status_flag, qywx_tag_id, qywx_tag_item_id, status_flag,
create_time, update_time) create_time, update_time)
values (#{qywxTagRelationId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{qywxTagRelationId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{memberTagId,jdbcType=VARCHAR}, #{tagItemId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{memberTagId,jdbcType=VARCHAR}, #{tagItemId,jdbcType=VARCHAR},
#{relationType,jdbcType=INTEGER}, #{syncFlag,jdbcType=INTEGER}, #{order,jdbcType=BIGINT}, #{relationType,jdbcType=INTEGER}, #{syncFlag,jdbcType=INTEGER}, #{order,jdbcType=BIGINT},
#{qywxTagId,jdbcType=VARCHAR}, #{qywxTagItemId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{qywxTagId,jdbcType=VARCHAR}, #{qywxTagItemId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation">
insert into tab_haoban_qywx_tag_relation insert into tab_haoban_qywx_tag_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="qywxTagRelationId != null"> <if test="qywxTagRelationId != null">
qywx_tag_relation_id, qywx_tag_relation_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="memberTagId != null"> <if test="memberTagId != null">
member_tag_id, member_tag_id,
</if> </if>
<if test="tagItemId != null"> <if test="tagItemId != null">
tag_item_id, tag_item_id,
</if> </if>
<if test="relationType != null"> <if test="relationType != null">
relation_type, relation_type,
</if> </if>
<if test="syncFlag != null"> <if test="syncFlag != null">
sync_flag, sync_flag,
</if> </if>
<if test="order != null"> <if test="order != null">
`order`, `order`,
</if> </if>
<if test="qywxTagId != null"> <if test="qywxTagId != null">
qywx_tag_id, qywx_tag_id,
</if> </if>
<if test="qywxTagItemId != null"> <if test="qywxTagItemId != null">
qywx_tag_item_id, qywx_tag_item_id,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="qywxTagRelationId != null"> <if test="qywxTagRelationId != null">
#{qywxTagRelationId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="memberTagId != null"> <if test="memberTagId != null">
#{memberTagId,jdbcType=VARCHAR}, #{memberTagId,jdbcType=VARCHAR},
</if> </if>
<if test="tagItemId != null"> <if test="tagItemId != null">
#{tagItemId,jdbcType=VARCHAR}, #{tagItemId,jdbcType=VARCHAR},
</if> </if>
<if test="relationType != null"> <if test="relationType != null">
#{relationType,jdbcType=INTEGER}, #{relationType,jdbcType=INTEGER},
</if> </if>
<if test="syncFlag != null"> <if test="syncFlag != null">
#{syncFlag,jdbcType=INTEGER}, #{syncFlag,jdbcType=INTEGER},
</if> </if>
<if test="order != null"> <if test="order != null">
#{order,jdbcType=BIGINT}, #{order,jdbcType=BIGINT},
</if> </if>
<if test="qywxTagId != null"> <if test="qywxTagId != null">
#{qywxTagId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagItemId != null"> <if test="qywxTagItemId != null">
#{qywxTagItemId,jdbcType=VARCHAR}, #{qywxTagItemId,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation">
update tab_haoban_qywx_tag_relation update tab_haoban_qywx_tag_relation
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="memberTagId != null"> <if test="memberTagId != null">
member_tag_id = #{memberTagId,jdbcType=VARCHAR}, member_tag_id = #{memberTagId,jdbcType=VARCHAR},
</if> </if>
<if test="tagItemId != null"> <if test="tagItemId != null">
tag_item_id = #{tagItemId,jdbcType=VARCHAR}, tag_item_id = #{tagItemId,jdbcType=VARCHAR},
</if> </if>
<if test="relationType != null"> <if test="relationType != null">
relation_type = #{relationType,jdbcType=INTEGER}, relation_type = #{relationType,jdbcType=INTEGER},
</if> </if>
<if test="syncFlag != null"> <if test="syncFlag != null">
sync_flag = #{syncFlag,jdbcType=INTEGER}, sync_flag = #{syncFlag,jdbcType=INTEGER},
</if> </if>
<if test="order != null"> <if test="order != null">
`order` = #{order,jdbcType=BIGINT}, `order` = #{order,jdbcType=BIGINT},
</if> </if>
<if test="qywxTagId != null"> <if test="qywxTagId != null">
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}, qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
</if> </if>
<if test="qywxTagItemId != null"> <if test="qywxTagItemId != null">
qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}, qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR} where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabQywxTagRelation">
update tab_haoban_qywx_tag_relation update tab_haoban_qywx_tag_relation
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
member_tag_id = #{memberTagId,jdbcType=VARCHAR}, member_tag_id = #{memberTagId,jdbcType=VARCHAR},
tag_item_id = #{tagItemId,jdbcType=VARCHAR}, tag_item_id = #{tagItemId,jdbcType=VARCHAR},
relation_type = #{relationType,jdbcType=INTEGER}, relation_type = #{relationType,jdbcType=INTEGER},
sync_flag = #{syncFlag,jdbcType=INTEGER}, sync_flag = #{syncFlag,jdbcType=INTEGER},
`order` = #{order,jdbcType=BIGINT}, `order` = #{order,jdbcType=BIGINT},
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}, qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}, qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR} where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</update> </update>
<select id="listBySyncStatus" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="listBySyncStatus" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<select id="listByMemberTagId" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="listByMemberTagId" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where where
member_tag_id = #{memberTagId,jdbcType=VARCHAR} member_tag_id = #{memberTagId,jdbcType=VARCHAR}
<if test="wxEnterpriseId!=null"> <if test="wxEnterpriseId!=null">
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if> </if>
and status_flag=1 and status_flag=1
</select> </select>
<select id="getQywxTagRelationByTagItemId" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="getQywxTagRelationByTagItemId" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and tag_item_id = #{tagItemId,jdbcType=VARCHAR} and tag_item_id = #{tagItemId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<update id="delByMemberTagId"> <update id="delByMemberTagId">
update tab_haoban_qywx_tag_relation update tab_haoban_qywx_tag_relation
set set
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR} and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</update> </update>
<select id="listByQywxTagId" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="listByQywxTagId" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<select id="getQywxGroupByQywxTagId" resultMap="BaseResultMap"> <select id="getQywxGroupByQywxTagId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR} and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and relation_type=0 and relation_type=0
and status_flag=1 and status_flag=1
</select> </select>
<select id="getQywxTagByQywxTagItemId" resultMap="BaseResultMap"> <select id="getQywxTagByQywxTagItemId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_tag_relation from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR} and qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
and relation_type=1 and relation_type=1
and status_flag=1 and status_flag=1
</select> </select>
<update id="changeRelationSyncFlag"> <update id="changeRelationSyncFlag">
UPDATE tab_haoban_qywx_tag_relation UPDATE tab_haoban_qywx_tag_relation
SET SET
sync_flag=#{syncFlag}, sync_flag=#{syncFlag},
update_time=now() update_time=now()
where where
wx_enterprise_id = #{wxEnterpriseId} wx_enterprise_id = #{wxEnterpriseId}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR} and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.SyncTaskMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.SyncTaskMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanSyncTask"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanSyncTask">
<id column="task_id" jdbcType="VARCHAR" property="taskId"/> <id column="task_id" jdbcType="VARCHAR" property="taskId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="task_name" jdbcType="VARCHAR" property="taskName"/> <result column="task_name" jdbcType="VARCHAR" property="taskName"/>
<result column="add_user" jdbcType="VARCHAR" property="addUser"/> <result column="add_user" jdbcType="VARCHAR" property="addUser"/>
<result column="task_desc" jdbcType="VARCHAR" property="taskDesc"/> <result column="task_desc" jdbcType="VARCHAR" property="taskDesc"/>
<result column="task_type" jdbcType="INTEGER" property="taskType"/> <result column="task_type" jdbcType="INTEGER" property="taskType"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
task_id,wx_enterprise_id, task_name, add_user, task_desc,task_type, status_flag, create_time, update_time task_id,wx_enterprise_id, task_name, add_user, task_desc,task_type, status_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_sync_task from tab_haoban_sync_task
where task_id = #{taskId,jdbcType=VARCHAR} where task_id = #{taskId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_sync_task delete from tab_haoban_sync_task
where task_id = #{taskId,jdbcType=VARCHAR} where task_id = #{taskId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask">
insert into tab_haoban_sync_task (task_id,wx_enterprise_id, task_name, add_user, insert into tab_haoban_sync_task (task_id,wx_enterprise_id, task_name, add_user,
task_desc, status_flag,task_type, create_time, task_desc, status_flag,task_type, create_time,
update_time) update_time)
values (#{taskId,jdbcType=VARCHAR},#{wxEnterpriseId}, #{taskName,jdbcType=VARCHAR}, #{addUser,jdbcType=VARCHAR}, values (#{taskId,jdbcType=VARCHAR},#{wxEnterpriseId}, #{taskName,jdbcType=VARCHAR}, #{addUser,jdbcType=VARCHAR},
#{taskDesc,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},#{taskType}, now(),now()) #{taskDesc,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},#{taskType}, now(),now())
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask">
insert into tab_haoban_sync_task insert into tab_haoban_sync_task
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null"> <if test="taskId != null">
task_id, task_id,
</if> </if>
<if test="taskName != null"> <if test="taskName != null">
task_name, task_name,
</if> </if>
<if test="addUser != null"> <if test="addUser != null">
add_user, add_user,
</if> </if>
<if test="taskDesc != null"> <if test="taskDesc != null">
task_desc, task_desc,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null"> <if test="taskId != null">
#{taskId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR},
</if> </if>
<if test="taskName != null"> <if test="taskName != null">
#{taskName,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR},
</if> </if>
<if test="addUser != null"> <if test="addUser != null">
#{addUser,jdbcType=VARCHAR}, #{addUser,jdbcType=VARCHAR},
</if> </if>
<if test="taskDesc != null"> <if test="taskDesc != null">
#{taskDesc,jdbcType=VARCHAR}, #{taskDesc,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask">
update tab_haoban_sync_task update tab_haoban_sync_task
<set> <set>
<if test="taskName != null"> <if test="taskName != null">
task_name = #{taskName,jdbcType=VARCHAR}, task_name = #{taskName,jdbcType=VARCHAR},
</if> </if>
<if test="addUser != null"> <if test="addUser != null">
add_user = #{addUser,jdbcType=VARCHAR}, add_user = #{addUser,jdbcType=VARCHAR},
</if> </if>
<if test="taskDesc != null"> <if test="taskDesc != null">
task_desc = #{taskDesc,jdbcType=VARCHAR}, task_desc = #{taskDesc,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where task_id = #{taskId,jdbcType=VARCHAR} where task_id = #{taskId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncTask">
update tab_haoban_sync_task update tab_haoban_sync_task
set task_name = #{taskName,jdbcType=VARCHAR}, set task_name = #{taskName,jdbcType=VARCHAR},
add_user = #{addUser,jdbcType=VARCHAR}, add_user = #{addUser,jdbcType=VARCHAR},
task_desc = #{taskDesc,jdbcType=VARCHAR}, task_desc = #{taskDesc,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where task_id = #{taskId,jdbcType=VARCHAR} where task_id = #{taskId,jdbcType=VARCHAR}
</update> </update>
<select id="listPageByWxEid" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="listPageByWxEid" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_sync_task from tab_haoban_sync_task
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and task_type != 4 and task_type != 4
order by update_time desc order by update_time desc
</select> </select>
<select id="listTaskByType" resultMap="BaseResultMap"> <select id="listTaskByType" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_sync_task from tab_haoban_sync_task
where status_flag = 0 where status_flag = 0
and task_type = #{taskType} and task_type = #{taskType}
group by wx_enterprise_id group by wx_enterprise_id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.TabHaobanErrorLogMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.TabHaobanErrorLogMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanErrorLog"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanErrorLog">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" /> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
<result column="module_desc" jdbcType="VARCHAR" property="moduleDesc" /> <result column="module_desc" jdbcType="VARCHAR" property="moduleDesc" />
<result column="error_desc" jdbcType="VARCHAR" property="errorDesc" /> <result column="error_desc" jdbcType="VARCHAR" property="errorDesc" />
<result column="error_flag_id" jdbcType="VARCHAR" property="errorFlagId" /> <result column="error_flag_id" jdbcType="VARCHAR" property="errorFlagId" />
<result column="error_param" jdbcType="VARCHAR" property="errorParam" /> <result column="error_param" jdbcType="VARCHAR" property="errorParam" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time, id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time,
update_time update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_error_log from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tab_haoban_error_log delete from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog" useGeneratedKeys="true">
insert into tab_haoban_error_log (id,enterprise_id, module_desc, error_desc, insert into tab_haoban_error_log (id,enterprise_id, module_desc, error_desc,
error_flag_id, error_param, remark, error_flag_id, error_param, remark,
create_time, update_time) create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
#{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog" useGeneratedKeys="true">
insert into tab_haoban_error_log insert into tab_haoban_error_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="moduleDesc != null"> <if test="moduleDesc != null">
module_desc, module_desc,
</if> </if>
<if test="errorDesc != null"> <if test="errorDesc != null">
error_desc, error_desc,
</if> </if>
<if test="errorFlagId != null"> <if test="errorFlagId != null">
error_flag_id, error_flag_id,
</if> </if>
<if test="errorParam != null"> <if test="errorParam != null">
error_param, error_param,
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="moduleDesc != null"> <if test="moduleDesc != null">
#{moduleDesc,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR},
</if> </if>
<if test="errorDesc != null"> <if test="errorDesc != null">
#{errorDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
</if> </if>
<if test="errorFlagId != null"> <if test="errorFlagId != null">
#{errorFlagId,jdbcType=VARCHAR}, #{errorFlagId,jdbcType=VARCHAR},
</if> </if>
<if test="errorParam != null"> <if test="errorParam != null">
#{errorParam,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog">
update tab_haoban_error_log update tab_haoban_error_log
<set> <set>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="moduleDesc != null"> <if test="moduleDesc != null">
module_desc = #{moduleDesc,jdbcType=VARCHAR}, module_desc = #{moduleDesc,jdbcType=VARCHAR},
</if> </if>
<if test="errorDesc != null"> <if test="errorDesc != null">
error_desc = #{errorDesc,jdbcType=VARCHAR}, error_desc = #{errorDesc,jdbcType=VARCHAR},
</if> </if>
<if test="errorFlagId != null"> <if test="errorFlagId != null">
error_flag_id = #{errorFlagId,jdbcType=VARCHAR}, error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
</if> </if>
<if test="errorParam != null"> <if test="errorParam != null">
error_param = #{errorParam,jdbcType=VARCHAR}, error_param = #{errorParam,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog">
update tab_haoban_error_log update tab_haoban_error_log
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
module_desc = #{moduleDesc,jdbcType=VARCHAR}, module_desc = #{moduleDesc,jdbcType=VARCHAR},
error_desc = #{errorDesc,jdbcType=VARCHAR}, error_desc = #{errorDesc,jdbcType=VARCHAR},
error_flag_id = #{errorFlagId,jdbcType=VARCHAR}, error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
error_param = #{errorParam,jdbcType=VARCHAR}, error_param = #{errorParam,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.TabHaobanFriendSettingMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.TabHaobanFriendSettingMapper">
<resultMap type="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting" id="TabHaobanFriendSettingMap"> <resultMap type="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting" id="TabHaobanFriendSettingMap">
<result property="friendSettingId" column="friend_setting_id" jdbcType="BIGINT"/> <result property="friendSettingId" column="friend_setting_id" jdbcType="BIGINT"/>
<result property="wxEnterpriseId" column="wx_enterprise_id" jdbcType="VARCHAR"/> <result property="wxEnterpriseId" column="wx_enterprise_id" jdbcType="VARCHAR"/>
<result property="friendSettingType" column="friend_setting_type" jdbcType="INTEGER"/> <result property="friendSettingType" column="friend_setting_type" jdbcType="INTEGER"/>
<result property="updateId" column="update_id" jdbcType="VARCHAR"/> <result property="updateId" column="update_id" jdbcType="VARCHAR"/>
<result property="updateName" column="update_name" jdbcType="VARCHAR"/> <result property="updateName" column="update_name" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="delete_flag" jdbcType="INTEGER"/> <result property="deleteFlag" column="delete_flag" jdbcType="INTEGER"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
friend_setting_id friend_setting_id
, wx_enterprise_id, friend_setting_type, update_id, update_name, create_time, update_time, delete_flag </sql> , wx_enterprise_id, friend_setting_type, update_id, update_name, create_time, update_time, delete_flag </sql>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="friendSettingId" useGeneratedKeys="true" <insert id="insert" keyProperty="friendSettingId" useGeneratedKeys="true"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"> parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting">
INSERT INTO tab_haoban_friend_setting INSERT INTO tab_haoban_friend_setting
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="friendSettingId != null"> <if test="friendSettingId != null">
friend_setting_id, friend_setting_id,
</if> </if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="friendSettingType != null"> <if test="friendSettingType != null">
friend_setting_type, friend_setting_type,
</if> </if>
<if test="updateId != null and updateId != ''"> <if test="updateId != null and updateId != ''">
update_id, update_id,
</if> </if>
<if test="updateName != null and updateName != ''"> <if test="updateName != null and updateName != ''">
update_name, update_name,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="friendSettingId != null"> <if test="friendSettingId != null">
#{friendSettingId}, #{friendSettingId},
</if> </if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
#{wxEnterpriseId}, #{wxEnterpriseId},
</if> </if>
<if test="friendSettingType != null"> <if test="friendSettingType != null">
#{friendSettingType}, #{friendSettingType},
</if> </if>
<if test="updateId != null and updateId != ''"> <if test="updateId != null and updateId != ''">
#{updateId}, #{updateId},
</if> </if>
<if test="updateName != null and updateName != ''"> <if test="updateName != null and updateName != ''">
#{updateName}, #{updateName},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime}, #{createTime},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime}, #{updateTime},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
#{deleteFlag}, #{deleteFlag},
</if> </if>
</trim> </trim>
</insert> </insert>
<!--通过主键修改数据--> <!--通过主键修改数据-->
<update id="update" parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"> <update id="update" parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting">
update tab_haoban_friend_setting update tab_haoban_friend_setting
<set> <set>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
wx_enterprise_id = #{wxEnterpriseId}, wx_enterprise_id = #{wxEnterpriseId},
</if> </if>
<if test="friendSettingType != null"> <if test="friendSettingType != null">
friend_setting_type = #{friendSettingType}, friend_setting_type = #{friendSettingType},
</if> </if>
<if test="updateId != null and updateId != ''"> <if test="updateId != null and updateId != ''">
update_id = #{updateId}, update_id = #{updateId},
</if> </if>
<if test="updateName != null and updateName != ''"> <if test="updateName != null and updateName != ''">
update_name = #{updateName}, update_name = #{updateName},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime}, create_time = #{createTime},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime}, update_time = #{updateTime},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag = #{deleteFlag}, delete_flag = #{deleteFlag},
</if> </if>
</set> </set>
where friend_setting_id = #{friendSettingId} where friend_setting_id = #{friendSettingId}
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="deleteById"> <delete id="deleteById">
delete delete
from tab_haoban_friend_setting from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId} where friend_setting_id = #{friendSettingId}
</delete> </delete>
<!--查询单个--> <!--查询单个-->
<select id="queryById" resultMap="TabHaobanFriendSettingMap"> <select id="queryById" resultMap="TabHaobanFriendSettingMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_friend_setting from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId} where friend_setting_id = #{friendSettingId}
</select> </select>
<!--通过实体作为筛选条件查询--> <!--通过实体作为筛选条件查询-->
<select id="queryAll" parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting" <select id="queryAll" parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
resultMap="TabHaobanFriendSettingMap"> resultMap="TabHaobanFriendSettingMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_friend_setting from tab_haoban_friend_setting
<where> <where>
<if test="friendSettingId != null"> <if test="friendSettingId != null">
and friend_setting_id = #{friendSettingId} and friend_setting_id = #{friendSettingId}
</if> </if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId} and wx_enterprise_id = #{wxEnterpriseId}
</if> </if>
<if test="friendSettingType != null"> <if test="friendSettingType != null">
and friend_setting_type = #{friendSettingType} and friend_setting_type = #{friendSettingType}
</if> </if>
<if test="updateId != null and updateId != ''"> <if test="updateId != null and updateId != ''">
and update_id = #{updateId} and update_id = #{updateId}
</if> </if>
<if test="updateName != null and updateName != ''"> <if test="updateName != null and updateName != ''">
and update_name = #{updateName} and update_name = #{updateName}
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
and create_time = #{createTime} and create_time = #{createTime}
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
and update_time = #{updateTime} and update_time = #{updateTime}
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
and delete_flag = #{deleteFlag} and delete_flag = #{deleteFlag}
</if> </if>
</where> </where>
</select> </select>
<select id="queryCountByPage" resultType="int"> <select id="queryCountByPage" resultType="int">
select count(*) select count(*)
from tab_haoban_friend_setting from tab_haoban_friend_setting
</select> </select>
<select id="queryListByPage" resultMap="TabHaobanFriendSettingMap"> <select id="queryListByPage" resultMap="TabHaobanFriendSettingMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_friend_setting from tab_haoban_friend_setting
limit #{offset}, #{limit} limit #{offset}, #{limit}
</select> </select>
<select id="getByWxEnterpriseId" resultMap="TabHaobanFriendSettingMap"> <select id="getByWxEnterpriseId" resultMap="TabHaobanFriendSettingMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_friend_setting where wx_enterprise_id = #{wxEnterpriseId} and delete_flag = 0 from tab_haoban_friend_setting where wx_enterprise_id = #{wxEnterpriseId} and delete_flag = 0
</select> </select>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.TabHaobanMemberClerkChatConfigMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.TabHaobanMemberClerkChatConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.MemberClerkChatConfig"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.MemberClerkChatConfig">
<id column="member_clerk_chat_config_id" jdbcType="INTEGER" property="memberClerkChatConfigId" /> <id column="member_clerk_chat_config_id" jdbcType="INTEGER" property="memberClerkChatConfigId" />
<result column="staff_id" jdbcType="VARCHAR" property="staffId" /> <result column="staff_id" jdbcType="VARCHAR" property="staffId" />
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" /> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
<result column="member_id" jdbcType="VARCHAR" property="memberId" /> <result column="member_id" jdbcType="VARCHAR" property="memberId" />
<result column="config_id" jdbcType="VARCHAR" property="configId" /> <result column="config_id" jdbcType="VARCHAR" property="configId" />
<result column="status" jdbcType="INTEGER" property="status" /> <result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
member_clerk_chat_config_id, staff_id, enterprise_id, member_id, config_id, status, member_clerk_chat_config_id, staff_id, enterprise_id, member_id, config_id, status,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_member_clerk_chat_config from tab_haoban_member_clerk_chat_config
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER} where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_haoban_member_clerk_chat_config delete from tab_haoban_member_clerk_chat_config
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER} where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig">
insert into tab_haoban_member_clerk_chat_config (member_clerk_chat_config_id, staff_id, insert into tab_haoban_member_clerk_chat_config (member_clerk_chat_config_id, staff_id,
enterprise_id, member_id, config_id, enterprise_id, member_id, config_id,
status, create_time, update_time status, create_time, update_time
) )
values (#{memberClerkChatConfigId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR}, values (#{memberClerkChatConfigId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig">
insert into tab_haoban_member_clerk_chat_config insert into tab_haoban_member_clerk_chat_config
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="memberClerkChatConfigId != null"> <if test="memberClerkChatConfigId != null">
member_clerk_chat_config_id, member_clerk_chat_config_id,
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
staff_id, staff_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="memberId != null"> <if test="memberId != null">
member_id, member_id,
</if> </if>
<if test="configId != null"> <if test="configId != null">
config_id, config_id,
</if> </if>
<if test="status != null"> <if test="status != null">
status, status,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="memberClerkChatConfigId != null"> <if test="memberClerkChatConfigId != null">
#{memberClerkChatConfigId,jdbcType=INTEGER}, #{memberClerkChatConfigId,jdbcType=INTEGER},
</if> </if>
<if test="staffId != null"> <if test="staffId != null">
#{staffId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="memberId != null"> <if test="memberId != null">
#{memberId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR},
</if> </if>
<if test="configId != null"> <if test="configId != null">
#{configId,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="status != null">
#{status,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig">
update tab_haoban_member_clerk_chat_config update tab_haoban_member_clerk_chat_config
<set> <set>
<if test="staffId != null"> <if test="staffId != null">
staff_id = #{staffId,jdbcType=VARCHAR}, staff_id = #{staffId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="memberId != null"> <if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR}, member_id = #{memberId,jdbcType=VARCHAR},
</if> </if>
<if test="configId != null"> <if test="configId != null">
config_id = #{configId,jdbcType=VARCHAR}, config_id = #{configId,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="status != null">
status = #{status,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER} where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.MemberClerkChatConfig">
update tab_haoban_member_clerk_chat_config update tab_haoban_member_clerk_chat_config
set staff_id = #{staffId,jdbcType=VARCHAR}, set staff_id = #{staffId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
member_id = #{memberId,jdbcType=VARCHAR}, member_id = #{memberId,jdbcType=VARCHAR},
config_id = #{configId,jdbcType=VARCHAR}, config_id = #{configId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER} where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</update> </update>
<select id="getChatByMemberIdStaffId" resultMap="BaseResultMap"> <select id="getChatByMemberIdStaffId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_member_clerk_chat_config from tab_haoban_member_clerk_chat_config
where staff_id = #{staffId,jdbcType=VARCHAR} and member_id = #{memberId,jdbcType=VARCHAR} where staff_id = #{staffId,jdbcType=VARCHAR} and member_id = #{memberId,jdbcType=VARCHAR}
and status =1 and status =1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.TabHaobanStoreRangeMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.TabHaobanStoreRangeMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabStoreRange"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabStoreRange">
<id column="store_range_id" jdbcType="VARCHAR" property="storeRangeId"/> <id column="store_range_id" jdbcType="VARCHAR" property="storeRangeId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="relation_id" jdbcType="VARCHAR" property="relationId"/> <result column="relation_id" jdbcType="VARCHAR" property="relationId"/>
<result column="relation_type" jdbcType="INTEGER" property="relationType"/> <result column="relation_type" jdbcType="INTEGER" property="relationType"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
store_range_id, wx_enterprise_id, enterprise_id, relation_id, relation_type, status_flag, store_range_id, wx_enterprise_id, enterprise_id, relation_id, relation_type, status_flag,
create_time, update_time create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_store_range from tab_haoban_store_range
where store_range_id = #{storeRangeId,jdbcType=VARCHAR} where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_store_range delete from tab_haoban_store_range
where store_range_id = #{storeRangeId,jdbcType=VARCHAR} where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange">
insert into tab_haoban_store_range (store_range_id, wx_enterprise_id, enterprise_id, insert into tab_haoban_store_range (store_range_id, wx_enterprise_id, enterprise_id,
relation_id, relation_type, status_flag, relation_id, relation_type, status_flag,
create_time, update_time) create_time, update_time)
values (#{storeRangeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, values (#{storeRangeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR}, #{relationType,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{relationId,jdbcType=VARCHAR}, #{relationType,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange">
insert into tab_haoban_store_range insert into tab_haoban_store_range
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storeRangeId != null"> <if test="storeRangeId != null">
store_range_id, store_range_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id, relation_id,
</if> </if>
<if test="relationType != null"> <if test="relationType != null">
relation_type, relation_type,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="storeRangeId != null"> <if test="storeRangeId != null">
#{storeRangeId,jdbcType=VARCHAR}, #{storeRangeId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
#{relationId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="relationType != null"> <if test="relationType != null">
#{relationType,jdbcType=INTEGER}, #{relationType,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange">
update tab_haoban_store_range update tab_haoban_store_range
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="relationId != null"> <if test="relationId != null">
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="relationType != null"> <if test="relationType != null">
relation_type = #{relationType,jdbcType=INTEGER}, relation_type = #{relationType,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where store_range_id = #{storeRangeId,jdbcType=VARCHAR} where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabStoreRange">
update tab_haoban_store_range update tab_haoban_store_range
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
relation_type = #{relationType,jdbcType=INTEGER}, relation_type = #{relationType,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_range_id = #{storeRangeId,jdbcType=VARCHAR} where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</update> </update>
<select id="queryByEnterpriseId" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="queryByEnterpriseId" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_store_range from tab_haoban_store_range
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR} where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
<if test="wxEnterpriseId!=null"> <if test="wxEnterpriseId!=null">
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
</if> </if>
and status_flag =1 and status_flag =1
</select> </select>
<update id="deleteByEnterpriseId"> <update id="deleteByEnterpriseId">
update tab_haoban_store_range update tab_haoban_store_range
SET SET
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR} enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and wx_enterprise_id=#{wxEnterpriseId} and wx_enterprise_id=#{wxEnterpriseId}
and status_flag =1 and status_flag =1
</update> </update>
<update id="delStoreRangeByRelationId"> <update id="delStoreRangeByRelationId">
update tab_haoban_store_range update tab_haoban_store_range
SET SET
status_flag = 0, status_flag = 0,
update_time = now() update_time = now()
where where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR} enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id=#{relationId} and relation_id=#{relationId}
and status_flag =1 and status_flag =1
</update> </update>
<insert id="insertBatch"> <insert id="insertBatch">
insert into tab_haoban_store_range (store_range_id, wx_enterprise_id, enterprise_id, insert into tab_haoban_store_range (store_range_id, wx_enterprise_id, enterprise_id,
relation_id, relation_type, status_flag, relation_id, relation_type, status_flag,
create_time, update_time) create_time, update_time)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.storeRangeId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,jdbcType=VARCHAR}, (#{item.storeRangeId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,jdbcType=VARCHAR},
#{item.enterpriseId,jdbcType=VARCHAR}, #{item.enterpriseId,jdbcType=VARCHAR},
#{item.relationId,jdbcType=VARCHAR}, #{item.relationType,jdbcType=INTEGER}, 1, #{item.relationId,jdbcType=VARCHAR}, #{item.relationType,jdbcType=INTEGER}, 1,
now(), now()) now(), now())
</foreach> </foreach>
</insert> </insert>
<select id="listStoreRangeByRelationId" resultMap="BaseResultMap"> <select id="listStoreRangeByRelationId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_store_range from tab_haoban_store_range
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR} where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id in and relation_id in
<foreach collection="relationIds" item="item" open="(" close=")" separator=","> <foreach collection="relationIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
and status_flag =1 and status_flag =1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.TabMiniprogramSettingMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.TabMiniprogramSettingMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabMiniprogramSetting"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabMiniprogramSetting">
<id column="miniprogram_setting_id" jdbcType="VARCHAR" property="miniprogramSettingId"/> <id column="miniprogram_setting_id" jdbcType="VARCHAR" property="miniprogramSettingId"/>
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/> <result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="miniprogram_name" jdbcType="VARCHAR" property="miniprogramName"/> <result column="miniprogram_name" jdbcType="VARCHAR" property="miniprogramName"/>
<result column="title" jdbcType="VARCHAR" property="title"/> <result column="title" jdbcType="VARCHAR" property="title"/>
<result column="app_id" jdbcType="VARCHAR" property="appId"/> <result column="app_id" jdbcType="VARCHAR" property="appId"/>
<result column="image_url" jdbcType="VARCHAR" property="imageUrl"/> <result column="image_url" jdbcType="VARCHAR" property="imageUrl"/>
<result column="media_id" jdbcType="VARCHAR" property="mediaId"/> <result column="media_id" jdbcType="VARCHAR" property="mediaId"/>
<result column="media_time" jdbcType="TIMESTAMP" property="mediaTime"/> <result column="media_time" jdbcType="TIMESTAMP" property="mediaTime"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/> <result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="miniprogram_type" jdbcType="INTEGER" property="miniprogramType"/> <result column="miniprogram_type" jdbcType="INTEGER" property="miniprogramType"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
miniprogram_setting_id, wx_enterprise_id, enterprise_id, miniprogram_name, title, miniprogram_setting_id, wx_enterprise_id, enterprise_id, miniprogram_name, title,
app_id, image_url, media_id, media_time,miniprogram_type, status_flag, create_time, update_time app_id, image_url, media_id, media_time,miniprogram_type, status_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_miniprogram_setting from tab_haoban_miniprogram_setting
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR} where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
update tab_haoban_miniprogram_setting update tab_haoban_miniprogram_setting
set status_flag=0,update_time=now() set status_flag=0,update_time=now()
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR} where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting">
insert into tab_haoban_miniprogram_setting (miniprogram_setting_id, wx_enterprise_id, insert into tab_haoban_miniprogram_setting (miniprogram_setting_id, wx_enterprise_id,
enterprise_id, miniprogram_name, title, enterprise_id, miniprogram_name, title,
app_id, image_url, media_id, app_id, image_url, media_id,
media_time, status_flag, create_time, media_time, status_flag, create_time,
update_time) update_time)
values (#{miniprogramSettingId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{miniprogramSettingId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{miniprogramName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{miniprogramName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{appId,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{mediaId,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{mediaId,jdbcType=VARCHAR},
#{mediaTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{mediaTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting">
insert into tab_haoban_miniprogram_setting insert into tab_haoban_miniprogram_setting
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="miniprogramSettingId != null"> <if test="miniprogramSettingId != null">
miniprogram_setting_id, miniprogram_setting_id,
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="miniprogramName != null"> <if test="miniprogramName != null">
miniprogram_name, miniprogram_name,
</if> </if>
<if test="title != null"> <if test="title != null">
title, title,
</if> </if>
<if test="appId != null"> <if test="appId != null">
app_id, app_id,
</if> </if>
<if test="imageUrl != null"> <if test="imageUrl != null">
image_url, image_url,
</if> </if>
<if test="mediaId != null"> <if test="mediaId != null">
media_id, media_id,
</if> </if>
<if test="mediaTime != null"> <if test="mediaTime != null">
media_time, media_time,
</if> </if>
<if test="miniprogramType != null"> <if test="miniprogramType != null">
miniprogram_type, miniprogram_type,
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time, update_time,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="miniprogramSettingId != null"> <if test="miniprogramSettingId != null">
#{miniprogramSettingId,jdbcType=VARCHAR}, #{miniprogramSettingId,jdbcType=VARCHAR},
</if> </if>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="miniprogramName != null"> <if test="miniprogramName != null">
#{miniprogramName,jdbcType=VARCHAR}, #{miniprogramName,jdbcType=VARCHAR},
</if> </if>
<if test="title != null"> <if test="title != null">
#{title,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
</if> </if>
<if test="appId != null"> <if test="appId != null">
#{appId,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
</if> </if>
<if test="imageUrl != null"> <if test="imageUrl != null">
#{imageUrl,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR},
</if> </if>
<if test="mediaId != null"> <if test="mediaId != null">
#{mediaId,jdbcType=VARCHAR}, #{mediaId,jdbcType=VARCHAR},
</if> </if>
<if test="mediaTime != null"> <if test="mediaTime != null">
#{mediaTime,jdbcType=TIMESTAMP}, #{mediaTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="miniprogramType != null"> <if test="miniprogramType != null">
#{miniprogramType,jdbcType=INTEGER}, #{miniprogramType,jdbcType=INTEGER},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting">
update tab_haoban_miniprogram_setting update tab_haoban_miniprogram_setting
<set> <set>
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="miniprogramName != null"> <if test="miniprogramName != null">
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR}, miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
</if> </if>
<if test="title != null"> <if test="title != null">
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
</if> </if>
<if test="appId != null"> <if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR}, app_id = #{appId,jdbcType=VARCHAR},
</if> </if>
<if test="imageUrl != null"> <if test="imageUrl != null">
image_url = #{imageUrl,jdbcType=VARCHAR}, image_url = #{imageUrl,jdbcType=VARCHAR},
</if> </if>
<if test="mediaId != null"> <if test="mediaId != null">
media_id = #{mediaId,jdbcType=VARCHAR}, media_id = #{mediaId,jdbcType=VARCHAR},
</if> </if>
<if test="mediaTime != null"> <if test="mediaTime != null">
media_time = #{mediaTime,jdbcType=TIMESTAMP}, media_time = #{mediaTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="statusFlag != null"> <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null"> <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR} where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting"> <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabMiniprogramSetting">
update tab_haoban_miniprogram_setting update tab_haoban_miniprogram_setting
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR}, miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR}, app_id = #{appId,jdbcType=VARCHAR},
image_url = #{imageUrl,jdbcType=VARCHAR}, image_url = #{imageUrl,jdbcType=VARCHAR},
media_id = #{mediaId,jdbcType=VARCHAR}, media_id = #{mediaId,jdbcType=VARCHAR},
media_time = #{mediaTime,jdbcType=TIMESTAMP}, media_time = #{mediaTime,jdbcType=TIMESTAMP},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR} where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update> </update>
<select id="getMiniprogramSetting" resultMap="BaseResultMap"> <select id="getMiniprogramSetting" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_miniprogram_setting from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and enterprise_id=#{enterpriseId} and enterprise_id=#{enterpriseId}
and status_flag=1 order by create_time desc limit 1 and status_flag=1 order by create_time desc limit 1
</select> </select>
<select id="listMiniprogramSetting" resultMap="BaseResultMap"> <select id="listMiniprogramSetting" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_miniprogram_setting from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<select id="getMiniprogramSettingByAppId" resultMap="BaseResultMap"> <select id="getMiniprogramSettingByAppId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_miniprogram_setting from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and app_id=#{appId} and app_id=#{appId}
and status_flag=1 and status_flag=1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.TestMapper"> <mapper namespace="com.gic.haoban.manage.service.dao.mapper.TestMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.Test"> <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.Test">
<id column="id" jdbcType="VARCHAR" property="id"/> <id column="id" jdbcType="VARCHAR" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/> <result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, name id, name
</sql> </sql>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.Test" > <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.Test" >
insert into test (id,name) insert into test (id,name)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}) values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR})
</insert> </insert>
<select id="queryList" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="queryList" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from test from test
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?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.hm.HmLinkMapper">
<resultMap type="com.gic.haoban.manage.service.entity.hm.TabHmLink" id="result-map-tabHaobanHmLink">
<result column="link_id" property="linkId"/>
<result column="link_code" property="linkCode"/>
<result column="link_type" property="linkType"/>
<result column="wx_enterprise_id" property="wxEnterpriseId"/>
<result column="enterprise_id" property="enterpriseId"/>
<result column="name" property="name"/>
<result column="remark" property="remark"/>
<result column="welcome_id" property="welcomeId"/>
<result column="page_id" property="pageId"/>
<result column="creator_id" property="creatorId"/>
<result column="creator_name" property="creatorName"/>
<result column="modifier_id" property="modifierId"/>
<result column="modifier_name" property="modifierName"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="store_rule_json" property="storeRuleJson"/>
<result column="custom_rule_json" property="customRuleJson"/>
<result column="member_label_id" property="memberLabelId"/>
<result column="status_flag" property="statusFlag"/>
</resultMap>
<sql id="Base_Column_List">
link_id,
link_code,
link_type,
wx_enterprise_id,
enterprise_id,
name,
remark,
welcome_id,
page_id,
creator_id,
creator_name,
modifier_id,
modifier_name,
create_time,
update_time,
store_rule_json,
custom_rule_json,
member_label_id,
status_flag
</sql>
<!-- ===================== 新增 ======================== -->
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.hm.TabHmLink">
<![CDATA[
INSERT INTO tab_haoban_hm_link(
link_id,
link_code,
link_type,
wx_enterprise_id,
enterprise_id,
name,
remark,
welcome_id,
page_id,
creator_id,
creator_name,
modifier_id,
modifier_name,
create_time,
update_time,
store_rule_json,
custom_rule_json,
member_label_id,
status_flag
)VALUES(
#{linkId,jdbcType=BIGINT},
#{linkCode,jdbcType=VARCHAR},
#{linkType,jdbcType=INTEGER},
#{wxEnterpriseId,jdbcType=CHAR},
#{enterpriseId,jdbcType=CHAR},
#{name,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
#{welcomeId,jdbcType=VARCHAR},
#{pageId,jdbcType=BIGINT},
#{creatorId,jdbcType=VARCHAR},
#{creatorName,jdbcType=VARCHAR},
#{modifierId,jdbcType=VARCHAR},
#{modifierName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{storeRuleJson,jdbcType=VARCHAR},
#{customRuleJson,jdbcType=VARCHAR},
#{memberLabelId,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}
)
]]>
</insert>
<!-- ==================更新 ========== -->
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.hm.TabHmLink">
<![CDATA[
UPDATE tab_haoban_hm_link SET
link_id=#{linkId,jdbcType=BIGINT},
link_code=#{linkCode,jdbcType=VARCHAR},
link_type=#{linkType,jdbcType=INTEGER},
wx_enterprise_id=#{wxEnterpriseId,jdbcType=CHAR},
enterprise_id=#{enterpriseId,jdbcType=CHAR},
name=#{name,jdbcType=VARCHAR},
remark=#{remark,jdbcType=VARCHAR},
welcome_id=#{welcomeId,jdbcType=VARCHAR},
page_id=#{pageId,jdbcType=BIGINT},
creator_id=#{creatorId,jdbcType=VARCHAR},
creator_name=#{creatorName,jdbcType=VARCHAR},
modifier_id=#{modifierId,jdbcType=VARCHAR},
modifier_name=#{modifierName,jdbcType=VARCHAR},
create_time=#{createTime,jdbcType=TIMESTAMP},
update_time=#{updateTime,jdbcType=TIMESTAMP},
store_rule_json=#{storeRuleJson,jdbcType=VARCHAR},
custom_rule_json=#{customRuleJson,jdbcType=VARCHAR},
member_label_id=#{memberLabelId,jdbcType=VARCHAR},
status_flag=#{statusFlag,jdbcType=INTEGER}
link_id = #{linkId}
]]>
</update>
<!-- ============ 查询=============-->
<select id="selectById" parameterType="long" resultMap="result-map-tabHaobanHmLink">
SELECT * FROM tab_haoban_hm_link WHERE link_id = #{linkId}
</select>
<select id="listAll" parameterType="tabHaobanHmLink" resultMap="result-map-tabHaobanHmLink">
select * from tab_haoban_hm_link
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment