Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
huluobin
gogirl-miniapp-backend
Commits
a483822d
Commit
a483822d
authored
Dec 15, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c0bc352a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
BaseProduceServiceImpl.java
...pplication/product/serve/impl/BaseProduceServiceImpl.java
+2
-2
BaseServeServiceImpl.java
.../application/product/serve/impl/BaseServeServiceImpl.java
+4
-3
SessionUtils.java
...a/com/gogirl/infrastructure/common/util/SessionUtils.java
+11
-0
No files found.
src/main/java/com/gogirl/application/product/serve/impl/BaseProduceServiceImpl.java
View file @
a483822d
...
@@ -52,8 +52,8 @@ public class BaseProduceServiceImpl extends ServiceImpl<BaseProduceMapper, BaseP
...
@@ -52,8 +52,8 @@ public class BaseProduceServiceImpl extends ServiceImpl<BaseProduceMapper, BaseP
Integer
sort
=
baseFeatures
!=
null
&&
baseFeatures
.
getName
().
equals
(
"热销款"
)
?
1
:
2
;
Integer
sort
=
baseFeatures
!=
null
&&
baseFeatures
.
getName
().
equals
(
"热销款"
)
?
1
:
2
;
request
.
setSort
(
sort
);
request
.
setSort
(
sort
);
request
.
setSourceFrom
(
SessionUtils
.
getSourceFrom
());
request
.
setSourceFrom
(
SessionUtils
.
getSourceFrom
());
Integer
departmentId
=
SessionUtils
.
getDepartmentId
();
request
.
setDepartmentId
(
SessionUtils
.
getCustomerDepartmentId
()
);
request
.
setDepartmentId
(
departmentId
);
page
=
baseProduceMapper
.
queryProducePage
(
page
,
request
);
page
=
baseProduceMapper
.
queryProducePage
(
page
,
request
);
...
...
src/main/java/com/gogirl/application/product/serve/impl/BaseServeServiceImpl.java
View file @
a483822d
...
@@ -26,12 +26,13 @@ public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe
...
@@ -26,12 +26,13 @@ public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe
@Override
@Override
public
IPage
<
BaseServe
>
listServeForPage
(
IPage
<
BaseServe
>
page
,
BaseServe
param
)
{
public
IPage
<
BaseServe
>
listServeForPage
(
IPage
<
BaseServe
>
page
,
BaseServe
param
)
{
param
.
setDepartmentId
(
SessionUtils
.
getCustomerDepartmentId
());
Integer
departmentId
=
SessionUtils
.
getDepartmentId
();
param
.
setDepartmentId
(
departmentId
);
IPage
<
BaseServe
>
result
=
baseServeMapper
.
listServeForPage
(
page
,
param
);
IPage
<
BaseServe
>
result
=
baseServeMapper
.
listServeForPage
(
page
,
param
);
List
<
Integer
>
serveIdList
=
result
.
getRecords
().
stream
().
map
(
BaseServe:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
serveIdList
=
result
.
getRecords
().
stream
().
map
(
BaseServe:
:
getId
).
collect
(
Collectors
.
toList
());
Integer
departmentId
=
SessionUtils
.
getCustomerDepartmentId
();
List
<
ServiceStorePrice
>
serviceStorePriceList
=
serviceStorePriceMapper
.
selectList
(
new
LambdaQueryWrapper
<
ServiceStorePrice
>()
List
<
ServiceStorePrice
>
serviceStorePriceList
=
serviceStorePriceMapper
.
selectList
(
new
LambdaQueryWrapper
<
ServiceStorePrice
>()
.
eq
(
ServiceStorePrice:
:
getStoreId
,
departmentId
)
.
eq
(
ServiceStorePrice:
:
getStoreId
,
departmentId
)
.
in
(
ServiceStorePrice:
:
getServiceId
,
serveIdList
));
.
in
(
ServiceStorePrice:
:
getServiceId
,
serveIdList
));
...
@@ -52,7 +53,7 @@ public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe
...
@@ -52,7 +53,7 @@ public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe
@Override
@Override
public
BaseServe
getAggregate
(
Integer
id
)
{
public
BaseServe
getAggregate
(
Integer
id
)
{
BaseServe
baseServe
=
baseServeMapper
.
selectById
(
id
);
BaseServe
baseServe
=
baseServeMapper
.
selectById
(
id
);
Integer
departmentId
=
SessionUtils
.
get
Customer
DepartmentId
();
Integer
departmentId
=
SessionUtils
.
getDepartmentId
();
ServiceStorePrice
serviceStorePrice
=
serviceStorePriceMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ServiceStorePrice
>()
ServiceStorePrice
serviceStorePrice
=
serviceStorePriceMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ServiceStorePrice
>()
.
eq
(
ServiceStorePrice:
:
getStoreId
,
departmentId
)
.
eq
(
ServiceStorePrice:
:
getStoreId
,
departmentId
)
...
...
src/main/java/com/gogirl/infrastructure/common/util/SessionUtils.java
View file @
a483822d
...
@@ -156,4 +156,15 @@ public class SessionUtils {
...
@@ -156,4 +156,15 @@ public class SessionUtils {
}
}
}
}
public
static
Integer
getDepartmentId
()
{
if
(
StringUtils
.
isNotEmpty
(
SessionUtils
.
getSourceFrom
())
&&
SessionUtils
.
getSourceFrom
().
equals
(
SessionUtils
.
customer
))
{
return
SessionUtils
.
getCustomerDepartmentId
();
}
if
(
StringUtils
.
isNotEmpty
(
SessionUtils
.
getSourceFrom
())
&&
SessionUtils
.
getSourceFrom
().
equals
(
SessionUtils
.
technician
))
{
return
SessionUtils
.
getTechnicianToken
().
getDepartmentId
();
}
return
null
;
}
}
}
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