记得上下班打卡 | 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
960fd4ec
Commit
960fd4ec
authored
Jan 18, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数字藏品预约活动-职务改成必填;加try
parent
e49f2900
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
27 deletions
+37
-27
SweetCollectionReservationController.java
...weet/controller/SweetCollectionReservationController.java
+2
-2
SweetCollectionReservationServiceImpl.java
...t/service/impl/SweetCollectionReservationServiceImpl.java
+35
-25
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetCollectionReservationController.java
View file @
960fd4ec
...
@@ -51,14 +51,14 @@ public class SweetCollectionReservationController {
...
@@ -51,14 +51,14 @@ public class SweetCollectionReservationController {
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"mobile"
,
value
=
"手机号"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"mobile"
,
value
=
"手机号"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"mailbox"
,
value
=
"邮箱"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"mailbox"
,
value
=
"邮箱"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"enterpriseName"
,
value
=
"公司名称"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"enterpriseName"
,
value
=
"公司名称"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"职务"
)
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"职务"
,
required
=
true
)
})
})
public
ResponseDto
<
Boolean
>
create
(
public
ResponseDto
<
Boolean
>
create
(
@RequestParam
()
String
nickname
,
@RequestParam
()
String
nickname
,
@RequestParam
()
String
mobile
,
@RequestParam
()
String
mobile
,
@RequestParam
()
String
mailbox
,
@RequestParam
()
String
mailbox
,
@RequestParam
()
String
enterpriseName
,
@RequestParam
()
String
enterpriseName
,
@RequestParam
(
defaultValue
=
""
)
String
title
@RequestParam
()
String
title
)
{
)
{
return
reservationService
.
create
(
nickname
,
mobile
,
mailbox
,
enterpriseName
,
title
);
return
reservationService
.
create
(
nickname
,
mobile
,
mailbox
,
enterpriseName
,
title
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetCollectionReservationServiceImpl.java
View file @
960fd4ec
...
@@ -12,6 +12,7 @@ import com.liquidnet.service.sweet.service.ISweetCollectionReservationService;
...
@@ -12,6 +12,7 @@ import com.liquidnet.service.sweet.service.ISweetCollectionReservationService;
import
com.liquidnet.service.sweet.utils.QueueUtils
;
import
com.liquidnet.service.sweet.utils.QueueUtils
;
import
com.liquidnet.service.sweet.utils.RedisActivityUtils
;
import
com.liquidnet.service.sweet.utils.RedisActivityUtils
;
import
com.liquidnet.service.sweet.vo.SweetCollectionReservationVo
;
import
com.liquidnet.service.sweet.vo.SweetCollectionReservationVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -26,6 +27,7 @@ import java.util.LinkedList;
...
@@ -26,6 +27,7 @@ import java.util.LinkedList;
* @author jiangxiulong
* @author jiangxiulong
* @since 2022-01-18
* @since 2022-01-18
*/
*/
@Slf4j
@Service
@Service
public
class
SweetCollectionReservationServiceImpl
extends
ServiceImpl
<
SweetCollectionReservationMapper
,
SweetCollectionReservation
>
implements
ISweetCollectionReservationService
{
public
class
SweetCollectionReservationServiceImpl
extends
ServiceImpl
<
SweetCollectionReservationMapper
,
SweetCollectionReservation
>
implements
ISweetCollectionReservationService
{
...
@@ -36,12 +38,15 @@ public class SweetCollectionReservationServiceImpl extends ServiceImpl<SweetColl
...
@@ -36,12 +38,15 @@ public class SweetCollectionReservationServiceImpl extends ServiceImpl<SweetColl
@Override
@Override
public
ResponseDto
<
SweetCollectionReservationVo
>
info
()
{
public
ResponseDto
<
SweetCollectionReservationVo
>
info
()
{
LocalDateTime
endTime
=
activityUtils
.
getEndTime
(
"reservation"
);
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
SweetCollectionReservationVo
reservationVo
=
SweetCollectionReservationVo
.
getNew
();
SweetCollectionReservationVo
reservationVo
=
SweetCollectionReservationVo
.
getNew
();
if
(
null
==
endTime
||
nowTime
.
isAfter
(
endTime
))
{
try
{
reservationVo
.
setStatus
(
2
);
LocalDateTime
endTime
=
activityUtils
.
getEndTime
(
"reservation"
);
}
else
{
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
reservationVo
.
setStatus
(
1
);
if
(
null
==
endTime
||
nowTime
.
isAfter
(
endTime
))
{
reservationVo
.
setStatus
(
2
);
}
}
catch
(
Exception
e
)
{
reservationVo
.
setStatus
(
1
);
reservationVo
.
setStatus
(
1
);
}
}
return
ResponseDto
.
success
(
reservationVo
);
return
ResponseDto
.
success
(
reservationVo
);
...
@@ -55,28 +60,33 @@ public class SweetCollectionReservationServiceImpl extends ServiceImpl<SweetColl
...
@@ -55,28 +60,33 @@ public class SweetCollectionReservationServiceImpl extends ServiceImpl<SweetColl
@Override
@Override
public
ResponseDto
<
Boolean
>
create
(
String
nickname
,
String
mobile
,
String
mailbox
,
String
enterpriseName
,
String
title
)
{
public
ResponseDto
<
Boolean
>
create
(
String
nickname
,
String
mobile
,
String
mailbox
,
String
enterpriseName
,
String
title
)
{
SweetCollectionReservation
reservation
=
SweetCollectionReservation
.
getNew
();
try
{
String
id
=
IDGenerator
.
nextSnowId
();
SweetCollectionReservation
reservation
=
SweetCollectionReservation
.
getNew
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
String
id
=
IDGenerator
.
nextSnowId
();
reservation
.
setReservationId
(
id
);
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
reservation
.
setNickname
(
nickname
);
reservation
.
setReservationId
(
id
);
reservation
.
setMobile
(
mobile
);
reservation
.
setNickname
(
nickname
);
reservation
.
setMailbox
(
mailbox
);
reservation
.
setMobile
(
mobile
);
reservation
.
setEnterpriseName
(
enterpriseName
);
reservation
.
setMailbox
(
mailbox
);
reservation
.
setTitle
(
title
);
reservation
.
setEnterpriseName
(
enterpriseName
);
reservation
.
setCreatedAt
(
nowTime
);
reservation
.
setTitle
(
title
);
reservation
.
setUpdatedAt
(
nowTime
);
reservation
.
setCreatedAt
(
nowTime
);
reservation
.
setUpdatedAt
(
nowTime
);
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
sqlsDataA
=
CollectionUtil
.
linkedListObjectArr
();
sqls
.
add
(
SqlMapping
.
get
(
"sweet_collection_reservation.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
id
,
nickname
,
mobile
,
mailbox
,
enterpriseName
,
title
,
nowTime
,
nowTime
});
queueUtils
.
sendMsgByRedis
(
MQConst
.
SweetQueue
.
SWEET_ANSWER_INSERT
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
sqlsDataA
));
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
return
ResponseDto
.
success
();
LinkedList
<
Object
[]>
sqlsDataA
=
CollectionUtil
.
linkedListObjectArr
();
}
catch
(
Exception
e
)
{
sqls
.
add
(
SqlMapping
.
get
(
"sweet_collection_reservation.insert"
));
log
.
error
(
"nickname="
+
nickname
+
"&mobile="
+
mobile
+
"&mailbox="
+
mailbox
+
"&enterpriseName="
+
enterpriseName
+
"&title="
+
title
);
sqlsDataA
.
add
(
new
Object
[]{
return
ResponseDto
.
success
();
id
,
nickname
,
mobile
,
mailbox
,
enterpriseName
,
title
,
nowTime
,
nowTime
}
});
queueUtils
.
sendMsgByRedis
(
MQConst
.
SweetQueue
.
SWEET_ANSWER_INSERT
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
sqlsDataA
));
return
ResponseDto
.
success
();
}
}
}
}
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