Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
config-server-api
Project
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
何熠
config-server-api
Commits
309244d6
Commit
309244d6
authored
Jan 19, 2022
by
zhaoxiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加token
parent
43598ab9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
GetConfigurationInputDTO.java
...tech/authorization/pojo/dto/GetConfigurationInputDTO.java
+1
-0
SuperBomEntity.java
.../com/uitech/authorization/pojo/entity/SuperBomEntity.java
+1
-0
CtoBomServiceImpl.java
.../uitech/authorization/service/impl/CtoBomServiceImpl.java
+16
-18
IntegrateServiceImpl.java
...tech/authorization/service/impl/IntegrateServiceImpl.java
+0
-0
SuperBomPriceCalculateServiceImpl.java
...ation/service/impl/SuperBomPriceCalculateServiceImpl.java
+0
-0
No files found.
src/main/java/cn/com/uitech/authorization/pojo/dto/GetConfigurationInputDTO.java
View file @
309244d6
...
...
@@ -25,4 +25,5 @@ public class GetConfigurationInputDTO {
private
List
<
String
>
configIds
;
private
String
skuCode
;
private
String
token
;
}
src/main/java/cn/com/uitech/authorization/pojo/entity/SuperBomEntity.java
View file @
309244d6
...
...
@@ -21,5 +21,6 @@ public class SuperBomEntity {
String
h3cpn
;
String
unisSalesName
;
String
configId
;
String
token
;
List
<
Characteristics
>
characteristicList
;
}
src/main/java/cn/com/uitech/authorization/service/impl/CtoBomServiceImpl.java
View file @
309244d6
package
cn
.
com
.
uitech
.
authorization
.
service
.
impl
;
import
cn.com.uitech.authorization.exception.BusinessException
;
import
cn.com.uitech.authorization.mapper.BomStatusMapper
;
import
cn.com.uitech.authorization.mapper.CtoBomMapper
;
import
cn.com.uitech.authorization.pojo.dto.ConfigurableBomLogOpera
;
import
cn.com.uitech.authorization.pojo.dto.CtoBomRequestParamDto
;
import
cn.com.uitech.authorization.pojo.dto.GetProductOutDto
;
import
cn.com.uitech.authorization.pojo.entity.ConfigurableBom
;
import
cn.com.uitech.authorization.pojo.entity.ProductGroup
;
import
cn.com.uitech.authorization.service.CtoBomService
;
import
cn.com.uitech.authorization.utils.ApiResult
;
import
cn.com.uitech.authorization.utils.RedisHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -33,7 +36,7 @@ public class CtoBomServiceImpl implements CtoBomService {
@Autowired
private
CtoBomMapper
ctoBomMapper
;
@Autowired
private
BomStatusMapper
bomStatusMapper
;
private
IntegrateServiceImpl
integrateService
;
@Resource
private
RedisHelper
redisHelper
;
...
...
@@ -46,20 +49,13 @@ public class CtoBomServiceImpl implements CtoBomService {
*/
@Override
public
Object
getCtoBoms
(
CtoBomRequestParamDto
ctoBomRequestParamDto
)
{
if
(!
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
ctoBomRequestParamDto
.
getToken
()))
{
String
redisToken
=
redisHelper
.
get
(
"unis_cpq:"
+
ctoBomRequestParamDto
.
getToken
());
if
(!
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
redisToken
))
{
PageHelper
.
startPage
(
ctoBomRequestParamDto
.
getPage
(),
ctoBomRequestParamDto
.
getPerPage
());
List
<
ConfigurableBom
>
ctoBoms
=
ctoBomMapper
.
getCtoBoms
(
ctoBomRequestParamDto
);
return
new
PageInfo
(
ctoBoms
);
}
else
{
ctoBomRequestParamDto
.
setToken
(
ctoBomRequestParamDto
.
getToken
()
+
"token已失效,请重新申请"
);
return
ctoBomRequestParamDto
;
}
}
else
{
ctoBomRequestParamDto
.
setToken
(
"请传入正确的token"
);
return
ctoBomRequestParamDto
;
GetProductOutDto
getProductOutDto
=
integrateService
.
checkToken
(
ctoBomRequestParamDto
.
getToken
());
if
(
getProductOutDto
.
getCode
().
equals
(
200
)){
PageHelper
.
startPage
(
ctoBomRequestParamDto
.
getPage
(),
ctoBomRequestParamDto
.
getPerPage
());
List
<
ConfigurableBom
>
ctoBoms
=
ctoBomMapper
.
getCtoBoms
(
ctoBomRequestParamDto
);
return
new
PageInfo
(
ctoBoms
);
}
else
{
throw
new
BusinessException
(
ApiResult
.
UNAUTHORIZED
.
getCode
(),
"token失效!"
);
}
}
...
...
@@ -149,9 +145,11 @@ public class CtoBomServiceImpl implements CtoBomService {
@Override
public
PageInfo
<
ConfigurableBom
>
getCtoBom
(
CtoBomRequestParamDto
ctoBomRequestParamDto
)
{
PageHelper
.
startPage
(
ctoBomRequestParamDto
.
getPage
(),
ctoBomRequestParamDto
.
getPerPage
());
List
<
ConfigurableBom
>
ctoBoms
=
ctoBomMapper
.
getCtoBoms
(
ctoBomRequestParamDto
);
return
new
PageInfo
(
ctoBoms
);
PageHelper
.
startPage
(
ctoBomRequestParamDto
.
getPage
(),
ctoBomRequestParamDto
.
getPerPage
());
List
<
ConfigurableBom
>
ctoBoms
=
ctoBomMapper
.
getCtoBoms
(
ctoBomRequestParamDto
);
return
new
PageInfo
(
ctoBoms
);
}
...
...
src/main/java/cn/com/uitech/authorization/service/impl/IntegrateServiceImpl.java
View file @
309244d6
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/uitech/authorization/service/impl/SuperBomPriceCalculateServiceImpl.java
View file @
309244d6
This diff is collapsed.
Click to expand it.
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