Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
df1886f2
Commit
df1886f2
authored
Oct 30, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动预约
parent
97bf19df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
4 deletions
+88
-4
OfflinePreController.java
...n/manage/web/controller/offline/OfflinePreController.java
+38
-4
OfflinePreInfoVO.java
...om/gic/haoban/manage/web/vo/offline/OfflinePreInfoVO.java
+50
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/offline/OfflinePreController.java
View file @
df1886f2
...
...
@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.manage.web.qo.offline.PageOfflinePreQO
;
import
com.gic.haoban.manage.web.qo.offline.WriteOffOfflinePreQO
;
...
...
@@ -22,6 +24,9 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 好办小程序-线下预约
*/
...
...
@@ -39,11 +44,40 @@ public class OfflinePreController {
@RequestMapping
(
"/page-offline-pre"
)
@ResponseBody
public
RestResponse
<
Page
<
OfflinePreInfoVO
>>
pageOfflinePre
(
@RequestBody
PageOfflinePreQO
qo
){
ServiceResponse
<
Page
<
OfflinePreInfoDTO
>>
offlinePreInfoDTO
=
offlinePreApiService
.
pageOfflinePre
(
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
qo
),
PageOfflinePreQDTO
.
class
));
return
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
offlinePreInfoDTO
,
SerializerFeature
.
WriteMapNullValue
),
RestResponse
.
class
);
ServiceResponse
<
Page
<
OfflinePreInfoDTO
>>
resp
=
offlinePreApiService
.
pageOfflinePre
(
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
qo
),
PageOfflinePreQDTO
.
class
));
Page
<
OfflinePreInfoVO
>
pageVO
=
new
Page
<>()
;
pageVO
.
setCurrentPage
(
resp
.
getResult
().
getCurrentPage
());
pageVO
.
setTotalCount
(
resp
.
getResult
().
getTotalCount
());
pageVO
.
setPageSize
(
resp
.
getResult
().
getPageSize
());
if
(
null
!=
resp
.
getResult
()
&&
null
!=
resp
.
getResult
().
getResult
())
{
List
<
OfflinePreInfoDTO
>
list
=
resp
.
getResult
().
getResult
()
;
List
<
OfflinePreInfoVO
>
voList
=
new
ArrayList
<>()
;
for
(
OfflinePreInfoDTO
dto
:
list
)
{
OfflinePreInfoVO
vo
=
EntityUtil
.
changeEntityByJSON
(
OfflinePreInfoVO
.
class
,
dto
)
;
if
(
null
!=
qo
.
getType
()
&&
qo
.
getType
()==
1
)
{
if
((
dto
.
getPreTime
().
getTime
()
<
System
.
currentTimeMillis
()
||
this
.
getAheadSignFlag
(
dto
.
getAheadSignFlag
())
==
1
)
&&
DateUtil
.
getStartTimeOfDay
(
dto
.
getPreTime
()).
getTime
()
>=
DateUtil
.
getStartTimeOfDay
().
getTime
())
{
vo
.
setCanSign
(
1
);
}
else
{
if
(
DateUtil
.
getStartTimeOfDay
(
dto
.
getPreTime
()).
getTime
()
<
DateUtil
.
getStartTimeOfDay
().
getTime
())
{
vo
.
setReason
(
"已过期"
);
}
else
if
(
this
.
getAheadSignFlag
(
dto
.
getAheadSignFlag
())
==
0
&&
dto
.
getPreTime
().
getTime
()
>
System
.
currentTimeMillis
())
{
vo
.
setReason
(
"不可提前签到"
);
}
}
}
voList
.
add
(
vo
)
;
}
pageVO
.
setResult
(
voList
);
}
return
RestResponse
.
successResult
(
pageVO
)
;
}
private
int
getAheadSignFlag
(
Integer
flag
)
{
if
(
null
==
flag
)
{
return
1
;
}
return
flag
;
}
/**
* 获取预约详情
* @param offlinePreId 预约ID
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/offline/OfflinePreInfoVO.java
View file @
df1886f2
...
...
@@ -156,6 +156,56 @@ public class OfflinePreInfoVO implements Serializable {
*/
private
Integer
writeOffExchangeNum
;
// '支持提前签到1是0否' ,
private
Integer
aheadSignFlag
=
1
;
private
String
imgIntegral
;
private
String
imgCoupon
;
// 是否可以签到
private
int
canSign
;
// 不能签到原因
private
String
reason
;
public
Integer
getAheadSignFlag
()
{
return
aheadSignFlag
;
}
public
void
setAheadSignFlag
(
Integer
aheadSignFlag
)
{
this
.
aheadSignFlag
=
aheadSignFlag
;
}
public
String
getImgIntegral
()
{
return
imgIntegral
;
}
public
void
setImgIntegral
(
String
imgIntegral
)
{
this
.
imgIntegral
=
imgIntegral
;
}
public
String
getImgCoupon
()
{
return
imgCoupon
;
}
public
void
setImgCoupon
(
String
imgCoupon
)
{
this
.
imgCoupon
=
imgCoupon
;
}
public
int
getCanSign
()
{
return
canSign
;
}
public
void
setCanSign
(
int
canSign
)
{
this
.
canSign
=
canSign
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
public
Integer
getWriteOffExchangeNum
()
{
return
writeOffExchangeNum
;
}
...
...
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