Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
custom-server
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhonghong
custom-server
Commits
a6bbe82f
Commit
a6bbe82f
authored
Jun 16, 2026
by
Lizh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复TokenHandle中getExpiration()可能为空的判断
parent
bdb8936e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
21 deletions
+9
-21
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/CustomProductInfoServiceImpl.java
+3
-4
custom-server-core/src/main/java/com/jomalls/custom/security/TokenHandle.java
+6
-1
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/service/SaasAdminService.java
+0
-16
No files found.
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/CustomProductInfoServiceImpl.java
View file @
a6bbe82f
...
...
@@ -89,7 +89,6 @@ public class CustomProductInfoServiceImpl implements CustomProductInfoService {
/** 负数 1 */
private
static
final
int
NEGATIVE_ONE
=
-
1
;
@Override
public
IPage
<
CustomProductInfoPageSnakeVO
>
pageList
(
CustomProductInfoQuerySnakeDTO
param
)
{
CustomAsserts
.
nonNull
(
param
,
"分页查询参数不能为空"
);
...
...
@@ -179,7 +178,7 @@ public class CustomProductInfoServiceImpl implements CustomProductInfoService {
if
(
param
.
getId
()
!=
null
)
{
queryWrapper
.
eq
(
CustomProductInfoEntity:
:
getId
,
param
.
getId
());
}
// sku 支持逗号分隔多值 IN 查询, erpPage查询条件
TODO
// sku 支持逗号分隔多值 IN 查询, erpPage查询条件
if
(
StringUtils
.
isNotBlank
(
param
.
getSku
()))
{
String
[]
skuArr
=
param
.
getSku
().
split
(
","
);
if
(
skuArr
.
length
>
MIN_LIST_SIZE
)
{
...
...
@@ -201,7 +200,7 @@ public class CustomProductInfoServiceImpl implements CustomProductInfoService {
if
(
StringUtils
.
isNotBlank
(
param
.
getProduct_type
()))
{
queryWrapper
.
eq
(
CustomProductInfoEntity:
:
getProductType
,
param
.
getProduct_type
());
}
// 货号:逗号分隔多值 IN 查询,单个值模糊 LIKE 查询, erpPage查询条件
TODO
// 货号:逗号分隔多值 IN 查询,单个值模糊 LIKE 查询, erpPage查询条件
if
(
StringUtils
.
isNotBlank
(
param
.
getProduct_no
()))
{
String
[]
productNoArr
=
param
.
getProduct_no
().
split
(
","
);
if
(
productNoArr
.
length
>
MIN_LIST_SIZE
)
{
...
...
@@ -1161,7 +1160,7 @@ public class CustomProductInfoServiceImpl implements CustomProductInfoService {
* if (productInfo.sales_price_max == null || new Decimal(productInfo.sales_price_max).greaterThan(new Decimal(item.sales_price))) {
* productInfo.sales_price_max = item.sales_price;
* }
*
*
<p>
* saveFull 批量保存时使用
*
*/
...
...
custom-server-core/src/main/java/com/jomalls/custom/security/TokenHandle.java
View file @
a6bbe82f
...
...
@@ -12,6 +12,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.StringUtils
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -175,7 +176,11 @@ public class TokenHandle {
Long
deptId
=
claims
.
get
(
"deptId"
,
Long
.
class
);
LoginUser
loginUser
=
new
LoginUser
(
userId
,
deptId
,
username
);
loginUser
.
setExpireTime
(
claims
.
getExpiration
().
getTime
());
// getExpiration() 在 JWT 无 exp claim 时返回 null,需判空避免 NPE
Date
expiration
=
claims
.
getExpiration
();
if
(
expiration
!=
null
)
{
loginUser
.
setExpireTime
(
expiration
.
getTime
());
}
loginUser
.
setPermissions
(
parsePermissionsFromClaims
(
claims
));
log
.
debug
(
"从 JWT claims 构建用户[{}]信息,权限数: {}"
,
username
,
loginUser
.
getPermissions
().
size
());
...
...
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/service/SaasAdminService.java
View file @
a6bbe82f
package
com
.
jomalls
.
custom
.
integrate
.
service
;
import
com.jomalls.custom.enums.CodeEnum
;
import
com.jomalls.custom.integrate.client.RemoteApiClient
;
import
com.jomalls.custom.integrate.model.CategoryInfoModel
;
import
com.jomalls.custom.integrate.model.PropertyModel
;
import
com.jomalls.custom.integrate.model.SaasAdminApiResponseModel
;
import
com.jomalls.custom.security.LoginUser
;
import
com.jomalls.custom.security.SecurityUtils
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Value
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicReference
;
/**
* 商品分类服务
...
...
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