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
15d84e8e
Commit
15d84e8e
authored
Oct 08, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加充值和赠送金额的日志
parent
af01395a
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1104 additions
and
0 deletions
+1104
-0
GiftAmountLogController.java
.../share/web/controller/system/GiftAmountLogController.java
+92
-0
RechargeAmountLogController.java
...re/web/controller/system/RechargeAmountLogController.java
+92
-0
ConsumerWallet.java
...tem/src/main/java/share/system/domain/ConsumerWallet.java
+12
-0
GiftAmountLog.java
...stem/src/main/java/share/system/domain/GiftAmountLog.java
+81
-0
RechargeAmountLog.java
.../src/main/java/share/system/domain/RechargeAmountLog.java
+87
-0
GiftAmountLogVo.java
...src/main/java/share/system/domain/vo/GiftAmountLogVo.java
+13
-0
RechargeAmountLogVo.java
...main/java/share/system/domain/vo/RechargeAmountLogVo.java
+13
-0
GiftAmountLogMapper.java
...rc/main/java/share/system/mapper/GiftAmountLogMapper.java
+63
-0
RechargeAmountLogMapper.java
...ain/java/share/system/mapper/RechargeAmountLogMapper.java
+63
-0
GiftAmountLogService.java
.../main/java/share/system/service/GiftAmountLogService.java
+63
-0
RechargeAmountLogService.java
...n/java/share/system/service/RechargeAmountLogService.java
+63
-0
GiftAmountLogServiceImpl.java
...a/share/system/service/impl/GiftAmountLogServiceImpl.java
+92
-0
RechargeAmountLogServiceImpl.java
...are/system/service/impl/RechargeAmountLogServiceImpl.java
+92
-0
ConsumerWalletMapper.xml
...src/main/resources/mapper/system/ConsumerWalletMapper.xml
+14
-0
GiftAmountLogMapper.xml
.../src/main/resources/mapper/system/GiftAmountLogMapper.xml
+131
-0
RechargeAmountLogMapper.xml
.../main/resources/mapper/system/RechargeAmountLogMapper.xml
+133
-0
No files found.
share-admin/src/main/java/share/web/controller/system/GiftAmountLogController.java
0 → 100644
View file @
15d84e8e
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.GiftAmountLog
;
import
share.system.domain.vo.GiftAmountLogVo
;
import
share.system.service.GiftAmountLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 赠送金额日志Controller
*
* @author wuwenlong
* @date 2024-10-08
*/
@RestController
@RequestMapping
(
"/system/giftAmountLog"
)
public
class
GiftAmountLogController
extends
BaseController
{
@Autowired
private
GiftAmountLogService
giftAmountLogService
;
/**
* 查询赠送金额日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:giftAmountLog:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
GiftAmountLogVo
giftAmountLog
)
{
startPage
();
List
<
GiftAmountLogVo
>
list
=
giftAmountLogService
.
selectGiftAmountLogList
(
giftAmountLog
);
return
getDataTable
(
list
);
}
/**
* 导出赠送金额日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:giftAmountLog:export')"
)
@Log
(
title
=
"赠送金额日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
GiftAmountLogVo
giftAmountLog
)
{
List
<
GiftAmountLogVo
>
list
=
giftAmountLogService
.
selectGiftAmountLogList
(
giftAmountLog
);
ExcelUtil
<
GiftAmountLogVo
>
util
=
new
ExcelUtil
<
GiftAmountLogVo
>(
GiftAmountLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"赠送金额日志数据"
);
}
/**
* 获取赠送金额日志详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:giftAmountLog:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
giftAmountLogService
.
selectGiftAmountLogById
(
id
));
}
/**
* 新增赠送金额日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:giftAmountLog:add')"
)
@Log
(
title
=
"赠送金额日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
GiftAmountLog
giftAmountLog
)
{
return
toAjax
(
giftAmountLogService
.
insertGiftAmountLog
(
giftAmountLog
));
}
/**
* 修改赠送金额日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:giftAmountLog:edit')"
)
@Log
(
title
=
"赠送金额日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
GiftAmountLog
giftAmountLog
)
{
return
toAjax
(
giftAmountLogService
.
updateGiftAmountLog
(
giftAmountLog
));
}
/**
* 删除赠送金额日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:giftAmountLog:remove')"
)
@Log
(
title
=
"赠送金额日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
giftAmountLogService
.
deleteGiftAmountLogByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/RechargeAmountLogController.java
0 → 100644
View file @
15d84e8e
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.RechargeAmountLog
;
import
share.system.domain.vo.RechargeAmountLogVo
;
import
share.system.service.RechargeAmountLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 充值金额日志Controller
*
* @author wuwenlong
* @date 2024-10-08
*/
@RestController
@RequestMapping
(
"/system/rechargeAmountLog"
)
public
class
RechargeAmountLogController
extends
BaseController
{
@Autowired
private
RechargeAmountLogService
rechargeAmountLogService
;
/**
* 查询充值金额日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:rechargeAmountLog:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
RechargeAmountLogVo
rechargeAmountLog
)
{
startPage
();
List
<
RechargeAmountLogVo
>
list
=
rechargeAmountLogService
.
selectRechargeAmountLogList
(
rechargeAmountLog
);
return
getDataTable
(
list
);
}
/**
* 导出充值金额日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:rechargeAmountLog:export')"
)
@Log
(
title
=
"充值金额日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
RechargeAmountLogVo
rechargeAmountLog
)
{
List
<
RechargeAmountLogVo
>
list
=
rechargeAmountLogService
.
selectRechargeAmountLogList
(
rechargeAmountLog
);
ExcelUtil
<
RechargeAmountLogVo
>
util
=
new
ExcelUtil
<
RechargeAmountLogVo
>(
RechargeAmountLogVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"充值金额日志数据"
);
}
/**
* 获取充值金额日志详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:rechargeAmountLog:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
rechargeAmountLogService
.
selectRechargeAmountLogById
(
id
));
}
/**
* 新增充值金额日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:rechargeAmountLog:add')"
)
@Log
(
title
=
"充值金额日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
RechargeAmountLog
rechargeAmountLog
)
{
return
toAjax
(
rechargeAmountLogService
.
insertRechargeAmountLog
(
rechargeAmountLog
));
}
/**
* 修改充值金额日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:rechargeAmountLog:edit')"
)
@Log
(
title
=
"充值金额日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
RechargeAmountLog
rechargeAmountLog
)
{
return
toAjax
(
rechargeAmountLogService
.
updateRechargeAmountLog
(
rechargeAmountLog
));
}
/**
* 删除充值金额日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:rechargeAmountLog:remove')"
)
@Log
(
title
=
"充值金额日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
rechargeAmountLogService
.
deleteRechargeAmountLogByIds
(
ids
));
}
}
share-system/src/main/java/share/system/domain/ConsumerWallet.java
View file @
15d84e8e
...
...
@@ -39,6 +39,18 @@ public class ConsumerWallet extends BaseEntity {
private
BigDecimal
balance
;
/**
* 充值金额
*/
@Excel
(
name
=
"充值金额"
)
private
BigDecimal
rechargeAmount
;
/**
* 赠送金额
*/
@Excel
(
name
=
"赠送金额"
)
private
BigDecimal
giftAmount
;
/**
* 时长
*/
@Excel
(
name
=
"时长"
)
...
...
share-system/src/main/java/share/system/domain/GiftAmountLog.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 赠送金额日志对象 s_gift_amount_log
*
* @author wuwenlong
* @date 2024-10-08
*/
@Data
public
class
GiftAmountLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* ID
*/
private
Long
id
;
/**
* 用户id
*/
private
Long
consumerId
;
/**
* 当前金额
*/
@Excel
(
name
=
"当前金额"
)
private
BigDecimal
currentAmount
;
/**
* 变动金额
*/
@Excel
(
name
=
"变动金额"
)
private
BigDecimal
variableAmount
;
/**
* 操作类型
*/
@Excel
(
name
=
"操作类型"
)
private
Long
operationType
;
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
/**
* 是否删除
*/
private
Long
isDelete
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"currentAmount"
,
getCurrentAmount
())
.
append
(
"variableAmount"
,
getVariableAmount
())
.
append
(
"operationType"
,
getOperationType
())
.
append
(
"operationTime"
,
getOperationTime
())
.
append
(
"isDelete"
,
getIsDelete
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/RechargeAmountLog.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 充值金额日志对象 s_recharge_amount_log
*
* @author wuwenlong
* @date 2024-10-08
*/
@Data
public
class
RechargeAmountLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* ID
*/
private
Long
id
;
/**
* 用户id
*/
@Excel
(
name
=
"用户id"
)
private
Long
consumerId
;
/**
* 当前金额
*/
@Excel
(
name
=
"当前金额"
)
private
BigDecimal
currentAmount
;
/**
* 变动金额
*/
@Excel
(
name
=
"变动金额"
)
private
BigDecimal
variableAmount
;
/**
* 操作类型
*/
@Excel
(
name
=
"操作类型"
)
private
Long
operationType
;
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
/**
* 是否删除
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField
(
select
=
false
)
private
Long
isDelete
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"currentAmount"
,
getCurrentAmount
())
.
append
(
"variableAmount"
,
getVariableAmount
())
.
append
(
"operationType"
,
getOperationType
())
.
append
(
"operationTime"
,
getOperationTime
())
.
append
(
"isDelete"
,
getIsDelete
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/vo/GiftAmountLogVo.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.system.domain.GiftAmountLog
;
@Data
public
class
GiftAmountLogVo
extends
GiftAmountLog
{
private
String
nickName
;
private
String
avatar
;
private
String
phone
;
}
share-system/src/main/java/share/system/domain/vo/RechargeAmountLogVo.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.system.domain.RechargeAmountLog
;
@Data
public
class
RechargeAmountLogVo
extends
RechargeAmountLog
{
private
String
nickName
;
private
String
avatar
;
private
String
phone
;
}
share-system/src/main/java/share/system/mapper/GiftAmountLogMapper.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.GiftAmountLog
;
import
share.system.domain.vo.GiftAmountLogVo
;
import
java.util.List
;
/**
* 赠送金额日志Mapper接口
*
* @author wuwenlong
* @date 2024-10-08
*/
public
interface
GiftAmountLogMapper
extends
BaseMapper
<
GiftAmountLog
>
{
/**
* 查询赠送金额日志
*
* @param id 赠送金额日志主键
* @return 赠送金额日志
*/
public
GiftAmountLog
selectGiftAmountLogById
(
Long
id
);
/**
* 查询赠送金额日志列表
*
* @param giftAmountLog 赠送金额日志
* @return 赠送金额日志集合
*/
public
List
<
GiftAmountLogVo
>
selectGiftAmountLogList
(
GiftAmountLogVo
giftAmountLog
);
/**
* 新增赠送金额日志
*
* @param giftAmountLog 赠送金额日志
* @return 结果
*/
public
int
insertGiftAmountLog
(
GiftAmountLog
giftAmountLog
);
/**
* 修改赠送金额日志
*
* @param giftAmountLog 赠送金额日志
* @return 结果
*/
public
int
updateGiftAmountLog
(
GiftAmountLog
giftAmountLog
);
/**
* 删除赠送金额日志
*
* @param id 赠送金额日志主键
* @return 结果
*/
public
int
deleteGiftAmountLogById
(
Long
id
);
/**
* 批量删除赠送金额日志
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteGiftAmountLogByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/RechargeAmountLogMapper.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.RechargeAmountLog
;
import
share.system.domain.vo.RechargeAmountLogVo
;
import
java.util.List
;
/**
* 充值金额日志Mapper接口
*
* @author wuwenlong
* @date 2024-10-08
*/
public
interface
RechargeAmountLogMapper
extends
BaseMapper
<
RechargeAmountLog
>
{
/**
* 查询充值金额日志
*
* @param id 充值金额日志主键
* @return 充值金额日志
*/
public
RechargeAmountLog
selectRechargeAmountLogById
(
Long
id
);
/**
* 查询充值金额日志列表
*
* @param rechargeAmountLog 充值金额日志
* @return 充值金额日志集合
*/
public
List
<
RechargeAmountLogVo
>
selectRechargeAmountLogList
(
RechargeAmountLogVo
rechargeAmountLog
);
/**
* 新增充值金额日志
*
* @param rechargeAmountLog 充值金额日志
* @return 结果
*/
public
int
insertRechargeAmountLog
(
RechargeAmountLog
rechargeAmountLog
);
/**
* 修改充值金额日志
*
* @param rechargeAmountLog 充值金额日志
* @return 结果
*/
public
int
updateRechargeAmountLog
(
RechargeAmountLog
rechargeAmountLog
);
/**
* 删除充值金额日志
*
* @param id 充值金额日志主键
* @return 结果
*/
public
int
deleteRechargeAmountLogById
(
Long
id
);
/**
* 批量删除充值金额日志
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteRechargeAmountLogByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/service/GiftAmountLogService.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.GiftAmountLog
;
import
share.system.domain.vo.GiftAmountLogVo
;
import
java.util.List
;
/**
* 赠送金额日志Service接口
*
* @author wuwenlong
* @date 2024-10-08
*/
public
interface
GiftAmountLogService
extends
IService
<
GiftAmountLog
>
{
/**
* 查询赠送金额日志
*
* @param id 赠送金额日志主键
* @return 赠送金额日志
*/
public
GiftAmountLog
selectGiftAmountLogById
(
Long
id
);
/**
* 查询赠送金额日志列表
*
* @param giftAmountLog 赠送金额日志
* @return 赠送金额日志集合
*/
public
List
<
GiftAmountLogVo
>
selectGiftAmountLogList
(
GiftAmountLogVo
giftAmountLog
);
/**
* 新增赠送金额日志
*
* @param giftAmountLog 赠送金额日志
* @return 结果
*/
public
int
insertGiftAmountLog
(
GiftAmountLog
giftAmountLog
);
/**
* 修改赠送金额日志
*
* @param giftAmountLog 赠送金额日志
* @return 结果
*/
public
int
updateGiftAmountLog
(
GiftAmountLog
giftAmountLog
);
/**
* 批量删除赠送金额日志
*
* @param ids 需要删除的赠送金额日志主键集合
* @return 结果
*/
public
int
deleteGiftAmountLogByIds
(
Long
[]
ids
);
/**
* 删除赠送金额日志信息
*
* @param id 赠送金额日志主键
* @return 结果
*/
public
int
deleteGiftAmountLogById
(
Long
id
);
}
share-system/src/main/java/share/system/service/RechargeAmountLogService.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.RechargeAmountLog
;
import
share.system.domain.vo.RechargeAmountLogVo
;
import
java.util.List
;
/**
* 充值金额日志Service接口
*
* @author wuwenlong
* @date 2024-10-08
*/
public
interface
RechargeAmountLogService
extends
IService
<
RechargeAmountLog
>
{
/**
* 查询充值金额日志
*
* @param id 充值金额日志主键
* @return 充值金额日志
*/
public
RechargeAmountLog
selectRechargeAmountLogById
(
Long
id
);
/**
* 查询充值金额日志列表
*
* @param rechargeAmountLog 充值金额日志
* @return 充值金额日志集合
*/
public
List
<
RechargeAmountLogVo
>
selectRechargeAmountLogList
(
RechargeAmountLogVo
rechargeAmountLog
);
/**
* 新增充值金额日志
*
* @param rechargeAmountLog 充值金额日志
* @return 结果
*/
public
int
insertRechargeAmountLog
(
RechargeAmountLog
rechargeAmountLog
);
/**
* 修改充值金额日志
*
* @param rechargeAmountLog 充值金额日志
* @return 结果
*/
public
int
updateRechargeAmountLog
(
RechargeAmountLog
rechargeAmountLog
);
/**
* 批量删除充值金额日志
*
* @param ids 需要删除的充值金额日志主键集合
* @return 结果
*/
public
int
deleteRechargeAmountLogByIds
(
Long
[]
ids
);
/**
* 删除充值金额日志信息
*
* @param id 充值金额日志主键
* @return 结果
*/
public
int
deleteRechargeAmountLogById
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/GiftAmountLogServiceImpl.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.GiftAmountLog
;
import
share.system.domain.vo.GiftAmountLogVo
;
import
share.system.mapper.GiftAmountLogMapper
;
import
share.system.service.GiftAmountLogService
;
import
java.util.List
;
/**
* 赠送金额日志Service业务层处理
*
* @author wuwenlong
* @date 2024-10-08
*/
@Service
public
class
GiftAmountLogServiceImpl
extends
ServiceImpl
<
GiftAmountLogMapper
,
GiftAmountLog
>
implements
GiftAmountLogService
{
@Autowired
private
GiftAmountLogMapper
giftAmountLogMapper
;
/**
* 查询赠送金额日志
*
* @param id 赠送金额日志主键
* @return 赠送金额日志
*/
@Override
public
GiftAmountLog
selectGiftAmountLogById
(
Long
id
)
{
return
giftAmountLogMapper
.
selectGiftAmountLogById
(
id
);
}
/**
* 查询赠送金额日志列表
*
* @param giftAmountLog 赠送金额日志
* @return 赠送金额日志
*/
@Override
public
List
<
GiftAmountLogVo
>
selectGiftAmountLogList
(
GiftAmountLogVo
giftAmountLog
)
{
return
giftAmountLogMapper
.
selectGiftAmountLogList
(
giftAmountLog
);
}
/**
* 新增赠送金额日志
*
* @param giftAmountLog 赠送金额日志
* @return 结果
*/
@Override
public
int
insertGiftAmountLog
(
GiftAmountLog
giftAmountLog
)
{
giftAmountLog
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
giftAmountLogMapper
.
insertGiftAmountLog
(
giftAmountLog
);
}
/**
* 修改赠送金额日志
*
* @param giftAmountLog 赠送金额日志
* @return 结果
*/
@Override
public
int
updateGiftAmountLog
(
GiftAmountLog
giftAmountLog
)
{
giftAmountLog
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
giftAmountLogMapper
.
updateGiftAmountLog
(
giftAmountLog
);
}
/**
* 批量删除赠送金额日志
*
* @param ids 需要删除的赠送金额日志主键
* @return 结果
*/
@Override
public
int
deleteGiftAmountLogByIds
(
Long
[]
ids
)
{
return
giftAmountLogMapper
.
deleteGiftAmountLogByIds
(
ids
);
}
/**
* 删除赠送金额日志信息
*
* @param id 赠送金额日志主键
* @return 结果
*/
@Override
public
int
deleteGiftAmountLogById
(
Long
id
)
{
return
giftAmountLogMapper
.
deleteGiftAmountLogById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/RechargeAmountLogServiceImpl.java
0 → 100644
View file @
15d84e8e
package
share
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.RechargeAmountLog
;
import
share.system.domain.vo.RechargeAmountLogVo
;
import
share.system.mapper.RechargeAmountLogMapper
;
import
share.system.service.RechargeAmountLogService
;
import
java.util.List
;
/**
* 充值金额日志Service业务层处理
*
* @author wuwenlong
* @date 2024-10-08
*/
@Service
public
class
RechargeAmountLogServiceImpl
extends
ServiceImpl
<
RechargeAmountLogMapper
,
RechargeAmountLog
>
implements
RechargeAmountLogService
{
@Autowired
private
RechargeAmountLogMapper
rechargeAmountLogMapper
;
/**
* 查询充值金额日志
*
* @param id 充值金额日志主键
* @return 充值金额日志
*/
@Override
public
RechargeAmountLog
selectRechargeAmountLogById
(
Long
id
)
{
return
rechargeAmountLogMapper
.
selectRechargeAmountLogById
(
id
);
}
/**
* 查询充值金额日志列表
*
* @param rechargeAmountLog 充值金额日志
* @return 充值金额日志
*/
@Override
public
List
<
RechargeAmountLogVo
>
selectRechargeAmountLogList
(
RechargeAmountLogVo
rechargeAmountLog
)
{
return
rechargeAmountLogMapper
.
selectRechargeAmountLogList
(
rechargeAmountLog
);
}
/**
* 新增充值金额日志
*
* @param rechargeAmountLog 充值金额日志
* @return 结果
*/
@Override
public
int
insertRechargeAmountLog
(
RechargeAmountLog
rechargeAmountLog
)
{
rechargeAmountLog
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
rechargeAmountLogMapper
.
insertRechargeAmountLog
(
rechargeAmountLog
);
}
/**
* 修改充值金额日志
*
* @param rechargeAmountLog 充值金额日志
* @return 结果
*/
@Override
public
int
updateRechargeAmountLog
(
RechargeAmountLog
rechargeAmountLog
)
{
rechargeAmountLog
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
rechargeAmountLogMapper
.
updateRechargeAmountLog
(
rechargeAmountLog
);
}
/**
* 批量删除充值金额日志
*
* @param ids 需要删除的充值金额日志主键
* @return 结果
*/
@Override
public
int
deleteRechargeAmountLogByIds
(
Long
[]
ids
)
{
return
rechargeAmountLogMapper
.
deleteRechargeAmountLogByIds
(
ids
);
}
/**
* 删除充值金额日志信息
*
* @param id 充值金额日志主键
* @return 结果
*/
@Override
public
int
deleteRechargeAmountLogById
(
Long
id
)
{
return
rechargeAmountLogMapper
.
deleteRechargeAmountLogById
(
id
);
}
}
share-system/src/main/resources/mapper/system/ConsumerWalletMapper.xml
View file @
15d84e8e
...
...
@@ -11,6 +11,8 @@
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"balance"
column=
"balance"
/>
<result
property=
"rechargeAmount"
column=
"recharge_amount"
/>
<result
property=
"giftAmount"
column=
"gift_amount"
/>
<result
property=
"remainingDuration"
column=
"remaining_duration"
/>
<result
property=
"remainingIntegral"
column=
"remaining_integral"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
...
...
@@ -27,6 +29,8 @@
select id,
consumer_id,
balance,
recharge_amount,
gift_amount,
remaining_duration,
remaining_integral,
is_delete,
...
...
@@ -47,6 +51,8 @@
c.phone,
c.avatar,
w.balance,
w.recharge_amount,
w.gift_amount,
w.remaining_duration,
w.remaining_integral,
w.is_delete,
...
...
@@ -80,6 +86,8 @@
c.phone,
c.avatar,
w.balance,
w.recharge_amount,
w.gift_amount,
w.remaining_duration,
w.remaining_integral,
w.is_delete,
...
...
@@ -109,6 +117,8 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"balance != null"
>
balance,
</if>
<if
test=
"rechargeAmount != null"
>
recharge_amount,
</if>
<if
test=
"giftAmount != null"
>
gift_amount,
</if>
<if
test=
"remainingDuration != null"
>
remaining_duration,
</if>
<if
test=
"remainingIntegral != null"
>
remaining_integral,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
...
...
@@ -123,6 +133,8 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"balance != null"
>
#{balance},
</if>
<if
test=
"rechargeAmount != null"
>
#{rechargeAmount},
</if>
<if
test=
"giftAmount != null"
>
#{giftAmount},
</if>
<if
test=
"remainingDuration != null"
>
#{remainingDuration},
</if>
<if
test=
"remainingIntegral != null"
>
#{remainingIntegral},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
...
...
@@ -141,6 +153,8 @@
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"balance != null"
>
balance = #{balance},
</if>
<if
test=
"rechargeAmount != null"
>
recharge_amount = #{rechargeAmount},
</if>
<if
test=
"giftAmount != null"
>
gift_amount = #{giftAmount},
</if>
<if
test=
"remainingDuration != null"
>
remaining_duration = #{remainingDuration},
</if>
<if
test=
"remainingIntegral != null"
>
remaining_integral = #{remainingIntegral},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
...
...
share-system/src/main/resources/mapper/system/GiftAmountLogMapper.xml
0 → 100644
View file @
15d84e8e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.GiftAmountLogMapper"
>
<resultMap
type=
"GiftAmountLogVo"
id=
"GiftAmountLogResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"currentAmount"
column=
"current_amount"
/>
<result
property=
"variableAmount"
column=
"variable_amount"
/>
<result
property=
"operationType"
column=
"operation_type"
/>
<result
property=
"operationTime"
column=
"operation_time"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectGiftAmountLogVo"
>
select id,
consumer_id,
current_amount,
variable_amount,
operation_type,
operation_time,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_gift_amount_log
</sql>
<select
id=
"selectGiftAmountLogList"
parameterType=
"GiftAmountLogVo"
resultMap=
"GiftAmountLogResult"
>
select b.id,
b.consumer_id,
c.nick_name,
c.phone,
c.avatar,
b.variable_amount,
b.current_amount,
b.operation_type,
b.operation_time,
b. is_delete,
b. create_by,
b. create_time,
b. update_by,
b.update_time,
b. remark
from s_gift_amount_log b join s_consumer c on b.consumer_id = c.id
<where>
<if
test=
"nickName != null and nickName != ''"
>
and c.nick_name like concat('%', #{nickName},'%')
</if>
<if
test=
"phone != null and phone != ''"
>
and c.phone like concat('%', #{phone},'%')
</if>
</where>
ORDER BY b.operation_time DESC
</select>
<select
id=
"selectGiftAmountLogById"
parameterType=
"Long"
resultMap=
"GiftAmountLogResult"
>
<include
refid=
"selectGiftAmountLogVo"
/>
where id = #{id}
</select>
<insert
id=
"insertGiftAmountLog"
parameterType=
"GiftAmountLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_gift_amount_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"currentAmount != null"
>
current_amount,
</if>
<if
test=
"variableAmount != null"
>
variable_amount,
</if>
<if
test=
"operationType != null"
>
operation_type,
</if>
<if
test=
"operationTime != null"
>
operation_time,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"currentAmount != null"
>
#{currentAmount},
</if>
<if
test=
"variableAmount != null"
>
#{variableAmount},
</if>
<if
test=
"operationType != null"
>
#{operationType},
</if>
<if
test=
"operationTime != null"
>
#{operationTime},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateGiftAmountLog"
parameterType=
"GiftAmountLog"
>
update s_gift_amount_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"currentAmount != null"
>
current_amount = #{currentAmount},
</if>
<if
test=
"variableAmount != null"
>
variable_amount = #{variableAmount},
</if>
<if
test=
"operationType != null"
>
operation_type = #{operationType},
</if>
<if
test=
"operationTime != null"
>
operation_time = #{operationTime},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteGiftAmountLogById"
parameterType=
"Long"
>
delete
from s_gift_amount_log
where id = #{id}
</delete>
<delete
id=
"deleteGiftAmountLogByIds"
parameterType=
"String"
>
delete from s_gift_amount_log where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
share-system/src/main/resources/mapper/system/RechargeAmountLogMapper.xml
0 → 100644
View file @
15d84e8e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.RechargeAmountLogMapper"
>
<resultMap
type=
"RechargeAmountLogVo"
id=
"RechargeAmountLogResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"currentAmount"
column=
"current_amount"
/>
<result
property=
"variableAmount"
column=
"variable_amount"
/>
<result
property=
"operationType"
column=
"operation_type"
/>
<result
property=
"operationTime"
column=
"operation_time"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectRechargeAmountLogVo"
>
select id,
consumer_id,
current_amount,
variable_amount,
operation_type,
operation_time,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_recharge_amount_log
</sql>
<select
id=
"selectRechargeAmountLogList"
parameterType=
"RechargeAmountLogVo"
resultMap=
"RechargeAmountLogResult"
>
select b.id,
b.consumer_id,
c.nick_name,
c.phone,
c.avatar,
b.variable_amount,
b.current_amount,
b.operation_type,
b.operation_time,
b. is_delete,
b. create_by,
b. create_time,
b. update_by,
b.update_time,
b. remark
from s_recharge_amount_log b join s_consumer c on b.consumer_id = c.id
<where>
<if
test=
"nickName != null and nickName != ''"
>
and c.nick_name like concat('%', #{nickName},'%')
</if>
<if
test=
"phone != null and phone != ''"
>
and c.phone like concat('%', #{phone},'%')
</if>
<if
test=
"currentAmount != null "
>
and b.current_amount = #{currentAmount}
</if>
<if
test=
"variableAmount != null "
>
and b.variable_amount = #{variableAmount}
</if>
</where>
ORDER BY b.operation_time DESC
</select>
<select
id=
"selectRechargeAmountLogById"
parameterType=
"Long"
resultMap=
"RechargeAmountLogResult"
>
<include
refid=
"selectRechargeAmountLogVo"
/>
where id = #{id}
</select>
<insert
id=
"insertRechargeAmountLog"
parameterType=
"RechargeAmountLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_recharge_amount_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"currentAmount != null"
>
current_amount,
</if>
<if
test=
"variableAmount != null"
>
variable_amount,
</if>
<if
test=
"operationType != null"
>
operation_type,
</if>
<if
test=
"operationTime != null"
>
operation_time,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"currentAmount != null"
>
#{currentAmount},
</if>
<if
test=
"variableAmount != null"
>
#{variableAmount},
</if>
<if
test=
"operationType != null"
>
#{operationType},
</if>
<if
test=
"operationTime != null"
>
#{operationTime},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateRechargeAmountLog"
parameterType=
"RechargeAmountLog"
>
update s_recharge_amount_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"currentAmount != null"
>
current_amount = #{currentAmount},
</if>
<if
test=
"variableAmount != null"
>
variable_amount = #{variableAmount},
</if>
<if
test=
"operationType != null"
>
operation_type = #{operationType},
</if>
<if
test=
"operationTime != null"
>
operation_time = #{operationTime},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteRechargeAmountLogById"
parameterType=
"Long"
>
delete
from s_recharge_amount_log
where id = #{id}
</delete>
<delete
id=
"deleteRechargeAmountLogByIds"
parameterType=
"String"
>
delete from s_recharge_amount_log where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
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