记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
bf7591b9
Commit
bf7591b9
authored
Dec 14, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 积分商品增加 字段 simpleType 区别于 TYPE字段 用作局 类别分组
parent
f71507a8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
application-dev.yml
liquidnet-bus-config/liquidnet-config/application-dev.yml
+5
-5
liquidnet-service-stone-dev.yml
...s-config/liquidnet-config/liquidnet-service-stone-dev.yml
+2
-2
StoneScoreItemsServiceImpl.java
...ervice/stone/service/impl/StoneScoreItemsServiceImpl.java
+2
-2
StoneMongoUtils.java
...ava/com/liquidnet/service/stone/util/StoneMongoUtils.java
+2
-2
StoneRedisUtils.java
...ava/com/liquidnet/service/stone/util/StoneRedisUtils.java
+2
-2
No files found.
liquidnet-bus-config/liquidnet-config/application-dev.yml
View file @
bf7591b9
...
...
@@ -44,11 +44,11 @@ liquidnet:
port
:
6379
password
:
3Xa%8p
sweet
:
dbs
:
0,
1
6
database
:
1
5
host
:
39.107.71.112
port
:
63
79
password
:
3Xa%8p
dbs
:
0,
25
6
database
:
25
5
host
:
r-2ze7002ckw5u75fgukpd.redis.rds.aliyuncs.com
port
:
63
80
password
:
PO@B!Iud32
adam
:
dbs
:
0,16
database
:
15
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-stone-dev.yml
View file @
bf7591b9
...
...
@@ -16,7 +16,7 @@ liquidnet:
pattern-rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
debug
mysql
:
database-name
:
dev
_ln_scene
database-name
:
test
_ln_scene
mongodb
:
sslEnabled
:
false
database
:
dev
_ln_scene
database
:
test
_ln_scene
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/service/impl/StoneScoreItemsServiceImpl.java
View file @
bf7591b9
...
...
@@ -85,10 +85,10 @@ public class StoneScoreItemsServiceImpl implements IStoneScoreItemsService {
List
<
StoneScoreItems
>
voList
;
long
count
;
if
(
page
==
1
)
{
voList
=
redisUtils
.
getListSimple
(
simpleType
.
toString
()
);
voList
=
redisUtils
.
getListSimple
(
simpleType
);
count
=
voList
.
size
();
}
else
{
HashMap
<
String
,
Object
>
info
=
mongoUtils
.
itemListPage
(
page
,
size
,
simpleType
.
toString
()
);
HashMap
<
String
,
Object
>
info
=
mongoUtils
.
itemListPage
(
page
,
size
,
simpleType
);
try
{
voList
=
(
List
<
StoneScoreItems
>)
info
.
get
(
"data"
);
}
catch
(
Exception
e
)
{
...
...
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/util/StoneMongoUtils.java
View file @
bf7591b9
...
...
@@ -46,7 +46,7 @@ public class StoneMongoUtils {
*
* @return
*/
public
HashMap
<
String
,
Object
>
itemListPage
(
int
page
,
int
size
,
String
simpleType
)
{
public
HashMap
<
String
,
Object
>
itemListPage
(
int
page
,
int
size
,
Integer
simpleType
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
HashMap
<
String
,
Object
>
info
=
CollectionUtil
.
mapStringObject
();
// 排序 分页
...
...
@@ -54,7 +54,7 @@ public class StoneMongoUtils {
//条件
Criteria
criteria
=
new
Criteria
().
orOperator
(
Criteria
.
where
(
"status"
).
is
(
1
),
Criteria
.
where
(
"status"
).
is
(
2
).
and
(
"startTime"
).
lte
(
now
).
and
(
"endTime"
).
gte
(
now
));
if
(
simpleType
!=
null
)
{
criteria
.
and
(
"simpleType"
).
is
(
simpleType
);
criteria
=
criteria
.
and
(
"simpleType"
).
is
(
simpleType
);
}
Query
query
=
Query
.
query
(
criteria
);
// 查询总数
...
...
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/util/StoneRedisUtils.java
View file @
bf7591b9
...
...
@@ -37,9 +37,9 @@ public class StoneRedisUtils {
}
}
public
List
<
StoneScoreItems
>
getListSimple
(
String
simpleType
)
{
public
List
<
StoneScoreItems
>
getListSimple
(
Integer
simpleType
)
{
try
{
String
redisKey
=
StoneConstant
.
ITEM_LIST_SIMPLE
.
concat
(
simpleType
);
String
redisKey
=
StoneConstant
.
ITEM_LIST_SIMPLE
.
concat
(
simpleType
.
toString
()
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
List
<
StoneScoreItems
>
list
=
(
List
<
StoneScoreItems
>)
mongoUtils
.
itemListPage
(
1
,
40
,
simpleType
).
get
(
"data"
);
...
...
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