记得上下班打卡 | 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
d0dc3b80
Commit
d0dc3b80
authored
May 26, 2022
by
wanglele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改生成兑换码 概率为空
parent
6d60dba7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
GoblinNftExSkuServiceImpl.java
...atform/service/impl/goblin/GoblinNftExSkuServiceImpl.java
+20
-21
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/goblin/GoblinNftExSkuServiceImpl.java
View file @
d0dc3b80
...
@@ -133,14 +133,13 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
...
@@ -133,14 +133,13 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
continue
;
continue
;
}
}
// 不能购买的 没库存的 概率是0的 过滤
// 不能购买的 没库存的 概率是0的 过滤
if
(
getSkuAllStatusShow
(
goblinGoodsSku
)
&&
goblinRedisUtils
.
getSkuAllStatusStock
(
goblinGoodsSku
)
>
0
)
{
if
(
getSkuAllStatusShow
(
goblinGoodsSku
)
&&
goblinRedisUtils
.
getSkuAllStatusStock
(
goblinGoodsSku
)
>
0
)
{
log
.
debug
(
"skuId:"
+
goblinGoodsSku
.
getSkuId
()+
"----hitRatio:"
+
goblinGoodsSku
.
getHitRatio
());
log
.
debug
(
"skuId:"
+
goblinGoodsSku
.
getSkuId
()+
"----hitRatio:"
+
goblinGoodsSku
.
getHitRatio
());
if
(
goblinGoodsSku
.
getHitRatio
()
==
null
)
{
if
(
goblinGoodsSku
.
getHitRatio
()
==
null
)
{
isHit
=
true
;
isHit
=
true
;
}
else
{
}
else
{
hitRatioCount
.
add
(
goblinGoodsSku
.
getHitRatio
());
hitRatioCount
=
hitRatioCount
.
add
(
goblinGoodsSku
.
getHitRatio
());
}
}
countStockNumber
+=
goblinRedisUtils
.
getSkuStock
(
goblinGoodsSku
.
getSkuId
());
countStockNumber
+=
goblinRedisUtils
.
getSkuStock
(
goblinGoodsSku
.
getSkuId
());
map
.
put
(
goblinGoodsSku
.
getSkuId
(),
goblinGoodsSku
.
getHitRatio
());
map
.
put
(
goblinGoodsSku
.
getSkuId
(),
goblinGoodsSku
.
getHitRatio
());
...
@@ -307,50 +306,50 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
...
@@ -307,50 +306,50 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
Map
<
String
,
Map
<
String
,
Object
>>
mapMap
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
mapMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
objectMap
.
put
(
"hitRatio"
,
3
0
);
objectMap
.
put
(
"hitRatio"
,
3
.33
);
objectMap
.
put
(
"stock"
,
9
00
);
objectMap
.
put
(
"stock"
,
1
00
);
mapMap
.
put
(
"1"
,
objectMap
);
mapMap
.
put
(
"1"
,
objectMap
);
Map
<
String
,
Object
>
objectMap1
=
new
HashMap
<>();
Map
<
String
,
Object
>
objectMap1
=
new
HashMap
<>();
objectMap1
.
put
(
"hitRatio"
,
0.3
);
objectMap1
.
put
(
"hitRatio"
,
57.7
);
objectMap1
.
put
(
"stock"
,
9
);
objectMap1
.
put
(
"stock"
,
20
);
mapMap
.
put
(
"2"
,
objectMap1
);
mapMap
.
put
(
"2"
,
objectMap1
);
Map
<
String
,
Object
>
objectMap2
=
new
HashMap
<>();
Map
<
String
,
Object
>
objectMap2
=
new
HashMap
<>();
objectMap2
.
put
(
"hitRatio"
,
23.3
);
objectMap2
.
put
(
"hitRatio"
,
9
);
objectMap2
.
put
(
"stock"
,
697
);
objectMap2
.
put
(
"stock"
,
30
);
mapMap
.
put
(
"3"
,
objectMap2
);
mapMap
.
put
(
"3"
,
objectMap2
);
Map
<
String
,
Object
>
objectMap3
=
new
HashMap
<>();
Map
<
String
,
Object
>
objectMap3
=
new
HashMap
<>();
objectMap3
.
put
(
"hitRatio"
,
2.2
);
objectMap3
.
put
(
"hitRatio"
,
1
);
objectMap3
.
put
(
"stock"
,
66
);
objectMap3
.
put
(
"stock"
,
50
);
mapMap
.
put
(
"4"
,
objectMap3
);
mapMap
.
put
(
"4"
,
objectMap3
);
Map
<
String
,
Object
>
objectMap4
=
new
HashMap
<>();
/*
Map<String, Object> objectMap4 = new HashMap<>();
objectMap4.put("hitRatio", 26.7);
objectMap4.put("hitRatio", 26.7);
objectMap4
.
put
(
"stock"
,
797
);
objectMap4.put("stock",
165
);
mapMap.put("5", objectMap4);
mapMap.put("5", objectMap4);
Map<String, Object> objectMap5 = new HashMap<>();
Map<String, Object> objectMap5 = new HashMap<>();
objectMap5.put("hitRatio", 2.2);
objectMap5.put("hitRatio", 2.2);
objectMap5
.
put
(
"stock"
,
66
);
objectMap5.put("stock",
12
);
mapMap.put("6", objectMap5);
mapMap.put("6", objectMap5);
Map<String, Object> objectMap6 = new HashMap<>();
Map<String, Object> objectMap6 = new HashMap<>();
objectMap6
.
put
(
"hitRatio"
,
15.
3
);
objectMap6.put("hitRatio", 15.
6
);
objectMap6
.
put
(
"stock"
,
458
);
objectMap6.put("stock",
90
);
mapMap
.
put
(
"7"
,
objectMap6
);
mapMap.put("7", objectMap6);
*/
Map
<
String
,
Integer
>
stockMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
stockMap
=
new
HashMap
<>();
ArrayList
<
String
>
eliminateSkuIdList
=
CollectionUtil
.
arrayListString
();
ArrayList
<
String
>
eliminateSkuIdList
=
CollectionUtil
.
arrayListString
();
// getStock(594, new BigDecimal(100), mapMap, stockMap, 2993
, eliminateSkuIdList);
getStock
(
155
,
new
BigDecimal
(
71.03
),
mapMap
,
stockMap
,
179
,
eliminateSkuIdList
);
for
(
String
key
:
stockMap
.
keySet
())
{
for
(
String
key
:
stockMap
.
keySet
())
{
//
System.out.println("skuId:" + key + "***********数量:" + stockMap.get(key));
System
.
out
.
println
(
"skuId:"
+
key
+
"***********数量:"
+
stockMap
.
get
(
key
));
}
}
//
System.out.println("kkk");
System
.
out
.
println
(
"kkk"
);
Map
<
String
,
BigDecimal
>
hmap
=
new
HashMap
<>();
/*
Map<String, BigDecimal> hmap = new HashMap<>();
hmap.put("1", new BigDecimal(40));
hmap.put("1", new BigDecimal(40));
hmap.put("2", new BigDecimal(49));
hmap.put("2", new BigDecimal(49));
hmap.put("3", null);
hmap.put("3", null);
...
@@ -359,7 +358,7 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
...
@@ -359,7 +358,7 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
arrangeHitRatioMap(hmap, new BigDecimal(89));
arrangeHitRatioMap(hmap, new BigDecimal(89));
for (String key : hmap.keySet()) {
for (String key : hmap.keySet()) {
}
}
*/
}
}
...
...
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