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
ebb361fc
Commit
ebb361fc
authored
Jul 12, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改返回活码数量接口
parent
634af29a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
10 deletions
+35
-10
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+4
-3
HmQrcodeService.java
...gic/haoban/manage/service/service/hm/HmQrcodeService.java
+3
-2
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+2
-2
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+19
-1
HmGroupApiServiceImpl.java
...ge/service/service/out/impl/hm/HmGroupApiServiceImpl.java
+1
-2
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+6
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
ebb361fc
...
...
@@ -161,11 +161,12 @@ public interface TabHaobanHmQrcodeMapper {
* 根据分组id获取活码数量
*
* @param enterpriseId 企业标识
* @return int
* @param groupIds 组id
* @return {@link List }<{@link HmQrcodeGroupNumBO }>
* @author mozhu
* @date 2022-07-12 1
5:18:34
* @date 2022-07-12 1
7:39:12
*/
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupIds"
)
List
<
Long
>
groupIds
);
/**
* 获取总数
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeService.java
View file @
ebb361fc
...
...
@@ -150,11 +150,12 @@ public interface HmQrcodeService {
* 根据分组id获取活码数量
*
* @param enterpriseId 企业标识
* @param groupIds 组id
* @return {@link List }<{@link HmQrcodeGroupNumBO }>
* @author mozhu
* @date 2022-07-12 1
5:20:48
* @date 2022-07-12 1
7:38:43
*/
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
enterpriseId
);
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
enterpriseId
,
List
<
Long
>
groupIds
);
/**
* 获取总数
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
ebb361fc
...
...
@@ -107,8 +107,8 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
@Override
public
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
enterpriseId
)
{
return
tabHaobanHmQrcodeMapper
.
getGroupIdNumByEnterpriseId
(
enterpriseId
);
public
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
enterpriseId
,
List
<
Long
>
groupIds
)
{
return
tabHaobanHmQrcodeMapper
.
getGroupIdNumByEnterpriseId
(
enterpriseId
,
groupIds
);
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
ebb361fc
...
...
@@ -574,7 +574,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if
(
StringUtils
.
isNotBlank
(
state
))
{
//"HM+id" "DT+key"
log
.
info
(
"特殊欢迎语 state:{}"
,
state
);
welcomeDetailBO
=
welcomeService
.
getMatchWelcomeWithReferId
(
staffId
,
wxEnterpriseId
,
state
);
String
refId
=
getRefId
(
state
);
welcomeDetailBO
=
welcomeService
.
getMatchWelcomeWithReferId
(
staffId
,
wxEnterpriseId
,
refId
);
}
else
{
welcomeDetailBO
=
welcomeService
.
getMatchWelcome
(
staffId
,
wxEnterpriseId
);
}
...
...
@@ -635,6 +636,23 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
}
/**
* 获取链接或者活码id
* @param state
* @return
*/
private
String
getRefId
(
String
state
)
{
String
substring
=
state
.
substring
(
2
);
String
refId
=
""
;
if
(
state
.
contains
(
"HM"
))
{
refId
=
substring
;
}
else
if
(
state
.
contains
(
"DT"
))
{
KeyDataLinkBO
dataForHmLink
=
keyDataService
.
getDataForHmLink
(
refId
);
refId
=
Convert
.
toStr
(
dataForHmLink
.
getLinkId
());
}
return
refId
;
}
private
void
attachmentAddImage
(
List
<
QywxExternalMessageBaseDTO
>
attachments
,
WelcomeMediaBO
media
,
WxEnterpriseDTO
wxEnterpriseDTO
)
{
String
mediaUrl
=
media
.
getMediaUrl
();
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmGroupApiServiceImpl.java
View file @
ebb361fc
...
...
@@ -29,7 +29,6 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -114,7 +113,7 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
}
result
.
addAll
(
groupDtoPage
.
getResult
());
List
<
Long
>
groupIds
=
result
.
stream
().
map
(
HmGroupDTO:
:
getGroupId
).
collect
(
Collectors
.
toList
());
List
<
HmQrcodeGroupNumBO
>
qrcodeGroupNumBoList
=
qrcodeService
.
getGroupIdNumByEnterpriseId
(
groupQueryDTO
.
getEnterpriseId
());
List
<
HmQrcodeGroupNumBO
>
qrcodeGroupNumBoList
=
qrcodeService
.
getGroupIdNumByEnterpriseId
(
groupQueryDTO
.
getEnterpriseId
()
,
groupIds
);
Map
<
Integer
,
Integer
>
qrcodeGroupNumMap
=
qrcodeGroupNumBoList
.
stream
()
.
collect
(
Collectors
.
toMap
(
HmQrcodeGroupNumBO:
:
getHmGroupId
,
HmQrcodeGroupNumBO:
:
getNum
,
(
v1
,
v2
)
->
v1
));
for
(
HmGroupDTO
groupDTO
:
result
)
{
...
...
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
ebb361fc
...
...
@@ -329,6 +329,12 @@
from tab_haoban_hm_qrcode
where status_flag != 0
and enterprise_id = #{enterpriseId}
<if
test=
"groupIds != null"
>
and hm_group_id IN
<foreach
collection=
"groupIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</if>
GROUP BY hm_group_id
</select>
...
...
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