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
5d993fc0
Commit
5d993fc0
authored
May 06, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:登录在session中放入导购id
parent
31b22482
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
34 deletions
+85
-34
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+12
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+35
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+5
-0
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+33
-32
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+0
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
5d993fc0
...
...
@@ -244,4 +244,16 @@ public interface StaffApiService {
*/
StaffQrCodeDTO
getQrCodeByClerkId
(
String
clerkId
);
/**
* 获取好办门店数据权限
* 超管返回所有门店
*
* @param clerkId 职员id
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-05-06 17:17:27
*/
List
<
String
>
getHaoBanStoreRoles
(
String
clerkId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
5d993fc0
...
...
@@ -6,7 +6,9 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.PowerClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.PowerService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalVar
;
...
...
@@ -15,6 +17,7 @@ import com.gic.enterprise.api.dto.StoreDTO;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
...
...
@@ -93,6 +96,10 @@ public class StaffApiServiceImpl implements StaffApiService {
private
StaffPrivacyUseLogService
staffPrivacyUseLogService
;
@Autowired
private
WxApplicationService
wxApplicationService
;
@Autowired
private
StoreWidgetService
storeWidgetService
;
@Autowired
private
PowerService
powerService
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -1282,4 +1289,32 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staffQrCodeDTO
;
}
@Override
public
List
<
String
>
getHaoBanStoreRoles
(
String
clerkId
)
{
return
null
;
}
/**
* 门店筛选器id企业端获取gic门店id列表
*
* @param clerkId 职员id
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-05-06 16:00:05
*/
private
List
<
String
>
getStoreIdList
(
String
clerkId
)
{
PowerClerkDTO
clerkDetail
=
powerService
.
getClerkDetail
(
clerkId
);
if
(
clerkDetail
==
null
)
{
return
Collections
.
emptyList
();
}
// 门店id列表
List
<
String
>
storeIdList
=
storeWidgetService
.
getStoreWidgetStore
(
clerkDetail
.
getStoreWidgetId
(),
clerkDetail
.
getEnterpriseId
(),
null
,
null
,
2
);
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
Collections
.
emptyList
();
}
logger
.
info
(
"门店筛选器查询结果:{}"
,
JSON
.
toJSONString
(
storeIdList
));
return
storeIdList
;
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
5d993fc0
...
...
@@ -158,4 +158,8 @@
<dubbo:reference
id=
"memberStoreService"
interface=
"com.gic.member.api.service.MemberStoreService"
timeout=
"10000"
/>
<dubbo:reference
id=
"imageService"
interface=
"com.gic.enterprise.api.service.ImageService"
timeout=
"10000"
/>
<dubbo:reference
id=
"storeWidgetService"
interface=
"com.gic.enterprise.api.service.StoreWidgetService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
5d993fc0
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.view.RedirectView
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.crypto.symmetric.AES
;
import
com.alibaba.dubbo.common.URL
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.PowerClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.UserService
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
...
...
@@ -48,9 +30,26 @@ import com.gic.redis.data.util.RedisUtil;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.view.RedirectView
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.crypto.symmetric.AES
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@RestController
...
...
@@ -62,26 +61,22 @@ public class LoginController extends WebBaseController {
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
QywxCorpApiService
qywxCorpApiService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
private
WxApplicationApiService
wxApplicationApiService
;
@Autowired
private
UserService
userService
;
private
UserService
userService
;
@Autowired
private
Config
config
;
@Autowired
private
ClerkService
clerkService
;
@RequestMapping
(
"login"
)
@Deprecated
...
...
@@ -297,6 +292,12 @@ public class LoginController extends WebBaseController {
LoginDTO
loginDTO
=
new
LoginDTO
();
loginDTO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
loginDTO
.
setEnterpriseId
(
gicEnterpriseId
);
//导购id
ClerkDTO
clerk
=
clerkService
.
getClerkByPhoneNumber
(
loginPhoneNumber
,
gicEnterpriseId
);
if
(
clerk
!=
null
)
{
staff
.
setClerkId
(
clerk
.
getClerkId
());
staff
.
setClerkCode
(
clerk
.
getClerkCode
());
}
loginDTO
.
setStaffDTO
(
staff
);
String
redirectUri
=
config
.
getHost
()
+
"index"
;
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
...
...
@@ -398,5 +399,5 @@ public class LoginController extends WebBaseController {
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-web/#/gic-error"
,
false
));
return
model
;
}
}
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
5d993fc0
...
...
@@ -96,6 +96,4 @@
<dubbo:reference
id=
"welcomeApiService"
interface=
"com.gic.haoban.manage.api.service.out.WelcomeApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
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