Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
lei
fzm-joying
Commits
5d88ea49
Commit
5d88ea49
authored
Jul 29, 2021
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nft标签为空时不加入缓存
修改nft编号的前缀
parent
cd67567d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
LabelServiceImpl.java
...in/java/com/fzm/common/service/impl/LabelServiceImpl.java
+4
-2
NftServiceImpl.java
...main/java/com/fzm/common/service/impl/NftServiceImpl.java
+1
-1
No files found.
joying-common/src/main/java/com/fzm/common/service/impl/LabelServiceImpl.java
View file @
5d88ea49
package
com
.
fzm
.
common
.
service
.
impl
;
package
com
.
fzm
.
common
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.fzm.common.entity.Category
;
import
com.fzm.common.entity.Category
;
...
@@ -25,10 +26,11 @@ public class LabelServiceImpl extends ServiceImpl<LabelMapper, Label> implements
...
@@ -25,10 +26,11 @@ public class LabelServiceImpl extends ServiceImpl<LabelMapper, Label> implements
private
LabelMapper
labelMapper
;
private
LabelMapper
labelMapper
;
@Override
@Override
@Cacheable
(
value
=
"label:list"
,
key
=
"#categoryId"
)
@Cacheable
(
value
=
"label:list"
,
key
=
"#categoryId"
,
unless
=
"#result == null"
)
public
List
<
Label
>
listAll
(
Integer
categoryId
)
{
public
List
<
Label
>
listAll
(
Integer
categoryId
)
{
QueryWrapper
<
Label
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Label
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"category_id"
,
categoryId
);
queryWrapper
.
eq
(
"category_id"
,
categoryId
);
return
labelMapper
.
selectList
(
queryWrapper
);
List
<
Label
>
labels
=
labelMapper
.
selectList
(
queryWrapper
);
return
CollectionUtil
.
isEmpty
(
labels
)
?
null
:
labels
;
}
}
}
}
joying-common/src/main/java/com/fzm/common/service/impl/NftServiceImpl.java
View file @
5d88ea49
...
@@ -287,7 +287,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
...
@@ -287,7 +287,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
throw
GlobalException
.
newException
(
ResultCode
.
DATA_ERROR
,
"没找到此类目"
);
throw
GlobalException
.
newException
(
ResultCode
.
DATA_ERROR
,
"没找到此类目"
);
}
}
int
code
=
RandomUtil
.
randomInt
(
1000
,
10000
);
int
code
=
RandomUtil
.
randomInt
(
1000
,
10000
);
return
String
.
format
(
"
INMVO
-%s-%s%s"
,
category
.
getEnglishName
(),
System
.
currentTimeMillis
(),
code
);
return
String
.
format
(
"
YIMU
-%s-%s%s"
,
category
.
getEnglishName
(),
System
.
currentTimeMillis
(),
code
);
}
}
@Override
@Override
...
...
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