记得上下班打卡 | 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
f0c29780
Commit
f0c29780
authored
Mar 21, 2024
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步票种 缺少库存 和 删除详情缓存
parent
fb53d93a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
63 deletions
+99
-63
bootstrap-prod.yml
...-service-kylin-impl/src/main/resources/bootstrap-prod.yml
+1
-1
bootstrap.yml
...idnet-service-kylin-impl/src/main/resources/bootstrap.yml
+1
-1
JxlDataPerformancesController.java
...m/controller/A_fskfsfs/JxlDataPerformancesController.java
+97
-61
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/resources/bootstrap-prod.yml
View file @
f0c29780
...
...
@@ -6,7 +6,7 @@ liquidnet:
username
:
user
password
:
user123
eureka
:
host
:
1
72.17.207.189
:7001
host
:
1
27.0.0.1
:7001
# end-prod-这里是配置信息基本值
spring
:
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/resources/bootstrap.yml
View file @
f0c29780
...
...
@@ -2,7 +2,7 @@ spring:
application
:
name
:
liquidnet-service-kylin
profiles
:
active
:
dev
active
:
prod
server
:
tomcat
:
max-threads
:
2000
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/A_fskfsfs/JxlDataPerformancesController.java
View file @
f0c29780
...
...
@@ -11,8 +11,10 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo
;
import
com.liquidnet.service.kylin.entity.KylinTicketRelations
;
import
com.liquidnet.service.kylin.entity.KylinTicketStatus
;
import
com.liquidnet.service.kylin.entity.KylinTickets
;
import
com.liquidnet.service.kylin.mapper.KylinTicketRelationsMapper
;
import
com.liquidnet.service.kylin.mapper.KylinTicketStatusMapper
;
import
com.liquidnet.service.kylin.mapper.KylinTicketsMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.List
;
...
...
@@ -48,6 +51,8 @@ public class JxlDataPerformancesController {
@Autowired
private
KylinTicketStatusMapper
ticketStatusMapper
;
@Autowired
private
KylinTicketsMapper
ticketsMapper
;
@Autowired
private
MongoTemplate
mongoTemplate
;
@GetMapping
(
"P001"
)
...
...
@@ -58,76 +63,107 @@ public class JxlDataPerformancesController {
public
ResponseDto
P001
(
@RequestParam
(
"performancesId"
)
String
performancesId
)
{
List
<
KylinTicketTimesPartnerVo
>
voTimes
=
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
KylinTicketTimesPartnerVo
.
class
,
KylinTicketTimesPartnerVo
.
class
.
getSimpleName
());
for
(
KylinTicketTimesPartnerVo
voTime
:
voTimes
)
{
List
<
KylinTicketPartnerVo
>
timesIdVo
=
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"timesId"
).
is
(
voTime
.
getTicketTimesId
())),
KylinTicketPartnerVo
.
class
,
KylinTicketPartnerVo
.
class
.
getSimpleName
());
for
(
KylinTicketPartnerVo
ticketVo
:
timesIdVo
)
{
LocalDateTime
timeC
=
null
;
LocalDateTime
timeU
=
null
;
try
{
timeC
=
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getCreatedAt
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
timeU
=
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getUpdatedAt
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
List
<
KylinTicketTimesPartnerVo
>
voTimes
=
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
KylinTicketTimesPartnerVo
.
class
,
KylinTicketTimesPartnerVo
.
class
.
getSimpleName
());
for
(
KylinTicketTimesPartnerVo
voTime
:
voTimes
)
{
List
<
KylinTicketPartnerVo
>
timesIdVo
=
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"timesId"
).
is
(
voTime
.
getTicketTimesId
())),
KylinTicketPartnerVo
.
class
,
KylinTicketPartnerVo
.
class
.
getSimpleName
());
for
(
KylinTicketPartnerVo
ticketVo
:
timesIdVo
)
{
PerformancePartnerVo
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
());
String
ticketsId
=
ticketVo
.
getTicketsId
();
KylinTicketRelations
ticketRelations
=
new
KylinTicketRelations
();
BeanUtils
.
copyProperties
(
ticketVo
,
ticketRelations
);
ticketRelations
.
setCreatedAt
(
timeC
);
ticketRelations
.
setUpdatedAt
(
timeU
);
ticketRelations
.
setTicketRelationsId
(
IDGenerator
.
nextSnowId
());
ticketRelations
.
setTicketId
(
ticketsId
);
// 场次与票种关联表
ticketRelationsMapper
.
insert
(
ticketRelations
);
KylinTickets
tickets
=
new
KylinTickets
();
BeanUtils
.
copyProperties
(
ticketVo
,
tickets
);
tickets
.
setPayCountdownMinute
(
performanceData
.
getPayCountdownMinute
());
tickets
.
setPriceExpress
(
new
BigDecimal
(
"0.00"
));
tickets
.
setPriceDiscountMember
(
new
BigDecimal
(
"0.00"
));
tickets
.
setPriceDiscount
(
new
BigDecimal
(
"0.00"
));
tickets
.
setTimeStart
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getTimeStart
())));
tickets
.
setTimeEnd
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getTimeEnd
())));
if
(
ticketVo
.
getIsExpress
()
==
1
)
{
tickets
.
setTimeEndExpress
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getTimeEndExpress
())));
tickets
.
setDescribeExpress
(
ticketVo
.
getDescribeExpress
());
}
// else{
// tickets.setTimeEndExpress(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2030-01-01 12:00:00")));
// }
if
(
ticketVo
.
getIsElectronic
()
==
1
)
{
tickets
.
setDescribeElectronic
(
ticketVo
.
getDescribeElectronic
());
}
tickets
.
setUseStart
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
voTime
.
getUseStart
())));
tickets
.
setUseEnd
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
voTime
.
getUseEnd
())));
tickets
.
setSaleRemindMinute
(
60
);
tickets
.
setCreatedAt
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getCreatedAt
())));
tickets
.
setUpdatedAt
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getUpdatedAt
())));
ticketsMapper
.
insert
(
tickets
);
KylinTicketStatus
ticketStatusNew
=
new
KylinTicketStatus
();
BeanUtils
.
copyProperties
(
ticketVo
,
ticketStatusNew
);
ticketStatusNew
.
setTicketId
(
ticketsId
);
ticketStatusNew
.
setStatusExchange
(
7
);
if
(
ticketVo
.
getExpressType
()
==
null
)
{
ticketStatusNew
.
setExpressType
(
0
);
}
PerformancePartnerVo
performanceData
=
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"performancesId"
).
is
(
performancesId
)),
PerformancePartnerVo
.
class
,
PerformancePartnerVo
.
class
.
getSimpleName
());
ticketStatusNew
.
setIsTrueName
(
performanceData
.
getIsTrueName
());
ticketStatusNew
.
setMemberLimitCount
(
1
);
ticketStatusNew
.
setCreatedAt
(
timeC
);
ticketStatusNew
.
setUpdatedAt
(
timeU
);
if
(
ticketVo
.
getIsShowCode
()
==
1
)
{
LocalDateTime
timeC
=
null
;
LocalDateTime
timeU
=
null
;
try
{
ti
cketStatusNew
.
setQrCodeShowTime
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getQrCodeShowTime
()
)));
ti
meC
=
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getCreatedAt
(
)));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
KylinTicketStatus
ticketStatus
=
ticketStatusMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
KylinTicketStatus
.
class
)
.
eq
(
KylinTicketStatus:
:
getTicketId
,
ticketsId
)
);
if
(
null
==
ticketStatus
)
{
// 添加
ticketStatusNew
.
setTicketStatusId
(
IDGenerator
.
nextSnowId
());
ticketStatusMapper
.
insert
(
ticketStatusNew
);
System
.
out
.
println
(
"新增---------------------------------"
);
System
.
out
.
println
(
ticketsId
);
System
.
out
.
println
(
ticketStatusNew
);
}
else
{
// 编辑
ticketStatusMapper
.
update
(
ticketStatusNew
,
new
UpdateWrapper
<
KylinTicketStatus
>().
eq
(
"ticket_id"
,
ticketsId
)
try
{
timeU
=
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getUpdatedAt
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
String
ticketsId
=
ticketVo
.
getTicketsId
();
KylinTicketRelations
ticketRelations
=
new
KylinTicketRelations
();
BeanUtils
.
copyProperties
(
ticketVo
,
ticketRelations
);
ticketRelations
.
setCreatedAt
(
timeC
);
ticketRelations
.
setUpdatedAt
(
timeU
);
ticketRelations
.
setTicketRelationsId
(
IDGenerator
.
nextSnowId
());
ticketRelations
.
setTicketId
(
ticketsId
);
// 场次与票种关联表
ticketRelationsMapper
.
insert
(
ticketRelations
);
KylinTicketStatus
ticketStatusNew
=
new
KylinTicketStatus
();
BeanUtils
.
copyProperties
(
ticketVo
,
ticketStatusNew
);
ticketStatusNew
.
setTicketId
(
ticketsId
);
ticketStatusNew
.
setStatusExchange
(
7
);
if
(
ticketVo
.
getExpressType
()
==
null
)
{
ticketStatusNew
.
setExpressType
(
0
);
}
ticketStatusNew
.
setIsTrueName
(
performanceData
.
getIsTrueName
());
ticketStatusNew
.
setMemberLimitCount
(
1
);
ticketStatusNew
.
setCreatedAt
(
timeC
);
ticketStatusNew
.
setUpdatedAt
(
timeU
);
if
(
ticketVo
.
getIsShowCode
()
==
1
)
{
try
{
ticketStatusNew
.
setQrCodeShowTime
(
DateUtil
.
asLocalDateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
ticketVo
.
getQrCodeShowTime
())));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
KylinTicketStatus
ticketStatus
=
ticketStatusMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
KylinTicketStatus
.
class
)
.
eq
(
KylinTicketStatus:
:
getTicketId
,
ticketsId
)
);
System
.
out
.
println
(
"编辑---------------------------------"
);
System
.
out
.
println
(
ticketsId
);
System
.
out
.
println
(
ticketStatusNew
);
if
(
null
==
ticketStatus
)
{
// 添加
ticketStatusNew
.
setTicketStatusId
(
IDGenerator
.
nextSnowId
());
ticketStatusMapper
.
insert
(
ticketStatusNew
);
System
.
out
.
println
(
"新增---------------------------------"
);
System
.
out
.
println
(
ticketsId
);
System
.
out
.
println
(
ticketStatusNew
);
}
else
{
// 编辑
ticketStatusMapper
.
update
(
ticketStatusNew
,
new
UpdateWrapper
<
KylinTicketStatus
>().
eq
(
"ticket_id"
,
ticketsId
)
);
System
.
out
.
println
(
"编辑---------------------------------"
);
System
.
out
.
println
(
ticketsId
);
System
.
out
.
println
(
ticketStatusNew
);
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// dataUtils.delPerformanceRedis(performancesId);
...
...
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