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
5cdadf24
Commit
5cdadf24
authored
Jun 12, 2025
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修流水表单向好友
parent
0c67f4a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
35 deletions
+54
-35
WxUserAddLogMapper.java
...oban/manage/service/dao/mapper/hm/WxUserAddLogMapper.java
+4
-0
WxUserAddLogMapper.xml
...rvice/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
+8
-0
HalfFriendTest.java
haoban-manage3-service/src/test/java/HalfFriendTest.java
+42
-35
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/WxUserAddLogMapper.java
View file @
5cdadf24
...
...
@@ -54,6 +54,10 @@ public interface WxUserAddLogMapper {
public
TabWxUserAddLog
selectNewLog
(
@Param
(
"externalUserid"
)
String
externalUserid
,
@Param
(
"staffId"
)
String
staffId
);
public
TabWxUserAddLog
listNewLog
(
@Param
(
"externalUserid"
)
String
externalUserid
,
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"friendClerkId"
)
String
friendClerkId
);
/**
*
* @Title: listAllForDel
...
...
haoban-manage3-service/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
View file @
5cdadf24
...
...
@@ -188,6 +188,14 @@
status_flag != 0 order by create_time desc limit 1
</select>
<select
id=
"listNewLog"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_user_add_log where
external_userid=#{externalUserid} and staff_id =#{staffId} and
status_flag != 0 and friend_clerk_id = #{friendClerkId} order by create_time desc limit 1
</select>
<select
id=
"listForPage"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
...
...
haoban-manage3-service/src/test/java/HalfFriendTest.java
View file @
5cdadf24
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO
;
import
com.gic.haoban.manage.api.service.HaobanTimerApiService
;
import
com.gic.haoban.manage.api.service.notify.NoticeMessageApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanRoleApiService
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.service.OpenStaffService
;
import
com.gic.weimob.common.Md5Util
;
import
com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogQDTO
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanExternalClerkRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.hm.WxUserAddLogMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog
;
import
com.gic.haoban.manage.service.service.hm.WxUserAddLogService
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.lang.reflect.Array
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
public
class
HalfFriendTest
{
@Autowired
private
OpenStaffService
openStaffService
;
private
TabHaobanExternalClerkRelatedMapper
haobanExternalClerkRelatedMapper
;
@Autowired
private
NoticeMessageApiService
noticeMessageApiService
;
private
WxUserAddLogMapper
wxUserAddLogMapper
;
@Autowired
private
WxUserAddLogService
wxUserAddLogService
;
@Test
public
void
tt
()
{
Map
<
String
,
String
>
map
=
new
HashMap
<>()
;
map
.
put
(
"accountName"
,
"111222333111K"
)
;
map
.
put
(
"errorTime"
,
"2024年4月20日 22:22"
)
;
map
.
put
(
"reason"
,
"异常断开"
)
;
this
.
noticeMessageApiService
.
sendMessageForOpenStaff
(
"ff8080815dacd3a2015dacd3ef5c0000"
,
"xgh"
,
"首次托管,需要二次验证"
);
/*OpenStaffPageQDTO qdto = new OpenStaffPageQDTO() ;
qdto.setWxEnterpriseId("ca66a01b79474c40b3e7c7f93daf1a3b");
qdto.setEnterpriseId("ff8080815dacd3a2015dacd3ef5c0000");
qdto.setClerkId("b2ef17cce11f476b996d0b27ebadf7fb");
qdto.setStoreGroupIdList(Arrays.asList("ff8080815dacd3a2015dacd3f4fc0033"));
qdto.setStaffParams("徐高华");
BasePageInfo basePageInfo = new BasePageInfo() ;
basePageInfo.setPageSize(11);
basePageInfo.setPageNum(1);
this.openStaffService.page(qdto,basePageInfo) ;*/
int
messageType
=
NoticeMessageTypeEnum
.
HAOBAN_OPEN_STAFF_LOGOUT
.
getType
();
// NoticeMessageUtil.sendNoticeMessageByStaff("ff8080815dacd3a2015dacd3ef5c0000","52995ea8c81c4cc286a9b82bc36a7081","-1",messageType,null,map,null);
String
wxEnterpriseId
=
"b8f2f238e73844219d8c1ac563cec0db"
;
String
staffId
=
"c153778c9ec24c189ac31e67748677e3"
;
List
<
TabHaobanExternalClerkRelated
>
list
=
this
.
haobanExternalClerkRelatedMapper
.
listByWxEnterpriseIdAndWxUserIdAndStatus
(
wxEnterpriseId
,
staffId
,
Arrays
.
asList
(
2
))
;
int
count
=
0
;
for
(
TabHaobanExternalClerkRelated
item
:
list
)
{
String
externalUserId
=
item
.
getExternalUserId
()
;
// a2d6b466a4fc436099a949db3756f6c1
// 8be4cae54aec4dbe90079d824f3c1490
String
clerkId
=
"8be4cae54aec4dbe90079d824f3c1490"
;
TabWxUserAddLog
log
=
this
.
wxUserAddLogMapper
.
listNewLog
(
externalUserId
,
staffId
,
clerkId
)
;
if
(
null
==
log
||
log
.
getStatusFlag
()!=
3
)
{
continue
;
}
count
++
;
System
.
err
.
println
(
"insert"
+
externalUserId
+
" "
+
count
);
//添加日志
WxUserAddLogQDTO
wxUserAddLogQDTO
=
new
WxUserAddLogQDTO
();
wxUserAddLogQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
wxUserAddLogQDTO
.
setEnterpriseId
(
item
.
getEnterpriseId
());
wxUserAddLogQDTO
.
setMemberId
(
item
.
getMemberId
());
wxUserAddLogQDTO
.
setUnionid
(
item
.
getUnionid
());
wxUserAddLogQDTO
.
setDelFlag
(
true
);
wxUserAddLogQDTO
.
setExternalUserid
(
item
.
getExternalUserId
());
wxUserAddLogQDTO
.
setStaffId
(
item
.
getStaffId
());
wxUserAddLogQDTO
.
setClerkId
(
log
.
getFriendClerkId
());
if
(
null
!=
item
.
getAddTime
())
{
wxUserAddLogQDTO
.
setQwAddTime
(
item
.
getAddTime
());
}
wxUserAddLogQDTO
.
setFriendClerkId
(
log
.
getFriendClerkId
());
wxUserAddLogQDTO
.
setFriendStoreId
(
log
.
getFriendStoreId
());
this
.
wxUserAddLogService
.
save
(
wxUserAddLogQDTO
);
}
}
}
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