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
44e0239b
Commit
44e0239b
authored
Sep 26, 2024
by
YG8429
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时长日志增加类型字段
parent
333eb5e9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
6 deletions
+67
-6
DurationTypeEnum.java
...on/src/main/java/share/common/enums/DurationTypeEnum.java
+31
-0
DurationLogController.java
...va/share/web/controller/system/DurationLogController.java
+10
-0
DurationLog.java
...system/src/main/java/share/system/domain/DurationLog.java
+3
-0
DurationLogService.java
...rc/main/java/share/system/service/DurationLogService.java
+2
-0
DurationLogServiceImpl.java
...ava/share/system/service/impl/DurationLogServiceImpl.java
+10
-0
EquityFundExcessServiceImpl.java
...hare/system/service/impl/EquityFundExcessServiceImpl.java
+2
-4
DurationLogMapper.xml
...em/src/main/resources/mapper/system/DurationLogMapper.xml
+9
-2
No files found.
share-common/src/main/java/share/common/enums/DurationTypeEnum.java
0 → 100644
View file @
44e0239b
package
share
.
common
.
enums
;
public
enum
DurationTypeEnum
{
RECHARGE
(
0
,
"充值"
),
ORDER
(
1
,
"订单消费"
),
SHARE
(
2
,
"分享赠送"
),
ORDER_REFUND
(
3
,
"订单消费退款"
),
;
private
Integer
code
;
private
String
name
;
DurationTypeEnum
()
{
}
DurationTypeEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
DurationTypeEnum
(
Integer
code
)
{
this
.
code
=
code
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
}
share-front/src/main/java/share/web/controller/system/DurationLogController.java
View file @
44e0239b
...
...
@@ -7,6 +7,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.DurationTypeEnum
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.DurationLogVo
;
import
share.system.domain.vo.FrontTokenComponent
;
...
...
@@ -45,4 +46,13 @@ public class DurationLogController extends BaseController {
List
<
DurationLogVo
>
list
=
durationLogService
.
selectDurationLogList
(
durationLog
);
return
success
(
list
);
}
@GetMapping
(
"/queryDurationType"
)
public
AjaxResult
queryDurationType
(
DurationLogVo
durationLog
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
durationLog
.
setConsumerId
(
user
.
getId
());
durationLog
.
setDurationType
(
DurationTypeEnum
.
SHARE
.
getCode
());
List
<
DurationLogVo
>
list
=
durationLogService
.
selectDurationTypeList
(
durationLog
);
return
success
(
list
);
}
}
share-system/src/main/java/share/system/domain/DurationLog.java
View file @
44e0239b
...
...
@@ -67,6 +67,9 @@ public class DurationLog extends BaseEntity {
@TableField
(
select
=
false
)
private
Long
isDelete
;
@Excel
(
name
=
"时长类型0-充值赠送,1-订单消费,2-分享赠送,3-订单退款"
)
private
Integer
durationType
;
@Override
public
String
toString
()
{
...
...
share-system/src/main/java/share/system/service/DurationLogService.java
View file @
44e0239b
...
...
@@ -60,4 +60,6 @@ public interface DurationLogService extends IService<DurationLog> {
* @return 结果
*/
public
int
deleteDurationLogById
(
Long
id
);
List
<
DurationLogVo
>
selectDurationTypeList
(
DurationLogVo
durationLog
);
}
share-system/src/main/java/share/system/service/impl/DurationLogServiceImpl.java
View file @
44e0239b
package
share
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.enums.DurationTypeEnum
;
import
share.common.utils.DateUtils
;
import
share.system.domain.DurationLog
;
import
share.system.domain.vo.DurationLogVo
;
import
share.system.mapper.DurationLogMapper
;
import
share.system.service.DurationLogService
;
import
java.util.Collections
;
import
java.util.List
;
/**
...
...
@@ -89,4 +92,11 @@ public class DurationLogServiceImpl extends ServiceImpl<DurationLogMapper, Durat
public
int
deleteDurationLogById
(
Long
id
)
{
return
durationLogMapper
.
deleteDurationLogById
(
id
);
}
@Override
public
List
<
DurationLogVo
>
selectDurationTypeList
(
DurationLogVo
durationLog
)
{
return
durationLogMapper
.
selectDurationLogList
(
durationLog
);
}
}
share-system/src/main/java/share/system/service/impl/EquityFundExcessServiceImpl.java
View file @
44e0239b
...
...
@@ -16,10 +16,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import
org.springframework.util.ObjectUtils
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.OrderStatusEnum
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.RefundStatusEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.enums.*
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -266,6 +263,7 @@ public class EquityFundExcessServiceImpl extends ServiceImpl<EquityFundExcessMap
durationLog
.
setVariableDuration
(
anHour
);
durationLog
.
setCurrentDuration
(
accumulateEquityFund
);
durationLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
durationLog
.
setDurationType
(
DurationTypeEnum
.
SHARE
.
getCode
());
durationLog
.
setOperationTime
(
DateUtils
.
getNowDate
());
durationLogService
.
insertDurationLog
(
durationLog
);
consumerWalletService
.
updateConsumerWallet
(
consumerWallet
);
...
...
share-system/src/main/resources/mapper/system/DurationLogMapper.xml
View file @
44e0239b
...
...
@@ -20,6 +20,7 @@
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"durationType"
column=
"duration_type"
/>
</resultMap>
<sql
id=
"selectDurationLogVo"
>
...
...
@@ -34,7 +35,8 @@
create_time,
update_by,
update_time,
remark
remark,
duration_type
from s_duration_log
</sql>
...
...
@@ -53,7 +55,8 @@
d.create_time,
d.update_by,
d.update_time,
d.remark
d.remark,
d.duration_type
from s_duration_log d join s_consumer c on d.consumer_id = c.id
<where>
<if
test=
"nickName != null and nickName != ''"
>
and c.nick_name like concat('%', #{nickName},'%')
...
...
@@ -66,6 +69,7 @@
<if
test=
"operationType != null "
>
and d.operation_type = #{operationType}
</if>
<if
test=
"operationTime != null "
>
and d.operation_time = #{operationTime}
</if>
<if
test=
"isDelete != null "
>
and d.is_delete = #{isDelete}
</if>
<if
test=
"durationType != null "
>
and d.duration_type = #{durationType}
</if>
</where>
ORDER BY d.operation_time DESC
</select>
...
...
@@ -89,6 +93,7 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"durationType != null"
>
duration_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
...
...
@@ -102,6 +107,7 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"durationType != null"
>
#{durationType},
</if>
</trim>
</insert>
...
...
@@ -119,6 +125,7 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"durationType != null"
>
duration_type = #{durationType}
</if>
</trim>
where id = #{id}
</update>
...
...
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