Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
747e6f47
Commit
747e6f47
authored
Sep 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单价格计算
parent
67f45a36
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
23 deletions
+18
-23
ActivityController.java
.../java/share/web/controller/system/ActivityController.java
+1
-2
ActivityService.java
...m/src/main/java/share/system/service/ActivityService.java
+1
-2
ActivityServiceImpl.java
...n/java/share/system/service/impl/ActivityServiceImpl.java
+12
-14
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+4
-5
No files found.
share-front/src/main/java/share/web/controller/system/ActivityController.java
View file @
747e6f47
...
...
@@ -11,7 +11,6 @@ import share.common.core.page.TableDataInfo;
import
share.common.enums.YesNoEnum
;
import
share.system.domain.Activity
;
import
share.system.domain.vo.ActivityDto
;
import
share.system.domain.vo.ActivityVo
;
import
share.system.service.ActivityService
;
import
java.util.Date
;
...
...
@@ -43,7 +42,7 @@ public class ActivityController extends BaseController {
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
ActivityDto
dto
)
{
dto
.
setIsOpen
(
Long
.
valueOf
(
YesNoEnum
.
yes
.
getIndex
()));
Map
<
Date
,
List
<
Activity
Vo
>>
map
=
activityService
.
queryList
(
dto
);
Map
<
Date
,
List
<
Activity
>>
map
=
activityService
.
queryList
(
dto
);
return
success
(
map
);
}
...
...
share-system/src/main/java/share/system/service/ActivityService.java
View file @
747e6f47
...
...
@@ -3,7 +3,6 @@ package share.system.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.Activity
;
import
share.system.domain.vo.ActivityDto
;
import
share.system.domain.vo.ActivityVo
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -64,5 +63,5 @@ public interface ActivityService extends IService<Activity> {
*/
public
int
deleteActivityById
(
Long
id
);
Map
<
Date
,
List
<
Activity
Vo
>>
queryList
(
ActivityDto
dto
);
Map
<
Date
,
List
<
Activity
>>
queryList
(
ActivityDto
dto
);
}
share-system/src/main/java/share/system/service/impl/ActivityServiceImpl.java
View file @
747e6f47
...
...
@@ -20,7 +20,6 @@ import share.system.domain.ConsumerMember;
import
share.system.domain.SConsumer
;
import
share.system.domain.SStore
;
import
share.system.domain.vo.ActivityDto
;
import
share.system.domain.vo.ActivityVo
;
import
share.system.mapper.ActivityMapper
;
import
share.system.service.ActivityService
;
import
share.system.service.ConsumerMemberService
;
...
...
@@ -121,7 +120,7 @@ public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity> i
}
@Override
public
Map
<
Date
,
List
<
Activity
Vo
>>
queryList
(
ActivityDto
dto
)
{
public
Map
<
Date
,
List
<
Activity
>>
queryList
(
ActivityDto
dto
)
{
SConsumer
user
=
sConsumerService
.
getInfo
();
if
(
ObjectUtil
.
isEmpty
(
user
))
{
return
new
HashMap
<>();
...
...
@@ -139,26 +138,25 @@ public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity> i
}
Activity
activity
=
new
Activity
();
BeanUtils
.
copyProperties
(
dto
,
activity
);
activity
.
setMemberType
(
MemberTypeEnum
.
NORMAL
.
getIndex
());
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
activity
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
}
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
activity
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
}
List
<
Activity
>
activities
=
selectActivityList
(
activity
);
CronParser
cronParser
=
new
CronParser
(
CronDefinitionBuilder
.
instanceDefinitionFor
(
CronType
.
QUARTZ
));
Map
<
Date
,
List
<
Activity
Vo
>>
map
=
new
HashMap
<>();
Map
<
Date
,
List
<
Activity
>>
map
=
new
HashMap
<>();
days
.
stream
().
forEach
(
day
->
{
List
<
Activity
Vo
>
voList
=
new
ArrayList
<>();
List
<
Activity
>
voList
=
new
ArrayList
<>();
activities
.
stream
().
forEach
(
item
->
{
Cron
cron
=
cronParser
.
parse
(
item
.
getCronExpression
());
ExecutionTime
executionTime
=
ExecutionTime
.
forCron
(
cron
);
boolean
match
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
day
.
toInstant
(),
ZoneId
.
systemDefault
()));
if
(
match
)
{
ActivityVo
activityVo
=
new
ActivityVo
();
activityVo
.
setMemberType
(
MemberTypeEnum
.
NORMAL
.
getIndex
());
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
activityVo
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
}
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
activityVo
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
}
BeanUtils
.
copyProperties
(
item
,
activityVo
);
voList
.
add
(
activityVo
);
voList
.
add
(
item
);
}
});
if
(
voList
.
size
()
>
0
)
{
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
747e6f47
...
...
@@ -2428,14 +2428,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
user
.
getId
()));
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
queryWrapper
.
eq
(
Activity:
:
getIsOpen
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
NORMAL
.
getIndex
());
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
());
}
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
RIGHTS
.
getIndex
());
}
else
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
no
.
getIndex
()))
{
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
());
}
else
{
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
NORMAL
.
getIndex
());
}
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
priceResponse
.
setAvailableBalance
(
consumerWallet
.
getBalance
());
...
...
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