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
a3f2ddc4
Commit
a3f2ddc4
authored
Aug 02, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改会员日计算
parent
bf247784
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
ActivityController.java
.../java/share/web/controller/system/ActivityController.java
+2
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+3
-1
ActivityMapper.xml
...ystem/src/main/resources/mapper/system/ActivityMapper.xml
+2
-1
No files found.
share-front/src/main/java/share/web/controller/system/ActivityController.java
View file @
a3f2ddc4
...
...
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RestController;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
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
;
...
...
@@ -41,6 +42,7 @@ public class ActivityController extends BaseController {
@GetMapping
(
"/query"
)
public
AjaxResult
query
(
ActivityDto
dto
)
{
dto
.
setIsOpen
(
Long
.
valueOf
(
YesNoEnum
.
yes
.
getIndex
()));
Map
<
Date
,
List
<
ActivityVo
>>
map
=
activityService
.
queryList
(
dto
);
return
success
(
map
);
}
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
a3f2ddc4
...
...
@@ -2568,6 +2568,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
SOrder:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getValidOrderStatus
());
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
gt
(
SOrder:
:
getDiscountRatio
,
new
BigDecimal
(
50
));
// queryWrapper.ne(SOrder::getPayPrice, new BigDecimal(0));
//预约结束时间大于等于今天的年月日
queryWrapper
.
ge
(
SOrder:
:
getPreEndDate
,
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD
,
new
Date
())));
...
...
@@ -2588,7 +2589,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
boolean
match
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
item
.
getPreStartDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
boolean
match1
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
item
.
getPreEndDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
if
(
match
&&
match1
// && (item.getPayPrice().compareTo(item.getTotalPrice().multiply(activity.getDiscountRatio()).divide(new BigDecimal(100)))) > 0
&&
item
.
getDuration
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
(
item
.
getPayPrice
().
add
(
item
.
getBalance
())).
divide
(
item
.
getTotalPrice
()).
multiply
(
new
BigDecimal
(
100
)).
compareTo
(
activity
.
getDiscountRatio
())
==
0
)
{
i
.
getAndIncrement
();
}
...
...
share-system/src/main/resources/mapper/system/ActivityMapper.xml
View file @
a3f2ddc4
...
...
@@ -45,7 +45,7 @@
<select
id=
"selectActivityList"
parameterType=
"Activity"
resultMap=
"ActivityResult"
>
<include
refid=
"selectActivityVo"
/>
where is_
open = 1 and is_
delete = 0
where is_delete = 0
<if
test=
"activityName != null and activityName != ''"
>
and activity_name like concat('%', #{activityName},
'%')
</if>
...
...
@@ -57,6 +57,7 @@
<if
test=
"storeIds != null and storeIds != ''"
>
and store_ids = #{storeIds}
</if>
<if
test=
"labelId != null "
>
and label_id = #{labelId}
</if>
<if
test=
"packId != null "
>
and pack_id = #{packId}
</if>
<if
test=
"isOpen != null or isOpen==0"
>
and is_open = #{isOpen}
</if>
<if
test=
"cronExpression != null and cronExpression != ''"
>
and cron_expression = #{cronExpression}
</if>
</select>
...
...
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