记得上下班打卡 | 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
4c74b669
Commit
4c74b669
authored
Mar 22, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 资金模块时间搜索
parent
b41d7ef0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
7 deletions
+22
-7
IGoblinStoreMoneyService.java
...rvice/goblin/service/manage/IGoblinStoreMoneyService.java
+1
-1
GoblinStoreMoneyController.java
.../goblin/controller/manage/GoblinStoreMoneyController.java
+6
-2
GoblinStoreMoneyServiceImpl.java
...blin/service/impl/manage/GoblinStoreMoneyServiceImpl.java
+2
-2
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+13
-2
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinStoreMoneyService.java
View file @
4c74b669
...
@@ -13,7 +13,7 @@ import java.util.HashMap;
...
@@ -13,7 +13,7 @@ import java.util.HashMap;
public
interface
IGoblinStoreMoneyService
{
public
interface
IGoblinStoreMoneyService
{
ResponseDto
<
HashMap
<
String
,
String
>>
money
(
String
spuId
);
ResponseDto
<
HashMap
<
String
,
String
>>
money
(
String
spuId
,
String
st
,
String
et
);
ResponseDto
<
PageInfo
<
GoblinOrderLogVo
>>
getSpuList
(
String
spuName
,
String
st
,
String
et
,
int
page
);
ResponseDto
<
PageInfo
<
GoblinOrderLogVo
>>
getSpuList
(
String
spuName
,
String
st
,
String
et
,
int
page
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMoneyController.java
View file @
4c74b669
...
@@ -32,10 +32,14 @@ public class GoblinStoreMoneyController {
...
@@ -32,10 +32,14 @@ public class GoblinStoreMoneyController {
@ApiOperation
(
"商品资金总收入"
)
@ApiOperation
(
"商品资金总收入"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"st"
,
value
=
"开始时间"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"et"
,
value
=
"截至时间"
),
})
})
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
HashMap
<
String
,
String
>>
money
(
@RequestParam
(
value
=
"spuId"
,
required
=
false
)
String
spuId
)
{
public
ResponseDto
<
HashMap
<
String
,
String
>>
money
(
@RequestParam
(
value
=
"spuId"
,
required
=
false
)
String
spuId
,
return
goblinStoreMoneyService
.
money
(
spuId
);
@RequestParam
(
value
=
"st"
,
required
=
false
)
String
st
,
@RequestParam
(
value
=
"et"
,
required
=
false
)
String
et
)
{
return
goblinStoreMoneyService
.
money
(
spuId
,
st
,
et
);
}
}
@GetMapping
(
"spu/list"
)
@GetMapping
(
"spu/list"
)
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMoneyServiceImpl.java
View file @
4c74b669
...
@@ -25,13 +25,13 @@ public class GoblinStoreMoneyServiceImpl implements IGoblinStoreMoneyService {
...
@@ -25,13 +25,13 @@ public class GoblinStoreMoneyServiceImpl implements IGoblinStoreMoneyService {
GoblinMongoUtils
mongoUtils
;
GoblinMongoUtils
mongoUtils
;
@Override
@Override
public
ResponseDto
<
HashMap
<
String
,
String
>>
money
(
String
spuId
)
{
public
ResponseDto
<
HashMap
<
String
,
String
>>
money
(
String
spuId
,
String
st
,
String
et
)
{
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
GoblinStoreInfoVo
vo
=
redisUtils
.
getStoreInfoVoByUid
(
uid
);
GoblinStoreInfoVo
vo
=
redisUtils
.
getStoreInfoVoByUid
(
uid
);
if
(
vo
==
null
)
{
if
(
vo
==
null
)
{
return
ResponseDto
.
failure
(
"店铺不存在"
);
return
ResponseDto
.
failure
(
"店铺不存在"
);
}
}
String
data
=
mongoUtils
.
storeMoney
(
vo
.
getStoreId
(),
spuId
);
String
data
=
mongoUtils
.
storeMoney
(
vo
.
getStoreId
(),
spuId
,
st
,
et
);
String
[]
array
=
data
.
split
(
","
);
String
[]
array
=
data
.
split
(
","
);
HashMap
<
String
,
String
>
map
=
CollectionUtil
.
mapStringString
();
HashMap
<
String
,
String
>
map
=
CollectionUtil
.
mapStringString
();
map
.
put
(
"name"
,
array
[
0
]);
map
.
put
(
"name"
,
array
[
0
]);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
4c74b669
...
@@ -43,6 +43,8 @@ import java.util.List;
...
@@ -43,6 +43,8 @@ import java.util.List;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
@Component
@Component
public
class
GoblinMongoUtils
{
public
class
GoblinMongoUtils
{
@Autowired
@Autowired
...
@@ -807,9 +809,14 @@ public class GoblinMongoUtils {
...
@@ -807,9 +809,14 @@ public class GoblinMongoUtils {
}
}
//店铺总收入
//店铺总收入
public
String
storeMoney
(
String
storeId
,
String
spuId
)
{
public
String
storeMoney
(
String
storeId
,
String
spuId
,
String
st
,
String
et
)
{
String
spuName
=
"店铺总收入"
;
String
spuName
=
"店铺总收入"
;
Criteria
criteria
=
Criteria
.
where
(
"status"
).
in
(
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_11
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_22
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_28
.
getValue
()).
and
(
"storeId"
).
is
(
storeId
);
Criteria
criteria
=
Criteria
.
where
(
"status"
).
in
(
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_11
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_22
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_28
.
getValue
()).
and
(
"storeId"
).
is
(
storeId
);
if
(
st
!=
null
&&
et
!=
null
)
{
LocalDateTime
stDateTime
=
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
);
LocalDateTime
etDateTime
=
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
);
criteria
=
criteria
.
and
(
"createdAt"
).
gte
(
stDateTime
).
lt
(
etDateTime
);
}
Aggregation
aggregation
;
Aggregation
aggregation
;
if
(
spuId
!=
null
)
{
if
(
spuId
!=
null
)
{
criteria
=
criteria
.
and
(
"spuId"
).
is
(
spuId
);
criteria
=
criteria
.
and
(
"spuId"
).
is
(
spuId
);
...
@@ -858,7 +865,9 @@ public class GoblinMongoUtils {
...
@@ -858,7 +865,9 @@ public class GoblinMongoUtils {
List
<
GoblinGoodsInfoVo
>
spuIdAndName
=
null
;
List
<
GoblinGoodsInfoVo
>
spuIdAndName
=
null
;
Criteria
criteria
=
Criteria
.
where
(
"status"
).
in
(
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_11
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_22
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_28
.
getValue
()).
and
(
"storeId"
).
is
(
storeId
);
Criteria
criteria
=
Criteria
.
where
(
"status"
).
in
(
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_11
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_22
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_28
.
getValue
()).
and
(
"storeId"
).
is
(
storeId
);
if
(
st
!=
null
&&
et
!=
null
)
{
if
(
st
!=
null
&&
et
!=
null
)
{
criteria
=
criteria
.
and
(
"createdAt"
).
gte
(
st
).
lt
(
et
);
LocalDateTime
stDateTime
=
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
);
LocalDateTime
etDateTime
=
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
);
criteria
=
criteria
.
and
(
"createdAt"
).
gte
(
stDateTime
).
lt
(
etDateTime
);
}
}
//查询总数量
//查询总数量
Query
countQuery
=
Query
.
query
(
criteria
);
Query
countQuery
=
Query
.
query
(
criteria
);
...
@@ -921,6 +930,8 @@ public class GoblinMongoUtils {
...
@@ -921,6 +930,8 @@ public class GoblinMongoUtils {
int
skipCount
=
((
page
-
1
)
*
size
);
int
skipCount
=
((
page
-
1
)
*
size
);
Criteria
criteria
=
Criteria
.
where
(
"spuId"
).
is
(
spuId
);
Criteria
criteria
=
Criteria
.
where
(
"spuId"
).
is
(
spuId
);
if
(
st
!=
null
&&
et
!=
null
)
{
if
(
st
!=
null
&&
et
!=
null
)
{
LocalDateTime
stDateTime
=
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
);
LocalDateTime
etDateTime
=
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
);
criteria
=
criteria
.
and
(
"createdAt"
).
gte
(
st
).
lt
(
et
);
criteria
=
criteria
.
and
(
"createdAt"
).
gte
(
st
).
lt
(
et
);
}
}
if
(
orderCode
!=
null
)
{
if
(
orderCode
!=
null
)
{
...
...
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