From ae04c5d925b0094e1a1ba1f2ce0bf6da0a6fee04 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 22 一月 2026 17:27:55 +0800
Subject: [PATCH] 2026.1.22 1. 新增台账上传office文档功能; 2. 新增office文档存储原始文档名字功能
---
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImplTest.kt | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImplTest.kt b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImplTest.kt
index 5055805..7489263 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImplTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/WxUserServiceImplTest.kt
@@ -1,5 +1,8 @@
package cn.flightfeather.supervision.lightshare.service.Impl
+import cn.flightfeather.supervision.domain.entity.UserInfoWx
+import cn.flightfeather.supervision.domain.mapper.PersonalInfoMapper
+import cn.flightfeather.supervision.domain.mapper.UserInfoWxMapper
import cn.flightfeather.supervision.lightshare.service.WxUserService
import org.junit.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -8,6 +11,7 @@
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
+import tk.mybatis.mapper.entity.Example
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@@ -17,9 +21,30 @@
@Autowired
lateinit var wxUserService: WxUserService
+ @Autowired
+ lateinit var personalInfoMapper: PersonalInfoMapper
+
+ @Autowired
+ lateinit var userInfoWxMapper: UserInfoWxMapper
+
@Test
fun subscribeResult() {
- val msg = "{\"ToUserName\":\"gh_213453153\", \"List\": [{\"TemplateId\":\"sadaihdfjhsadoaiwhfefe\", \"SubscribeStatusString\":\"accept\"}]}"
+ val msg = "{\"ToUserName\":\"gh_c60faa57000f\",\"FromUserName\":\"otZkc5cC55BtV2AFZdXMvBw0oJo8\",\"CreateTime\":1667377808,\"MsgType\":\"event\",\"Event\":\"subscribe_msg_popup_event\",\"List\":[{\"PopupScene\":\"0\",\"SubscribeStatusString\":\"accept\",\"TemplateId\":\"6JQFOJ12yBvKfRg_duSdwKiH5_J3LpICmz3Li-L1Cr8\"},{\"PopupScene\":\"0\",\"SubscribeStatusString\":\"accept\",\"TemplateId\":\"zPNMzF5WsshniJyl83DD-lDZtNvx7JyqLbKgqDl0qvU\"},{\"PopupScene\":\"0\",\"SubscribeStatusString\":\"accept\",\"TemplateId\":\"dqREi7vAd03OOirTgBGcm5aCihZJKBjVpiA8Kbu4B8w\"}]}"
wxUserService.subscribeResult(msg)
}
+
+ @Test
+ fun refreshPersonalInfo() {
+ personalInfoMapper.selectAll().forEach {
+ val uList = userInfoWxMapper.selectByExample(Example(UserInfoWx::class.java).apply {
+ createCriteria().andEqualTo("piGuid", it?.piGuid)
+ })
+ if (uList.isNotEmpty()) {
+ val u = uList[0]
+ it?.piWxId = u.uiOpenId
+ it?.piSceneId = u.uiGuid
+ personalInfoMapper.updateByPrimaryKeySelective(it)
+ }
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3