记得上下班打卡 | 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
64c15b66
Commit
64c15b66
authored
May 17, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改
parent
0eee0259
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
101 deletions
+109
-101
PerformanceStep1Param.java
...uidnet/service/kylin/dto/param/PerformanceStep1Param.java
+1
-0
KylinPerformancesAdminServiceImpl.java
...service/impl/admin/KylinPerformancesAdminServiceImpl.java
+16
-15
KylinPerformancesPartnerServiceImpl.java
...ice/impl/partner/KylinPerformancesPartnerServiceImpl.java
+18
-10
PerformanceVoTask.java
.../liquidnet/service/kylin/timerTask/PerformanceVoTask.java
+74
-76
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/PerformanceStep1Param.java
View file @
64c15b66
...
...
@@ -18,6 +18,7 @@ public class PerformanceStep1Param implements Serializable {
private
String
imgPoster
;
@ApiModelProperty
(
value
=
"第三方id"
,
example
=
"0"
)
@NotNull
(
message
=
"不能为空"
)
private
String
merchantId
;
@ApiModelProperty
(
value
=
"演出名称"
,
example
=
"测试演出"
)
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/admin/KylinPerformancesAdminServiceImpl.java
View file @
64c15b66
...
...
@@ -96,10 +96,11 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
@Override
public
PerformanceMisVo
performanceDetails
(
String
performancesId
)
{
log
.
info
(
" PERFORMANCE mis演出详情"
);
PerformanceMisVo
createMisVo
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformanceMisVo
.
class
,
PerformanceMisVo
.
class
.
getSimpleName
());
// PerformanceMisVo createMisVo = mongoTemplate.findOne(
// Query.query(Criteria.where("performancesId").is(performancesId)),
// PerformanceMisVo.class,
// PerformanceMisVo.class.getSimpleName());
PerformanceMisVo
createMisVo
=
performanceVoTask
.
getPerformanceMisVo
(
performancesId
);
return
createMisVo
;
}
...
...
@@ -118,12 +119,12 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
map
.
put
(
"status"
,
status
);
map
.
put
(
"auditStatus"
,
auditStatus
);
map
.
put
(
"updatedAt"
,
updatedAt
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
BasicDBObject
objectPerformanceVo
=
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
map
));
Document
doc
=
mongoTemplate
.
getCollection
(
PerformanceMisVo
.
class
.
getSimpleName
()).
findOneAndUpdate
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)).
getQueryObject
(),
objectPerformanceVo
,
new
FindOneAndUpdateOptions
().
returnDocument
(
ReturnDocument
.
AFTER
)
);
//
BasicDBObject objectPerformanceVo = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
//
Document doc = mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).findOneAndUpdate(
//
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
//
objectPerformanceVo,
//
new FindOneAndUpdateOptions().returnDocument(ReturnDocument.AFTER)
//
);
KylinPerformanceStatus
sqlStatus
=
performanceStatusMapper
.
selectOne
(
new
UpdateWrapper
<
KylinPerformanceStatus
>().
eq
(
"performance_id"
,
performancesId
));
if
(
sqlStatus
.
getStatus
()
==
1
)
{
...
...
@@ -161,7 +162,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
HashMap
<
String
,
Object
>
mapSql
=
new
HashMap
<>();
mapSql
.
put
(
"status"
,
9
);
mapSql
.
put
(
"updatedAt"
,
updatedAt
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
performanceVoTask
.
updatePerformanceMySql
(
performancesId
,
mapSql
,
JsonUtils
.
fromJson
(
doc
.
toJson
(),
PerformanceMisVo
.
class
),
updatedAt
);
performanceVoTask
.
updatePerformanceMySql
(
performancesId
,
mapSql
,
performanceVoTask
.
getPerformanceMisVo
(
performancesId
),
updatedAt
);
if
(
sqlStatus
.
getStatus
()
==
6
)
{
//若 演出上 则 线判断状态
performanceVoTask
.
performanceVoStatus
(
performancesId
);
}
...
...
@@ -179,10 +180,10 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)).
getQueryObject
(),
object
);
mongoTemplate
.
getCollection
(
PerformanceMisVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)).
getQueryObject
(),
object
);
//
mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne(
//
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
//
object
//
);
}
else
{
return
false
;
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/partner/KylinPerformancesPartnerServiceImpl.java
View file @
64c15b66
...
...
@@ -33,6 +33,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
...
...
@@ -64,6 +65,9 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
@Autowired
private
RedisUtil
redisUtil
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
PerformanceVoTask
performanceVoTask
;
...
...
@@ -136,12 +140,16 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performanceParam
.
setStatusSell
(
1
);
performanceParam
.
setRoadShowId
(
"0"
);
performanceParam
.
setProjectId
(
"0"
);
performanceParam
.
setFieldName
((
String
)
redisUtil
.
hget
(
KylinRedisConst
.
FIELDS
+
":"
+
performanceParam
.
getFieldId
(),
"name"
));
mongoTemplate
.
insert
(
performanceParam
,
PerformanceParam
.
class
.
getSimpleName
()
);
return
performanceId
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
""
;
}
}
...
...
@@ -289,7 +297,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
if
(
ticketTimesPartnerVoList
.
size
()
<=
0
)
{
return
false
;
}
else
{
PerformanceMisVo
performanceMisVo
=
performanceVoTask
.
createPerformanceCreateParam
(
performanceId
);
PerformanceMisVo
performanceMisVo
=
performanceVoTask
.
getPerformanceMisVo
(
performanceId
);
HashMap
<
String
,
Object
>
mapSql
=
new
HashMap
<>();
mapSql
.
put
(
"isCreateSave"
,
0
);
...
...
@@ -356,7 +364,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
if
(
ticketTimesPartnerVoList
.
size
()
<=
0
)
{
return
false
;
}
else
{
PerformanceMisVo
performanceMisVo
=
performanceVoTask
.
setPerformanceUpdateParam
(
performanceId
);
PerformanceMisVo
performanceMisVo
=
performanceVoTask
.
getPerformanceMisVo
(
performanceId
);
HashMap
<
String
,
Object
>
mapSql
=
new
HashMap
<>();
mapSql
.
put
(
"rejectTxt"
,
""
);
...
...
@@ -633,14 +641,14 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performanceVoData
,
PerformanceVo
.
class
.
getSimpleName
()
);
}
//修改 提审vo
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"status"
,
3
);
BasicDBObject
objectPerformance
=
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
map
));
mongoTemplate
.
getCollection
(
PerformanceMisVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)).
getQueryObject
(),
objectPerformance
);
//
//修改 提审vo
//
Map<String, Object> map = new HashMap<>();
//
map.put("status", 3);
//
BasicDBObject objectPerformance = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
//
mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne(
//
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
//
objectPerformance
//
);
//判断状态
performanceVoTask
.
performanceVoStatus
(
performancesId
);
return
true
;
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/timerTask/PerformanceVoTask.java
View file @
64c15b66
...
...
@@ -217,19 +217,13 @@ public class PerformanceVoTask {
}
/**
* 根据票 判断 演出会员相关状态
* @param performanceId
*/
public
void
performanceVoMember
(
String
performanceId
){}
/**
* 生成 PerformanceCreatePartnerVo(用于审核第一次提交数据)
*
* @param performancesId
* @return
*/
public
PerformanceMisVo
createPerformanceCreateParam
(
String
performancesId
)
{
public
PerformanceMisVo
getPerformanceMisVo
(
String
performancesId
)
{
PerformanceParam
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformanceParam
.
class
,
PerformanceParam
.
class
.
getSimpleName
());
List
<
TicketTimesPartnerVo
>
ticketTimesPartnerVos
=
ticketTimesPartnerService
.
getTimesMongoList
(
performancesId
);
List
<
TicketTimesTicketCreatePartnerVo
>
ticketTimesTicketCreatePartnerVoList
=
new
ArrayList
<
TicketTimesTicketCreatePartnerVo
>();
...
...
@@ -266,77 +260,77 @@ public class PerformanceVoTask {
performanceMisVo
.
setSyncAgent
(
0
);
performanceMisVo
.
setAuditStatus
(
0
);
boolean
exists
=
mongoTemplate
.
exists
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformanceMisVo
.
class
,
PerformanceMisVo
.
class
.
getSimpleName
());
if
(!
exists
)
{
PerformanceMisVo
data
=
mongoTemplate
.
insert
(
performanceMisVo
,
PerformanceMisVo
.
class
.
getSimpleName
()
);
}
//
boolean exists = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceMisVo.class, PerformanceMisVo.class.getSimpleName());
//
//
if (!exists) {
//
PerformanceMisVo data = mongoTemplate.insert(
//
performanceMisVo, PerformanceMisVo.class.getSimpleName()
//
);
//
}
return
performanceMisVo
;
}
/**
* 生成 PerformanceUpdatePartnerVo(用于修改审核提交数据)
*
* @param performancesId
* @return
*/
public
PerformanceMisVo
setPerformanceUpdateParam
(
String
performancesId
)
{
PerformanceParam
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformanceParam
.
class
,
PerformanceParam
.
class
.
getSimpleName
());
List
<
TicketTimesPartnerVo
>
ticketTimesPartnerVos
=
ticketTimesPartnerService
.
getTimesMongoList
(
performancesId
);
List
<
TicketTimesTicketCreatePartnerVo
>
ticketTimesTicketCreatePartnerVoList
=
new
ArrayList
<
TicketTimesTicketCreatePartnerVo
>();
ArrayList
<
BigDecimal
>
floatList
=
new
ArrayList
<>();
ArrayList
<
String
>
StringList
=
new
ArrayList
<>();
for
(
TicketTimesPartnerVo
ticketTimes
:
ticketTimesPartnerVos
)
{
TicketTimesTicketCreatePartnerVo
ticketTimesTicketCreatePartnerVo
=
new
TicketTimesTicketCreatePartnerVo
();
BeanUtils
.
copyProperties
(
ticketTimes
,
ticketTimesTicketCreatePartnerVo
);
List
<
TicketPartnerVo
>
ticketPartnerVos
=
ticketsPartnerService
.
getTicketMongoList
(
ticketTimes
.
getTicketTimesId
());
ticketTimesTicketCreatePartnerVo
.
setTicket
(
ticketPartnerVos
);
ticketTimesTicketCreatePartnerVoList
.
add
(
ticketTimesTicketCreatePartnerVo
);
for
(
TicketPartnerVo
ticketPartnerVoItem
:
ticketPartnerVos
)
{
floatList
.
add
(
ticketPartnerVoItem
.
getPrice
());
StringList
.
add
(
ticketPartnerVoItem
.
getTimeEnd
());
}
}
PerformanceMisVo
performanceMisVo
=
new
PerformanceMisVo
();
BeanUtils
.
copyProperties
(
performanceData
,
performanceMisVo
);
floatList
.
sort
(
Comparator
.
reverseOrder
());
StringList
.
sort
(
Comparator
.
naturalOrder
());
performanceMisVo
.
setPrice
(
floatList
.
get
(
0
)
+
"起"
);
performanceMisVo
.
setStopSellTime
(
StringList
.
get
(
0
));
performanceMisVo
.
setTicketTimes
(
ticketTimesTicketCreatePartnerVoList
);
performanceMisVo
.
setStatus
(
1
);
performanceMisVo
.
setRejectTxt
(
""
);
performanceMisVo
.
setAuditStatus
(
0
);
KylinPerformanceStatus
performanceStatus
=
performanceStatusMapper
.
selectOne
(
new
UpdateWrapper
<
KylinPerformanceStatus
>().
eq
(
"performance_id"
,
performancesId
));
performanceMisVo
.
setStatusSell
(
performanceStatus
.
getStatusSell
());
performanceMisVo
.
setIsShow
(
performanceStatus
.
getIsShow
());
performanceMisVo
.
setIsDistribution
(
performanceStatus
.
getIsDistribution
());
performanceMisVo
.
setSyncAgent
(
performanceStatus
.
getSyncAgent
());
boolean
exists
=
mongoTemplate
.
exists
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformanceMisVo
.
class
,
PerformanceMisVo
.
class
.
getSimpleName
());
if
(!
exists
)
{
mongoTemplate
.
insert
(
performanceMisVo
,
PerformanceMisVo
.
class
.
getSimpleName
()
);
}
else
{
BasicDBObject
object
=
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
performanceMisVo
));
mongoTemplate
.
getCollection
(
PerformanceMisVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)).
getQueryObject
(),
object
);
}
return
performanceMisVo
;
}
//
/**
//
* 生成 PerformanceUpdatePartnerVo(用于修改审核提交数据)
//
*
//
* @param performancesId
//
* @return
//
*/
//
public PerformanceMisVo setPerformanceUpdateParam(String performancesId) {
//
PerformanceParam performanceData = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceParam.class, PerformanceParam.class.getSimpleName());
//
List<TicketTimesPartnerVo> ticketTimesPartnerVos = ticketTimesPartnerService.getTimesMongoList(performancesId);
//
List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList<TicketTimesTicketCreatePartnerVo>();
//
//
ArrayList<BigDecimal> floatList = new ArrayList<>();
//
ArrayList<String> StringList = new ArrayList<>();
//
//
for (TicketTimesPartnerVo ticketTimes : ticketTimesPartnerVos) {
//
TicketTimesTicketCreatePartnerVo ticketTimesTicketCreatePartnerVo = new TicketTimesTicketCreatePartnerVo();
//
BeanUtils.copyProperties(ticketTimes, ticketTimesTicketCreatePartnerVo);
//
List<TicketPartnerVo> ticketPartnerVos = ticketsPartnerService.getTicketMongoList(ticketTimes.getTicketTimesId());
//
ticketTimesTicketCreatePartnerVo.setTicket(ticketPartnerVos);
//
ticketTimesTicketCreatePartnerVoList.add(ticketTimesTicketCreatePartnerVo);
//
for (TicketPartnerVo ticketPartnerVoItem : ticketPartnerVos) {
//
floatList.add(ticketPartnerVoItem.getPrice());
//
StringList.add(ticketPartnerVoItem.getTimeEnd());
//
}
//
}
//
PerformanceMisVo performanceMisVo = new PerformanceMisVo();
//
BeanUtils.copyProperties(performanceData, performanceMisVo);
//
//
floatList.sort(Comparator.reverseOrder());
//
StringList.sort(Comparator.naturalOrder());
//
//
performanceMisVo.setPrice(floatList.get(0) + "起");
//
performanceMisVo.setStopSellTime(StringList.get(0));
//
performanceMisVo.setTicketTimes(ticketTimesTicketCreatePartnerVoList);
//
performanceMisVo.setStatus(1);
//
performanceMisVo.setRejectTxt("");
//
performanceMisVo.setAuditStatus(0);
//
KylinPerformanceStatus performanceStatus = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
//
performanceMisVo.setStatusSell(performanceStatus.getStatusSell());
//
performanceMisVo.setIsShow(performanceStatus.getIsShow());
//
performanceMisVo.setIsDistribution(performanceStatus.getIsDistribution());
//
performanceMisVo.setSyncAgent(performanceStatus.getSyncAgent());
//
//
////
boolean exists = mongoTemplate.exists(Query.query(Criteria.where("performancesId").is(performancesId)), PerformanceMisVo.class, PerformanceMisVo.class.getSimpleName());
////
////
if (!exists) {
////
mongoTemplate.insert(
////
performanceMisVo, PerformanceMisVo.class.getSimpleName()
////
);
////
} else {
////
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(performanceMisVo));
////
mongoTemplate.getCollection(PerformanceMisVo.class.getSimpleName()).updateOne(
////
Query.query(Criteria.where("performancesId").is(performancesId)).getQueryObject(),
////
object
////
);
////
}
//
//
return performanceMisVo;
//
}
/**
* 插入数据库
...
...
@@ -425,7 +419,9 @@ public class PerformanceVoTask {
tickets
.
setPriceDiscount
(
new
BigDecimal
(
"0.00"
));
tickets
.
setTimeStart
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketItem
.
getTimeStart
())));
tickets
.
setTimeEnd
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketItem
.
getTimeEnd
())));
if
(
ticketItem
.
getIsExpress
()==
1
)
{
tickets
.
setTimeEndExpress
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketItem
.
getTimeEndExpress
())));
}
tickets
.
setUseStart
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketTimeItem
.
getUseStart
())));
tickets
.
setUseEnd
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketTimeItem
.
getUseEnd
())));
tickets
.
setSaleRemindMinute
(
60
);
...
...
@@ -440,7 +436,9 @@ public class PerformanceVoTask {
ticketStatus
.
setIsTrueName
(
performanceStatus
.
getIsTrueName
());
ticketStatus
.
setMemberLimitCount
(
1
);
ticketStatus
.
setStatusExchange
(
7
);
if
(
ticketItem
.
getIsShowCode
()
==
1
){
ticketStatus
.
setQrCodeShowTime
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketItem
.
getQrCodeShowTime
())));
}
ticketRelations
.
setCreatedAt
(
tickets
.
getCreatedAt
());
ticketRelations
.
setUpdatedAt
(
updatedAt
);
...
...
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