Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
b6c1dac2
Commit
b6c1dac2
authored
Jul 01, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好办
parent
92c5d7ac
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
4266 additions
and
3867 deletions
+4266
-3867
HmLinkMapper.java
...gic/haoban/manage/service/dao/mapper/hm/HmLinkMapper.java
+57
-0
TabHmLink.java
...va/com/gic/haoban/manage/service/entity/hm/TabHmLink.java
+195
-0
jdbc-haoban-manage-service.xml
...service/src/main/resources/jdbc-haoban-manage-service.xml
+1
-1
ExternalUseridLogMapper.xml
...ice/src/main/resources/mapper/ExternalUseridLogMapper.xml
+102
-101
HandoverExternalMapper.xml
...vice/src/main/resources/mapper/HandoverExternalMapper.xml
+363
-362
HandoverStaffMapper.xml
...service/src/main/resources/mapper/HandoverStaffMapper.xml
+206
-205
HandoverTransferMapper.xml
...vice/src/main/resources/mapper/HandoverTransferMapper.xml
+212
-211
NoticeMessageMapper.xml
...service/src/main/resources/mapper/NoticeMessageMapper.xml
+261
-260
NoticeMessageTemplateMapper.xml
...src/main/resources/mapper/NoticeMessageTemplateMapper.xml
+127
-126
PendingTaskMapper.xml
...3-service/src/main/resources/mapper/PendingTaskMapper.xml
+367
-366
PreDealLogMapper.xml
...e3-service/src/main/resources/mapper/PreDealLogMapper.xml
+420
-419
QywxSyncLogMapper.xml
...3-service/src/main/resources/mapper/QywxSyncLogMapper.xml
+189
-188
QywxTagItemMapper.xml
...3-service/src/main/resources/mapper/QywxTagItemMapper.xml
+214
-213
QywxTagMapper.xml
...nage3-service/src/main/resources/mapper/QywxTagMapper.xml
+148
-147
QywxTagRelationMapper.xml
...rvice/src/main/resources/mapper/QywxTagRelationMapper.xml
+268
-267
SyncTaskMapper.xml
...age3-service/src/main/resources/mapper/SyncTaskMapper.xml
+136
-135
TabHaobanErrorLogMapper.xml
...ice/src/main/resources/mapper/TabHaobanErrorLogMapper.xml
+140
-139
TabHaobanFriendSettingMapper.xml
...rc/main/resources/mapper/TabHaobanFriendSettingMapper.xml
+171
-171
TabHaobanMemberClerkChatConfigMapper.xml
...resources/mapper/TabHaobanMemberClerkChatConfigMapper.xml
+140
-139
TabHaobanStoreRangeMapper.xml
...e/src/main/resources/mapper/TabHaobanStoreRangeMapper.xml
+189
-188
TabMiniprogramSettingMapper.xml
...src/main/resources/mapper/TabMiniprogramSettingMapper.xml
+211
-210
TestMapper.xml
...-manage3-service/src/main/resources/mapper/TestMapper.xml
+20
-19
HmLinkMapper.xml
...ge3-service/src/main/resources/mapper/hm/HmLinkMapper.xml
+129
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/HmLinkMapper.java
0 → 100644
View file @
b6c1dac2
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
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/hm/TabHmLink.java
0 → 100644
View file @
b6c1dac2
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
haoban-manage3-service/src/main/resources/jdbc-haoban-manage-service.xml
View file @
b6c1dac2
...
...
@@ -24,7 +24,7 @@
<bean
class=
"com.gic.haoban.common.init.HaobanSqlSessionFactoryBean"
id=
"sqlSessionFactory"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<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"
>
<array>
<bean
class=
"com.github.pagehelper.PageHelper"
>
...
...
haoban-manage3-service/src/main/resources/mapper/ExternalUseridLogMapper.xml
View file @
b6c1dac2
<?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.ExternalUseridLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabExternalUseridLog"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"old_external_user_id"
property=
"oldExternalUserId"
/>
<result
column=
"new_external_user_id"
property=
"newExternalUserId"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"creator_id"
property=
"creatorId"
/>
<result
column=
"creator_name"
property=
"creatorName"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
old_external_user_id,
new_external_user_id,
wx_enterprise_id,
status_flag,
creator_id,
creator_name,
create_time,
update_time
</sql>
<insert
id=
"insertBatch"
>
insert into tab_external_userid_log (id,
old_external_user_id,
new_external_user_id,
wx_enterprise_id,
status_flag,
creator_id,
creator_name,
create_time,
update_time)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.id}, #{item.oldExternalUserId},#{item.newExternalUserId}, #{item.wxEnterpriseId}, 1, #{item.creatorId},
#{item.creatorName},now(),now())
</foreach>
</insert>
<update
id=
"update"
parameterType=
"com.gic.haoban.manage.service.entity.TabExternalUseridLog"
>
UPDATE tab_external_userid_log
<set>
<if
test=
"null != oldExternalUserId and '' != oldExternalUserId"
>
old_external_user_id = #{oldExternalUserId},
</if>
<if
test=
"null != newExternalUserId and '' != newExternalUserId"
>
new_external_user_id = #{newExternalUserId},
</if>
<if
test=
"null != wxEnterpriseId and '' != wxEnterpriseId"
>
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if
test=
"null != statusFlag "
>
status_flag = #{statusFlag},
</if>
<if
test=
"null != creatorId and '' != creatorId"
>
creator_id = #{creatorId},
</if>
<if
test=
"null != creatorName and '' != creatorName"
>
creator_name = #{creatorName},
</if>
<if
test=
"null != createTime "
>
create_time = #{createTime},
</if>
<if
test=
"null != updateTime "
>
update_time = #{updateTime}
</if>
</set>
WHERE id = #{id}
</update>
<select
id=
"selectByWxEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_external_userid_log
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
</select>
<update
id=
"updateStatusFlagByWxEnterpriseId"
>
update tab_external_userid_log
set status_flag = #{statusFlag},
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
</update>
<update
id=
"updateOldExternalUserId"
>
UPDATE tab_haoban_external_clerk_related a
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
SET a.external_user_id = b.old_external_user_id,a.update_time = now()
WHERE
a.wx_enterprise_id = #{wxEnterpriseId}
AND b.wx_enterprise_id = #{wxEnterpriseId}
AND a.status_flag = 1 and b.status_flag = 1;
</update>
<?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.ExternalUseridLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabExternalUseridLog"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"old_external_user_id"
property=
"oldExternalUserId"
/>
<result
column=
"new_external_user_id"
property=
"newExternalUserId"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"creator_id"
property=
"creatorId"
/>
<result
column=
"creator_name"
property=
"creatorName"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
old_external_user_id,
new_external_user_id,
wx_enterprise_id,
status_flag,
creator_id,
creator_name,
create_time,
update_time
</sql>
<insert
id=
"insertBatch"
>
insert into tab_external_userid_log (id,
old_external_user_id,
new_external_user_id,
wx_enterprise_id,
status_flag,
creator_id,
creator_name,
create_time,
update_time)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.id}, #{item.oldExternalUserId},#{item.newExternalUserId}, #{item.wxEnterpriseId}, 1, #{item.creatorId},
#{item.creatorName},now(),now())
</foreach>
</insert>
<update
id=
"update"
parameterType=
"com.gic.haoban.manage.service.entity.TabExternalUseridLog"
>
UPDATE tab_external_userid_log
<set>
<if
test=
"null != oldExternalUserId and '' != oldExternalUserId"
>
old_external_user_id = #{oldExternalUserId},
</if>
<if
test=
"null != newExternalUserId and '' != newExternalUserId"
>
new_external_user_id = #{newExternalUserId},
</if>
<if
test=
"null != wxEnterpriseId and '' != wxEnterpriseId"
>
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if
test=
"null != statusFlag "
>
status_flag = #{statusFlag},
</if>
<if
test=
"null != creatorId and '' != creatorId"
>
creator_id = #{creatorId},
</if>
<if
test=
"null != creatorName and '' != creatorName"
>
creator_name = #{creatorName},
</if>
<if
test=
"null != createTime "
>
create_time = #{createTime},
</if>
<if
test=
"null != updateTime "
>
update_time = #{updateTime}
</if>
</set>
WHERE id = #{id}
</update>
<select
id=
"selectByWxEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_external_userid_log
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
</select>
<update
id=
"updateStatusFlagByWxEnterpriseId"
>
update tab_external_userid_log
set status_flag = #{statusFlag},
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
</update>
<update
id=
"updateOldExternalUserId"
>
UPDATE tab_haoban_external_clerk_related a
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
SET a.external_user_id = b.old_external_user_id,a.update_time = now()
WHERE
a.wx_enterprise_id = #{wxEnterpriseId}
AND b.wx_enterprise_id = #{wxEnterpriseId}
AND a.status_flag = 1 and b.status_flag = 1;
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/HandoverExternalMapper.xml
View file @
b6c1dac2
<?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.HandoverExternalMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
<id
column=
"handover_external_id"
jdbcType=
"VARCHAR"
property=
"handoverExternalId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"user_id"
jdbcType=
"VARCHAR"
property=
"userId"
/>
<result
column=
"external_user_id"
jdbcType=
"VARCHAR"
property=
"externalUserId"
/>
<result
column=
"external_user_name"
jdbcType=
"VARCHAR"
property=
"externalUserName"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"haoban_friend_flag"
jdbcType=
"INTEGER"
property=
"haobanFriendFlag"
/>
<result
column=
"external_head_url"
jdbcType=
"VARCHAR"
property=
"externalHeadUrl"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"handover_transfer_id"
jdbcType=
"VARCHAR"
property=
"handoverTransferId"
/>
<result
column=
"takeover_time"
jdbcType=
"TIMESTAMP"
property=
"takeoverTime"
/>
<result
column=
"transfer_status"
jdbcType=
"INTEGER"
property=
"transferStatus"
/>
<result
column=
"transfer_time"
jdbcType=
"TIMESTAMP"
property=
"transferTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"FiendCountResultMap"
type=
"com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO"
>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"friendCount"
jdbcType=
"INTEGER"
property=
"friendCount"
/>
<result
column=
"haobanFriendCount"
jdbcType=
"INTEGER"
property=
"haobanFriendCount"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
transfer_status, transfer_time, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_handover_external
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
insert into tab_haoban_handover_external (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,
transfer_status, transfer_time, create_time,
update_time)
values (#{handoverExternalId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{staffId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{externalUserId,jdbcType=VARCHAR},
#{externalUserName,jdbcType=VARCHAR},#{relationId}, #{haobanFriendFlag,jdbcType=INTEGER}, #{externalHeadUrl,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}, #{handoverTransferId,jdbcType=VARCHAR}, #{takeoverTime,jdbcType=TIMESTAMP},
#{transferStatus}, #{transferTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
insert into tab_haoban_handover_external
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverExternalId != null"
>
handover_external_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"externalUserId != null"
>
external_user_id,
</if>
<if
test=
"externalUserName != null"
>
external_user_name,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"haobanFriendFlag != null"
>
haoban_friend_flag,
</if>
<if
test=
"externalHeadUrl != null"
>
external_head_url,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"handoverTransferId != null"
>
handover_transfer_id,
</if>
<if
test=
"takeoverTime != null"
>
takeover_time,
</if>
<if
test=
"transferStatus != null"
>
transfer_status,
</if>
<if
test=
"transferTime != null"
>
transfer_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverExternalId != null"
>
#{handoverExternalId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserId != null"
>
#{externalUserId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserName != null"
>
#{externalUserName,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"haobanFriendFlag != null"
>
#{haobanFriendFlag,jdbcType=INTEGER},
</if>
<if
test=
"externalHeadUrl != null"
>
#{externalHeadUrl,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"handoverTransferId != null"
>
#{handoverTransferId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverTime != null"
>
#{takeoverTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"transferStatus != null"
>
#{transferStatus},
</if>
<if
test=
"transferTime != null"
>
#{transferTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
update tab_haoban_handover_external
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserId != null"
>
external_user_id = #{externalUserId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserName != null"
>
external_user_name = #{externalUserName,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"haobanFriendFlag != null"
>
haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER},
</if>
<if
test=
"externalHeadUrl != null"
>
external_head_url = #{externalHeadUrl,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"handoverTransferId != null"
>
handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverTime != null"
>
takeover_time = #{takeoverTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"transferStatus != null"
>
transfer_status = #{transferStatus},
</if>
<if
test=
"transferTime != null"
>
transfer_time = #{transferTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
update tab_haoban_handover_external
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
external_user_id = #{externalUserId,jdbcType=VARCHAR},
external_user_name = #{externalUserName,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER},
external_head_url = #{externalHeadUrl,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR},
takeover_time = #{takeoverTime,jdbcType=TIMESTAMP},
transfer_status = #{transferStatus},
transfer_time = #{transferTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</update>
<insert
id=
"insertBatch"
>
insert into tab_haoban_handover_external (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, create_time,
update_time)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.handoverExternalId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,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.externalHeadUrl,jdbcType=VARCHAR},
#{item.statusFlag,jdbcType=INTEGER}, now(),
now())
</foreach>
</insert>
<select
id=
"listByStaffIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if
test=
"staffIds!=null and staffIds.size>0"
>
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
and status_flag = #{status}
<if
test=
"search!=null and search!=''"
>
and external_user_name like CONCAT('%',#{search},'%')
</if>
<if
test=
"transferIds!=null and transferIds.size>0"
>
and handover_transfer_id in
<foreach
collection=
"transferIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
order by create_time desc
</select>
<select
id=
"listIdByStaffIds"
resultMap=
"BaseResultMap"
>
select
handover_external_id
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if
test=
"staffIds!=null and staffIds.size>0"
>
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
and status_flag=1
</select>
<select
id=
"listByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_external_id in
<foreach
collection=
"ids"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
and status_flag=1
</select>
<update
id=
"updateAfterTransfer"
>
update tab_haoban_handover_external
set
status_flag = 2,
handover_transfer_id = #{transferId,jdbcType=VARCHAR},
transfer_status = 0,
transfer_time = now(),
update_time = now()
where handover_external_id in
<foreach
collection=
"ids"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</update>
<select
id=
"getByTransferId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_transfer_id = #{transferId,jdbcType=VARCHAR}
and external_user_id=#{externalUserId}
and status_flag=2
</select>
<select
id=
"getByExternalUserIdAndStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id = #{staffId,jdbcType=VARCHAR}
and external_user_id=#{externalUserId}
and status_flag!=0
</select>
<update
id=
"delNoTransferExternal"
>
update tab_haoban_handover_external
set
status_flag = 0,
update_time = now()
where
wx_enterprise_id=#{wxEnterpriseId}
<if
test=
"userIds!=null and userIds.size>0"
>
and user_id in
<foreach
collection=
"userIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
and status_flag=1
</update>
<select
id=
"listPreCountByStaffIds"
resultMap=
"FiendCountResultMap"
>
select
staff_id ,
COUNT(external_user_id) friendCount,
sum(haoban_friend_flag) haobanFriendCount
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
and status_flag=1
group by staff_id
</select>
<?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.HandoverExternalMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
<id
column=
"handover_external_id"
jdbcType=
"VARCHAR"
property=
"handoverExternalId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"user_id"
jdbcType=
"VARCHAR"
property=
"userId"
/>
<result
column=
"external_user_id"
jdbcType=
"VARCHAR"
property=
"externalUserId"
/>
<result
column=
"external_user_name"
jdbcType=
"VARCHAR"
property=
"externalUserName"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"haoban_friend_flag"
jdbcType=
"INTEGER"
property=
"haobanFriendFlag"
/>
<result
column=
"external_head_url"
jdbcType=
"VARCHAR"
property=
"externalHeadUrl"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"handover_transfer_id"
jdbcType=
"VARCHAR"
property=
"handoverTransferId"
/>
<result
column=
"takeover_time"
jdbcType=
"TIMESTAMP"
property=
"takeoverTime"
/>
<result
column=
"transfer_status"
jdbcType=
"INTEGER"
property=
"transferStatus"
/>
<result
column=
"transfer_time"
jdbcType=
"TIMESTAMP"
property=
"transferTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"FiendCountResultMap"
type=
"com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO"
>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"friendCount"
jdbcType=
"INTEGER"
property=
"friendCount"
/>
<result
column=
"haobanFriendCount"
jdbcType=
"INTEGER"
property=
"haobanFriendCount"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
transfer_status, transfer_time, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_handover_external
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
insert into tab_haoban_handover_external (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,
transfer_status, transfer_time, create_time,
update_time)
values (#{handoverExternalId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{staffId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{externalUserId,jdbcType=VARCHAR},
#{externalUserName,jdbcType=VARCHAR},#{relationId}, #{haobanFriendFlag,jdbcType=INTEGER}, #{externalHeadUrl,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}, #{handoverTransferId,jdbcType=VARCHAR}, #{takeoverTime,jdbcType=TIMESTAMP},
#{transferStatus}, #{transferTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
insert into tab_haoban_handover_external
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverExternalId != null"
>
handover_external_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"externalUserId != null"
>
external_user_id,
</if>
<if
test=
"externalUserName != null"
>
external_user_name,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"haobanFriendFlag != null"
>
haoban_friend_flag,
</if>
<if
test=
"externalHeadUrl != null"
>
external_head_url,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"handoverTransferId != null"
>
handover_transfer_id,
</if>
<if
test=
"takeoverTime != null"
>
takeover_time,
</if>
<if
test=
"transferStatus != null"
>
transfer_status,
</if>
<if
test=
"transferTime != null"
>
transfer_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverExternalId != null"
>
#{handoverExternalId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserId != null"
>
#{externalUserId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserName != null"
>
#{externalUserName,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"haobanFriendFlag != null"
>
#{haobanFriendFlag,jdbcType=INTEGER},
</if>
<if
test=
"externalHeadUrl != null"
>
#{externalHeadUrl,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"handoverTransferId != null"
>
#{handoverTransferId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverTime != null"
>
#{takeoverTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"transferStatus != null"
>
#{transferStatus},
</if>
<if
test=
"transferTime != null"
>
#{transferTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
update tab_haoban_handover_external
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserId != null"
>
external_user_id = #{externalUserId,jdbcType=VARCHAR},
</if>
<if
test=
"externalUserName != null"
>
external_user_name = #{externalUserName,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"haobanFriendFlag != null"
>
haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER},
</if>
<if
test=
"externalHeadUrl != null"
>
external_head_url = #{externalHeadUrl,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"handoverTransferId != null"
>
handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverTime != null"
>
takeover_time = #{takeoverTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"transferStatus != null"
>
transfer_status = #{transferStatus},
</if>
<if
test=
"transferTime != null"
>
transfer_time = #{transferTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverExternal"
>
update tab_haoban_handover_external
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
external_user_id = #{externalUserId,jdbcType=VARCHAR},
external_user_name = #{externalUserName,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
haoban_friend_flag = #{haobanFriendFlag,jdbcType=INTEGER},
external_head_url = #{externalHeadUrl,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR},
takeover_time = #{takeoverTime,jdbcType=TIMESTAMP},
transfer_status = #{transferStatus},
transfer_time = #{transferTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_external_id = #{handoverExternalId,jdbcType=VARCHAR}
</update>
<insert
id=
"insertBatch"
>
insert into tab_haoban_handover_external (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, create_time,
update_time)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.handoverExternalId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,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.externalHeadUrl,jdbcType=VARCHAR},
#{item.statusFlag,jdbcType=INTEGER}, now(),
now())
</foreach>
</insert>
<select
id=
"listByStaffIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if
test=
"staffIds!=null and staffIds.size>0"
>
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
and status_flag = #{status}
<if
test=
"search!=null and search!=''"
>
and external_user_name like CONCAT('%',#{search},'%')
</if>
<if
test=
"transferIds!=null and transferIds.size>0"
>
and handover_transfer_id in
<foreach
collection=
"transferIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
order by create_time desc
</select>
<select
id=
"listIdByStaffIds"
resultMap=
"BaseResultMap"
>
select
handover_external_id
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
<if
test=
"staffIds!=null and staffIds.size>0"
>
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
and status_flag=1
</select>
<select
id=
"listByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_external_id in
<foreach
collection=
"ids"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
and status_flag=1
</select>
<update
id=
"updateAfterTransfer"
>
update tab_haoban_handover_external
set
status_flag = 2,
handover_transfer_id = #{transferId,jdbcType=VARCHAR},
transfer_status = 0,
transfer_time = now(),
update_time = now()
where handover_external_id in
<foreach
collection=
"ids"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</update>
<select
id=
"getByTransferId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_transfer_id = #{transferId,jdbcType=VARCHAR}
and external_user_id=#{externalUserId}
and status_flag=2
</select>
<select
id=
"getByExternalUserIdAndStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id = #{staffId,jdbcType=VARCHAR}
and external_user_id=#{externalUserId}
and status_flag!=0
</select>
<update
id=
"delNoTransferExternal"
>
update tab_haoban_handover_external
set
status_flag = 0,
update_time = now()
where
wx_enterprise_id=#{wxEnterpriseId}
<if
test=
"userIds!=null and userIds.size>0"
>
and user_id in
<foreach
collection=
"userIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
and status_flag=1
</update>
<select
id=
"listPreCountByStaffIds"
resultMap=
"FiendCountResultMap"
>
select
staff_id ,
COUNT(external_user_id) friendCount,
sum(haoban_friend_flag) haobanFriendCount
from tab_haoban_handover_external
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id in
<foreach
collection=
"staffIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
and status_flag=1
group by staff_id
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/HandoverStaffMapper.xml
View file @
b6c1dac2
<?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.HandoverStaffMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
<id
column=
"handover_staff_id"
jdbcType=
"VARCHAR"
property=
"handoverStaffId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"handover_user_id"
jdbcType=
"VARCHAR"
property=
"handoverUserId"
/>
<result
column=
"dimission_time"
jdbcType=
"TIMESTAMP"
property=
"dimissionTime"
/>
<result
column=
"friend_count"
jdbcType=
"INTEGER"
property=
"friendCount"
/>
<result
column=
"haoban_friend_count"
jdbcType=
"INTEGER"
property=
"haobanFriendCount"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_handover_staff
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
insert into tab_haoban_handover_staff (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)
values (#{handoverStaffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{staffId,jdbcType=VARCHAR},#{storeId,jdbcType=VARCHAR}, #{handoverUserId,jdbcType=VARCHAR}, #{dimissionTime,jdbcType=TIMESTAMP},
#{friendCount,jdbcType=INTEGER}, #{haobanFriendCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
insert into tab_haoban_handover_staff
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverStaffId != null"
>
handover_staff_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"handoverUserId != null"
>
handover_user_id,
</if>
<if
test=
"dimissionTime != null"
>
dimission_time,
</if>
<if
test=
"friendCount != null"
>
friend_count,
</if>
<if
test=
"haobanFriendCount != null"
>
haoban_friend_count,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverStaffId != null"
>
#{handoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverUserId != null"
>
#{handoverUserId,jdbcType=VARCHAR},
</if>
<if
test=
"dimissionTime != null"
>
#{dimissionTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"friendCount != null"
>
#{friendCount,jdbcType=INTEGER},
</if>
<if
test=
"haobanFriendCount != null"
>
#{haobanFriendCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
update tab_haoban_handover_staff
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverUserId != null"
>
handover_user_id = #{handoverUserId,jdbcType=VARCHAR},
</if>
<if
test=
"dimissionTime != null"
>
dimission_time = #{dimissionTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"friendCount != null"
>
friend_count = #{friendCount,jdbcType=INTEGER},
</if>
<if
test=
"haobanFriendCount != null"
>
haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
update tab_haoban_handover_staff
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
handover_user_id = #{handoverUserId,jdbcType=VARCHAR},
dimission_time = #{dimissionTime,jdbcType=TIMESTAMP},
friend_count = #{friendCount,jdbcType=INTEGER},
haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</update>
<select
id=
"getByStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id=#{staffId}
and status_flag = 1
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and store_id=#{storeId}
and status_flag=1
</select>
<select
id=
"listByWxEnterpriseId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<update
id=
"delByUserIds"
>
update tab_haoban_handover_staff
set
status_flag = 0,
update_time = now()
where
wx_enterprise_id=#{wxEnterpriseId}
and status_flag=1
<if
test=
"userIds!=null and userIds.size>0"
>
and handover_user_id in
<foreach
collection=
"userIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</update>
<?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.HandoverStaffMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
<id
column=
"handover_staff_id"
jdbcType=
"VARCHAR"
property=
"handoverStaffId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"handover_user_id"
jdbcType=
"VARCHAR"
property=
"handoverUserId"
/>
<result
column=
"dimission_time"
jdbcType=
"TIMESTAMP"
property=
"dimissionTime"
/>
<result
column=
"friend_count"
jdbcType=
"INTEGER"
property=
"friendCount"
/>
<result
column=
"haoban_friend_count"
jdbcType=
"INTEGER"
property=
"haobanFriendCount"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_handover_staff
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
insert into tab_haoban_handover_staff (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)
values (#{handoverStaffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{staffId,jdbcType=VARCHAR},#{storeId,jdbcType=VARCHAR}, #{handoverUserId,jdbcType=VARCHAR}, #{dimissionTime,jdbcType=TIMESTAMP},
#{friendCount,jdbcType=INTEGER}, #{haobanFriendCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
insert into tab_haoban_handover_staff
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverStaffId != null"
>
handover_staff_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"handoverUserId != null"
>
handover_user_id,
</if>
<if
test=
"dimissionTime != null"
>
dimission_time,
</if>
<if
test=
"friendCount != null"
>
friend_count,
</if>
<if
test=
"haobanFriendCount != null"
>
haoban_friend_count,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverStaffId != null"
>
#{handoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverUserId != null"
>
#{handoverUserId,jdbcType=VARCHAR},
</if>
<if
test=
"dimissionTime != null"
>
#{dimissionTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"friendCount != null"
>
#{friendCount,jdbcType=INTEGER},
</if>
<if
test=
"haobanFriendCount != null"
>
#{haobanFriendCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
update tab_haoban_handover_staff
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverUserId != null"
>
handover_user_id = #{handoverUserId,jdbcType=VARCHAR},
</if>
<if
test=
"dimissionTime != null"
>
dimission_time = #{dimissionTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"friendCount != null"
>
friend_count = #{friendCount,jdbcType=INTEGER},
</if>
<if
test=
"haobanFriendCount != null"
>
haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverStaff"
>
update tab_haoban_handover_staff
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
handover_user_id = #{handoverUserId,jdbcType=VARCHAR},
dimission_time = #{dimissionTime,jdbcType=TIMESTAMP},
friend_count = #{friendCount,jdbcType=INTEGER},
haoban_friend_count = #{haobanFriendCount,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR}
</update>
<select
id=
"getByStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id=#{staffId}
and status_flag = 1
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and store_id=#{storeId}
and status_flag=1
</select>
<select
id=
"listByWxEnterpriseId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<update
id=
"delByUserIds"
>
update tab_haoban_handover_staff
set
status_flag = 0,
update_time = now()
where
wx_enterprise_id=#{wxEnterpriseId}
and status_flag=1
<if
test=
"userIds!=null and userIds.size>0"
>
and handover_user_id in
<foreach
collection=
"userIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/HandoverTransferMapper.xml
View file @
b6c1dac2
<?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.HandoverTransferMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
<id
column=
"handover_transfer_id"
jdbcType=
"VARCHAR"
property=
"handoverTransferId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"handover_staff_id"
jdbcType=
"VARCHAR"
property=
"handoverStaffId"
/>
<result
column=
"takeover_staff_id"
jdbcType=
"VARCHAR"
property=
"takeoverStaffId"
/>
<result
column=
"external_count"
jdbcType=
"INTEGER"
property=
"externalCount"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
handover_transfer_id, wx_enterprise_id, store_id, handover_staff_id, takeover_staff_id,
external_count, status_flag, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_handover_transfer
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
insert into tab_haoban_handover_transfer (handover_transfer_id, wx_enterprise_id,
store_id, handover_staff_id, takeover_staff_id,
external_count, status_flag, create_time,
update_time)
values (#{handoverTransferId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{storeId,jdbcType=VARCHAR}, #{handoverStaffId,jdbcType=VARCHAR}, #{takeoverStaffId,jdbcType=VARCHAR},
#{externalCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
insert into tab_haoban_handover_transfer
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverTransferId != null"
>
handover_transfer_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"handoverStaffId != null"
>
handover_staff_id,
</if>
<if
test=
"takeoverStaffId != null"
>
takeover_staff_id,
</if>
<if
test=
"externalCount != null"
>
external_count,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverTransferId != null"
>
#{handoverTransferId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverStaffId != null"
>
#{handoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverStaffId != null"
>
#{takeoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"externalCount != null"
>
#{externalCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
update tab_haoban_handover_transfer
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverStaffId != null"
>
handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverStaffId != null"
>
takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"externalCount != null"
>
external_count = #{externalCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
update tab_haoban_handover_transfer
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR},
takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR},
external_count = #{externalCount,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</update>
<select
id=
"getByHandoverStaffIdAndTakeoverStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and handover_staff_id = #{handoverStaffId}
and takeover_staff_id = #{takeoverStaffId}
and status_flag=1
</select>
<update
id=
"addCount"
>
update tab_haoban_handover_transfer
set
external_count =external_count+${count},
update_time = now()
where handover_transfer_id = #{id}
</update>
<select
id=
"listTransferByStoreId"
resultMap=
"BaseResultMap"
>
select
handover_staff_id,
max(update_time) as update_time,
sum(external_count) as external_count
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and store_id = #{storeId}
and status_flag=1
group by handover_staff_id
</select>
<select
id=
"listTransferByHandoverStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and handover_staff_id = #{handoverStaffId}
and status_flag=1
</select>
<select
id=
"listTransferByTakeoverStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and takeover_staff_id = #{takeoverStaffId}
and status_flag=1
</select>
<select
id=
"listTransferByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and handover_transfer_id in
<foreach
collection=
"ids"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
and status_flag=1
</select>
<select
id=
"listTransferByWxEnterpriseId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and create_time > #{date}
and status_flag=1
</select>
<?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.HandoverTransferMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
<id
column=
"handover_transfer_id"
jdbcType=
"VARCHAR"
property=
"handoverTransferId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"handover_staff_id"
jdbcType=
"VARCHAR"
property=
"handoverStaffId"
/>
<result
column=
"takeover_staff_id"
jdbcType=
"VARCHAR"
property=
"takeoverStaffId"
/>
<result
column=
"external_count"
jdbcType=
"INTEGER"
property=
"externalCount"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
handover_transfer_id, wx_enterprise_id, store_id, handover_staff_id, takeover_staff_id,
external_count, status_flag, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_handover_transfer
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
insert into tab_haoban_handover_transfer (handover_transfer_id, wx_enterprise_id,
store_id, handover_staff_id, takeover_staff_id,
external_count, status_flag, create_time,
update_time)
values (#{handoverTransferId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{storeId,jdbcType=VARCHAR}, #{handoverStaffId,jdbcType=VARCHAR}, #{takeoverStaffId,jdbcType=VARCHAR},
#{externalCount,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
insert into tab_haoban_handover_transfer
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverTransferId != null"
>
handover_transfer_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"handoverStaffId != null"
>
handover_staff_id,
</if>
<if
test=
"takeoverStaffId != null"
>
takeover_staff_id,
</if>
<if
test=
"externalCount != null"
>
external_count,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"handoverTransferId != null"
>
#{handoverTransferId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverStaffId != null"
>
#{handoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverStaffId != null"
>
#{takeoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"externalCount != null"
>
#{externalCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
update tab_haoban_handover_transfer
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"handoverStaffId != null"
>
handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"takeoverStaffId != null"
>
takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"externalCount != null"
>
external_count = #{externalCount,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHandoverTransfer"
>
update tab_haoban_handover_transfer
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
handover_staff_id = #{handoverStaffId,jdbcType=VARCHAR},
takeover_staff_id = #{takeoverStaffId,jdbcType=VARCHAR},
external_count = #{externalCount,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where handover_transfer_id = #{handoverTransferId,jdbcType=VARCHAR}
</update>
<select
id=
"getByHandoverStaffIdAndTakeoverStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and handover_staff_id = #{handoverStaffId}
and takeover_staff_id = #{takeoverStaffId}
and status_flag=1
</select>
<update
id=
"addCount"
>
update tab_haoban_handover_transfer
set
external_count =external_count+${count},
update_time = now()
where handover_transfer_id = #{id}
</update>
<select
id=
"listTransferByStoreId"
resultMap=
"BaseResultMap"
>
select
handover_staff_id,
max(update_time) as update_time,
sum(external_count) as external_count
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and store_id = #{storeId}
and status_flag=1
group by handover_staff_id
</select>
<select
id=
"listTransferByHandoverStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and handover_staff_id = #{handoverStaffId}
and status_flag=1
</select>
<select
id=
"listTransferByTakeoverStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and takeover_staff_id = #{takeoverStaffId}
and status_flag=1
</select>
<select
id=
"listTransferByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and handover_transfer_id in
<foreach
collection=
"ids"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
and status_flag=1
</select>
<select
id=
"listTransferByWxEnterpriseId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and create_time > #{date}
and status_flag=1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/NoticeMessageMapper.xml
View file @
b6c1dac2
<?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.NoticeMessageMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
<id
column=
"notice_message_id"
jdbcType=
"BIGINT"
property=
"noticeMessageId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"clerk_id"
jdbcType=
"VARCHAR"
property=
"clerkId"
/>
<result
column=
"category_type"
jdbcType=
"INTEGER"
property=
"categoryType"
/>
<result
column=
"message_type"
jdbcType=
"INTEGER"
property=
"messageType"
/>
<result
column=
"template_code"
jdbcType=
"VARCHAR"
property=
"templateCode"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"message_content"
jdbcType=
"VARCHAR"
property=
"messageContent"
/>
<result
column=
"read_flag"
jdbcType=
"INTEGER"
property=
"readFlag"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
insert into tab_haoban_notice_message (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, create_time, update_time
)
values (#{noticeMessageId,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{clerkId,jdbcType=VARCHAR}, #{categoryType,jdbcType=INTEGER}, #{messageType,jdbcType=INTEGER},
#{templateCode,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR}, #{messageContent,jdbcType=VARCHAR}, #{readFlag,jdbcType=INTEGER},
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
insert into tab_haoban_notice_message
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageId != null"
>
notice_message_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"clerkId != null"
>
clerk_id,
</if>
<if
test=
"categoryType != null"
>
category_type,
</if>
<if
test=
"messageType != null"
>
message_type,
</if>
<if
test=
"templateCode != null"
>
template_code,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"messageContent != null"
>
message_content,
</if>
<if
test=
"readFlag != null"
>
read_flag,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageId != null"
>
#{noticeMessageId,jdbcType=BIGINT},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
#{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"categoryType != null"
>
#{categoryType,jdbcType=INTEGER},
</if>
<if
test=
"messageType != null"
>
#{messageType,jdbcType=INTEGER},
</if>
<if
test=
"templateCode != null"
>
#{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"messageContent != null"
>
#{messageContent,jdbcType=VARCHAR},
</if>
<if
test=
"readFlag != null"
>
#{readFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
update tab_haoban_notice_message
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
clerk_id = #{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"categoryType != null"
>
category_type = #{categoryType,jdbcType=INTEGER},
</if>
<if
test=
"messageType != null"
>
message_type = #{messageType,jdbcType=INTEGER},
</if>
<if
test=
"templateCode != null"
>
template_code = #{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"messageContent != null"
>
message_content = #{messageContent,jdbcType=VARCHAR},
</if>
<if
test=
"readFlag != null"
>
read_flag = #{readFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
update tab_haoban_notice_message
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR},
category_type = #{categoryType,jdbcType=INTEGER},
message_type = #{messageType,jdbcType=INTEGER},
template_code = #{templateCode,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
message_content = #{messageContent,jdbcType=VARCHAR},
read_flag = #{readFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update>
<select
id=
"listNoticeMessage"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message
where enterprise_id = #{enterpriseId}
and store_id = #{storeId}
and delete_flag=0
<if
test=
"clerkId != null"
>
and clerk_id =#{clerkId}
</if>
<if
test=
"categoryType != -1"
>
and category_type =#{categoryType}
</if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
order by create_time desc
</select>
<select
id=
"countUnreadNoticeMessage"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_notice_message
where enterprise_id = #{enterpriseId}
and read_flag=0
and delete_flag=0
and store_id = #{storeId}
<if
test=
"clerkId != null"
>
and clerk_id =#{clerkId}
</if>
<if
test=
"categoryType != -1"
>
and category_type =#{categoryType}
</if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
order by create_time desc
</select>
<update
id=
"updateNoticeMessageReadFlag"
>
update tab_haoban_notice_message
set read_flag=1,update_time = now()
WHERE enterprise_id = #{enterpriseId}
and clerk_id = #{clerkId}
and read_flag=0
and delete_flag=0
<if
test=
"categoryType!=-1"
>
and category_type=#{categoryType}
</if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
</update>
<?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.NoticeMessageMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
<id
column=
"notice_message_id"
jdbcType=
"BIGINT"
property=
"noticeMessageId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"clerk_id"
jdbcType=
"VARCHAR"
property=
"clerkId"
/>
<result
column=
"category_type"
jdbcType=
"INTEGER"
property=
"categoryType"
/>
<result
column=
"message_type"
jdbcType=
"INTEGER"
property=
"messageType"
/>
<result
column=
"template_code"
jdbcType=
"VARCHAR"
property=
"templateCode"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"message_content"
jdbcType=
"VARCHAR"
property=
"messageContent"
/>
<result
column=
"read_flag"
jdbcType=
"INTEGER"
property=
"readFlag"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
insert into tab_haoban_notice_message (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, create_time, update_time
)
values (#{noticeMessageId,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{clerkId,jdbcType=VARCHAR}, #{categoryType,jdbcType=INTEGER}, #{messageType,jdbcType=INTEGER},
#{templateCode,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR}, #{messageContent,jdbcType=VARCHAR}, #{readFlag,jdbcType=INTEGER},
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
insert into tab_haoban_notice_message
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageId != null"
>
notice_message_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"clerkId != null"
>
clerk_id,
</if>
<if
test=
"categoryType != null"
>
category_type,
</if>
<if
test=
"messageType != null"
>
message_type,
</if>
<if
test=
"templateCode != null"
>
template_code,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"messageContent != null"
>
message_content,
</if>
<if
test=
"readFlag != null"
>
read_flag,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageId != null"
>
#{noticeMessageId,jdbcType=BIGINT},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
#{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"categoryType != null"
>
#{categoryType,jdbcType=INTEGER},
</if>
<if
test=
"messageType != null"
>
#{messageType,jdbcType=INTEGER},
</if>
<if
test=
"templateCode != null"
>
#{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"messageContent != null"
>
#{messageContent,jdbcType=VARCHAR},
</if>
<if
test=
"readFlag != null"
>
#{readFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
update tab_haoban_notice_message
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
clerk_id = #{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"categoryType != null"
>
category_type = #{categoryType,jdbcType=INTEGER},
</if>
<if
test=
"messageType != null"
>
message_type = #{messageType,jdbcType=INTEGER},
</if>
<if
test=
"templateCode != null"
>
template_code = #{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"messageContent != null"
>
message_content = #{messageContent,jdbcType=VARCHAR},
</if>
<if
test=
"readFlag != null"
>
read_flag = #{readFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessage"
>
update tab_haoban_notice_message
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR},
category_type = #{categoryType,jdbcType=INTEGER},
message_type = #{messageType,jdbcType=INTEGER},
template_code = #{templateCode,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
message_content = #{messageContent,jdbcType=VARCHAR},
read_flag = #{readFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update>
<select
id=
"listNoticeMessage"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message
where enterprise_id = #{enterpriseId}
and store_id = #{storeId}
and delete_flag=0
<if
test=
"clerkId != null"
>
and clerk_id =#{clerkId}
</if>
<if
test=
"categoryType != -1"
>
and category_type =#{categoryType}
</if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
order by create_time desc
</select>
<select
id=
"countUnreadNoticeMessage"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_notice_message
where enterprise_id = #{enterpriseId}
and read_flag=0
and delete_flag=0
and store_id = #{storeId}
<if
test=
"clerkId != null"
>
and clerk_id =#{clerkId}
</if>
<if
test=
"categoryType != -1"
>
and category_type =#{categoryType}
</if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
order by create_time desc
</select>
<update
id=
"updateNoticeMessageReadFlag"
>
update tab_haoban_notice_message
set read_flag=1,update_time = now()
WHERE enterprise_id = #{enterpriseId}
and clerk_id = #{clerkId}
and read_flag=0
and delete_flag=0
<if
test=
"categoryType!=-1"
>
and category_type=#{categoryType}
</if>
and create_time > DATE_SUB(now(),INTERVAL 30 DAY)
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/NoticeMessageTemplateMapper.xml
View file @
b6c1dac2
<?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.NoticeMessageTemplateMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
<id
column=
"notice_message_template_id"
jdbcType=
"INTEGER"
property=
"noticeMessageTemplateId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"template_code"
jdbcType=
"VARCHAR"
property=
"templateCode"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"notice_content"
jdbcType=
"VARCHAR"
property=
"noticeContent"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
notice_message_template_id, enterprise_id, template_code, content,notice_content, delete_flag, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message_template
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_notice_message_template
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
insert into tab_haoban_notice_message_template (notice_message_template_id, enterprise_id,
template_code, content, delete_flag,
create_time, update_time)
values (#{noticeMessageTemplateId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR},
#{templateCode,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
insert into tab_haoban_notice_message_template
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageTemplateId != null"
>
notice_message_template_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"templateCode != null"
>
template_code,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageTemplateId != null"
>
#{noticeMessageTemplateId,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"templateCode != null"
>
#{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
update tab_haoban_notice_message_template
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"templateCode != null"
>
template_code = #{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
update tab_haoban_notice_message_template
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
template_code = #{templateCode,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</update>
<select
id=
"getByCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message_template
where template_code = #{templateCode,jdbcType=VARCHAR} and enterprise_id=#{enterpriseId} and delete_flag=0
</select>
<?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.NoticeMessageTemplateMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
<id
column=
"notice_message_template_id"
jdbcType=
"INTEGER"
property=
"noticeMessageTemplateId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"template_code"
jdbcType=
"VARCHAR"
property=
"templateCode"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"notice_content"
jdbcType=
"VARCHAR"
property=
"noticeContent"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
notice_message_template_id, enterprise_id, template_code, content,notice_content, delete_flag, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message_template
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_notice_message_template
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
insert into tab_haoban_notice_message_template (notice_message_template_id, enterprise_id,
template_code, content, delete_flag,
create_time, update_time)
values (#{noticeMessageTemplateId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR},
#{templateCode,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
insert into tab_haoban_notice_message_template
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageTemplateId != null"
>
notice_message_template_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"templateCode != null"
>
template_code,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"noticeMessageTemplateId != null"
>
#{noticeMessageTemplateId,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"templateCode != null"
>
#{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
update tab_haoban_notice_message_template
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"templateCode != null"
>
template_code = #{templateCode,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabNoticeMessageTemplate"
>
update tab_haoban_notice_message_template
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
template_code = #{templateCode,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_template_id = #{noticeMessageTemplateId,jdbcType=INTEGER}
</update>
<select
id=
"getByCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_notice_message_template
where template_code = #{templateCode,jdbcType=VARCHAR} and enterprise_id=#{enterpriseId} and delete_flag=0
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/PendingTaskMapper.xml
View file @
b6c1dac2
<?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.PendingTaskMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"task_type"
jdbcType=
"INTEGER"
property=
"taskType"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"task_status_flag"
jdbcType=
"INTEGER"
property=
"taskStatusFlag"
/>
<result
column=
"overdue_time"
jdbcType=
"TIMESTAMP"
property=
"overdueTime"
/>
<result
column=
"invalid_time"
jdbcType=
"TIMESTAMP"
property=
"invalidTime"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"clerk_id"
jdbcType=
"VARCHAR"
property=
"clerkId"
/>
<result
column=
"finish_time"
jdbcType=
"TIMESTAMP"
property=
"finishTime"
/>
<result
column=
"finish_flag"
jdbcType=
"INTEGER"
property=
"finishFlag"
/>
<result
column=
"overdue_flag"
jdbcType=
"INTEGER"
property=
"overdueFlag"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
delete_flag, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_pending_task
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
insert into tab_haoban_pending_task (id, enterprise_id, relation_id,
task_type, title, description,
task_status_flag, overdue_time, invalid_time,
store_id, clerk_id, finish_time,
finish_flag, overdue_flag, delete_flag,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
#{taskType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{taskStatusFlag,jdbcType=INTEGER}, #{overdueTime,jdbcType=TIMESTAMP}, #{invalidTime,jdbcType=TIMESTAMP},
#{storeId,jdbcType=VARCHAR}, #{clerkId,jdbcType=VARCHAR}, #{finishTime,jdbcType=TIMESTAMP},
#{finishFlag,jdbcType=INTEGER}, #{overdueFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
insert into tab_haoban_pending_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"businessId != null"
>
business_id,
</if>
<if
test=
"taskType != null"
>
task_type,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"taskStatusFlag != null"
>
task_status_flag,
</if>
<if
test=
"overdueTime != null"
>
overdue_time,
</if>
<if
test=
"invalidTime != null"
>
invalid_time,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"clerkId != null"
>
clerk_id,
</if>
<if
test=
"finishTime != null"
>
finish_time,
</if>
<if
test=
"finishFlag != null"
>
finish_flag,
</if>
<if
test=
"overdueFlag != null"
>
overdue_flag,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"businessId != null"
>
#{businessId,jdbcType=VARCHAR},
</if>
<if
test=
"taskType != null"
>
#{taskType,jdbcType=INTEGER},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"taskStatusFlag != null"
>
#{taskStatusFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueTime != null"
>
#{overdueTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"invalidTime != null"
>
#{invalidTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
#{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"finishTime != null"
>
#{finishTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"finishFlag != null"
>
#{finishFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueFlag != null"
>
#{overdueFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
update tab_haoban_pending_task
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"businessId != null"
>
business_id = #{businessId,jdbcType=VARCHAR},
</if>
<if
test=
"taskType != null"
>
task_type = #{taskType,jdbcType=INTEGER},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"taskStatusFlag != null"
>
task_status_flag = #{taskStatusFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueTime != null"
>
overdue_time = #{overdueTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"invalidTime != null"
>
invalid_time = #{invalidTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
clerk_id = #{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"finishTime != null"
>
finish_time = #{finishTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"finishFlag != null"
>
finish_flag = #{finishFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueFlag != null"
>
overdue_flag = #{overdueFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
update tab_haoban_pending_task
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
business_id = #{businessId,jdbcType=VARCHAR},
task_type = #{taskType,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
task_status_flag = #{taskStatusFlag,jdbcType=INTEGER},
overdue_time = #{overdueTime,jdbcType=TIMESTAMP},
invalid_time = #{invalidTime,jdbcType=TIMESTAMP},
store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR},
finish_time = #{finishTime,jdbcType=TIMESTAMP},
finish_flag = #{finishFlag,jdbcType=INTEGER},
overdue_flag = #{overdueFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"getByRelationId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where relation_id = #{relationId}
</select>
<select
id=
"listByRelationId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where relation_id in
<foreach
collection=
"relationIds"
open=
"("
separator=
","
close=
")"
item=
"item"
>
#{item}
</foreach>
</select>
<select
id=
"listPendingTask"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where enterprise_id = #{enterpriseId}
and store_id =#{storeId}
and task_status_flag=0
and delete_flag=0
<if
test=
"finishFlag != -1"
>
and finish_flag = #{finishFlag}
</if>
<if
test=
"overdueFlag != -1"
>
and overdue_flag = #{overdueFlag}
</if>
<if
test=
"clerkId != null"
>
and clerk_id = #{clerkId}
</if>
<if
test=
"taskType!=-1"
>
and task_type = #{taskType}
</if>
order by overdue_time desc
</select>
<select
id=
"listPendingTaskByCreateTime"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where enterprise_id = #{enterpriseId}
and store_id =#{storeId}
and task_status_flag=0
and delete_flag=0
and finish_flag =0
<if
test=
"clerkId != null"
>
and clerk_id = #{clerkId}
</if>
<if
test=
"startDate != null"
>
and create_time
<![CDATA[ >= ]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
and create_time
<![CDATA[ <= ]]>
#{endDate}
</if>
order by create_time desc limit 20
</select>
<update
id=
"deleteByRelationIds"
>
update tab_haoban_pending_task
set
delete_flag = 1,
update_time = now()
where relation_id in
<foreach
collection=
"relationIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</update>
<update
id=
"updateInvalidTimeByBusinessId"
>
update tab_haoban_pending_task
set
update_time = now(),
invalid_time = #{invalidTime},
overdue_time = #{invalidTime}
where business_id = #{businessId}
</update>
<update
id=
"deleteByBusinessId"
>
update tab_haoban_pending_task
set
delete_flag = 1,
update_time = now()
where business_id = #{businessId} and delete_flag=0
</update>
<insert
id=
"insertBatch"
>
insert into tab_haoban_pending_task ( 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, delete_flag,
create_time, update_time)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
( #{item.enterpriseId,jdbcType=VARCHAR}, #{item.relationId,jdbcType=VARCHAR},#{item.businessId,jdbcType=VARCHAR},
#{item.taskType,jdbcType=INTEGER}, #{item.title,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR},
0, #{item.overdueTime,jdbcType=TIMESTAMP}, #{item.invalidTime,jdbcType=TIMESTAMP},
#{item.storeId,jdbcType=VARCHAR}, #{item.clerkId,jdbcType=VARCHAR}, #{item.finishTime,jdbcType=TIMESTAMP},
0, 0, 0,
now(), now())
</foreach>
</insert>
<update
id=
"updateDelToNormalByRelationIds"
>
update tab_haoban_pending_task
set
delete_flag=0,
update_time = now(),
invalid_time = #{invalidTime},
overdue_time = #{invalidTime}
where
relation_id in
<foreach
collection=
"relationIds"
open=
"("
separator=
","
close=
")"
item=
"item"
>
#{item}
</foreach>
</update>
<?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.PendingTaskMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"task_type"
jdbcType=
"INTEGER"
property=
"taskType"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"task_status_flag"
jdbcType=
"INTEGER"
property=
"taskStatusFlag"
/>
<result
column=
"overdue_time"
jdbcType=
"TIMESTAMP"
property=
"overdueTime"
/>
<result
column=
"invalid_time"
jdbcType=
"TIMESTAMP"
property=
"invalidTime"
/>
<result
column=
"store_id"
jdbcType=
"VARCHAR"
property=
"storeId"
/>
<result
column=
"clerk_id"
jdbcType=
"VARCHAR"
property=
"clerkId"
/>
<result
column=
"finish_time"
jdbcType=
"TIMESTAMP"
property=
"finishTime"
/>
<result
column=
"finish_flag"
jdbcType=
"INTEGER"
property=
"finishFlag"
/>
<result
column=
"overdue_flag"
jdbcType=
"INTEGER"
property=
"overdueFlag"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
delete_flag, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_pending_task
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
insert into tab_haoban_pending_task (id, enterprise_id, relation_id,
task_type, title, description,
task_status_flag, overdue_time, invalid_time,
store_id, clerk_id, finish_time,
finish_flag, overdue_flag, delete_flag,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
#{taskType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{taskStatusFlag,jdbcType=INTEGER}, #{overdueTime,jdbcType=TIMESTAMP}, #{invalidTime,jdbcType=TIMESTAMP},
#{storeId,jdbcType=VARCHAR}, #{clerkId,jdbcType=VARCHAR}, #{finishTime,jdbcType=TIMESTAMP},
#{finishFlag,jdbcType=INTEGER}, #{overdueFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
insert into tab_haoban_pending_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"businessId != null"
>
business_id,
</if>
<if
test=
"taskType != null"
>
task_type,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"taskStatusFlag != null"
>
task_status_flag,
</if>
<if
test=
"overdueTime != null"
>
overdue_time,
</if>
<if
test=
"invalidTime != null"
>
invalid_time,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"clerkId != null"
>
clerk_id,
</if>
<if
test=
"finishTime != null"
>
finish_time,
</if>
<if
test=
"finishFlag != null"
>
finish_flag,
</if>
<if
test=
"overdueFlag != null"
>
overdue_flag,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"businessId != null"
>
#{businessId,jdbcType=VARCHAR},
</if>
<if
test=
"taskType != null"
>
#{taskType,jdbcType=INTEGER},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"taskStatusFlag != null"
>
#{taskStatusFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueTime != null"
>
#{overdueTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"invalidTime != null"
>
#{invalidTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
#{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"finishTime != null"
>
#{finishTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"finishFlag != null"
>
#{finishFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueFlag != null"
>
#{overdueFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
update tab_haoban_pending_task
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"businessId != null"
>
business_id = #{businessId,jdbcType=VARCHAR},
</if>
<if
test=
"taskType != null"
>
task_type = #{taskType,jdbcType=INTEGER},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"taskStatusFlag != null"
>
task_status_flag = #{taskStatusFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueTime != null"
>
overdue_time = #{overdueTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"invalidTime != null"
>
invalid_time = #{invalidTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if
test=
"clerkId != null"
>
clerk_id = #{clerkId,jdbcType=VARCHAR},
</if>
<if
test=
"finishTime != null"
>
finish_time = #{finishTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"finishFlag != null"
>
finish_flag = #{finishFlag,jdbcType=INTEGER},
</if>
<if
test=
"overdueFlag != null"
>
overdue_flag = #{overdueFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabPendingTask"
>
update tab_haoban_pending_task
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
business_id = #{businessId,jdbcType=VARCHAR},
task_type = #{taskType,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
task_status_flag = #{taskStatusFlag,jdbcType=INTEGER},
overdue_time = #{overdueTime,jdbcType=TIMESTAMP},
invalid_time = #{invalidTime,jdbcType=TIMESTAMP},
store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR},
finish_time = #{finishTime,jdbcType=TIMESTAMP},
finish_flag = #{finishFlag,jdbcType=INTEGER},
overdue_flag = #{overdueFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"getByRelationId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where relation_id = #{relationId}
</select>
<select
id=
"listByRelationId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where relation_id in
<foreach
collection=
"relationIds"
open=
"("
separator=
","
close=
")"
item=
"item"
>
#{item}
</foreach>
</select>
<select
id=
"listPendingTask"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where enterprise_id = #{enterpriseId}
and store_id =#{storeId}
and task_status_flag=0
and delete_flag=0
<if
test=
"finishFlag != -1"
>
and finish_flag = #{finishFlag}
</if>
<if
test=
"overdueFlag != -1"
>
and overdue_flag = #{overdueFlag}
</if>
<if
test=
"clerkId != null"
>
and clerk_id = #{clerkId}
</if>
<if
test=
"taskType!=-1"
>
and task_type = #{taskType}
</if>
order by overdue_time desc
</select>
<select
id=
"listPendingTaskByCreateTime"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pending_task
where enterprise_id = #{enterpriseId}
and store_id =#{storeId}
and task_status_flag=0
and delete_flag=0
and finish_flag =0
<if
test=
"clerkId != null"
>
and clerk_id = #{clerkId}
</if>
<if
test=
"startDate != null"
>
and create_time
<![CDATA[ >= ]]>
#{startDate}
</if>
<if
test=
"endDate != null"
>
and create_time
<![CDATA[ <= ]]>
#{endDate}
</if>
order by create_time desc limit 20
</select>
<update
id=
"deleteByRelationIds"
>
update tab_haoban_pending_task
set
delete_flag = 1,
update_time = now()
where relation_id in
<foreach
collection=
"relationIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</update>
<update
id=
"updateInvalidTimeByBusinessId"
>
update tab_haoban_pending_task
set
update_time = now(),
invalid_time = #{invalidTime},
overdue_time = #{invalidTime}
where business_id = #{businessId}
</update>
<update
id=
"deleteByBusinessId"
>
update tab_haoban_pending_task
set
delete_flag = 1,
update_time = now()
where business_id = #{businessId} and delete_flag=0
</update>
<insert
id=
"insertBatch"
>
insert into tab_haoban_pending_task ( 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, delete_flag,
create_time, update_time)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
( #{item.enterpriseId,jdbcType=VARCHAR}, #{item.relationId,jdbcType=VARCHAR},#{item.businessId,jdbcType=VARCHAR},
#{item.taskType,jdbcType=INTEGER}, #{item.title,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR},
0, #{item.overdueTime,jdbcType=TIMESTAMP}, #{item.invalidTime,jdbcType=TIMESTAMP},
#{item.storeId,jdbcType=VARCHAR}, #{item.clerkId,jdbcType=VARCHAR}, #{item.finishTime,jdbcType=TIMESTAMP},
0, 0, 0,
now(), now())
</foreach>
</insert>
<update
id=
"updateDelToNormalByRelationIds"
>
update tab_haoban_pending_task
set
delete_flag=0,
update_time = now(),
invalid_time = #{invalidTime},
overdue_time = #{invalidTime}
where
relation_id in
<foreach
collection=
"relationIds"
open=
"("
separator=
","
close=
")"
item=
"item"
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/PreDealLogMapper.xml
View file @
b6c1dac2
<?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.PreDealLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"data_id"
jdbcType=
"VARCHAR"
property=
"dataId"
/>
<result
column=
"data_content"
jdbcType=
"VARCHAR"
property=
"dataContent"
/>
<result
column=
"reason"
jdbcType=
"VARCHAR"
property=
"reason"
/>
<result
column=
"p_data_id"
jdbcType=
"VARCHAR"
property=
"pDataId"
/>
<result
column=
"task_id"
jdbcType=
"VARCHAR"
property=
"taskId"
/>
<result
column=
"data_type"
jdbcType=
"INTEGER"
property=
"dataType"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<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,
update_time
</sql>
<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,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_pre_deal_log
where id = #{id,jdbcType=INTEGER}
</delete>
<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,
p_data_id, task_id, data_type,
status_flag, create_time, update_time
)
values (#{wxEnterpriseId,jdbcType=VARCHAR},#{enterpriseId,jdbcType=VARCHAR},
#{dataId,jdbcType=VARCHAR},#{dataContent}
#{pDataId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{dataType,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, now(), now()
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
insert into tab_haoban_pre_deal_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"dataId != null"
>
data_id,
</if>
<if
test=
"dataContent != null"
>
data_content,
</if>
<if
test=
"pDataId != null"
>
p_data_id,
</if>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"dataType != null"
>
data_type,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
create_time,
update_time
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"dataId != null"
>
#{dataId,jdbcType=VARCHAR},
</if>
<if
test=
"dataContent != null"
>
#{dataContent},
</if>
<if
test=
"pDataId != null"
>
#{pDataId,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=VARCHAR},
</if>
<if
test=
"dataType != null"
>
#{dataType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
now(),
now()
</trim>
</insert>
<insert
id=
"insertSelectiveBatch"
>
insert into tab_haoban_pre_deal_log ( wx_enterprise_id,enterprise_id, data_id,data_content,
p_data_id, task_id, data_type,
status_flag, create_time, update_time
)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
>
(#{item.wxEnterpriseId,jdbcType=VARCHAR},#{item.enterpriseId,jdbcType=VARCHAR},
#{item.dataId,jdbcType=VARCHAR},#{item.dataContent},
#{item.pDataId,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.dataType,jdbcType=INTEGER},
#{item.statusFlag,jdbcType=INTEGER}, now(), now()
)
</foreach>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
update tab_haoban_pre_deal_log
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"dataId != null"
>
data_id = #{dataId,jdbcType=VARCHAR},
</if>
<if
test=
"pDataId != null"
>
p_data_id = #{pDataId,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
task_id = #{taskId,jdbcType=VARCHAR},
</if>
<if
test=
"dataType != null"
>
data_type = #{dataType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
update tab_haoban_pre_deal_log
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
data_id = #{dataId,jdbcType=VARCHAR},
p_data_id = #{pDataId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=VARCHAR},
data_type = #{dataType,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"getByDataId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_id=#{dataId}
<if
test=
"status!=-1"
>
and status_flag=#{status}
</if>
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
</select>
<select
id=
"listByPDataId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
<if
test=
"status!=-1"
>
and status_flag=#{status}
</if>
</select>
<select
id=
"listReByPDataId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
and status_flag in(0,1,3)
</select>
<update
id=
"updateStatusByDataId"
>
update tab_haoban_pre_deal_log
<set>
status_flag = #{status,jdbcType=INTEGER},
reason=#{reason},
update_time = now()
</set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
</update>
<select
id=
"checkTask"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType}
and status_flag=#{status}
</select>
<select
id=
"listByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType}
and status_flag=#{status}
</select>
<select
id=
"countByTaskId"
resultType=
"Integer"
>
select
COUNT(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
<if
test=
"status!=-1"
>
and status_flag=#{status}
</if>
</select>
<select
id=
"countExcepAndPreByTaskId"
resultType=
"Integer"
>
select
COUNT(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
and status_flag in(0,3)
</select>
<select
id=
"listRebuildDepartByTaskId"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
tab_haoban_pre_deal_log a
WHERE
a.task_id = #{taskId}
AND data_type = 0
AND status_flag in(0,3)
AND EXISTS (
SELECT
1
FROM
tab_haoban_pre_deal_log b
WHERE
b.task_id = #{taskId}
AND data_type = 0
AND a.p_data_id = b.data_id
AND b.status_flag = 2
)
</select>
<select
id=
"listRebuildByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType}
and status_flag in(0,3)
</select>
<update
id=
"updateExceptionToPre"
>
update tab_haoban_pre_deal_log
<set>
status_flag = 0,
update_time = now()
</set>
where status_flag = 3 and task_id=#{taskId}
</update>
<select
id=
"listExceptionByTask"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and status_flag =3
</select>
<select
id=
"countByDataId"
resultType=
"integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and data_id =#{dataId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
</select>
<select
id=
"listDataIdByTaskIdAndDataType"
resultType=
"java.lang.String"
>
select
data_id
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and data_type =#{dataType}
</select>
<select
id=
"getLastPreDataByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId,jdbcType=INTEGER} order by update_time desc limit 1
</select>
<select
id=
"getRootDataIdByWxEnterpriseIdAndTaskId"
resultType=
"java.lang.String"
>
select
data_id
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and p_data_id =0
and wx_enterprise_id =#{wxEnterpriseId} limit 1
</select>
<update
id=
"updateFriendStatusByDataId"
>
update tab_haoban_pre_deal_log
<set>
status_flag = #{status,jdbcType=INTEGER},
reason=#{reason},
data_content = #{dataContent},
update_time = now()
</set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
</update>
<update
id=
"updateFriendStatusAndRelationKeyByDataId"
>
update tab_haoban_pre_deal_log
<set>
status_flag = #{status,jdbcType=INTEGER},
reason=#{reason},
<if
test=
"dataContent !=null"
>
data_content = #{dataContent},
</if>
relation_key=#{relationKey},
update_time = now()
</set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
</update>
<select
id=
"countFailStaffTaskByTaskIdAndPDataId"
resultType=
"integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and p_data_id =#{pDataId}
and status_flag != 2
and status_flag != 3
</select>
<select
id=
"listByPDataIdAndTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and p_data_id =#{pDataId}
</select>
<select
id=
"getByRelationKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and relation_key =#{relationKey}
and data_type =#{dataType}
</select>
<select
id=
"checkTaskFriend"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
<if
test=
"pDataId!=null"
>
and p_data_id=#{pDataId}
</if>
and data_type=#{dataType}
and status_flag in(0,1)
</select>
<select
id=
"listReDataIdByPDataId"
resultType=
"String"
>
select
data_id
from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
and status_flag in(0,1,3)
</select>
<?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.PreDealLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"data_id"
jdbcType=
"VARCHAR"
property=
"dataId"
/>
<result
column=
"data_content"
jdbcType=
"VARCHAR"
property=
"dataContent"
/>
<result
column=
"reason"
jdbcType=
"VARCHAR"
property=
"reason"
/>
<result
column=
"p_data_id"
jdbcType=
"VARCHAR"
property=
"pDataId"
/>
<result
column=
"task_id"
jdbcType=
"VARCHAR"
property=
"taskId"
/>
<result
column=
"data_type"
jdbcType=
"INTEGER"
property=
"dataType"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<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,
update_time
</sql>
<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,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_pre_deal_log
where id = #{id,jdbcType=INTEGER}
</delete>
<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,
p_data_id, task_id, data_type,
status_flag, create_time, update_time
)
values (#{wxEnterpriseId,jdbcType=VARCHAR},#{enterpriseId,jdbcType=VARCHAR},
#{dataId,jdbcType=VARCHAR},#{dataContent}
#{pDataId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{dataType,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, now(), now()
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
insert into tab_haoban_pre_deal_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"dataId != null"
>
data_id,
</if>
<if
test=
"dataContent != null"
>
data_content,
</if>
<if
test=
"pDataId != null"
>
p_data_id,
</if>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"dataType != null"
>
data_type,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
create_time,
update_time
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"dataId != null"
>
#{dataId,jdbcType=VARCHAR},
</if>
<if
test=
"dataContent != null"
>
#{dataContent},
</if>
<if
test=
"pDataId != null"
>
#{pDataId,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=VARCHAR},
</if>
<if
test=
"dataType != null"
>
#{dataType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
now(),
now()
</trim>
</insert>
<insert
id=
"insertSelectiveBatch"
>
insert into tab_haoban_pre_deal_log ( wx_enterprise_id,enterprise_id, data_id,data_content,
p_data_id, task_id, data_type,
status_flag, create_time, update_time
)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
>
(#{item.wxEnterpriseId,jdbcType=VARCHAR},#{item.enterpriseId,jdbcType=VARCHAR},
#{item.dataId,jdbcType=VARCHAR},#{item.dataContent},
#{item.pDataId,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.dataType,jdbcType=INTEGER},
#{item.statusFlag,jdbcType=INTEGER}, now(), now()
)
</foreach>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
update tab_haoban_pre_deal_log
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"dataId != null"
>
data_id = #{dataId,jdbcType=VARCHAR},
</if>
<if
test=
"pDataId != null"
>
p_data_id = #{pDataId,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
task_id = #{taskId,jdbcType=VARCHAR},
</if>
<if
test=
"dataType != null"
>
data_type = #{dataType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanPreDealLog"
>
update tab_haoban_pre_deal_log
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
data_id = #{dataId,jdbcType=VARCHAR},
p_data_id = #{pDataId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=VARCHAR},
data_type = #{dataType,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"getByDataId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_id=#{dataId}
<if
test=
"status!=-1"
>
and status_flag=#{status}
</if>
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
</select>
<select
id=
"listByPDataId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
<if
test=
"status!=-1"
>
and status_flag=#{status}
</if>
</select>
<select
id=
"listReByPDataId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
and status_flag in(0,1,3)
</select>
<update
id=
"updateStatusByDataId"
>
update tab_haoban_pre_deal_log
<set>
status_flag = #{status,jdbcType=INTEGER},
reason=#{reason},
update_time = now()
</set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
</update>
<select
id=
"checkTask"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType}
and status_flag=#{status}
</select>
<select
id=
"listByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType}
and status_flag=#{status}
</select>
<select
id=
"countByTaskId"
resultType=
"Integer"
>
select
COUNT(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
<if
test=
"status!=-1"
>
and status_flag=#{status}
</if>
</select>
<select
id=
"countExcepAndPreByTaskId"
resultType=
"Integer"
>
select
COUNT(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
and status_flag in(0,3)
</select>
<select
id=
"listRebuildDepartByTaskId"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
tab_haoban_pre_deal_log a
WHERE
a.task_id = #{taskId}
AND data_type = 0
AND status_flag in(0,3)
AND EXISTS (
SELECT
1
FROM
tab_haoban_pre_deal_log b
WHERE
b.task_id = #{taskId}
AND data_type = 0
AND a.p_data_id = b.data_id
AND b.status_flag = 2
)
</select>
<select
id=
"listRebuildByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId} and data_type=#{dataType}
and status_flag in(0,3)
</select>
<update
id=
"updateExceptionToPre"
>
update tab_haoban_pre_deal_log
<set>
status_flag = 0,
update_time = now()
</set>
where status_flag = 3 and task_id=#{taskId}
</update>
<select
id=
"listExceptionByTask"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and status_flag =3
</select>
<select
id=
"countByDataId"
resultType=
"integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and data_id =#{dataId}
<if
test=
"dataType!=-1"
>
and data_type=#{dataType}
</if>
</select>
<select
id=
"listDataIdByTaskIdAndDataType"
resultType=
"java.lang.String"
>
select
data_id
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and data_type =#{dataType}
</select>
<select
id=
"getLastPreDataByTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId,jdbcType=INTEGER} order by update_time desc limit 1
</select>
<select
id=
"getRootDataIdByWxEnterpriseIdAndTaskId"
resultType=
"java.lang.String"
>
select
data_id
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and p_data_id =0
and wx_enterprise_id =#{wxEnterpriseId} limit 1
</select>
<update
id=
"updateFriendStatusByDataId"
>
update tab_haoban_pre_deal_log
<set>
status_flag = #{status,jdbcType=INTEGER},
reason=#{reason},
data_content = #{dataContent},
update_time = now()
</set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
</update>
<update
id=
"updateFriendStatusAndRelationKeyByDataId"
>
update tab_haoban_pre_deal_log
<set>
status_flag = #{status,jdbcType=INTEGER},
reason=#{reason},
<if
test=
"dataContent !=null"
>
data_content = #{dataContent},
</if>
relation_key=#{relationKey},
update_time = now()
</set>
where data_id = #{dataId,jdbcType=INTEGER} and task_id=#{taskId}
</update>
<select
id=
"countFailStaffTaskByTaskIdAndPDataId"
resultType=
"integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and p_data_id =#{pDataId}
and status_flag != 2
and status_flag != 3
</select>
<select
id=
"listByPDataIdAndTaskId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and p_data_id =#{pDataId}
</select>
<select
id=
"getByRelationKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_data"
/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and relation_key =#{relationKey}
and data_type =#{dataType}
</select>
<select
id=
"checkTaskFriend"
resultType=
"Integer"
>
select
count(*)
from tab_haoban_pre_deal_log
where task_id = #{taskId}
<if
test=
"pDataId!=null"
>
and p_data_id=#{pDataId}
</if>
and data_type=#{dataType}
and status_flag in(0,1)
</select>
<select
id=
"listReDataIdByPDataId"
resultType=
"String"
>
select
data_id
from tab_haoban_pre_deal_log
where task_id = #{taskId} and p_data_id=#{dataId} and data_type=#{dataType}
and status_flag in(0,1,3)
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/QywxSyncLogMapper.xml
View file @
b6c1dac2
<?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.QywxSyncLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
<id
column=
"qywx_sync_log_id"
jdbcType=
"VARCHAR"
property=
"qywxSyncLogId"
/>
<result
column=
"qywx_tag_relation_id"
jdbcType=
"VARCHAR"
property=
"qywxTagRelationId"
/>
<result
column=
"member_tag_id"
jdbcType=
"VARCHAR"
property=
"memberTagId"
/>
<result
column=
"member_tag_name"
jdbcType=
"VARCHAR"
property=
"memberTagName"
/>
<result
column=
"business_type"
jdbcType=
"INTEGER"
property=
"businessType"
/>
<result
column=
"change_code"
jdbcType=
"VARCHAR"
property=
"changeCode"
/>
<result
column=
"log_content"
jdbcType=
"VARCHAR"
property=
"logContent"
/>
<result
column=
"opt_code"
jdbcType=
"VARCHAR"
property=
"optCode"
/>
<result
column=
"opt_staff_id"
jdbcType=
"VARCHAR"
property=
"optStaffId"
/>
<result
column=
"sync_task_id"
jdbcType=
"VARCHAR"
property=
"syncTaskId"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_sync_log
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_sync_log
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</delete>
<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,
member_tag_id, member_tag_name, business_type,
change_code, log_content, opt_code,
opt_staff_id, sync_task_id, status_flag,
create_time, update_time)
values (#{qywxSyncLogId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR},
#{memberTagId,jdbcType=VARCHAR}, #{memberTagName,jdbcType=VARCHAR}, #{businessType,jdbcType=INTEGER},
#{changeCode,jdbcType=VARCHAR}, #{logContent,jdbcType=VARCHAR}, #{optCode,jdbcType=VARCHAR},
#{optStaffId,jdbcType=VARCHAR}, #{syncTaskId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
insert into tab_haoban_qywx_sync_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxSyncLogId != null"
>
qywx_sync_log_id,
</if>
<if
test=
"qywxTagRelationId != null"
>
qywx_tag_relation_id,
</if>
<if
test=
"memberTagId != null"
>
member_tag_id,
</if>
<if
test=
"memberTagName != null"
>
member_tag_name,
</if>
<if
test=
"businessType != null"
>
business_type,
</if>
<if
test=
"changeCode != null"
>
change_code,
</if>
<if
test=
"logContent != null"
>
log_content,
</if>
<if
test=
"optCode != null"
>
opt_code,
</if>
<if
test=
"optStaffId != null"
>
opt_staff_id,
</if>
<if
test=
"syncTaskId != null"
>
sync_task_id,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxSyncLogId != null"
>
#{qywxSyncLogId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagRelationId != null"
>
#{qywxTagRelationId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
#{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagName != null"
>
#{memberTagName,jdbcType=VARCHAR},
</if>
<if
test=
"businessType != null"
>
#{businessType,jdbcType=INTEGER},
</if>
<if
test=
"changeCode != null"
>
#{changeCode,jdbcType=VARCHAR},
</if>
<if
test=
"logContent != null"
>
#{logContent,jdbcType=VARCHAR},
</if>
<if
test=
"optCode != null"
>
#{optCode,jdbcType=VARCHAR},
</if>
<if
test=
"optStaffId != null"
>
#{optStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"syncTaskId != null"
>
#{syncTaskId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
update tab_haoban_qywx_sync_log
<set>
<if
test=
"qywxTagRelationId != null"
>
qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagName != null"
>
member_tag_name = #{memberTagName,jdbcType=VARCHAR},
</if>
<if
test=
"businessType != null"
>
business_type = #{businessType,jdbcType=INTEGER},
</if>
<if
test=
"changeCode != null"
>
change_code = #{changeCode,jdbcType=VARCHAR},
</if>
<if
test=
"logContent != null"
>
log_content = #{logContent,jdbcType=VARCHAR},
</if>
<if
test=
"optCode != null"
>
opt_code = #{optCode,jdbcType=VARCHAR},
</if>
<if
test=
"optStaffId != null"
>
opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"syncTaskId != null"
>
sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
update tab_haoban_qywx_sync_log
set qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
member_tag_name = #{memberTagName,jdbcType=VARCHAR},
business_type = #{businessType,jdbcType=INTEGER},
change_code = #{changeCode,jdbcType=VARCHAR},
log_content = #{logContent,jdbcType=VARCHAR},
opt_code = #{optCode,jdbcType=VARCHAR},
opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</update>
<?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.QywxSyncLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
<id
column=
"qywx_sync_log_id"
jdbcType=
"VARCHAR"
property=
"qywxSyncLogId"
/>
<result
column=
"qywx_tag_relation_id"
jdbcType=
"VARCHAR"
property=
"qywxTagRelationId"
/>
<result
column=
"member_tag_id"
jdbcType=
"VARCHAR"
property=
"memberTagId"
/>
<result
column=
"member_tag_name"
jdbcType=
"VARCHAR"
property=
"memberTagName"
/>
<result
column=
"business_type"
jdbcType=
"INTEGER"
property=
"businessType"
/>
<result
column=
"change_code"
jdbcType=
"VARCHAR"
property=
"changeCode"
/>
<result
column=
"log_content"
jdbcType=
"VARCHAR"
property=
"logContent"
/>
<result
column=
"opt_code"
jdbcType=
"VARCHAR"
property=
"optCode"
/>
<result
column=
"opt_staff_id"
jdbcType=
"VARCHAR"
property=
"optStaffId"
/>
<result
column=
"sync_task_id"
jdbcType=
"VARCHAR"
property=
"syncTaskId"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_sync_log
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_sync_log
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</delete>
<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,
member_tag_id, member_tag_name, business_type,
change_code, log_content, opt_code,
opt_staff_id, sync_task_id, status_flag,
create_time, update_time)
values (#{qywxSyncLogId,jdbcType=VARCHAR}, #{qywxTagRelationId,jdbcType=VARCHAR},
#{memberTagId,jdbcType=VARCHAR}, #{memberTagName,jdbcType=VARCHAR}, #{businessType,jdbcType=INTEGER},
#{changeCode,jdbcType=VARCHAR}, #{logContent,jdbcType=VARCHAR}, #{optCode,jdbcType=VARCHAR},
#{optStaffId,jdbcType=VARCHAR}, #{syncTaskId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
insert into tab_haoban_qywx_sync_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxSyncLogId != null"
>
qywx_sync_log_id,
</if>
<if
test=
"qywxTagRelationId != null"
>
qywx_tag_relation_id,
</if>
<if
test=
"memberTagId != null"
>
member_tag_id,
</if>
<if
test=
"memberTagName != null"
>
member_tag_name,
</if>
<if
test=
"businessType != null"
>
business_type,
</if>
<if
test=
"changeCode != null"
>
change_code,
</if>
<if
test=
"logContent != null"
>
log_content,
</if>
<if
test=
"optCode != null"
>
opt_code,
</if>
<if
test=
"optStaffId != null"
>
opt_staff_id,
</if>
<if
test=
"syncTaskId != null"
>
sync_task_id,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxSyncLogId != null"
>
#{qywxSyncLogId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagRelationId != null"
>
#{qywxTagRelationId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
#{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagName != null"
>
#{memberTagName,jdbcType=VARCHAR},
</if>
<if
test=
"businessType != null"
>
#{businessType,jdbcType=INTEGER},
</if>
<if
test=
"changeCode != null"
>
#{changeCode,jdbcType=VARCHAR},
</if>
<if
test=
"logContent != null"
>
#{logContent,jdbcType=VARCHAR},
</if>
<if
test=
"optCode != null"
>
#{optCode,jdbcType=VARCHAR},
</if>
<if
test=
"optStaffId != null"
>
#{optStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"syncTaskId != null"
>
#{syncTaskId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
update tab_haoban_qywx_sync_log
<set>
<if
test=
"qywxTagRelationId != null"
>
qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagName != null"
>
member_tag_name = #{memberTagName,jdbcType=VARCHAR},
</if>
<if
test=
"businessType != null"
>
business_type = #{businessType,jdbcType=INTEGER},
</if>
<if
test=
"changeCode != null"
>
change_code = #{changeCode,jdbcType=VARCHAR},
</if>
<if
test=
"logContent != null"
>
log_content = #{logContent,jdbcType=VARCHAR},
</if>
<if
test=
"optCode != null"
>
opt_code = #{optCode,jdbcType=VARCHAR},
</if>
<if
test=
"optStaffId != null"
>
opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
</if>
<if
test=
"syncTaskId != null"
>
sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxSyncLog"
>
update tab_haoban_qywx_sync_log
set qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR},
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
member_tag_name = #{memberTagName,jdbcType=VARCHAR},
business_type = #{businessType,jdbcType=INTEGER},
change_code = #{changeCode,jdbcType=VARCHAR},
log_content = #{logContent,jdbcType=VARCHAR},
opt_code = #{optCode,jdbcType=VARCHAR},
opt_staff_id = #{optStaffId,jdbcType=VARCHAR},
sync_task_id = #{syncTaskId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_sync_log_id = #{qywxSyncLogId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/QywxTagItemMapper.xml
View file @
b6c1dac2
<?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.QywxTagItemMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
<id
column=
"qywx_tag_item_id"
jdbcType=
"VARCHAR"
property=
"qywxTagItemId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"qywx_tag_id"
jdbcType=
"VARCHAR"
property=
"qywxTagId"
/>
<result
column=
"qywx_group_key"
jdbcType=
"VARCHAR"
property=
"qywxGroupKey"
/>
<result
column=
"qywx_tag_key"
jdbcType=
"VARCHAR"
property=
"qywxTagKey"
/>
<result
column=
"qywx_tag_name"
jdbcType=
"VARCHAR"
property=
"qywxTagName"
/>
<result
column=
"order"
jdbcType=
"BIGINT"
property=
"order"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_tag_item
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</delete>
<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,
qywx_group_key, qywx_tag_key, qywx_tag_name,
`order`, status_flag, create_time,
update_time)
values (#{qywxTagItemId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR},
#{qywxGroupKey,jdbcType=VARCHAR}, #{qywxTagKey,jdbcType=VARCHAR}, #{qywxTagName,jdbcType=VARCHAR},
#{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
insert into tab_haoban_qywx_tag_item
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagItemId != null"
>
qywx_tag_item_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id,
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key,
</if>
<if
test=
"qywxTagKey != null"
>
qywx_tag_key,
</if>
<if
test=
"qywxTagName != null"
>
qywx_tag_name,
</if>
<if
test=
"order != null"
>
`order`,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagItemId != null"
>
#{qywxTagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagId != null"
>
#{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
#{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagKey != null"
>
#{qywxTagKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagName != null"
>
#{qywxTagName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
#{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
update tab_haoban_qywx_tag_item
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagKey != null"
>
qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagName != null"
>
qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
`order` = #{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
update tab_haoban_qywx_tag_item
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR},
qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR},
`order` = #{order,jdbcType=BIGINT},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</update>
<select
id=
"listByQywxTagId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<select
id=
"listByQywxTagGroupKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_group_key = #{qywxTagGroupKey}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<update
id=
"delByQywxTagGroupKey"
>
update tab_haoban_qywx_tag_item
set
status_flag = 0,
update_time = now()
where qywx_group_key = #{qywxTagGroupKey}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</update>
<select
id=
"getByQywxTagKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_key = #{qywxTagKey}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<select
id=
"listByQywxTagItemsIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_item_id in
<foreach
collection=
"ids"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<select
id=
"listByQywxTagItemsKeys"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_key in
<foreach
collection=
"qywxTagKeys"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<?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.QywxTagItemMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
<id
column=
"qywx_tag_item_id"
jdbcType=
"VARCHAR"
property=
"qywxTagItemId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"qywx_tag_id"
jdbcType=
"VARCHAR"
property=
"qywxTagId"
/>
<result
column=
"qywx_group_key"
jdbcType=
"VARCHAR"
property=
"qywxGroupKey"
/>
<result
column=
"qywx_tag_key"
jdbcType=
"VARCHAR"
property=
"qywxTagKey"
/>
<result
column=
"qywx_tag_name"
jdbcType=
"VARCHAR"
property=
"qywxTagName"
/>
<result
column=
"order"
jdbcType=
"BIGINT"
property=
"order"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_tag_item
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</delete>
<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,
qywx_group_key, qywx_tag_key, qywx_tag_name,
`order`, status_flag, create_time,
update_time)
values (#{qywxTagItemId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxTagId,jdbcType=VARCHAR},
#{qywxGroupKey,jdbcType=VARCHAR}, #{qywxTagKey,jdbcType=VARCHAR}, #{qywxTagName,jdbcType=VARCHAR},
#{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
insert into tab_haoban_qywx_tag_item
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagItemId != null"
>
qywx_tag_item_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id,
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key,
</if>
<if
test=
"qywxTagKey != null"
>
qywx_tag_key,
</if>
<if
test=
"qywxTagName != null"
>
qywx_tag_name,
</if>
<if
test=
"order != null"
>
`order`,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagItemId != null"
>
#{qywxTagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagId != null"
>
#{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
#{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagKey != null"
>
#{qywxTagKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagName != null"
>
#{qywxTagName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
#{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
update tab_haoban_qywx_tag_item
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagKey != null"
>
qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagName != null"
>
qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
`order` = #{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagItem"
>
update tab_haoban_qywx_tag_item
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
qywx_tag_key = #{qywxTagKey,jdbcType=VARCHAR},
qywx_tag_name = #{qywxTagName,jdbcType=VARCHAR},
`order` = #{order,jdbcType=BIGINT},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
</update>
<select
id=
"listByQywxTagId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<select
id=
"listByQywxTagGroupKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_group_key = #{qywxTagGroupKey}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<update
id=
"delByQywxTagGroupKey"
>
update tab_haoban_qywx_tag_item
set
status_flag = 0,
update_time = now()
where qywx_group_key = #{qywxTagGroupKey}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</update>
<select
id=
"getByQywxTagKey"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_key = #{qywxTagKey}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<select
id=
"listByQywxTagItemsIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_item_id in
<foreach
collection=
"ids"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
<select
id=
"listByQywxTagItemsKeys"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_item
where qywx_tag_key in
<foreach
collection=
"qywxTagKeys"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/QywxTagMapper.xml
View file @
b6c1dac2
<?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.QywxTagMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
<id
column=
"qywx_tag_id"
jdbcType=
"VARCHAR"
property=
"qywxTagId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"qywx_group_key"
jdbcType=
"VARCHAR"
property=
"qywxGroupKey"
/>
<result
column=
"qywx_group_name"
jdbcType=
"VARCHAR"
property=
"qywxGroupName"
/>
<result
column=
"order"
jdbcType=
"BIGINT"
property=
"order"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
qywx_tag_id, wx_enterprise_id, qywx_group_key, qywx_group_name, `order`, status_flag,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_tag
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</delete>
<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,
qywx_group_name, `order`, status_flag,
create_time, update_time)
values (#{qywxTagId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR},
#{qywxGroupName,jdbcType=VARCHAR}, #{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
insert into tab_haoban_qywx_tag
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagId != null"
>
qywx_tag_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key,
</if>
<if
test=
"qywxGroupName != null"
>
qywx_group_name,
</if>
<if
test=
"order != null"
>
`order`,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagId != null"
>
#{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
#{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupName != null"
>
#{qywxGroupName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
#{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
update tab_haoban_qywx_tag
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupName != null"
>
qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
`order` = #{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
update tab_haoban_qywx_tag
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR},
`order` = #{order,jdbcType=BIGINT},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</update>
<select
id=
"getByQywxGroupKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_group_key=#{qywxTagGroupKey}
and status_flag=1
</select>
<update
id=
"delByGroupKey"
>
UPDATE
tab_haoban_qywx_tag
SET
status_flag=0,
update_time=now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_group_key=#{qywxTagGroupKey}
and status_flag=1
</update>
<?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.QywxTagMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
<id
column=
"qywx_tag_id"
jdbcType=
"VARCHAR"
property=
"qywxTagId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"qywx_group_key"
jdbcType=
"VARCHAR"
property=
"qywxGroupKey"
/>
<result
column=
"qywx_group_name"
jdbcType=
"VARCHAR"
property=
"qywxGroupName"
/>
<result
column=
"order"
jdbcType=
"BIGINT"
property=
"order"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
qywx_tag_id, wx_enterprise_id, qywx_group_key, qywx_group_name, `order`, status_flag,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_tag
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</delete>
<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,
qywx_group_name, `order`, status_flag,
create_time, update_time)
values (#{qywxTagId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{qywxGroupKey,jdbcType=VARCHAR},
#{qywxGroupName,jdbcType=VARCHAR}, #{order,jdbcType=BIGINT}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
insert into tab_haoban_qywx_tag
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagId != null"
>
qywx_tag_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key,
</if>
<if
test=
"qywxGroupName != null"
>
qywx_group_name,
</if>
<if
test=
"order != null"
>
`order`,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagId != null"
>
#{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
#{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupName != null"
>
#{qywxGroupName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
#{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
update tab_haoban_qywx_tag
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupKey != null"
>
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
</if>
<if
test=
"qywxGroupName != null"
>
qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR},
</if>
<if
test=
"order != null"
>
`order` = #{order,jdbcType=BIGINT},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTag"
>
update tab_haoban_qywx_tag
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
qywx_group_key = #{qywxGroupKey,jdbcType=VARCHAR},
qywx_group_name = #{qywxGroupName,jdbcType=VARCHAR},
`order` = #{order,jdbcType=BIGINT},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
</update>
<select
id=
"getByQywxGroupKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_group_key=#{qywxTagGroupKey}
and status_flag=1
</select>
<update
id=
"delByGroupKey"
>
UPDATE
tab_haoban_qywx_tag
SET
status_flag=0,
update_time=now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_group_key=#{qywxTagGroupKey}
and status_flag=1
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/QywxTagRelationMapper.xml
View file @
b6c1dac2
<?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.QywxTagRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
<id
column=
"qywx_tag_relation_id"
jdbcType=
"VARCHAR"
property=
"qywxTagRelationId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"member_tag_id"
jdbcType=
"VARCHAR"
property=
"memberTagId"
/>
<result
column=
"tag_item_id"
jdbcType=
"VARCHAR"
property=
"tagItemId"
/>
<result
column=
"relation_type"
jdbcType=
"INTEGER"
property=
"relationType"
/>
<result
column=
"sync_flag"
jdbcType=
"INTEGER"
property=
"syncFlag"
/>
<result
column=
"order"
jdbcType=
"BIGINT"
property=
"order"
/>
<result
column=
"qywx_tag_id"
jdbcType=
"VARCHAR"
property=
"qywxTagId"
/>
<result
column=
"qywx_tag_item_id"
jdbcType=
"VARCHAR"
property=
"qywxTagItemId"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_tag_relation
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</delete>
<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,
enterprise_id, member_tag_id, tag_item_id,
relation_type, sync_flag, `order`,
qywx_tag_id, qywx_tag_item_id, status_flag,
create_time, update_time)
values (#{qywxTagRelationId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{memberTagId,jdbcType=VARCHAR}, #{tagItemId,jdbcType=VARCHAR},
#{relationType,jdbcType=INTEGER}, #{syncFlag,jdbcType=INTEGER}, #{order,jdbcType=BIGINT},
#{qywxTagId,jdbcType=VARCHAR}, #{qywxTagItemId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
insert into tab_haoban_qywx_tag_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagRelationId != null"
>
qywx_tag_relation_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"memberTagId != null"
>
member_tag_id,
</if>
<if
test=
"tagItemId != null"
>
tag_item_id,
</if>
<if
test=
"relationType != null"
>
relation_type,
</if>
<if
test=
"syncFlag != null"
>
sync_flag,
</if>
<if
test=
"order != null"
>
`order`,
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id,
</if>
<if
test=
"qywxTagItemId != null"
>
qywx_tag_item_id,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagRelationId != null"
>
#{qywxTagRelationId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
#{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"tagItemId != null"
>
#{tagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
#{relationType,jdbcType=INTEGER},
</if>
<if
test=
"syncFlag != null"
>
#{syncFlag,jdbcType=INTEGER},
</if>
<if
test=
"order != null"
>
#{order,jdbcType=BIGINT},
</if>
<if
test=
"qywxTagId != null"
>
#{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagItemId != null"
>
#{qywxTagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
update tab_haoban_qywx_tag_relation
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"tagItemId != null"
>
tag_item_id = #{tagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
relation_type = #{relationType,jdbcType=INTEGER},
</if>
<if
test=
"syncFlag != null"
>
sync_flag = #{syncFlag,jdbcType=INTEGER},
</if>
<if
test=
"order != null"
>
`order` = #{order,jdbcType=BIGINT},
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagItemId != null"
>
qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
update tab_haoban_qywx_tag_relation
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
tag_item_id = #{tagItemId,jdbcType=VARCHAR},
relation_type = #{relationType,jdbcType=INTEGER},
sync_flag = #{syncFlag,jdbcType=INTEGER},
`order` = #{order,jdbcType=BIGINT},
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</update>
<select
id=
"listBySyncStatus"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select
id=
"listByMemberTagId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where
member_tag_id = #{memberTagId,jdbcType=VARCHAR}
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
and status_flag=1
</select>
<select
id=
"getQywxTagRelationByTagItemId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and tag_item_id = #{tagItemId,jdbcType=VARCHAR}
and status_flag=1
</select>
<update
id=
"delByMemberTagId"
>
update tab_haoban_qywx_tag_relation
set
status_flag = 0,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1
</update>
<select
id=
"listByQywxTagId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select
id=
"getQywxGroupByQywxTagId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and relation_type=0
and status_flag=1
</select>
<select
id=
"getQywxTagByQywxTagItemId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
and relation_type=1
and status_flag=1
</select>
<update
id=
"changeRelationSyncFlag"
>
UPDATE tab_haoban_qywx_tag_relation
SET
sync_flag=#{syncFlag},
update_time=now()
where
wx_enterprise_id = #{wxEnterpriseId}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1
</update>
<?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.QywxTagRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
<id
column=
"qywx_tag_relation_id"
jdbcType=
"VARCHAR"
property=
"qywxTagRelationId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"member_tag_id"
jdbcType=
"VARCHAR"
property=
"memberTagId"
/>
<result
column=
"tag_item_id"
jdbcType=
"VARCHAR"
property=
"tagItemId"
/>
<result
column=
"relation_type"
jdbcType=
"INTEGER"
property=
"relationType"
/>
<result
column=
"sync_flag"
jdbcType=
"INTEGER"
property=
"syncFlag"
/>
<result
column=
"order"
jdbcType=
"BIGINT"
property=
"order"
/>
<result
column=
"qywx_tag_id"
jdbcType=
"VARCHAR"
property=
"qywxTagId"
/>
<result
column=
"qywx_tag_item_id"
jdbcType=
"VARCHAR"
property=
"qywxTagItemId"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_qywx_tag_relation
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</delete>
<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,
enterprise_id, member_tag_id, tag_item_id,
relation_type, sync_flag, `order`,
qywx_tag_id, qywx_tag_item_id, status_flag,
create_time, update_time)
values (#{qywxTagRelationId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{memberTagId,jdbcType=VARCHAR}, #{tagItemId,jdbcType=VARCHAR},
#{relationType,jdbcType=INTEGER}, #{syncFlag,jdbcType=INTEGER}, #{order,jdbcType=BIGINT},
#{qywxTagId,jdbcType=VARCHAR}, #{qywxTagItemId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
insert into tab_haoban_qywx_tag_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagRelationId != null"
>
qywx_tag_relation_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"memberTagId != null"
>
member_tag_id,
</if>
<if
test=
"tagItemId != null"
>
tag_item_id,
</if>
<if
test=
"relationType != null"
>
relation_type,
</if>
<if
test=
"syncFlag != null"
>
sync_flag,
</if>
<if
test=
"order != null"
>
`order`,
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id,
</if>
<if
test=
"qywxTagItemId != null"
>
qywx_tag_item_id,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"qywxTagRelationId != null"
>
#{qywxTagRelationId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
#{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"tagItemId != null"
>
#{tagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
#{relationType,jdbcType=INTEGER},
</if>
<if
test=
"syncFlag != null"
>
#{syncFlag,jdbcType=INTEGER},
</if>
<if
test=
"order != null"
>
#{order,jdbcType=BIGINT},
</if>
<if
test=
"qywxTagId != null"
>
#{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagItemId != null"
>
#{qywxTagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
update tab_haoban_qywx_tag_relation
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberTagId != null"
>
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
</if>
<if
test=
"tagItemId != null"
>
tag_item_id = #{tagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
relation_type = #{relationType,jdbcType=INTEGER},
</if>
<if
test=
"syncFlag != null"
>
sync_flag = #{syncFlag,jdbcType=INTEGER},
</if>
<if
test=
"order != null"
>
`order` = #{order,jdbcType=BIGINT},
</if>
<if
test=
"qywxTagId != null"
>
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
</if>
<if
test=
"qywxTagItemId != null"
>
qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabQywxTagRelation"
>
update tab_haoban_qywx_tag_relation
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
member_tag_id = #{memberTagId,jdbcType=VARCHAR},
tag_item_id = #{tagItemId,jdbcType=VARCHAR},
relation_type = #{relationType,jdbcType=INTEGER},
sync_flag = #{syncFlag,jdbcType=INTEGER},
`order` = #{order,jdbcType=BIGINT},
qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR},
qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where qywx_tag_relation_id = #{qywxTagRelationId,jdbcType=VARCHAR}
</update>
<select
id=
"listBySyncStatus"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select
id=
"listByMemberTagId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where
member_tag_id = #{memberTagId,jdbcType=VARCHAR}
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
and status_flag=1
</select>
<select
id=
"getQywxTagRelationByTagItemId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and tag_item_id = #{tagItemId,jdbcType=VARCHAR}
and status_flag=1
</select>
<update
id=
"delByMemberTagId"
>
update tab_haoban_qywx_tag_relation
set
status_flag = 0,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1
</update>
<select
id=
"listByQywxTagId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select
id=
"getQywxGroupByQywxTagId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_id = #{qywxTagId,jdbcType=VARCHAR}
and relation_type=0
and status_flag=1
</select>
<select
id=
"getQywxTagByQywxTagItemId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_tag_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and qywx_tag_item_id = #{qywxTagItemId,jdbcType=VARCHAR}
and relation_type=1
and status_flag=1
</select>
<update
id=
"changeRelationSyncFlag"
>
UPDATE tab_haoban_qywx_tag_relation
SET
sync_flag=#{syncFlag},
update_time=now()
where
wx_enterprise_id = #{wxEnterpriseId}
and member_tag_id = #{memberTagId,jdbcType=VARCHAR}
and status_flag=1
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/SyncTaskMapper.xml
View file @
b6c1dac2
<?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.SyncTaskMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
<id
column=
"task_id"
jdbcType=
"VARCHAR"
property=
"taskId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"task_name"
jdbcType=
"VARCHAR"
property=
"taskName"
/>
<result
column=
"add_user"
jdbcType=
"VARCHAR"
property=
"addUser"
/>
<result
column=
"task_desc"
jdbcType=
"VARCHAR"
property=
"taskDesc"
/>
<result
column=
"task_type"
jdbcType=
"INTEGER"
property=
"taskType"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
task_id,wx_enterprise_id, task_name, add_user, task_desc,task_type, status_flag, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_sync_task
where task_id = #{taskId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_sync_task
where task_id = #{taskId,jdbcType=VARCHAR}
</delete>
<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,
task_desc, status_flag,task_type, create_time,
update_time)
values (#{taskId,jdbcType=VARCHAR},#{wxEnterpriseId}, #{taskName,jdbcType=VARCHAR}, #{addUser,jdbcType=VARCHAR},
#{taskDesc,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},#{taskType}, now(),now())
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
insert into tab_haoban_sync_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"taskName != null"
>
task_name,
</if>
<if
test=
"addUser != null"
>
add_user,
</if>
<if
test=
"taskDesc != null"
>
task_desc,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=VARCHAR},
</if>
<if
test=
"taskName != null"
>
#{taskName,jdbcType=VARCHAR},
</if>
<if
test=
"addUser != null"
>
#{addUser,jdbcType=VARCHAR},
</if>
<if
test=
"taskDesc != null"
>
#{taskDesc,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
update tab_haoban_sync_task
<set>
<if
test=
"taskName != null"
>
task_name = #{taskName,jdbcType=VARCHAR},
</if>
<if
test=
"addUser != null"
>
add_user = #{addUser,jdbcType=VARCHAR},
</if>
<if
test=
"taskDesc != null"
>
task_desc = #{taskDesc,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where task_id = #{taskId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
update tab_haoban_sync_task
set task_name = #{taskName,jdbcType=VARCHAR},
add_user = #{addUser,jdbcType=VARCHAR},
task_desc = #{taskDesc,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where task_id = #{taskId,jdbcType=VARCHAR}
</update>
<select
id=
"listPageByWxEid"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_sync_task
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and task_type != 4
order by update_time desc
</select>
<select
id=
"listTaskByType"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_sync_task
where status_flag = 0
and task_type = #{taskType}
group by wx_enterprise_id
</select>
<?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.SyncTaskMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
<id
column=
"task_id"
jdbcType=
"VARCHAR"
property=
"taskId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"task_name"
jdbcType=
"VARCHAR"
property=
"taskName"
/>
<result
column=
"add_user"
jdbcType=
"VARCHAR"
property=
"addUser"
/>
<result
column=
"task_desc"
jdbcType=
"VARCHAR"
property=
"taskDesc"
/>
<result
column=
"task_type"
jdbcType=
"INTEGER"
property=
"taskType"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
task_id,wx_enterprise_id, task_name, add_user, task_desc,task_type, status_flag, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_sync_task
where task_id = #{taskId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_sync_task
where task_id = #{taskId,jdbcType=VARCHAR}
</delete>
<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,
task_desc, status_flag,task_type, create_time,
update_time)
values (#{taskId,jdbcType=VARCHAR},#{wxEnterpriseId}, #{taskName,jdbcType=VARCHAR}, #{addUser,jdbcType=VARCHAR},
#{taskDesc,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},#{taskType}, now(),now())
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
insert into tab_haoban_sync_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"taskName != null"
>
task_name,
</if>
<if
test=
"addUser != null"
>
add_user,
</if>
<if
test=
"taskDesc != null"
>
task_desc,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=VARCHAR},
</if>
<if
test=
"taskName != null"
>
#{taskName,jdbcType=VARCHAR},
</if>
<if
test=
"addUser != null"
>
#{addUser,jdbcType=VARCHAR},
</if>
<if
test=
"taskDesc != null"
>
#{taskDesc,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
update tab_haoban_sync_task
<set>
<if
test=
"taskName != null"
>
task_name = #{taskName,jdbcType=VARCHAR},
</if>
<if
test=
"addUser != null"
>
add_user = #{addUser,jdbcType=VARCHAR},
</if>
<if
test=
"taskDesc != null"
>
task_desc = #{taskDesc,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where task_id = #{taskId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanSyncTask"
>
update tab_haoban_sync_task
set task_name = #{taskName,jdbcType=VARCHAR},
add_user = #{addUser,jdbcType=VARCHAR},
task_desc = #{taskDesc,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where task_id = #{taskId,jdbcType=VARCHAR}
</update>
<select
id=
"listPageByWxEid"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_sync_task
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and task_type != 4
order by update_time desc
</select>
<select
id=
"listTaskByType"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_sync_task
where status_flag = 0
and task_type = #{taskType}
group by wx_enterprise_id
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanErrorLogMapper.xml
View file @
b6c1dac2
<?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.TabHaobanErrorLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"module_desc"
jdbcType=
"VARCHAR"
property=
"moduleDesc"
/>
<result
column=
"error_desc"
jdbcType=
"VARCHAR"
property=
"errorDesc"
/>
<result
column=
"error_flag_id"
jdbcType=
"VARCHAR"
property=
"errorFlagId"
/>
<result
column=
"error_param"
jdbcType=
"VARCHAR"
property=
"errorParam"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</delete>
<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,
error_flag_id, error_param, remark,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
#{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
useGeneratedKeys=
"true"
>
insert into tab_haoban_error_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"moduleDesc != null"
>
module_desc,
</if>
<if
test=
"errorDesc != null"
>
error_desc,
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id,
</if>
<if
test=
"errorParam != null"
>
error_param,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
#{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
#{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
#{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
#{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
module_desc = #{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
error_desc = #{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
error_param = #{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
module_desc = #{moduleDesc,jdbcType=VARCHAR},
error_desc = #{errorDesc,jdbcType=VARCHAR},
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
error_param = #{errorParam,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<?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.TabHaobanErrorLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"module_desc"
jdbcType=
"VARCHAR"
property=
"moduleDesc"
/>
<result
column=
"error_desc"
jdbcType=
"VARCHAR"
property=
"errorDesc"
/>
<result
column=
"error_flag_id"
jdbcType=
"VARCHAR"
property=
"errorFlagId"
/>
<result
column=
"error_param"
jdbcType=
"VARCHAR"
property=
"errorParam"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</delete>
<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,
error_flag_id, error_param, remark,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
#{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
useGeneratedKeys=
"true"
>
insert into tab_haoban_error_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"moduleDesc != null"
>
module_desc,
</if>
<if
test=
"errorDesc != null"
>
error_desc,
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id,
</if>
<if
test=
"errorParam != null"
>
error_param,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
#{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
#{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
#{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
#{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
module_desc = #{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
error_desc = #{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
error_param = #{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
module_desc = #{moduleDesc,jdbcType=VARCHAR},
error_desc = #{errorDesc,jdbcType=VARCHAR},
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
error_param = #{errorParam,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanFriendSettingMapper.xml
View file @
b6c1dac2
<?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.TabHaobanFriendSettingMapper"
>
<resultMap
type=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
id=
"TabHaobanFriendSettingMap"
>
<result
property=
"friendSettingId"
column=
"friend_setting_id"
jdbcType=
"BIGINT"
/>
<result
property=
"wxEnterpriseId"
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"friendSettingType"
column=
"friend_setting_type"
jdbcType=
"INTEGER"
/>
<result
property=
"updateId"
column=
"update_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateName"
column=
"update_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
friend_setting_id
, wx_enterprise_id, friend_setting_type, update_id, update_name, create_time, update_time, delete_flag
</sql>
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"friendSettingId"
useGeneratedKeys=
"true"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
>
INSERT INTO tab_haoban_friend_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"friendSettingId != null"
>
friend_setting_id,
</if>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
wx_enterprise_id,
</if>
<if
test=
"friendSettingType != null"
>
friend_setting_type,
</if>
<if
test=
"updateId != null and updateId != ''"
>
update_id,
</if>
<if
test=
"updateName != null and updateName != ''"
>
update_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"friendSettingId != null"
>
#{friendSettingId},
</if>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
#{wxEnterpriseId},
</if>
<if
test=
"friendSettingType != null"
>
#{friendSettingType},
</if>
<if
test=
"updateId != null and updateId != ''"
>
#{updateId},
</if>
<if
test=
"updateName != null and updateName != ''"
>
#{updateName},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag},
</if>
</trim>
</insert>
<!--通过主键修改数据-->
<update
id=
"update"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
>
update tab_haoban_friend_setting
<set>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if
test=
"friendSettingType != null"
>
friend_setting_type = #{friendSettingType},
</if>
<if
test=
"updateId != null and updateId != ''"
>
update_id = #{updateId},
</if>
<if
test=
"updateName != null and updateName != ''"
>
update_name = #{updateName},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag},
</if>
</set>
where friend_setting_id = #{friendSettingId}
</update>
<!--通过主键删除-->
<delete
id=
"deleteById"
>
delete
from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId}
</delete>
<!--查询单个-->
<select
id=
"queryById"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId}
</select>
<!--通过实体作为筛选条件查询-->
<select
id=
"queryAll"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting
<where>
<if
test=
"friendSettingId != null"
>
and friend_setting_id = #{friendSettingId}
</if>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if
test=
"friendSettingType != null"
>
and friend_setting_type = #{friendSettingType}
</if>
<if
test=
"updateId != null and updateId != ''"
>
and update_id = #{updateId}
</if>
<if
test=
"updateName != null and updateName != ''"
>
and update_name = #{updateName}
</if>
<if
test=
"createTime != null"
>
and create_time = #{createTime}
</if>
<if
test=
"updateTime != null"
>
and update_time = #{updateTime}
</if>
<if
test=
"deleteFlag != null"
>
and delete_flag = #{deleteFlag}
</if>
</where>
</select>
<select
id=
"queryCountByPage"
resultType=
"int"
>
select count(*)
from tab_haoban_friend_setting
</select>
<select
id=
"queryListByPage"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting
limit #{offset}, #{limit}
</select>
<select
id=
"getByWxEnterpriseId"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting where wx_enterprise_id = #{wxEnterpriseId} and delete_flag = 0
</select>
</mapper>
<?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.TabHaobanFriendSettingMapper"
>
<resultMap
type=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
id=
"TabHaobanFriendSettingMap"
>
<result
property=
"friendSettingId"
column=
"friend_setting_id"
jdbcType=
"BIGINT"
/>
<result
property=
"wxEnterpriseId"
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"friendSettingType"
column=
"friend_setting_type"
jdbcType=
"INTEGER"
/>
<result
property=
"updateId"
column=
"update_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateName"
column=
"update_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
friend_setting_id
, wx_enterprise_id, friend_setting_type, update_id, update_name, create_time, update_time, delete_flag
</sql>
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"friendSettingId"
useGeneratedKeys=
"true"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
>
INSERT INTO tab_haoban_friend_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"friendSettingId != null"
>
friend_setting_id,
</if>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
wx_enterprise_id,
</if>
<if
test=
"friendSettingType != null"
>
friend_setting_type,
</if>
<if
test=
"updateId != null and updateId != ''"
>
update_id,
</if>
<if
test=
"updateName != null and updateName != ''"
>
update_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"friendSettingId != null"
>
#{friendSettingId},
</if>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
#{wxEnterpriseId},
</if>
<if
test=
"friendSettingType != null"
>
#{friendSettingType},
</if>
<if
test=
"updateId != null and updateId != ''"
>
#{updateId},
</if>
<if
test=
"updateName != null and updateName != ''"
>
#{updateName},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag},
</if>
</trim>
</insert>
<!--通过主键修改数据-->
<update
id=
"update"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
>
update tab_haoban_friend_setting
<set>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if
test=
"friendSettingType != null"
>
friend_setting_type = #{friendSettingType},
</if>
<if
test=
"updateId != null and updateId != ''"
>
update_id = #{updateId},
</if>
<if
test=
"updateName != null and updateName != ''"
>
update_name = #{updateName},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag},
</if>
</set>
where friend_setting_id = #{friendSettingId}
</update>
<!--通过主键删除-->
<delete
id=
"deleteById"
>
delete
from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId}
</delete>
<!--查询单个-->
<select
id=
"queryById"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId}
</select>
<!--通过实体作为筛选条件查询-->
<select
id=
"queryAll"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting
<where>
<if
test=
"friendSettingId != null"
>
and friend_setting_id = #{friendSettingId}
</if>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if
test=
"friendSettingType != null"
>
and friend_setting_type = #{friendSettingType}
</if>
<if
test=
"updateId != null and updateId != ''"
>
and update_id = #{updateId}
</if>
<if
test=
"updateName != null and updateName != ''"
>
and update_name = #{updateName}
</if>
<if
test=
"createTime != null"
>
and create_time = #{createTime}
</if>
<if
test=
"updateTime != null"
>
and update_time = #{updateTime}
</if>
<if
test=
"deleteFlag != null"
>
and delete_flag = #{deleteFlag}
</if>
</where>
</select>
<select
id=
"queryCountByPage"
resultType=
"int"
>
select count(*)
from tab_haoban_friend_setting
</select>
<select
id=
"queryListByPage"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting
limit #{offset}, #{limit}
</select>
<select
id=
"getByWxEnterpriseId"
resultMap=
"TabHaobanFriendSettingMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_friend_setting where wx_enterprise_id = #{wxEnterpriseId} and delete_flag = 0
</select>
</mapper>
haoban-manage3-service/src/main/resources/mapper/TabHaobanMemberClerkChatConfigMapper.xml
View file @
b6c1dac2
<?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.TabHaobanMemberClerkChatConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
<id
column=
"member_clerk_chat_config_id"
jdbcType=
"INTEGER"
property=
"memberClerkChatConfigId"
/>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"member_id"
jdbcType=
"VARCHAR"
property=
"memberId"
/>
<result
column=
"config_id"
jdbcType=
"VARCHAR"
property=
"configId"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
member_clerk_chat_config_id, staff_id, enterprise_id, member_id, config_id, status,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_member_clerk_chat_config
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_member_clerk_chat_config
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</delete>
<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,
enterprise_id, member_id, config_id,
status, create_time, update_time
)
values (#{memberClerkChatConfigId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
insert into tab_haoban_member_clerk_chat_config
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"memberClerkChatConfigId != null"
>
member_clerk_chat_config_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"memberId != null"
>
member_id,
</if>
<if
test=
"configId != null"
>
config_id,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"memberClerkChatConfigId != null"
>
#{memberClerkChatConfigId,jdbcType=INTEGER},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberId != null"
>
#{memberId,jdbcType=VARCHAR},
</if>
<if
test=
"configId != null"
>
#{configId,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
update tab_haoban_member_clerk_chat_config
<set>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberId != null"
>
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if
test=
"configId != null"
>
config_id = #{configId,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
update tab_haoban_member_clerk_chat_config
set staff_id = #{staffId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
member_id = #{memberId,jdbcType=VARCHAR},
config_id = #{configId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</update>
<select
id=
"getChatByMemberIdStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_member_clerk_chat_config
where staff_id = #{staffId,jdbcType=VARCHAR} and member_id = #{memberId,jdbcType=VARCHAR}
and status =1
</select>
<?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.TabHaobanMemberClerkChatConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
<id
column=
"member_clerk_chat_config_id"
jdbcType=
"INTEGER"
property=
"memberClerkChatConfigId"
/>
<result
column=
"staff_id"
jdbcType=
"VARCHAR"
property=
"staffId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"member_id"
jdbcType=
"VARCHAR"
property=
"memberId"
/>
<result
column=
"config_id"
jdbcType=
"VARCHAR"
property=
"configId"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
member_clerk_chat_config_id, staff_id, enterprise_id, member_id, config_id, status,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_member_clerk_chat_config
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_haoban_member_clerk_chat_config
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</delete>
<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,
enterprise_id, member_id, config_id,
status, create_time, update_time
)
values (#{memberClerkChatConfigId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
insert into tab_haoban_member_clerk_chat_config
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"memberClerkChatConfigId != null"
>
member_clerk_chat_config_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"memberId != null"
>
member_id,
</if>
<if
test=
"configId != null"
>
config_id,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"memberClerkChatConfigId != null"
>
#{memberClerkChatConfigId,jdbcType=INTEGER},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberId != null"
>
#{memberId,jdbcType=VARCHAR},
</if>
<if
test=
"configId != null"
>
#{configId,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
update tab_haoban_member_clerk_chat_config
<set>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"memberId != null"
>
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if
test=
"configId != null"
>
config_id = #{configId,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.MemberClerkChatConfig"
>
update tab_haoban_member_clerk_chat_config
set staff_id = #{staffId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
member_id = #{memberId,jdbcType=VARCHAR},
config_id = #{configId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_clerk_chat_config_id = #{memberClerkChatConfigId,jdbcType=INTEGER}
</update>
<select
id=
"getChatByMemberIdStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_member_clerk_chat_config
where staff_id = #{staffId,jdbcType=VARCHAR} and member_id = #{memberId,jdbcType=VARCHAR}
and status =1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanStoreRangeMapper.xml
View file @
b6c1dac2
<?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.TabHaobanStoreRangeMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
<id
column=
"store_range_id"
jdbcType=
"VARCHAR"
property=
"storeRangeId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"relation_type"
jdbcType=
"INTEGER"
property=
"relationType"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
store_range_id, wx_enterprise_id, enterprise_id, relation_id, relation_type, status_flag,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_store_range
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_store_range
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</delete>
<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,
relation_id, relation_type, status_flag,
create_time, update_time)
values (#{storeRangeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR}, #{relationType,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
insert into tab_haoban_store_range
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeRangeId != null"
>
store_range_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"relationType != null"
>
relation_type,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeRangeId != null"
>
#{storeRangeId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
#{relationType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
update tab_haoban_store_range
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
relation_type = #{relationType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
update tab_haoban_store_range
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
relation_type = #{relationType,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</update>
<select
id=
"queryByEnterpriseId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_store_range
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id=#{wxEnterpriseId}
</if>
and status_flag =1
</select>
<update
id=
"deleteByEnterpriseId"
>
update tab_haoban_store_range
SET
status_flag = 0,
update_time = now()
where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and wx_enterprise_id=#{wxEnterpriseId}
and status_flag =1
</update>
<update
id=
"delStoreRangeByRelationId"
>
update tab_haoban_store_range
SET
status_flag = 0,
update_time = now()
where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id=#{relationId}
and status_flag =1
</update>
<insert
id=
"insertBatch"
>
insert into tab_haoban_store_range (store_range_id, wx_enterprise_id, enterprise_id,
relation_id, relation_type, status_flag,
create_time, update_time)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.storeRangeId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,jdbcType=VARCHAR},
#{item.enterpriseId,jdbcType=VARCHAR},
#{item.relationId,jdbcType=VARCHAR}, #{item.relationType,jdbcType=INTEGER}, 1,
now(), now())
</foreach>
</insert>
<select
id=
"listStoreRangeByRelationId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_store_range
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id in
<foreach
collection=
"relationIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
and status_flag =1
</select>
<?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.TabHaobanStoreRangeMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
<id
column=
"store_range_id"
jdbcType=
"VARCHAR"
property=
"storeRangeId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"relation_id"
jdbcType=
"VARCHAR"
property=
"relationId"
/>
<result
column=
"relation_type"
jdbcType=
"INTEGER"
property=
"relationType"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
store_range_id, wx_enterprise_id, enterprise_id, relation_id, relation_type, status_flag,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_store_range
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_store_range
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</delete>
<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,
relation_id, relation_type, status_flag,
create_time, update_time)
values (#{storeRangeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
#{relationId,jdbcType=VARCHAR}, #{relationType,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
insert into tab_haoban_store_range
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeRangeId != null"
>
store_range_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"relationType != null"
>
relation_type,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeRangeId != null"
>
#{storeRangeId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
#{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
#{relationType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
update tab_haoban_store_range
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if
test=
"relationType != null"
>
relation_type = #{relationType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabStoreRange"
>
update tab_haoban_store_range
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
relation_type = #{relationType,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_range_id = #{storeRangeId,jdbcType=VARCHAR}
</update>
<select
id=
"queryByEnterpriseId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_store_range
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id=#{wxEnterpriseId}
</if>
and status_flag =1
</select>
<update
id=
"deleteByEnterpriseId"
>
update tab_haoban_store_range
SET
status_flag = 0,
update_time = now()
where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and wx_enterprise_id=#{wxEnterpriseId}
and status_flag =1
</update>
<update
id=
"delStoreRangeByRelationId"
>
update tab_haoban_store_range
SET
status_flag = 0,
update_time = now()
where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id=#{relationId}
and status_flag =1
</update>
<insert
id=
"insertBatch"
>
insert into tab_haoban_store_range (store_range_id, wx_enterprise_id, enterprise_id,
relation_id, relation_type, status_flag,
create_time, update_time)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.storeRangeId,jdbcType=VARCHAR}, #{item.wxEnterpriseId,jdbcType=VARCHAR},
#{item.enterpriseId,jdbcType=VARCHAR},
#{item.relationId,jdbcType=VARCHAR}, #{item.relationType,jdbcType=INTEGER}, 1,
now(), now())
</foreach>
</insert>
<select
id=
"listStoreRangeByRelationId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_store_range
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and relation_id in
<foreach
collection=
"relationIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
and status_flag =1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabMiniprogramSettingMapper.xml
View file @
b6c1dac2
<?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.TabMiniprogramSettingMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
<id
column=
"miniprogram_setting_id"
jdbcType=
"VARCHAR"
property=
"miniprogramSettingId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"miniprogram_name"
jdbcType=
"VARCHAR"
property=
"miniprogramName"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"app_id"
jdbcType=
"VARCHAR"
property=
"appId"
/>
<result
column=
"image_url"
jdbcType=
"VARCHAR"
property=
"imageUrl"
/>
<result
column=
"media_id"
jdbcType=
"VARCHAR"
property=
"mediaId"
/>
<result
column=
"media_time"
jdbcType=
"TIMESTAMP"
property=
"mediaTime"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"miniprogram_type"
jdbcType=
"INTEGER"
property=
"miniprogramType"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update tab_haoban_miniprogram_setting
set status_flag=0,update_time=now()
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
insert into tab_haoban_miniprogram_setting (miniprogram_setting_id, wx_enterprise_id,
enterprise_id, miniprogram_name, title,
app_id, image_url, media_id,
media_time, status_flag, create_time,
update_time)
values (#{miniprogramSettingId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{miniprogramName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{appId,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{mediaId,jdbcType=VARCHAR},
#{mediaTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
insert into tab_haoban_miniprogram_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"miniprogramSettingId != null"
>
miniprogram_setting_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"miniprogramName != null"
>
miniprogram_name,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"appId != null"
>
app_id,
</if>
<if
test=
"imageUrl != null"
>
image_url,
</if>
<if
test=
"mediaId != null"
>
media_id,
</if>
<if
test=
"mediaTime != null"
>
media_time,
</if>
<if
test=
"miniprogramType != null"
>
miniprogram_type,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"miniprogramSettingId != null"
>
#{miniprogramSettingId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"miniprogramName != null"
>
#{miniprogramName,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"appId != null"
>
#{appId,jdbcType=VARCHAR},
</if>
<if
test=
"imageUrl != null"
>
#{imageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
#{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"mediaTime != null"
>
#{mediaTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"miniprogramType != null"
>
#{miniprogramType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
update tab_haoban_miniprogram_setting
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"miniprogramName != null"
>
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"appId != null"
>
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if
test=
"imageUrl != null"
>
image_url = #{imageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
media_id = #{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"mediaTime != null"
>
media_time = #{mediaTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
update tab_haoban_miniprogram_setting
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
image_url = #{imageUrl,jdbcType=VARCHAR},
media_id = #{mediaId,jdbcType=VARCHAR},
media_time = #{mediaTime,jdbcType=TIMESTAMP},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update>
<select
id=
"getMiniprogramSetting"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and enterprise_id=#{enterpriseId}
and status_flag=1 order by create_time desc limit 1
</select>
<select
id=
"listMiniprogramSetting"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select
id=
"getMiniprogramSettingByAppId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and app_id=#{appId}
and status_flag=1
</select>
<?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.TabMiniprogramSettingMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
<id
column=
"miniprogram_setting_id"
jdbcType=
"VARCHAR"
property=
"miniprogramSettingId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"miniprogram_name"
jdbcType=
"VARCHAR"
property=
"miniprogramName"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"app_id"
jdbcType=
"VARCHAR"
property=
"appId"
/>
<result
column=
"image_url"
jdbcType=
"VARCHAR"
property=
"imageUrl"
/>
<result
column=
"media_id"
jdbcType=
"VARCHAR"
property=
"mediaId"
/>
<result
column=
"media_time"
jdbcType=
"TIMESTAMP"
property=
"mediaTime"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"miniprogram_type"
jdbcType=
"INTEGER"
property=
"miniprogramType"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
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
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update tab_haoban_miniprogram_setting
set status_flag=0,update_time=now()
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
insert into tab_haoban_miniprogram_setting (miniprogram_setting_id, wx_enterprise_id,
enterprise_id, miniprogram_name, title,
app_id, image_url, media_id,
media_time, status_flag, create_time,
update_time)
values (#{miniprogramSettingId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{miniprogramName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{appId,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{mediaId,jdbcType=VARCHAR},
#{mediaTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
insert into tab_haoban_miniprogram_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"miniprogramSettingId != null"
>
miniprogram_setting_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"miniprogramName != null"
>
miniprogram_name,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"appId != null"
>
app_id,
</if>
<if
test=
"imageUrl != null"
>
image_url,
</if>
<if
test=
"mediaId != null"
>
media_id,
</if>
<if
test=
"mediaTime != null"
>
media_time,
</if>
<if
test=
"miniprogramType != null"
>
miniprogram_type,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"miniprogramSettingId != null"
>
#{miniprogramSettingId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"miniprogramName != null"
>
#{miniprogramName,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"appId != null"
>
#{appId,jdbcType=VARCHAR},
</if>
<if
test=
"imageUrl != null"
>
#{imageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
#{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"mediaTime != null"
>
#{mediaTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"miniprogramType != null"
>
#{miniprogramType,jdbcType=INTEGER},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
update tab_haoban_miniprogram_setting
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"miniprogramName != null"
>
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"appId != null"
>
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if
test=
"imageUrl != null"
>
image_url = #{imageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
media_id = #{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"mediaTime != null"
>
media_time = #{mediaTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
update tab_haoban_miniprogram_setting
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
image_url = #{imageUrl,jdbcType=VARCHAR},
media_id = #{mediaId,jdbcType=VARCHAR},
media_time = #{mediaTime,jdbcType=TIMESTAMP},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update>
<select
id=
"getMiniprogramSetting"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and enterprise_id=#{enterpriseId}
and status_flag=1 order by create_time desc limit 1
</select>
<select
id=
"listMiniprogramSetting"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select
id=
"getMiniprogramSettingByAppId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and app_id=#{appId}
and status_flag=1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TestMapper.xml
View file @
b6c1dac2
<?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.TestMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.Test"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, name
</sql>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.Test"
>
insert into test (id,name)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR})
</insert>
<select
id=
"queryList"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from test
</select>
<?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.TestMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.Test"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, name
</sql>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.Test"
>
insert into test (id,name)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR})
</insert>
<select
id=
"queryList"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from test
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/hm/HmLinkMapper.xml
0 → 100644
View file @
b6c1dac2
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment