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
b39d4acb
Commit
b39d4acb
authored
May 11, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 数据修复
parent
5eddaed5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
7 deletions
+59
-7
TabHaobanInteractRecordMapper.java
...ice/dao/mapper/content/TabHaobanInteractRecordMapper.java
+2
-0
applicationContext-conf.xml
...e3-service/src/main/resources/applicationContext-conf.xml
+3
-2
TabHaobanInteractRecordMapper.xml
...esources/mapper/content/TabHaobanInteractRecordMapper.xml
+7
-0
GroupMessageServiceTest.java
...anage3-service/src/test/java/GroupMessageServiceTest.java
+2
-2
InteractRecordTest.java
haoban-manage3-service/src/test/java/InteractRecordTest.java
+42
-0
NotityTest.java
haoban-manage3-service/src/test/java/NotityTest.java
+3
-3
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/content/TabHaobanInteractRecordMapper.java
View file @
b39d4acb
...
...
@@ -121,5 +121,7 @@ public interface TabHaobanInteractRecordMapper {
*/
int
memberAuthorized
(
@Param
(
"memberId"
)
String
memberId
,
@Param
(
"unionId"
)
String
unionId
);
List
<
TabHaobanInteractRecord
>
queryInteractRecordWithMemberIdINull
();
}
haoban-manage3-service/src/main/resources/applicationContext-conf.xml
View file @
b39d4acb
...
...
@@ -5,10 +5,10 @@
<import
resource=
"classpath:gic-haoban-init.xml"
/>
<import
resource=
"classpath*:redis-init.xml"
/>
<import
resource=
"classpath*:kafka-setting.xml"
/
>
<!-- <import resource="classpath*:kafka-setting.xml"/>--
>
<import
resource=
"classpath:dubbo-haoban-manage-service.xml"
/>
<import
resource=
"classpath:dubbo-setting-test.xml"
/>
<import
resource=
"classpath:jdbc-haoban-manage-service.xml"
/>
<import
resource=
"classpath*:log-record-init.xml"
/>
<import
resource=
"classpath*:kafka-setting-data.xml"
/
>
<!-- <import resource="classpath*:kafka-setting-data.xml" />--
>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanInteractRecordMapper.xml
View file @
b39d4acb
...
...
@@ -325,5 +325,12 @@
where union_id = #{unionId} and delete_flag = 0
</update>
<select
id=
"queryInteractRecordWithMemberIdINull"
resultMap=
"TabHaobanInteractRecordMap"
>
select
<include
refid=
"baseSql"
/>
from tab_haoban_interact_record
where
member_id is null or member_id = ''
</select>
</mapper>
haoban-manage3-service/src/test/java/GroupMessageServiceTest.java
View file @
b39d4acb
...
...
@@ -116,8 +116,8 @@ public class GroupMessageServiceTest {
qywxMomentInfoQDTO
.
setEndTime
(
1681906519L
);
qywxMomentInfoQDTO
.
setCreatorId
(
"wo59NLDQAAbjSBA575NouC1pUYQgCOtw"
);
qywxMomentInfoQDTO
.
setPageSize
(
20
);
ServiceResponse
<
QywxMomentRespDTO
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxMomentList
(
qywxMomentInfoQDTO
);
System
.
out
.
println
(
JSON
.
toJSONString
(
serviceResponse
));
//
ServiceResponse<QywxMomentRespDTO> serviceResponse = qywxSuiteApiService.queryQywxMomentList(qywxMomentInfoQDTO);
//
System.out.println(JSON.toJSONString(serviceResponse));
}
@Test
...
...
haoban-manage3-service/src/test/java/InteractRecordTest.java
View file @
b39d4acb
...
...
@@ -10,12 +10,19 @@ import com.gic.haoban.manage.api.enums.content.MaterialInteractRecordEventType;
import
com.gic.haoban.manage.api.enums.content.TriggerCustomerChannelType
;
import
com.gic.haoban.manage.api.service.content.InteractRecordApiService
;
import
com.gic.haoban.manage.service.dao.mapper.chat.GroupChatPlanOwnerLogMapper
;
import
com.gic.haoban.manage.service.dao.mapper.content.TabHaobanInteractRecordMapper
;
import
com.gic.haoban.manage.service.entity.content.TabHaobanInteractRecord
;
import
com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.MemberAttrChangeBO
;
import
com.gic.haoban.manage.service.pojo.bo.content.message.InteractRecordMessageBO
;
import
com.gic.haoban.manage.service.pojo.qo.content.InteractRecordQO
;
import
com.gic.haoban.manage.service.service.content.InteractRecordService
;
import
com.gic.haoban.manage.service.service.content.message.InteractRecordMessageService
;
import
com.gic.member.api.dto.info.MemberBaseInfoDTO
;
import
com.gic.member.api.dto.info.MemberSummaryInfoDTO
;
import
com.gic.member.api.dto.info.qo.QueryMemberInfoDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -33,6 +40,7 @@ import java.util.UUID;
* @Description
* @Version
**/
@Slf4j
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
public
class
InteractRecordTest
{
...
...
@@ -40,9 +48,13 @@ public class InteractRecordTest {
@Autowired
private
InteractRecordService
interactRecordService
;
@Autowired
private
TabHaobanInteractRecordMapper
interactRecordMapper
;
@Autowired
private
InteractRecordMessageService
interactRecordMessageService
;
@Autowired
InteractRecordApiService
interactRecordApiService
;
@Autowired
private
com
.
gic
.
member
.
api
.
service
.
MemberOutApiService
memberOutApiService
;
String
eid
=
"ff8080815dacd3a2015dacd3ef5c0000"
;
...
...
@@ -105,4 +117,34 @@ public class InteractRecordTest {
memberAttrChangeBO
.
setOpt
(
MemberAttrChangeBO
.
MemberChangeOpt
.
MINI_APP_AUTHORIZED
.
getCode
());
interactRecordApiService
.
memberChangeMQ
(
JSON
.
toJSONString
(
memberAttrChangeBO
));
}
@Test
public
void
queryTest
()
{
List
<
TabHaobanInteractRecord
>
interactRecords
=
interactRecordMapper
.
queryInteractRecordWithMemberIdINull
();
if
(
CollectionUtils
.
isEmpty
(
interactRecords
))
{
return
;
}
for
(
TabHaobanInteractRecord
interactRecord
:
interactRecords
)
{
String
unionId
=
interactRecord
.
getUnionId
();
QueryMemberInfoDTO
queryMemberInfoDTO
=
QueryMemberInfoDTO
.
queryByUnionId
(
unionId
,
interactRecord
.
getEnterpriseId
())
.
setMemberBaseInfoDTO
(
true
)
.
setMemberPersonalInfoDTO
(
false
);
ServiceResponse
<
MemberSummaryInfoDTO
>
serviceResponse
=
memberOutApiService
.
queryMemberInfo
(
queryMemberInfoDTO
);
if
(!
serviceResponse
.
isSuccess
()
||
serviceResponse
.
getResult
()
==
null
)
{
log
.
info
(
"企业id:{}, unionId: {} 不存在会员信息"
,
interactRecord
.
getEnterpriseId
(),
unionId
);
continue
;
}
MemberBaseInfoDTO
memberBaseInfoDTO
=
serviceResponse
.
getResult
().
getMemberBaseInfoDTO
();
if
(
memberBaseInfoDTO
==
null
)
{
log
.
info
(
"企业id:{}, unionId: {} 不存在会员信息"
,
interactRecord
.
getEnterpriseId
(),
unionId
);
continue
;
}
String
memberId
=
memberBaseInfoDTO
.
getMemberId
();
interactRecordService
.
memberAuthorized
(
memberId
,
unionId
);
}
}
}
haoban-manage3-service/src/test/java/NotityTest.java
View file @
b39d4acb
...
...
@@ -124,8 +124,8 @@ public class NotityTest {
articleInfo
.
setPicurl
(
"https://platform-1251519181.cos.ap-shanghai.myqcloud.com/image/newdmwltest/enterprise_common-e1e8b3d46fdb4486ad545aae6cba67a1.png"
);
messageDTO
.
setArticleMessages
(
Arrays
.
asList
(
articleInfo
));
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpid
,
config
.
getWxSuiteid
(),
messageDTO
);
System
.
out
.
println
(
b
);
//
boolean b = qywxSuiteApiService.sendMessage(corpid, config.getWxSuiteid(), messageDTO);
//
System.out.println(b);
}
@Test
...
...
@@ -138,7 +138,7 @@ public class NotityTest {
search
.
setSuiteid
(
config
.
getWxSuiteid
());
search
.
setChatType
(
"single"
);
Date
date
=
DateUtils
.
addDays
(
new
Date
(),
-
1
);
ServiceResponse
<
QywxGroupMsgResp
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxGroupMessageList
(
search
);
//
ServiceResponse<QywxGroupMsgResp> serviceResponse = qywxSuiteApiService.queryQywxGroupMessageList(search);
}
...
...
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