记得上下班打卡 | 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
ab382d9f
Commit
ab382d9f
authored
Jan 07, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/pre' into pre
parents
0a7a2955
e51facc0
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2872 additions
and
65 deletions
+2872
-65
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+0
-1
DataUtils.java
...iquidnet/client/admin/zhengzai/kylin/utils/DataUtils.java
+0
-1
KylinPerformancesController.java
...service/kylin/controller/KylinPerformancesController.java
+0
-3
CityJsonUtils.java
...java/com/liquidnet/service/kylin/utils/CityJsonUtils.java
+64
-0
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+21
-23
city_2021.json
...dnet-service-kylin-impl/src/main/resources/city_2021.json
+2732
-0
DataImpl.java
...quidnet/service/platform/service/impl/kylin/DataImpl.java
+8
-8
DataUtils.java
.../java/com/liquidnet/service/platform/utils/DataUtils.java
+0
-1
db_mongo_slime.sql
...lime/liquidnet-service-slime-impl/docu/db_mongo_slime.sql
+16
-3
MongoSlimeUtils.java
...ava/com/liquidnet/service/slime/util/MongoSlimeUtils.java
+31
-24
RedisSlimeUtils.java
...ava/com/liquidnet/service/slime/util/RedisSlimeUtils.java
+0
-1
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
ab382d9f
...
...
@@ -4,7 +4,6 @@ public class KylinRedisConst {
public
static
final
String
FIELDS
=
"kylin:fields:id"
;
public
static
final
String
PERFORMANCES
=
"kylin:performances:id:"
;
public
static
final
String
PERFORMANCES_TRUE_NAME
=
"kylin:performances_true_name:id:"
;
public
static
final
String
PERFORMANCES_LIST_CITYNAME
=
"kylin:performances:cityName:"
;
public
static
final
String
PERFORMANCES_LIST_CITY
=
"kylin:performances:city:"
;
public
static
final
String
PERFORMANCES_LIST_SYSTEM_RECOMMEND
=
"kylin:performances:systemRecommend"
;
public
static
final
String
PERFORMANCES_LIST_NOTICE
=
"kylin:performances:notice"
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/utils/DataUtils.java
View file @
ab382d9f
...
...
@@ -221,7 +221,6 @@ public class DataUtils {
//删除redis
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES
+
performanceIds
);
// 大龙相关 演出列表
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_LIST_CITYNAME
+
vo
.
getCityName
());
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_LIST_CITY
.
concat
(
String
.
valueOf
(
vo
.
getCityId
())));
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_ROADLIST
+
vo
.
getRoadShowId
());
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_LIST_SYSTEM_RECOMMEND
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinPerformancesController.java
View file @
ab382d9f
package
com
.
liquidnet
.
service
.
kylin
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.base.ResponseDto
;
...
...
@@ -15,11 +14,9 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.juli.logging.Log
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/CityJsonUtils.java
0 → 100644
View file @
ab382d9f
package
com
.
liquidnet
.
service
.
kylin
.
utils
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.io.Reader
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* <p>
* 读取城市
* </p>
*
* @author jiangxiulong
* @since 2022-01-06
*/
public
class
CityJsonUtils
{
private
static
final
Map
<
String
,
Integer
>
cityMap
;
static
{
cityMap
=
reload
();
}
public
static
Map
<
String
,
Integer
>
reload
()
{
Map
<
String
,
Integer
>
cityMap
=
new
HashMap
<>();
String
jsonStr
=
""
;
Reader
reader
=
null
;
try
{
reader
=
new
InputStreamReader
(
CityJsonUtils
.
class
.
getClassLoader
().
getResourceAsStream
(
"city_2021.json"
));
int
ch
=
0
;
StringBuffer
sb
=
new
StringBuffer
();
while
((
ch
=
reader
.
read
())
!=
-
1
)
{
sb
.
append
((
char
)
ch
);
}
jsonStr
=
sb
.
toString
();
}
catch
(
IOException
e
)
{
}
finally
{
if
(
null
!=
reader
)
{
try
{
reader
.
close
();
}
catch
(
IOException
e
)
{
}
}
}
JsonNode
jsonNode
=
JsonUtils
.
fromJson
(
jsonStr
,
JsonNode
.
class
);
String
name
=
"name"
,
adcode
=
"adcode"
;
for
(
JsonNode
node
:
jsonNode
)
{
cityMap
.
put
(
node
.
get
(
name
).
asText
(),
node
.
get
(
adcode
).
asInt
());
}
return
cityMap
;
}
public
static
Integer
get
(
String
cityName
)
{
return
cityMap
.
get
(
cityName
);
}
public
static
void
main
(
String
[]
args
)
{
Integer
integer
=
CityJsonUtils
.
get
(
"新竹市"
);
System
.
out
.
println
(
integer
);
}
}
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
ab382d9f
...
...
@@ -295,24 +295,20 @@ public class DataUtils {
* @param cityName
*/
public
List
<
KylinPerformanceVo
>
getPerformancesListOfcityNameOradCode
(
String
cityName
,
Integer
adCode
)
{
String
redisKey
=
""
;
if
(
cityName
.
isEmpty
(
))
{
redisKey
=
KylinRedisConst
.
PERFORMANCES_LIST_CITY
.
concat
(
String
.
valueOf
(
adCode
)
);
}
else
{
redisKey
=
KylinRedisConst
.
PERFORMANCES_LIST_CITYNAME
.
conca
t
(
cityName
);
if
(!
cityName
.
isEmpty
())
{
if
(!
cityName
.
endsWith
(
"州"
)
&&
!
cityName
.
endsWith
(
"县"
)
&&
!
cityName
.
endsWith
(
"区"
)
&&
!
cityName
.
endsWith
(
"市"
))
{
cityName
=
cityName
.
concat
(
"市"
);
}
adCode
=
CityJsonUtils
.
ge
t
(
cityName
);
}
String
redisKey
=
KylinRedisConst
.
PERFORMANCES_LIST_CITY
.
concat
(
String
.
valueOf
(
adCode
));
Object
object
=
redisUtil
.
get
(
redisKey
);
if
(
object
==
null
)
{
// 固定查询条件
Query
query
=
getCommonWhere
();
// 其他条件
if
(
cityName
.
isEmpty
())
{
query
.
addCriteria
(
Criteria
.
where
(
"cityId"
).
is
(
adCode
));
}
else
{
Pattern
cityNameCompile
=
Pattern
.
compile
(
"^.*"
+
cityName
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
query
.
addCriteria
(
Criteria
.
where
(
"cityName"
).
regex
(
cityNameCompile
));
}
query
.
addCriteria
(
Criteria
.
where
(
"cityId"
).
is
(
adCode
));
// 排序
Sort
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
);
query
.
with
(
sortName
);
...
...
@@ -740,6 +736,7 @@ public class DataUtils {
return
orderRefundPoundageArrayList
;
}
}
// 获取手续费ALL说明
public
OrderRefundPoundageAll
getRefundPoundageAll
(
Integer
isRefundPoundage
)
{
ArrayList
<
OrderRefundPoundage
>
refundPoundage
=
getRefundPoundage
(
isRefundPoundage
);
...
...
@@ -776,12 +773,12 @@ public class DataUtils {
// if (getTicketType.equals("express")) { // 快递票
// return null;
// } else { // 电子票
Object
obj
=
redisUtil
.
get
(
KylinRedisConst
.
ORDER_REFUND_ADDRESS
);
if
(
obj
==
null
)
{
return
null
;
}
else
{
return
(
OrderRefundAddress
)
obj
;
}
Object
obj
=
redisUtil
.
get
(
KylinRedisConst
.
ORDER_REFUND_ADDRESS
);
if
(
obj
==
null
)
{
return
null
;
}
else
{
return
(
OrderRefundAddress
)
obj
;
}
// }
}
...
...
@@ -816,12 +813,12 @@ public class DataUtils {
// List<KylinIpAreaVo> data = mongoTemplate.find(Query.query(Criteria.where("ipBeginLong").lte(IPUtil.ipToLong(ipAddress))
// .and("ipEndLong").gte(IPUtil.ipToLong(ipAddress))), KylinIpAreaVo.class, KylinIpAreaVo.class.getSimpleName());
// if(data==null || data.size()==0){
KylinIpAreaVo
data0
=
KylinIpAreaVo
.
getNew
();
data0
.
setArea
(
"未知"
);
data0
.
setCity
(
"未知"
);
data0
.
setCounty
(
"未知"
);
data0
.
setProvince
(
"未知"
);
return
data0
;
KylinIpAreaVo
data0
=
KylinIpAreaVo
.
getNew
();
data0
.
setArea
(
"未知"
);
data0
.
setCity
(
"未知"
);
data0
.
setCounty
(
"未知"
);
data0
.
setProvince
(
"未知"
);
return
data0
;
// }else{
// return data.get(0);
// }
...
...
@@ -829,6 +826,7 @@ public class DataUtils {
/**
* 获取已经退了的快递费
*
* @return
*/
public
BigDecimal
getCanRefundPriceExpress
(
List
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoBaseList
)
{
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/resources/city_2021.json
0 → 100644
View file @
ab382d9f
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/kylin/DataImpl.java
View file @
ab382d9f
...
...
@@ -68,14 +68,14 @@ public class DataImpl {
DMTAuthorizationRecordsService
dmtAuthorizationRecordsService
;
private
static
final
String
SQL_URL
=
"jdbc:mysql://39.107.71.112:3308/test_ln_scene"
;
private
static
final
String
SQL_USER
=
"testmall"
;
private
static
final
String
SQL_PWD
=
"zhengzai!mYT"
;
private
static
final
String
PHP_DB
=
"testmall"
;
//
private static final String SQL_URL = "jdbc:mysql://zhengzairead.rwlb.rds.aliyuncs.com:3306/prod_ln_scene";
//
private static final String SQL_USER = "readonly";
//
private static final String SQL_PWD = "ZWDsf8Fy";
//
private static final String PHP_DB = "mall";
//
private static final String SQL_URL = "jdbc:mysql://39.107.71.112:3308/test_ln_scene";
//
private static final String SQL_USER = "testmall";
//
private static final String SQL_PWD = "zhengzai!mYT";
//
private static final String PHP_DB = "testmall";
private
static
final
String
SQL_URL
=
"jdbc:mysql://zhengzairead.rwlb.rds.aliyuncs.com:3306/prod_ln_scene"
;
private
static
final
String
SQL_USER
=
"readonly"
;
private
static
final
String
SQL_PWD
=
"ZWDsf8Fy"
;
private
static
final
String
PHP_DB
=
"mall"
;
//迁移场地和场地认领关系
public
void
fieldData
()
{
try
{
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/DataUtils.java
View file @
ab382d9f
...
...
@@ -252,7 +252,6 @@ public class DataUtils {
//删除redis
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES
+
performanceIds
);
// 大龙相关 演出列表
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_LIST_CITYNAME
+
vo
.
getCityName
());
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_LIST_CITY
.
concat
(
String
.
valueOf
(
vo
.
getCityId
())));
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_ROADLIST
+
vo
.
getRoadShowId
());
redisDataSourceUtil
.
getRedisKylinUtil
().
del
(
KylinRedisConst
.
PERFORMANCES_LIST_SYSTEM_RECOMMEND
);
...
...
liquidnet-bus-service/liquidnet-service-slime/liquidnet-service-slime-impl/docu/db_mongo_slime.sql
View file @
ab382d9f
...
...
@@ -21,7 +21,6 @@ db.SlimeFieldAppliesVo.createIndex({uid:"hashed"});
db
.
SlimeFieldCheckersVo
.
createIndex
(
{
fieldCheckerId
:
"hashed"
}
);
db
.
SlimeFieldCheckersVo
.
createIndex
(
{
fieldId
:
"hashed"
}
);
db
.
SlimeFieldCheckersVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
SlimeSponsorsVo
.
createIndex
(
{
sponsorId
:
"hashed"
}
);
db
.
SlimeSponsorsVo
.
createIndex
(
{
isOnline
:
"hashed"
}
);
db
.
SlimeSponsorsVo
.
createIndex
(
{
uid
:
"hashed"
}
);
...
...
@@ -29,13 +28,27 @@ db.SlimeSponsorsVo.createIndex({companyId:"hashed"});
db
.
SlimeSponsorAppliesVo
.
createIndex
(
{
sponsorApplyId
:
"hashed"
}
);
db
.
SlimeSponsorAppliesVo
.
createIndex
(
{
sponsorId
:
"hashed"
}
);
db
.
SlimeSponsorAppliesVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
SlimeAuthorizationRecordsVo
.
createIndex
(
{
authorizationRecordId
:
"hashed"
}
);
db
.
SlimeAuthorizationRecordsVo
.
createIndex
(
{
performanceId
:
"hashed"
}
);
db
.
SlimeAuthorizationRecordsVo
.
createIndex
(
{
uidRole
:
"hashed"
}
);
db
.
SlimeAuthorizationRecordsVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
SlimeAuthorizationRecordsVo
.
createIndex
(
{
cuidRole
:
"hashed"
}
);
db
.
SlimeAuthorizationRecordsVo
.
createIndex
(
{
cuid
:
"hashed"
}
);
db
.
SlimeAuthorizationPerformanceVo
.
createIndex
(
{
performanceId
:
"hashed"
}
);
db
.
SlimeAuthorizationPerformanceVo
.
createIndex
(
{
uid
:
"hashed"
}
);
db
.
KylinPerformanceVo
.
createIndex
(
{
merchantId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
status
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
transferStatus
:
"hashed"
}
);
#
创建分片
sh
.
enableSharding
(
"prod_ln_scene"
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeFieldsVo"
,
{
"fieldId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeFieldAppliesVo"
,
{
"fieldApplyId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeFieldCheckersVo"
,
{
"fieldCheckId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeSponsorsVo"
,
{
"sponsorId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeSponsorAppliesVo"
,
{
"sponsorApplyId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeAuthorizationRecordsVo"
,
{
"authorizationRecordId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.SlimeAuthorizationPerformanceVo"
,
{
"performanceId"
:
"hashed"
}
);
liquidnet-bus-service/liquidnet-service-slime/liquidnet-service-slime-impl/src/main/java/com/liquidnet/service/slime/util/MongoSlimeUtils.java
View file @
ab382d9f
...
...
@@ -19,6 +19,7 @@ import com.liquidnet.service.slime.service.SlimeRdmService;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.client.model.FindOneAndUpdateOptions
;
import
com.mongodb.client.model.ReturnDocument
;
import
lombok.extern.slf4j.Slf4j
;
import
org.bson.Document
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Sort
;
...
...
@@ -37,6 +38,7 @@ import java.util.List;
import
java.util.stream.Collectors
;
@Component
@Slf4j
public
class
MongoSlimeUtils
{
@Autowired
private
MongoTemplate
mongoTemplate
;
...
...
@@ -47,6 +49,14 @@ public class MongoSlimeUtils {
@Autowired
private
SlimeRdmService
slimeRdmService
;
private
List
<
String
>
initPerList
=
new
ArrayList
<
String
>()
{{
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
READ
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
LINE
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
SALES
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
CHECK
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
GRANT
.
getId
());
}};
public
PerformancePartnerVo
getPerformancePartnerVo
(
String
performanceId
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performanceId
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
());
...
...
@@ -256,14 +266,14 @@ public class MongoSlimeUtils {
return
docTicket
;
}
public
HashMap
<
String
,
Object
>
getPerformanceList
(
PerformancePartnerListParam
performancePartnerListParam
)
{
public
HashMap
<
String
,
Object
>
getPerformanceList
(
PerformancePartnerListParam
performancePartnerListParam
)
{
performancePartnerListParam
.
setOrderType
(
performancePartnerListParam
.
getOrderType
());
//分页排序
Sort
.
Direction
orderBy
=
Sort
.
Direction
.
DESC
;
if
(
performancePartnerListParam
.
getOrderSc
().
equals
(
"asc"
))
{
orderBy
=
Sort
.
Direction
.
ASC
;
}
long
currentTime
=
System
.
currentTimeMillis
();
List
<
String
>
performanceIdList
=
null
;
List
<
SlimeAuthorizationPerformanceVo
>
permissionVoList
=
ObjectUtil
.
getPermissionVoList
();
if
(!
redisSlimeUtils
.
superAccount
(
performancePartnerListParam
.
getMerchantId
()))
{
...
...
@@ -280,6 +290,8 @@ public class MongoSlimeUtils {
SlimeAuthorizationPerformanceVo
.
class
,
SlimeAuthorizationPerformanceVo
.
class
.
getSimpleName
());
performanceIdList
=
permissionVoList
.
stream
().
map
(
SlimeAuthorizationPerformanceVo:
:
getPerformanceId
).
collect
(
Collectors
.
toList
());
}
log
.
debug
(
"TIME 1= "
+
(
System
.
currentTimeMillis
()
-
currentTime
));
currentTime
=
System
.
currentTimeMillis
();
//查询演出
Criteria
criteriaPerformanceId
=
performanceIdList
==
null
?
Criteria
.
where
(
"performancesId"
).
ne
(
null
)
:
Criteria
.
where
(
"performancesId"
).
in
(
performanceIdList
);
Criteria
criteria
=
Criteria
.
where
(
"performancesId"
).
ne
(
null
);
...
...
@@ -304,12 +316,16 @@ public class MongoSlimeUtils {
.
skip
(((
performancePartnerListParam
.
getPage
()
-
1
)
*
performancePartnerListParam
.
getSize
()))
.
limit
(
performancePartnerListParam
.
getSize
()),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
log
.
debug
(
"TIME 2= "
+
(
System
.
currentTimeMillis
()
-
currentTime
));
currentTime
=
System
.
currentTimeMillis
();
long
total
=
mongoTemplate
.
count
(
Query
.
query
(
new
Criteria
().
andOperator
(
criteria
).
orOperator
(
criteriaPerformanceId
,
Criteria
.
where
(
"merchantId"
).
is
(
performancePartnerListParam
.
getMerchantId
())))
.
with
(
Sort
.
by
(
orderBy
,
performancePartnerListParam
.
getOrderItem
())),
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
log
.
debug
(
"TIME 3= "
+
(
System
.
currentTimeMillis
()
-
currentTime
));
currentTime
=
System
.
currentTimeMillis
();
//查询销量
performanceIdList
=
performanceVos
.
stream
().
map
(
KylinPerformanceVo:
:
getPerformancesId
).
collect
(
Collectors
.
toList
());
Aggregation
aggregation
=
Aggregation
.
newAggregation
(
Aggregation
.
match
(
Criteria
.
where
(
"status"
).
in
(
0
,
1
,
3
,
6
).
and
(
"couponType"
).
is
(
"no"
).
and
(
"transferStatus"
).
in
(
0
,
1
,
2
,
5
).
and
(
"performanceId"
).
in
(
performanceIdList
)),
Aggregation
.
group
(
"performanceId"
)
...
...
@@ -321,8 +337,12 @@ public class MongoSlimeUtils {
);
AggregationResults
<
PerformancePartnerListDao
>
outputType
=
mongoTemplate
.
aggregate
(
aggregation
,
KylinOrderTicketVo
.
class
.
getSimpleName
(),
PerformancePartnerListDao
.
class
);
log
.
debug
(
"TIME 4= "
+
(
System
.
currentTimeMillis
()
-
currentTime
));
currentTime
=
System
.
currentTimeMillis
();
List
<
PerformancePartnerListDao
>
dataList
=
new
ArrayList
(
outputType
.
getMappedResults
());
List
<
PerformancePartnerListDao
>
list
=
ObjectUtil
.
getPerformancePartnerListDaoArrayList
();
boolean
isSuperAccount
=
redisSlimeUtils
.
superAccount
(
performancePartnerListParam
.
getMerchantId
());
for
(
KylinPerformanceVo
item
:
performanceVos
)
{
boolean
findData
=
false
;
PerformancePartnerListDao
dao
=
PerformancePartnerListDao
.
getNew
();
...
...
@@ -359,27 +379,13 @@ public class MongoSlimeUtils {
dao
.
setTimeSell
(
timeSell
);
dao
.
setTimeStop
(
timeStop
);
if
(
item
.
getMerchantId
().
equals
(
performancePartnerListParam
.
getMerchantId
())
||
redisSlimeUtils
.
superAccount
(
performancePartnerListParam
.
getMerchantId
()))
{
dao
.
setPermissionId
(
new
ArrayList
<
String
>()
{{
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
READ
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
LINE
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
SALES
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
CHECK
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
GRANT
.
getId
());
}});
if
(
item
.
getMerchantId
().
equals
(
performancePartnerListParam
.
getMerchantId
())
||
isSuperAccount
)
{
dao
.
setPermissionId
(
initPerList
);
}
for
(
SlimeAuthorizationPerformanceVo
permission
:
permissionVoList
)
{
if
(
item
.
getMerchantId
().
equals
(
performancePartnerListParam
.
getMerchantId
())
||
redisSlimeUtils
.
superAccount
(
performancePartnerListParam
.
getMerchantId
()))
{
dao
.
setPermissionId
(
new
ArrayList
<
String
>()
{{
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
READ
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
EDIT
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
LINE
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
SALES
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
CHECK
.
getId
());
add
(
SlimeAuthorizationConst
.
PerformancePermission
.
GRANT
.
getId
());
}});
if
(
item
.
getMerchantId
().
equals
(
performancePartnerListParam
.
getMerchantId
())
||
isSuperAccount
)
{
dao
.
setPermissionId
(
initPerList
);
break
;
}
if
(
permission
.
getPerformanceId
().
equals
(
item
.
getPerformancesId
()))
{
...
...
@@ -410,9 +416,10 @@ public class MongoSlimeUtils {
}
list
.
add
(
dao
);
}
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"data"
,
list
);
map
.
put
(
"total"
,
total
);
log
.
debug
(
"TIME 5= "
+
(
System
.
currentTimeMillis
()
-
currentTime
));
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"data"
,
list
);
map
.
put
(
"total"
,
total
);
return
map
;
}
...
...
liquidnet-bus-service/liquidnet-service-slime/liquidnet-service-slime-impl/src/main/java/com/liquidnet/service/slime/util/RedisSlimeUtils.java
View file @
ab382d9f
...
...
@@ -235,7 +235,6 @@ public class RedisSlimeUtils {
//删除redis
redisUtil
.
del
(
KylinRedisConst
.
PERFORMANCES
+
performanceIds
);
// 大龙相关 演出列表
redisUtil
.
del
(
KylinRedisConst
.
PERFORMANCES_LIST_CITYNAME
+
vo
.
getCityName
());
redisUtil
.
del
(
KylinRedisConst
.
PERFORMANCES_LIST_CITY
.
concat
(
String
.
valueOf
(
vo
.
getCityId
())));
redisUtil
.
del
(
KylinRedisConst
.
PERFORMANCES_ROADLIST
+
vo
.
getRoadShowId
());
redisUtil
.
del
(
KylinRedisConst
.
PERFORMANCES_LIST_SYSTEM_RECOMMEND
);
...
...
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