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
6aaaa7d7
Commit
6aaaa7d7
authored
Sep 09, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/xgh/240820' into 'developer'
Feature/xgh/240820 See merge request
!2134
parents
1ea7e55a
5aff3b67
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
11 deletions
+35
-11
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+30
-9
CustomSwitcher.java
.../java/com/gic/haoban/manage/web/utils/CustomSwitcher.java
+3
-2
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+2
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
6aaaa7d7
...
...
@@ -26,6 +26,8 @@ import com.gic.enterprise.api.service.*;
import
com.gic.haoban.manage.web.qo.StaffAddVO
;
import
com.gic.haoban.manage.web.utils.CustomSwitcher
;
import
com.gic.haoban.manage.web.vo.*
;
import
com.gic.weimob.dto.guider.WmGuiderInfoDTO
;
import
com.gic.weimob.service.GicWeimobGuiderRelService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -134,6 +136,9 @@ public class WxStaffController extends WebBaseController {
private
CustomPageNewService
customPageNewService
;
@Autowired
private
EnterpriseWxaLinkService
enterpriseWxaLinkService
;
@Autowired
private
GicWeimobGuiderRelService
gicWeimobGuiderRelService
;
// 选择成员列表
@RequestMapping
(
"/staff-list"
)
...
...
@@ -333,9 +338,13 @@ public class WxStaffController extends WebBaseController {
private
int
aiCustom
(
String
enterpriseId
)
{
List
<
AiCustomVO
>
list
=
CustomSwitcher
.
haoban_ai_custom
;
list
=
list
.
stream
().
filter
(
o
->
o
.
getIsOpen
()==
1
&&
o
.
getEid
().
equals
(
enterpriseId
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
JSONObject
>
list
=
CustomSwitcher
.
haoban_ai_custom
;
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
0
;
}
List
<
AiCustomVO
>
voList
=
list
.
stream
().
map
(
o
->
JSONObject
.
parseObject
(
o
.
toJSONString
(),
AiCustomVO
.
class
)).
collect
(
Collectors
.
toList
());
voList
=
voList
.
stream
().
filter
(
o
->
o
.
getIsOpen
()==
1
&&
o
.
getEid
().
equals
(
enterpriseId
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
voList
))
{
return
1
;
}
return
0
;
...
...
@@ -349,12 +358,24 @@ public class WxStaffController extends WebBaseController {
@IgnoreLogin
@RequestMapping
(
"/get-ai-custom-setting"
)
public
RestResponse
<
Object
>
getAiCustomSetting
(
String
enterpriseId
,
String
clerkId
)
{
ClerkDTO
clerkDTO
=
this
.
clerkService
.
getClerkByClerkId
(
clerkId
)
;
List
<
AiCustomVO
>
list
=
CustomSwitcher
.
haoban_ai_custom
;
list
=
list
.
stream
().
filter
(
o
->
o
.
getIsOpen
()==
1
&&
o
.
getEid
().
equals
(
enterpriseId
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
AiCustomVO
vo
=
list
.
get
(
0
)
;
String
h5
=
String
.
format
(
vo
.
getUrl
(),
clerkDTO
.
getClerkCode
())
;
String
wmId
=
""
;
if
(
null
!=
clerkId
)
{
ClerkDTO
clerkDTO
=
this
.
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
null
!=
clerkDTO
&&
clerkDTO
.
getClerkType
()<=
1
)
{
String
clerkCode
=
clerkDTO
.
getClerkCode
();
ServiceResponse
<
WmGuiderInfoDTO
>
resp
=
this
.
gicWeimobGuiderRelService
.
getWmClerkInfoByClerkCode
(
enterpriseId
,
clerkCode
);
if
(
null
!=
resp
.
getResult
())
{
logger
.
info
(
"wm={}"
,
JSONObject
.
toJSONString
(
resp
));
wmId
=
""
+
resp
.
getResult
().
getGuiderVid
();
}
}
}
List
<
JSONObject
>
list
=
CustomSwitcher
.
haoban_ai_custom
;
List
<
AiCustomVO
>
voList
=
list
.
stream
().
map
(
o
->
JSONObject
.
parseObject
(
o
.
toJSONString
(),
AiCustomVO
.
class
)).
collect
(
Collectors
.
toList
());
voList
=
voList
.
stream
().
filter
(
o
->
o
.
getIsOpen
()==
1
&&
o
.
getEid
().
equals
(
enterpriseId
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
voList
))
{
AiCustomVO
vo
=
voList
.
get
(
0
)
;
String
h5
=
String
.
format
(
vo
.
getUrl
(),
wmId
)
;
String
str
=
"{\"url\":\""
+
h5
+
"\",\"id\":\"5\"}"
;
Map
<
String
,
Object
>
map
=
this
.
enterpriseWxaLinkService
.
getWxaLinkAndQrCode
(
enterpriseId
,
str
)
;
vo
.
setPath
(
map
.
get
(
"link"
).
toString
());
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/utils/CustomSwitcher.java
View file @
6aaaa7d7
package
com
.
gic
.
haoban
.
manage
.
web
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.switcher.Switcher
;
import
com.gic.commons.switcher.SwitcherNamespace
;
import
com.gic.haoban.manage.web.vo.AiCustomVO
;
import
java.util.List
;
...
...
@@ -10,6 +10,6 @@ import java.util.List;
public
class
CustomSwitcher
{
@Switcher
public
static
List
<
AiCustomVO
>
haoban_ai_custom
;
public
static
List
<
JSONObject
>
haoban_ai_custom
;
}
\ No newline at end of file
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
6aaaa7d7
...
...
@@ -175,6 +175,8 @@
<dubbo:reference
id=
"storeRankApiService"
interface=
"com.gic.enterprise.api.service.rank.StoreRankApiService"
timeout=
"100000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"enterpriseWxaLinkService"
interface=
"com.gic.enterprise.api.service.EnterpriseWxaLinkService"
timeout=
"100000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"gicWeimobGuiderRelService"
interface=
"com.gic.weimob.service.GicWeimobGuiderRelService"
timeout=
"100000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"memberExtraPropertyApiService"
interface=
"com.gic.member.api.service.extra.MemberExtraPropertyApiService"
timeout=
"100000"
retries=
"0"
check=
"false"
/>
...
...
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