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
811b37e3
Commit
811b37e3
authored
Oct 09, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
cbd6cbd6
1c69cb22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
1450 additions
and
24 deletions
+1450
-24
GiftAmountLogController.java
.../share/web/controller/system/GiftAmountLogController.java
+92
-0
RechargeAmountLogController.java
...re/web/controller/system/RechargeAmountLogController.java
+92
-0
ReceiptRdeisEnum.java
...on/src/main/java/share/common/enums/ReceiptRdeisEnum.java
+3
-1
ConsumerSecondaryCardController.java
...eb/controller/system/ConsumerSecondaryCardController.java
+2
-2
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+44
-2
ConsumerMonthlyCard.java
...rc/main/java/share/system/domain/ConsumerMonthlyCard.java
+7
-5
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
MonthlyCardConf.java
...em/src/main/java/share/system/domain/MonthlyCardConf.java
+1
-1
MonthlyCardLog.java
...tem/src/main/java/share/system/domain/MonthlyCardLog.java
+20
-2
RechargeAmountLog.java
.../src/main/java/share/system/domain/RechargeAmountLog.java
+87
-0
SOrder.java
share-system/src/main/java/share/system/domain/SOrder.java
+12
-0
SecondaryCardLog.java
...m/src/main/java/share/system/domain/SecondaryCardLog.java
+17
-0
ConsumerSecondaryCardVo.java
.../java/share/system/domain/vo/ConsumerSecondaryCardVo.java
+4
-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
SConsumerVo.java
...tem/src/main/java/share/system/domain/vo/SConsumerVo.java
+4
-2
ConsumerMonthlyCardMapper.java
...n/java/share/system/mapper/ConsumerMonthlyCardMapper.java
+1
-1
GiftAmountLogMapper.java
...rc/main/java/share/system/mapper/GiftAmountLogMapper.java
+63
-0
RechargeAmountLogMapper.java
...ain/java/share/system/mapper/RechargeAmountLogMapper.java
+63
-0
CreateOrderRequest.java
...rc/main/java/share/system/request/CreateOrderRequest.java
+8
-0
OrderComputedPriceRequest.java
.../java/share/system/request/OrderComputedPriceRequest.java
+8
-0
ComputedOrderPriceResponse.java
...ava/share/system/response/ComputedOrderPriceResponse.java
+7
-0
ConsumerMonthlyCardService.java
...java/share/system/service/ConsumerMonthlyCardService.java
+1
-1
ConsumerSecondaryCardService.java
...va/share/system/service/ConsumerSecondaryCardService.java
+2
-0
GiftAmountLogService.java
.../main/java/share/system/service/GiftAmountLogService.java
+63
-0
RechargeAmountLogService.java
...n/java/share/system/service/RechargeAmountLogService.java
+63
-0
ConsumerMonthlyCardServiceImpl.java
...e/system/service/impl/ConsumerMonthlyCardServiceImpl.java
+1
-1
ConsumerSecondaryCardServiceImpl.java
...system/service/impl/ConsumerSecondaryCardServiceImpl.java
+34
-0
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+50
-0
GiftAmountLogServiceImpl.java
...a/share/system/service/impl/GiftAmountLogServiceImpl.java
+92
-0
MonthlyCardOrderServiceImpl.java
...hare/system/service/impl/MonthlyCardOrderServiceImpl.java
+19
-0
RechargeAmountLogServiceImpl.java
...are/system/service/impl/RechargeAmountLogServiceImpl.java
+92
-0
RechargeServiceImpl.java
...n/java/share/system/service/impl/RechargeServiceImpl.java
+2
-0
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+14
-6
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+0
-0
SecondaryCardOrderServiceImpl.java
...re/system/service/impl/SecondaryCardOrderServiceImpl.java
+19
-0
ConsumerWalletMapper.xml
...src/main/resources/mapper/system/ConsumerWalletMapper.xml
+14
-0
GiftAmountLogMapper.xml
.../src/main/resources/mapper/system/GiftAmountLogMapper.xml
+131
-0
MonthlyCardLogMapper.xml
...src/main/resources/mapper/system/MonthlyCardLogMapper.xml
+13
-0
RechargeAmountLogMapper.xml
.../main/resources/mapper/system/RechargeAmountLogMapper.xml
+133
-0
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+40
-0
SecondaryCardLogMapper.xml
...c/main/resources/mapper/system/SecondaryCardLogMapper.xml
+13
-0
No files found.
share-admin/src/main/java/share/web/controller/system/GiftAmountLogController.java
0 → 100644
View file @
811b37e3
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 @
811b37e3
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-common/src/main/java/share/common/enums/ReceiptRdeisEnum.java
View file @
811b37e3
...
@@ -13,7 +13,9 @@ public enum ReceiptRdeisEnum {
...
@@ -13,7 +13,9 @@ public enum ReceiptRdeisEnum {
//房间15分钟过期
//房间15分钟过期
ROOM_EXPIRE_TIME
(
9
,
"ROOM_EXPIRE_TIME."
),
ROOM_EXPIRE_TIME
(
9
,
"ROOM_EXPIRE_TIME."
),
ORDER_CANCEL_PAY
(
10
,
"ORDER_CANCEL_PAY."
),
ORDER_CANCEL_PAY
(
10
,
"ORDER_CANCEL_PAY."
),
EQUITY_MEMBERS_TIME
(
11
,
"EQUITY_MEMBERS_TIME."
)
EQUITY_MEMBERS_TIME
(
11
,
"EQUITY_MEMBERS_TIME."
),
MONTHLY_CARD
(
12
,
"MONTHLY_CARD."
),
SECONDARY_CARD
(
13
,
"SECONDARY_CARD."
)
;
;
...
...
share-front/src/main/java/share/web/controller/system/ConsumerSecondaryCardController.java
View file @
811b37e3
...
@@ -35,8 +35,8 @@ public class ConsumerSecondaryCardController extends BaseController {
...
@@ -35,8 +35,8 @@ public class ConsumerSecondaryCardController extends BaseController {
}
}
@GetMapping
(
"/query"
)
@GetMapping
(
"/query"
)
public
AjaxResult
selectByConsumerId
()
{
public
AjaxResult
selectByConsumerId
(
Long
packId
)
{
return
success
(
consumerSecondaryCardService
.
selectBy
ConsumerId
(
));
return
success
(
consumerSecondaryCardService
.
selectBy
PaclId
(
packId
));
}
}
}
}
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
811b37e3
...
@@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.dianping.openapi.sdk.api.oauth.entity.CustomerRefreshTokenResponse
;
import
com.dianping.openapi.sdk.api.oauth.entity.CustomerRefreshTokenResponse
;
import
com.dianping.openapi.sdk.api.tuangou.entity.TuangouReceiptGetConsumedReponseEntity
;
import
com.dianping.openapi.sdk.api.tuangou.entity.TuangouReceiptGetConsumedReponseEntity
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
lombok.val
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -33,7 +32,6 @@ import share.system.domain.vo.MqttxVo;
...
@@ -33,7 +32,6 @@ import share.system.domain.vo.MqttxVo;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -116,6 +114,12 @@ public class RedisTask {
...
@@ -116,6 +114,12 @@ public class RedisTask {
@Autowired
@Autowired
private
EquityFundExcessService
equityFundExcessService
;
private
EquityFundExcessService
equityFundExcessService
;
@Autowired
private
ConsumerMonthlyCardService
consumerMonthlyCardService
;
@Autowired
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
//15分钟的常量
//15分钟的常量
final
long
FIFTEEN_MINUTES
=
60
*
15
;
final
long
FIFTEEN_MINUTES
=
60
*
15
;
...
@@ -780,4 +784,42 @@ public class RedisTask {
...
@@ -780,4 +784,42 @@ public class RedisTask {
});
});
logger
.
debug
(
"AutoUpdateOpenid:自动更新用户unionid结束"
);
logger
.
debug
(
"AutoUpdateOpenid:自动更新用户unionid结束"
);
}
}
@XxlJob
(
"AutomaticallyMonthlyCard"
)
public
void
AutomaticallyMonthlyCard
()
{
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡开始"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
MONTHLY_CARD
.
getValue
()
+
"*"
);
if
(
keys
.
size
()
==
0
)
return
;
keys
.
stream
().
forEach
(
key
->
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Long
consumerMonthlyCardId
=
jsonObject
.
getLong
(
"consumerMonthlyCardId"
);
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
consumerMonthlyCardService
.
removeById
(
consumerMonthlyCardId
);
redisUtil
.
delete
(
key
);
}
});
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡结束"
);
}
@XxlJob
(
"AutomaticallySecondaryCard"
)
public
void
AutomaticallySecondaryCard
()
{
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡开始"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
SECONDARY_CARD
.
getValue
()
+
"*"
);
if
(
keys
.
size
()
==
0
)
return
;
keys
.
stream
().
forEach
(
key
->
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Long
consumerSecondaryCardId
=
jsonObject
.
getLong
(
"consumerSecondaryCardId"
);
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
consumerSecondaryCardService
.
removeById
(
consumerSecondaryCardId
);
redisUtil
.
delete
(
key
);
}
});
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡结束"
);
}
}
}
share-system/src/main/java/share/system/domain/ConsumerMonthlyCard.java
View file @
811b37e3
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
@@ -10,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
...
@@ -10,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -51,7 +50,7 @@ public class ConsumerMonthlyCard extends BaseEntity {
...
@@ -51,7 +50,7 @@ public class ConsumerMonthlyCard extends BaseEntity {
* 免费时长
* 免费时长
*/
*/
@Excel
(
name
=
"免费时长"
)
@Excel
(
name
=
"免费时长"
)
private
Long
freeDuration
;
private
BigDecimal
freeDuration
;
/**
/**
* 月卡天数
* 月卡天数
...
@@ -69,7 +68,10 @@ public class ConsumerMonthlyCard extends BaseEntity {
...
@@ -69,7 +68,10 @@ public class ConsumerMonthlyCard extends BaseEntity {
/**
/**
* 删除标记:1-删除,0-正常
* 删除标记:1-删除,0-正常
*/
*/
private
Long
isDelete
;
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField
(
select
=
false
)
private
Integer
isDelete
;
@Override
@Override
...
...
share-system/src/main/java/share/system/domain/ConsumerWallet.java
View file @
811b37e3
...
@@ -39,6 +39,18 @@ public class ConsumerWallet extends BaseEntity {
...
@@ -39,6 +39,18 @@ public class ConsumerWallet extends BaseEntity {
private
BigDecimal
balance
;
private
BigDecimal
balance
;
/**
/**
* 充值金额
*/
@Excel
(
name
=
"充值金额"
)
private
BigDecimal
rechargeAmount
;
/**
* 赠送金额
*/
@Excel
(
name
=
"赠送金额"
)
private
BigDecimal
giftAmount
;
/**
* 时长
* 时长
*/
*/
@Excel
(
name
=
"时长"
)
@Excel
(
name
=
"时长"
)
...
...
share-system/src/main/java/share/system/domain/GiftAmountLog.java
0 → 100644
View file @
811b37e3
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
Integer
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/MonthlyCardConf.java
View file @
811b37e3
...
@@ -43,7 +43,7 @@ public class MonthlyCardConf extends BaseEntity {
...
@@ -43,7 +43,7 @@ public class MonthlyCardConf extends BaseEntity {
* 免费时长
* 免费时长
*/
*/
@Excel
(
name
=
"免费时长"
)
@Excel
(
name
=
"免费时长"
)
private
Long
freeDuration
;
private
BigDecimal
freeDuration
;
/**
/**
* 月卡天数
* 月卡天数
...
...
share-system/src/main/java/share/system/domain/MonthlyCardLog.java
View file @
811b37e3
...
@@ -3,12 +3,16 @@ package share.system.domain;
...
@@ -3,12 +3,16 @@ package share.system.domain;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
/**
* 月卡使用记录对象 s_monthly_card_log
* 月卡使用记录对象 s_monthly_card_log
*
*
...
@@ -47,13 +51,27 @@ public class MonthlyCardLog extends BaseEntity {
...
@@ -47,13 +51,27 @@ public class MonthlyCardLog extends BaseEntity {
* 使用时长
* 使用时长
*/
*/
@Excel
(
name
=
"使用时长"
)
@Excel
(
name
=
"使用时长"
)
private
Long
useDuration
;
private
BigDecimal
useDuration
;
/**
/**
* 剩余时长
* 剩余时长
*/
*/
@Excel
(
name
=
"剩余时长"
)
@Excel
(
name
=
"剩余时长"
)
private
Long
residueDuration
;
private
BigDecimal
residueDuration
;
/**
* 操作类型
*/
@Excel
(
name
=
"操作类型"
)
private
Integer
operationType
;
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
/**
/**
* 删除标记:1-删除,0-正常
* 删除标记:1-删除,0-正常
...
...
share-system/src/main/java/share/system/domain/RechargeAmountLog.java
0 → 100644
View file @
811b37e3
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
Integer
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/SOrder.java
View file @
811b37e3
...
@@ -81,6 +81,12 @@ public class SOrder extends BaseEntity
...
@@ -81,6 +81,12 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"优惠券金额"
)
@Excel
(
name
=
"优惠券金额"
)
private
BigDecimal
couponPrice
;
private
BigDecimal
couponPrice
;
@Excel
(
name
=
"次卡ID"
)
private
Long
secondaryCardId
;
@Excel
(
name
=
"月卡ID"
)
private
Long
monthlyCardId
;
@Excel
(
name
=
"订单总价"
)
@Excel
(
name
=
"订单总价"
)
private
BigDecimal
totalPrice
;
private
BigDecimal
totalPrice
;
...
@@ -99,6 +105,12 @@ public class SOrder extends BaseEntity
...
@@ -99,6 +105,12 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"使用余额"
)
@Excel
(
name
=
"使用余额"
)
private
BigDecimal
balance
;
private
BigDecimal
balance
;
@Excel
(
name
=
"充值金额"
)
private
BigDecimal
rechargeAmount
;
@Excel
(
name
=
"赠送金额"
)
private
BigDecimal
giftAmount
;
@Excel
(
name
=
"优惠比例"
)
@Excel
(
name
=
"优惠比例"
)
private
BigDecimal
discountRatio
;
private
BigDecimal
discountRatio
;
...
...
share-system/src/main/java/share/system/domain/SecondaryCardLog.java
View file @
811b37e3
...
@@ -3,12 +3,15 @@ package share.system.domain;
...
@@ -3,12 +3,15 @@ package share.system.domain;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
/**
* 次卡使用记录对象 s_secondary_card_log
* 次卡使用记录对象 s_secondary_card_log
*
*
...
@@ -62,6 +65,20 @@ public class SecondaryCardLog extends BaseEntity {
...
@@ -62,6 +65,20 @@ public class SecondaryCardLog extends BaseEntity {
private
Long
residueCount
;
private
Long
residueCount
;
/**
/**
* 操作类型
*/
@Excel
(
name
=
"操作类型"
)
private
Integer
operationType
;
/**
* 操作时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
operationTime
;
/**
* 删除标记:1-删除,0-正常
* 删除标记:1-删除,0-正常
*/
*/
//逻辑删除注解(0 未删除 1 已删除)
//逻辑删除注解(0 未删除 1 已删除)
...
...
share-system/src/main/java/share/system/domain/vo/ConsumerSecondaryCardVo.java
View file @
811b37e3
...
@@ -19,4 +19,8 @@ public class ConsumerSecondaryCardVo extends ConsumerSecondaryCard {
...
@@ -19,4 +19,8 @@ public class ConsumerSecondaryCardVo extends ConsumerSecondaryCard {
private
String
confName
;
private
String
confName
;
//次卡金额
//次卡金额
private
BigDecimal
confAmount
;
private
BigDecimal
confAmount
;
//是否适用当前套餐
private
Integer
isUse
;
//原因
private
String
reason
;
}
}
share-system/src/main/java/share/system/domain/vo/GiftAmountLogVo.java
0 → 100644
View file @
811b37e3
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 @
811b37e3
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/domain/vo/SConsumerVo.java
View file @
811b37e3
...
@@ -2,9 +2,10 @@ package share.system.domain.vo;
...
@@ -2,9 +2,10 @@ package share.system.domain.vo;
import
lombok.Data
;
import
lombok.Data
;
import
share.system.domain.ConsumerMember
;
import
share.system.domain.ConsumerMember
;
import
share.system.domain.ConsumerWallet
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
java.util.List
;
/**
/**
* @className: share.system.domain.vo.SConsumerVo
* @className: share.system.domain.vo.SConsumerVo
* @description: 会员
* @description: 会员
...
@@ -46,7 +47,8 @@ public class SConsumerVo extends SConsumer {
...
@@ -46,7 +47,8 @@ public class SConsumerVo extends SConsumer {
private
Long
newId
;
private
Long
newId
;
private
List
<
ConsumerMonthlyCardVo
>
monthlyCardList
;
private
List
<
ConsumerSecondaryCardVo
>
secondaryCardList
;
}
}
share-system/src/main/java/share/system/mapper/ConsumerMonthlyCardMapper.java
View file @
811b37e3
...
@@ -61,5 +61,5 @@ public interface ConsumerMonthlyCardMapper extends BaseMapper<ConsumerMonthlyCar
...
@@ -61,5 +61,5 @@ public interface ConsumerMonthlyCardMapper extends BaseMapper<ConsumerMonthlyCar
*/
*/
public
int
deleteConsumerMonthlyCardByIds
(
Long
[]
ids
);
public
int
deleteConsumerMonthlyCardByIds
(
Long
[]
ids
);
ConsumerMonthlyCardVo
selectByConsumerId
(
ConsumerMonthlyCardVo
consumerMemberVo
);
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
(
ConsumerMonthlyCardVo
consumerMemberVo
);
}
}
share-system/src/main/java/share/system/mapper/GiftAmountLogMapper.java
0 → 100644
View file @
811b37e3
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 @
811b37e3
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/request/CreateOrderRequest.java
View file @
811b37e3
...
@@ -89,4 +89,12 @@ public class CreateOrderRequest {
...
@@ -89,4 +89,12 @@ public class CreateOrderRequest {
@ApiModelProperty
(
value
=
"使用时长"
)
@ApiModelProperty
(
value
=
"使用时长"
)
private
BigDecimal
duration
;
private
BigDecimal
duration
;
//次卡ID
@ApiModelProperty
(
value
=
"次卡ID"
)
private
Long
secondaryCardId
;
//月卡ID
@ApiModelProperty
(
value
=
"月卡ID"
)
private
Long
monthlyCardId
;
}
}
share-system/src/main/java/share/system/request/OrderComputedPriceRequest.java
View file @
811b37e3
...
@@ -54,4 +54,12 @@ public class OrderComputedPriceRequest {
...
@@ -54,4 +54,12 @@ public class OrderComputedPriceRequest {
@ApiModelProperty
(
value
=
"标签id"
)
@ApiModelProperty
(
value
=
"标签id"
)
private
Long
roomLabelId
;
private
Long
roomLabelId
;
//次卡ID
@ApiModelProperty
(
value
=
"次卡ID"
)
private
Long
secondaryCardId
;
//月卡ID
@ApiModelProperty
(
value
=
"月卡ID"
)
private
Long
monthlyCardId
;
}
}
share-system/src/main/java/share/system/response/ComputedOrderPriceResponse.java
View file @
811b37e3
...
@@ -68,5 +68,12 @@ public class ComputedOrderPriceResponse implements Serializable {
...
@@ -68,5 +68,12 @@ public class ComputedOrderPriceResponse implements Serializable {
@ApiModelProperty
(
value
=
"剩余余额"
)
@ApiModelProperty
(
value
=
"剩余余额"
)
private
BigDecimal
remainingBalance
;
private
BigDecimal
remainingBalance
;
//次卡ID
@ApiModelProperty
(
value
=
"次卡ID"
)
private
Long
secondaryCardId
;
//月卡ID
@ApiModelProperty
(
value
=
"月卡ID"
)
private
Long
monthlyCardId
;
}
}
share-system/src/main/java/share/system/service/ConsumerMonthlyCardService.java
View file @
811b37e3
...
@@ -61,5 +61,5 @@ public interface ConsumerMonthlyCardService extends IService<ConsumerMonthlyCard
...
@@ -61,5 +61,5 @@ public interface ConsumerMonthlyCardService extends IService<ConsumerMonthlyCard
*/
*/
public
int
deleteConsumerMonthlyCardById
(
Long
id
);
public
int
deleteConsumerMonthlyCardById
(
Long
id
);
ConsumerMonthlyCardVo
selectByConsumerId
();
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
();
}
}
share-system/src/main/java/share/system/service/ConsumerSecondaryCardService.java
View file @
811b37e3
...
@@ -62,4 +62,6 @@ public interface ConsumerSecondaryCardService extends IService<ConsumerSecondary
...
@@ -62,4 +62,6 @@ public interface ConsumerSecondaryCardService extends IService<ConsumerSecondary
public
int
deleteConsumerSecondaryCardById
(
Long
id
);
public
int
deleteConsumerSecondaryCardById
(
Long
id
);
List
<
ConsumerSecondaryCardVo
>
selectByConsumerId
();
List
<
ConsumerSecondaryCardVo
>
selectByConsumerId
();
List
<
ConsumerSecondaryCardVo
>
selectByPaclId
(
Long
packId
);
}
}
share-system/src/main/java/share/system/service/GiftAmountLogService.java
0 → 100644
View file @
811b37e3
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 @
811b37e3
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/ConsumerMonthlyCardServiceImpl.java
View file @
811b37e3
...
@@ -95,7 +95,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
...
@@ -95,7 +95,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
}
@Override
@Override
public
ConsumerMonthlyCardVo
selectByConsumerId
()
{
public
List
<
ConsumerMonthlyCardVo
>
selectByConsumerId
()
{
SConsumer
info
=
sConsumerService
.
getInfo
();
SConsumer
info
=
sConsumerService
.
getInfo
();
ConsumerMonthlyCardVo
vo
=
new
ConsumerMonthlyCardVo
();
ConsumerMonthlyCardVo
vo
=
new
ConsumerMonthlyCardVo
();
vo
.
setConsumerId
(
info
.
getId
());
vo
.
setConsumerId
(
info
.
getId
());
...
...
share-system/src/main/java/share/system/service/impl/ConsumerSecondaryCardServiceImpl.java
View file @
811b37e3
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.common.enums.YesNoEnum
;
import
share.common.exception.base.BaseException
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
share.system.domain.ConsumerSecondaryCard
;
import
share.system.domain.ConsumerSecondaryCard
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SPack
;
import
share.system.domain.vo.ConsumerSecondaryCardVo
;
import
share.system.domain.vo.ConsumerSecondaryCardVo
;
import
share.system.mapper.ConsumerSecondaryCardMapper
;
import
share.system.mapper.ConsumerSecondaryCardMapper
;
import
share.system.service.ConsumerSecondaryCardService
;
import
share.system.service.ConsumerSecondaryCardService
;
import
share.system.service.IPackService
;
import
share.system.service.SConsumerService
;
import
share.system.service.SConsumerService
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
/**
* 用户次卡Service业务层处理
* 用户次卡Service业务层处理
...
@@ -25,6 +33,8 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
...
@@ -25,6 +33,8 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
private
ConsumerSecondaryCardMapper
consumerSecondaryCardMapper
;
private
ConsumerSecondaryCardMapper
consumerSecondaryCardMapper
;
@Autowired
@Autowired
private
SConsumerService
sConsumerService
;
private
SConsumerService
sConsumerService
;
@Autowired
private
IPackService
packService
;
/**
/**
* 查询用户次卡
* 查询用户次卡
...
@@ -97,8 +107,32 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
...
@@ -97,8 +107,32 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
@Override
@Override
public
List
<
ConsumerSecondaryCardVo
>
selectByConsumerId
()
{
public
List
<
ConsumerSecondaryCardVo
>
selectByConsumerId
()
{
SConsumer
info
=
sConsumerService
.
getInfo
();
SConsumer
info
=
sConsumerService
.
getInfo
();
if
(
ObjectUtil
.
isNull
(
info
))
{
throw
new
BaseException
(
"您的登录已过期,请先登录"
);
}
ConsumerSecondaryCardVo
vo
=
new
ConsumerSecondaryCardVo
();
ConsumerSecondaryCardVo
vo
=
new
ConsumerSecondaryCardVo
();
vo
.
setConsumerId
(
info
.
getId
());
vo
.
setConsumerId
(
info
.
getId
());
return
consumerSecondaryCardMapper
.
selectByConsumerId
(
vo
);
return
consumerSecondaryCardMapper
.
selectByConsumerId
(
vo
);
}
}
@Override
public
List
<
ConsumerSecondaryCardVo
>
selectByPaclId
(
Long
packId
)
{
SConsumer
info
=
sConsumerService
.
getInfo
();
if
(
ObjectUtil
.
isNull
(
info
))
{
throw
new
BaseException
(
"您的登录已过期,请先登录"
);
}
Map
<
Long
,
SPack
>
packMap
=
packService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SPack:
:
getId
,
Function
.
identity
()));
ConsumerSecondaryCardVo
vo
=
new
ConsumerSecondaryCardVo
();
vo
.
setConsumerId
(
info
.
getId
());
List
<
ConsumerSecondaryCardVo
>
consumerSecondaryCardVos
=
consumerSecondaryCardMapper
.
selectByConsumerId
(
vo
);
consumerSecondaryCardVos
.
stream
().
forEach
(
item
->
{
if
(
item
.
getPackId
().
equals
(
packId
))
{
item
.
setIsUse
(
YesNoEnum
.
yes
.
getIndex
());
}
else
{
item
.
setIsUse
(
YesNoEnum
.
no
.
getIndex
());
item
.
setReason
(
"当前次卡适用于"
+
packMap
.
get
(
item
.
getPackId
()).
getName
()
+
"套餐"
+
",不适用于"
+
packMap
.
get
(
packId
).
getName
()
+
"套餐"
);
}
});
return
consumerSecondaryCardVos
;
}
}
}
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
811b37e3
...
@@ -59,6 +59,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -59,6 +59,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
private
ISConsumerCouponService
consumerCouponService
;
private
ISConsumerCouponService
consumerCouponService
;
@Autowired
@Autowired
private
ISysConfigService
sysConfigService
;
private
ISysConfigService
sysConfigService
;
@Autowired
private
RechargeAmountLogService
rechargeAmountLogService
;
@Autowired
private
GiftAmountLogService
giftAmountLogService
;
/**
/**
* 查询会员钱包
* 查询会员钱包
...
@@ -153,6 +157,26 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -153,6 +157,26 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
balanceLog
.
setCreateTime
(
new
Date
());
balanceLog
.
setCreateTime
(
new
Date
());
balanceLogService
.
save
(
balanceLog
);
balanceLogService
.
save
(
balanceLog
);
}
}
if
(
consumerWallet
.
getRechargeAmount
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
RechargeAmountLog
rechargeAmountLog
=
new
RechargeAmountLog
();
rechargeAmountLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
rechargeAmountLog
.
setCurrentAmount
(
new
BigDecimal
(
0
));
rechargeAmountLog
.
setVariableAmount
(
consumerWallet
.
getRechargeAmount
());
rechargeAmountLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
rechargeAmountLog
.
setOperationTime
(
new
Date
());
rechargeAmountLog
.
setCreateTime
(
new
Date
());
rechargeAmountLogService
.
save
(
rechargeAmountLog
);
}
if
(
consumerWallet
.
getGiftAmount
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
GiftAmountLog
giftAmountLog
=
new
GiftAmountLog
();
giftAmountLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
giftAmountLog
.
setCurrentAmount
(
new
BigDecimal
(
0
));
giftAmountLog
.
setVariableAmount
(
consumerWallet
.
getGiftAmount
());
giftAmountLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
giftAmountLog
.
setOperationTime
(
new
Date
());
giftAmountLog
.
setCreateTime
(
new
Date
());
giftAmountLogService
.
save
(
giftAmountLog
);
}
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
DurationLog
durationLog
=
new
DurationLog
();
DurationLog
durationLog
=
new
DurationLog
();
durationLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
durationLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
...
@@ -206,6 +230,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -206,6 +230,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
public
boolean
editConsumerWallet
(
ConsumerWallet
consumerWallet
,
Recharge
recharge
,
ConsumerMember
one
)
{
public
boolean
editConsumerWallet
(
ConsumerWallet
consumerWallet
,
Recharge
recharge
,
ConsumerMember
one
)
{
BigDecimal
divide
=
new
BigDecimal
(
0
);
BigDecimal
divide
=
new
BigDecimal
(
0
);
BigDecimal
oldBalance
=
consumerWallet
.
getBalance
();
BigDecimal
oldBalance
=
consumerWallet
.
getBalance
();
BigDecimal
oldRechargeAmount
=
consumerWallet
.
getRechargeAmount
();
BigDecimal
oldGiftAmount
=
consumerWallet
.
getGiftAmount
();
BigDecimal
oldDuration
=
consumerWallet
.
getRemainingDuration
();
BigDecimal
oldDuration
=
consumerWallet
.
getRemainingDuration
();
BigDecimal
oldIntegral
=
consumerWallet
.
getRemainingIntegral
();
BigDecimal
oldIntegral
=
consumerWallet
.
getRemainingIntegral
();
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
...
@@ -222,8 +248,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -222,8 +248,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
logger
.
debug
(
"修改会员用户"
);
logger
.
debug
(
"修改会员用户"
);
consumerWallet
.
setBalance
(
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
()));
consumerWallet
.
setBalance
(
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
()));
consumerWallet
.
setRechargeAmount
(
consumerWallet
.
getRechargeAmount
().
add
(
recharge
.
getRechargeAmount
()));
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
consumerWallet
.
setBalance
(
consumerWallet
.
getBalance
().
add
(
recharge
.
getGiveAmount
()));
consumerWallet
.
setBalance
(
consumerWallet
.
getBalance
().
add
(
recharge
.
getGiveAmount
()));
consumerWallet
.
setGiftAmount
(
consumerWallet
.
getGiftAmount
().
add
(
recharge
.
getGiveAmount
()));
}
}
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
BigDecimal
duration
=
consumerWallet
.
getRemainingDuration
().
add
(
rechargeConf
.
getGiveDuration
());
BigDecimal
duration
=
consumerWallet
.
getRemainingDuration
().
add
(
rechargeConf
.
getGiveDuration
());
...
@@ -247,6 +275,28 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -247,6 +275,28 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
balanceLogService
.
save
(
balanceLog
);
balanceLogService
.
save
(
balanceLog
);
logger
.
debug
(
"新增余额日志"
);
logger
.
debug
(
"新增余额日志"
);
}
}
if
(
consumerWallet
.
getRechargeAmount
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
RechargeAmountLog
rechargeAmountLog
=
new
RechargeAmountLog
();
rechargeAmountLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
rechargeAmountLog
.
setCurrentAmount
(
oldRechargeAmount
);
rechargeAmountLog
.
setVariableAmount
(
consumerWallet
.
getRechargeAmount
().
subtract
(
oldRechargeAmount
));
rechargeAmountLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
rechargeAmountLog
.
setOperationTime
(
new
Date
());
rechargeAmountLog
.
setCreateTime
(
new
Date
());
rechargeAmountLogService
.
save
(
rechargeAmountLog
);
logger
.
debug
(
"新增充值金额日志"
);
}
if
(
consumerWallet
.
getGiftAmount
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
GiftAmountLog
giftAmountLog
=
new
GiftAmountLog
();
giftAmountLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
giftAmountLog
.
setCurrentAmount
(
oldGiftAmount
);
giftAmountLog
.
setVariableAmount
(
consumerWallet
.
getGiftAmount
().
subtract
(
oldGiftAmount
));
giftAmountLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
giftAmountLog
.
setOperationTime
(
new
Date
());
giftAmountLog
.
setCreateTime
(
new
Date
());
giftAmountLogService
.
save
(
giftAmountLog
);
logger
.
debug
(
"新增赠送金额日志"
);
}
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
DurationLog
durationLog
=
new
DurationLog
();
DurationLog
durationLog
=
new
DurationLog
();
durationLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
durationLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
...
...
share-system/src/main/java/share/system/service/impl/GiftAmountLogServiceImpl.java
0 → 100644
View file @
811b37e3
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/MonthlyCardOrderServiceImpl.java
View file @
811b37e3
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.exception.base.BaseException
;
import
share.common.exception.base.BaseException
;
import
share.common.utils.BaseUtil
;
import
share.common.utils.BaseUtil
;
...
@@ -24,7 +27,9 @@ import share.system.response.MonthlyyCardPayResultResponse;
...
@@ -24,7 +27,9 @@ import share.system.response.MonthlyyCardPayResultResponse;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 月卡订单Service业务层处理
* 月卡订单Service业务层处理
...
@@ -44,6 +49,8 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
...
@@ -44,6 +49,8 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
private
MonthlyCardConfService
monthlyCardConfService
;
private
MonthlyCardConfService
monthlyCardConfService
;
@Autowired
@Autowired
private
ConsumerMonthlyCardService
consumerMonthlyCardService
;
private
ConsumerMonthlyCardService
consumerMonthlyCardService
;
@Autowired
private
RedisUtil
redisUtil
;
/**
/**
* 查询月卡订单
* 查询月卡订单
...
@@ -170,6 +177,18 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
...
@@ -170,6 +177,18 @@ public class MonthlyCardOrderServiceImpl extends ServiceImpl<MonthlyCardOrderMap
consumerMonthlyCard
.
setMonthlyCardDays
(
byId
.
getMonthlyCardDays
());
consumerMonthlyCard
.
setMonthlyCardDays
(
byId
.
getMonthlyCardDays
());
consumerMonthlyCard
.
setCreateTime
(
new
Date
());
consumerMonthlyCard
.
setCreateTime
(
new
Date
());
consumerMonthlyCardService
.
save
(
consumerMonthlyCard
);
consumerMonthlyCardService
.
save
(
consumerMonthlyCard
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"consumerMonthlyCardId"
,
String
.
valueOf
(
consumerMonthlyCard
.
getId
()));
map
.
put
(
"expirationTime"
,
consumerMonthlyCard
.
getExpirationDate
().
toString
());
JSONObject
jsonObject
=
new
JSONObject
(
map
);
new
Thread
(()
->
{
try
{
Thread
.
sleep
(
1000
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
MONTHLY_CARD
.
getValue
()
+
consumerMonthlyCard
.
getId
(),
jsonObject
.
toString
());
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}).
start
();
}
}
@Override
@Override
...
...
share-system/src/main/java/share/system/service/impl/RechargeAmountLogServiceImpl.java
0 → 100644
View file @
811b37e3
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/java/share/system/service/impl/RechargeServiceImpl.java
View file @
811b37e3
...
@@ -223,9 +223,11 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
...
@@ -223,9 +223,11 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
ConsumerWallet
consumerWallet
=
new
ConsumerWallet
();
ConsumerWallet
consumerWallet
=
new
ConsumerWallet
();
consumerWallet
.
setConsumerId
(
recharge
.
getConsumerId
());
consumerWallet
.
setConsumerId
(
recharge
.
getConsumerId
());
consumerWallet
.
setBalance
(
recharge
.
getRechargeAmount
());
consumerWallet
.
setBalance
(
recharge
.
getRechargeAmount
());
consumerWallet
.
setRechargeAmount
(
recharge
.
getRechargeAmount
());
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
BigDecimal
balance
=
recharge
.
getRechargeAmount
().
add
(
rechargeConf
.
getGiveAmount
());
BigDecimal
balance
=
recharge
.
getRechargeAmount
().
add
(
rechargeConf
.
getGiveAmount
());
consumerWallet
.
setBalance
(
balance
);
consumerWallet
.
setBalance
(
balance
);
consumerWallet
.
setGiftAmount
(
rechargeConf
.
getGiveAmount
());
}
}
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
consumerWallet
.
setRemainingDuration
(
rechargeConf
.
getGiveDuration
());
consumerWallet
.
setRemainingDuration
(
rechargeConf
.
getGiveDuration
());
...
...
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
811b37e3
...
@@ -25,7 +25,6 @@ import share.common.utils.DateUtils;
...
@@ -25,7 +25,6 @@ import share.common.utils.DateUtils;
import
share.common.utils.StringUtils
;
import
share.common.utils.StringUtils
;
import
share.system.domain.*
;
import
share.system.domain.*
;
import
share.system.domain.vo.*
;
import
share.system.domain.vo.*
;
import
share.system.mapper.ConsumerMemberMapper
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SStoreConsumerMapper
;
import
share.system.mapper.SStoreConsumerMapper
;
import
share.system.request.RegisterThirdSConsumerRequest
;
import
share.system.request.RegisterThirdSConsumerRequest
;
...
@@ -63,6 +62,10 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -63,6 +62,10 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
private
MemberConfigService
memberConfigService
;
private
MemberConfigService
memberConfigService
;
@Autowired
@Autowired
private
MemberProgressLogService
memberProgressLogService
;
private
MemberProgressLogService
memberProgressLogService
;
@Autowired
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
@Autowired
private
ConsumerMonthlyCardService
consumerMonthlyCardService
;
@Autowired
@Autowired
...
@@ -214,6 +217,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -214,6 +217,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
BeanUtils
.
copyProperties
(
currentUser
,
vo
);
BeanUtils
.
copyProperties
(
currentUser
,
vo
);
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
currentUser
.
getId
()));
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
currentUser
.
getId
()));
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>().
eq
(
ConsumerWallet:
:
getConsumerId
,
currentUser
.
getId
()));
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>().
eq
(
ConsumerWallet:
:
getConsumerId
,
currentUser
.
getId
()));
List
<
ConsumerSecondaryCardVo
>
consumerSecondaryCardVos
=
consumerSecondaryCardService
.
selectByConsumerId
();
List
<
ConsumerMonthlyCardVo
>
consumerMonthlyCardVo
=
consumerMonthlyCardService
.
selectByConsumerId
();
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
vo
.
setConsumerMember
(
consumerMember
);
vo
.
setConsumerMember
(
consumerMember
);
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>().
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()));
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>().
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()));
...
@@ -277,9 +282,12 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -277,9 +282,12 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
}
else
{
}
else
{
vo
.
setIsManage
(
true
);
vo
.
setIsManage
(
true
);
}
}
if
(!
CollectionUtils
.
isEmpty
(
consumerSecondaryCardVos
))
{
vo
.
setSecondaryCardList
(
consumerSecondaryCardVos
);
}
if
(!
CollectionUtils
.
isEmpty
(
consumerMonthlyCardVo
))
{
vo
.
setMonthlyCardList
(
consumerMonthlyCardVo
);
}
return
vo
;
return
vo
;
}
}
...
@@ -352,8 +360,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -352,8 +360,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
public
TableDataInfo
selectConsumernotById
(
SConsumerVo
sConsumer
)
{
public
TableDataInfo
selectConsumernotById
(
SConsumerVo
sConsumer
)
{
List
<
ConsumerMember
>
consumerMembers
=
consumerMemberService
List
<
ConsumerMember
>
consumerMembers
=
consumerMemberService
.
list
(
new
LambdaQueryWrapper
<
ConsumerMember
>()
.
list
(
new
LambdaQueryWrapper
<
ConsumerMember
>()
.
eq
(
ConsumerMember:
:
getIsRights
,
YesNoEnum
.
yes
.
getIndex
())
.
eq
(
ConsumerMember:
:
getIsRights
,
YesNoEnum
.
yes
.
getIndex
())
.
ne
(
ConsumerMember:
:
getConsumerId
,
sConsumer
.
getNewId
()));
.
ne
(
ConsumerMember:
:
getConsumerId
,
sConsumer
.
getNewId
()));
List
<
Long
>
collect
=
consumerMembers
.
stream
().
map
(
ConsumerMember:
:
getConsumerId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
collect
=
consumerMembers
.
stream
().
map
(
ConsumerMember:
:
getConsumerId
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SConsumer
>
uSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
LambdaQueryWrapper
<
SConsumer
>
uSConsumer
=
new
LambdaQueryWrapper
<
SConsumer
>();
if
(
StringUtils
.
isNotEmpty
(
sConsumer
.
getPhone
())){
if
(
StringUtils
.
isNotEmpty
(
sConsumer
.
getPhone
())){
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
811b37e3
This diff is collapsed.
Click to expand it.
share-system/src/main/java/share/system/service/impl/SecondaryCardOrderServiceImpl.java
View file @
811b37e3
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.exception.base.BaseException
;
import
share.common.exception.base.BaseException
;
import
share.common.utils.BaseUtil
;
import
share.common.utils.BaseUtil
;
...
@@ -23,7 +26,9 @@ import share.system.response.SecondaryCardOrderPayResultResponse;
...
@@ -23,7 +26,9 @@ import share.system.response.SecondaryCardOrderPayResultResponse;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 次卡购买记录Service业务层处理
* 次卡购买记录Service业务层处理
...
@@ -43,6 +48,8 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
...
@@ -43,6 +48,8 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
private
SecondaryCardConfService
secondaryCardConfService
;
private
SecondaryCardConfService
secondaryCardConfService
;
@Autowired
@Autowired
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
@Autowired
private
RedisUtil
redisUtil
;
/**
/**
* 查询次卡购买记录
* 查询次卡购买记录
...
@@ -160,6 +167,18 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
...
@@ -160,6 +167,18 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
consumerSecondaryCard
.
setNumber
(
secondaryCardConf
.
getNumber
());
consumerSecondaryCard
.
setNumber
(
secondaryCardConf
.
getNumber
());
consumerSecondaryCard
.
setCreateTime
(
new
Date
());
consumerSecondaryCard
.
setCreateTime
(
new
Date
());
consumerSecondaryCardService
.
save
(
consumerSecondaryCard
);
consumerSecondaryCardService
.
save
(
consumerSecondaryCard
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"consumerSecondaryCardId"
,
String
.
valueOf
(
consumerSecondaryCard
.
getId
()));
map
.
put
(
"expirationTime"
,
consumerSecondaryCard
.
getExpirationDate
().
toString
());
JSONObject
jsonObject
=
new
JSONObject
(
map
);
new
Thread
(()
->
{
try
{
Thread
.
sleep
(
1000
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
SECONDARY_CARD
.
getValue
()
+
consumerSecondaryCard
.
getId
(),
jsonObject
.
toString
());
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}).
start
();
}
}
@Override
@Override
...
...
share-system/src/main/resources/mapper/system/ConsumerWalletMapper.xml
View file @
811b37e3
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"balance"
column=
"balance"
/>
<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=
"remainingDuration"
column=
"remaining_duration"
/>
<result
property=
"remainingIntegral"
column=
"remaining_integral"
/>
<result
property=
"remainingIntegral"
column=
"remaining_integral"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
...
@@ -27,6 +29,8 @@
...
@@ -27,6 +29,8 @@
select id,
select id,
consumer_id,
consumer_id,
balance,
balance,
recharge_amount,
gift_amount,
remaining_duration,
remaining_duration,
remaining_integral,
remaining_integral,
is_delete,
is_delete,
...
@@ -47,6 +51,8 @@
...
@@ -47,6 +51,8 @@
c.phone,
c.phone,
c.avatar,
c.avatar,
w.balance,
w.balance,
w.recharge_amount,
w.gift_amount,
w.remaining_duration,
w.remaining_duration,
w.remaining_integral,
w.remaining_integral,
w.is_delete,
w.is_delete,
...
@@ -80,6 +86,8 @@
...
@@ -80,6 +86,8 @@
c.phone,
c.phone,
c.avatar,
c.avatar,
w.balance,
w.balance,
w.recharge_amount,
w.gift_amount,
w.remaining_duration,
w.remaining_duration,
w.remaining_integral,
w.remaining_integral,
w.is_delete,
w.is_delete,
...
@@ -109,6 +117,8 @@
...
@@ -109,6 +117,8 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"balance != null"
>
balance,
</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=
"remainingDuration != null"
>
remaining_duration,
</if>
<if
test=
"remainingIntegral != null"
>
remaining_integral,
</if>
<if
test=
"remainingIntegral != null"
>
remaining_integral,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
...
@@ -123,6 +133,8 @@
...
@@ -123,6 +133,8 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"balance != null"
>
#{balance},
</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=
"remainingDuration != null"
>
#{remainingDuration},
</if>
<if
test=
"remainingIntegral != null"
>
#{remainingIntegral},
</if>
<if
test=
"remainingIntegral != null"
>
#{remainingIntegral},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
...
@@ -141,6 +153,8 @@
...
@@ -141,6 +153,8 @@
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"balance != null"
>
balance = #{balance},
</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=
"remainingDuration != null"
>
remaining_duration = #{remainingDuration},
</if>
<if
test=
"remainingIntegral != null"
>
remaining_integral = #{remainingIntegral},
</if>
<if
test=
"remainingIntegral != null"
>
remaining_integral = #{remainingIntegral},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
...
...
share-system/src/main/resources/mapper/system/GiftAmountLogMapper.xml
0 → 100644
View file @
811b37e3
<?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/MonthlyCardLogMapper.xml
View file @
811b37e3
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"useDuration"
column=
"use_duration"
/>
<result
property=
"useDuration"
column=
"use_duration"
/>
<result
property=
"residueDuration"
column=
"residue_duration"
/>
<result
property=
"residueDuration"
column=
"residue_duration"
/>
<result
property=
"operationType"
column=
"operation_type"
/>
<result
property=
"operationTime"
column=
"operation_time"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
@@ -30,6 +32,8 @@
...
@@ -30,6 +32,8 @@
phone,
phone,
use_duration,
use_duration,
residue_duration,
residue_duration,
operation_type,
operation_time,
is_delete,
is_delete,
create_by,
create_by,
create_time,
create_time,
...
@@ -50,6 +54,8 @@
...
@@ -50,6 +54,8 @@
l.phone,
l.phone,
l.use_duration,
l.use_duration,
l.residue_duration,
l.residue_duration,
l.operation_type,
l.operation_time,
l.is_delete,
l.is_delete,
l.create_by,
l.create_by,
l.create_time,
l.create_time,
...
@@ -65,6 +71,7 @@
...
@@ -65,6 +71,7 @@
<if
test=
"phone != null and phone != ''"
>
and l.phone = #{phone}
</if>
<if
test=
"phone != null and phone != ''"
>
and l.phone = #{phone}
</if>
<if
test=
"useDuration != null "
>
and l.use_duration = #{useDuration}
</if>
<if
test=
"useDuration != null "
>
and l.use_duration = #{useDuration}
</if>
<if
test=
"residueDuration != null "
>
and l.residue_duration = #{residueDuration}
</if>
<if
test=
"residueDuration != null "
>
and l.residue_duration = #{residueDuration}
</if>
order by l.create_time
</select>
</select>
<select
id=
"selectMonthlyCardLogById"
parameterType=
"Long"
resultMap=
"MonthlyCardLogResult"
>
<select
id=
"selectMonthlyCardLogById"
parameterType=
"Long"
resultMap=
"MonthlyCardLogResult"
>
...
@@ -86,6 +93,8 @@
...
@@ -86,6 +93,8 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"operationType != null"
>
operation_type,
</if>
<if
test=
"operationTime != null"
>
operation_time,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerMonthlyCardId != null"
>
#{consumerMonthlyCardId},
</if>
<if
test=
"consumerMonthlyCardId != null"
>
#{consumerMonthlyCardId},
</if>
...
@@ -99,6 +108,8 @@
...
@@ -99,6 +108,8 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"operationType != null"
>
#{operationType},
</if>
<if
test=
"operationTime != null"
>
#{operationTime},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -116,6 +127,8 @@
...
@@ -116,6 +127,8 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"operationType != null"
>
operation_type = #{operationType},
</if>
<if
test=
"operationTime != null"
>
operation_time = #{operationTime},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
share-system/src/main/resources/mapper/system/RechargeAmountLogMapper.xml
0 → 100644
View file @
811b37e3
<?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
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
811b37e3
...
@@ -21,9 +21,13 @@
...
@@ -21,9 +21,13 @@
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponPrice"
column=
"coupon_price"
/>
<result
property=
"couponPrice"
column=
"coupon_price"
/>
<result
property=
"secondaryCardId"
column=
"secondary_card_id"
/>
<result
property=
"monthlyCardId"
column=
"monthly_card_id"
/>
<result
property=
"totalPrice"
column=
"total_price"
/>
<result
property=
"totalPrice"
column=
"total_price"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"balance"
column=
"balance"
/>
<result
property=
"balance"
column=
"balance"
/>
<result
property=
"rechargeAmount"
column=
"recharge_amount"
/>
<result
property=
"giftAmount"
column=
"gift_amount"
/>
<result
property=
"discountRatio"
column=
"discount_ratio"
/>
<result
property=
"discountRatio"
column=
"discount_ratio"
/>
<result
property=
"payPrice"
column=
"pay_price"
/>
<result
property=
"payPrice"
column=
"pay_price"
/>
<result
property=
"payTime"
column=
"pay_time"
/>
<result
property=
"payTime"
column=
"pay_time"
/>
...
@@ -63,10 +67,14 @@
...
@@ -63,10 +67,14 @@
pack_price,
pack_price,
coupon_id,
coupon_id,
coupon_price,
coupon_price,
secondary_card_id,
monthly_card_id,
total_price,
total_price,
pay_price,
pay_price,
duration,
duration,
balance,
balance,
recharge_amount,
gift_amount,
discount_ratio,
discount_ratio,
pay_time,
pay_time,
time_long,
time_long,
...
@@ -106,10 +114,14 @@
...
@@ -106,10 +114,14 @@
pack_price,
pack_price,
coupon_id,
coupon_id,
coupon_price,
coupon_price,
secondary_card_id,
monthly_card_id,
total_price,
total_price,
pay_price,
pay_price,
duration,
duration,
balance,
balance,
recharge_amount,
gift_amount,
discount_ratio,
discount_ratio,
pay_time,
pay_time,
time_long,
time_long,
...
@@ -149,10 +161,14 @@
...
@@ -149,10 +161,14 @@
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
and secondary_card_id = #{secondaryCardId}
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
and monthly_card_id = #{monthlyCardId}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"balance != null and balance != ''"
>
and balance = #{balance}
</if>
<if
test=
"balance != null and balance != ''"
>
and balance = #{balance}
</if>
<if
test=
"rechargeAmount != null and rechargeAmount != ''"
>
and recharge_amount = #{rechargeAmount}
</if>
<if
test=
"giftAmount != null and giftAmount !=''"
>
and gift_amount = #{giftAmount}
</if>
<if
test=
"discountRatio != null and discountRatio != ''"
>
and discount_ratio = #{discountRatio}
</if>
<if
test=
"discountRatio != null and discountRatio != ''"
>
and discount_ratio = #{discountRatio}
</if>
<if
test=
"startPayTime != null"
>
<if
test=
"startPayTime != null"
>
and DATE_FORMAT(pay_time, '%Y-%m-%d')
>
= DATE_FORMAT(#{startPayTime}, '%Y-%m-%d')
and DATE_FORMAT(pay_time, '%Y-%m-%d')
>
= DATE_FORMAT(#{startPayTime}, '%Y-%m-%d')
...
@@ -225,11 +241,15 @@
...
@@ -225,11 +241,15 @@
s.consumer_phone,
s.consumer_phone,
s.duration,
s.duration,
s.balance,
s.balance,
s.recharge_amount,
s.gift_amount,
s.discount_ratio,
s.discount_ratio,
s.pack_id,
s.pack_id,
s.pack_price,
s.pack_price,
s.coupon_id,
s.coupon_id,
s.coupon_price,
s.coupon_price,
s.secondary_card_id,
s.monthly_card_id,
s.total_price,
s.total_price,
s.pay_price,
s.pay_price,
s.discount_ratio,
s.discount_ratio,
...
@@ -273,11 +293,15 @@
...
@@ -273,11 +293,15 @@
s.consumer_phone,
s.consumer_phone,
s.duration,
s.duration,
s.balance,
s.balance,
s.recharge_amount,
s.gift_amount,
s.discount_ratio,
s.discount_ratio,
s.pack_id,
s.pack_id,
s.pack_price,
s.pack_price,
s.coupon_id,
s.coupon_id,
s.coupon_price,
s.coupon_price,
s.secondary_card_id,
s.monthly_card_id,
s.total_price,
s.total_price,
s.pay_price,
s.pay_price,
s.discount_ratio,
s.discount_ratio,
...
@@ -339,6 +363,8 @@
...
@@ -339,6 +363,8 @@
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
and secondary_card_id = #{secondaryCardId}
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
and monthly_card_id = #{monthlyCardId}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
...
@@ -401,6 +427,8 @@
...
@@ -401,6 +427,8 @@
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"packPrice != null and packPrice != ''"
>
and pack_price = #{packPrice}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponId != null and couponId != ''"
>
and coupon_id = #{couponId}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"couponPrice != null and couponPrice != ''"
>
and coupon_price = #{couponPrice}
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
and secondary_card_id = #{secondaryCardId}
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
and monthly_card_id = #{monthlyCardId}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"totalPrice != null and totalPrice != ''"
>
and total_price = #{totalPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"payPrice != null and payPrice != ''"
>
and pay_price = #{payPrice}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
...
@@ -480,6 +508,10 @@
...
@@ -480,6 +508,10 @@
<if
test=
"discountRatio != null and discountRatio != ''"
>
discount_ratio,
</if>
<if
test=
"discountRatio != null and discountRatio != ''"
>
discount_ratio,
</if>
<if
test=
"duration != null and duration != ''"
>
duration,
</if>
<if
test=
"duration != null and duration != ''"
>
duration,
</if>
<if
test=
"balance != null and balance != '' "
>
balance,
</if>
<if
test=
"balance != null and balance != '' "
>
balance,
</if>
<if
test=
"rechargeAmount != null and rechargeAmount != ''"
>
recharge_amount,
</if>
<if
test=
"giftAmount != null and giftAmount != ''"
>
gift_amount,
</if>
<if
test=
"secondaryCardId != null and secondaryCardId != ''"
>
secondary_card_id,
</if>
<if
test=
"monthlyCardId != null and monthlyCardId != ''"
>
monthly_card_id,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
...
@@ -517,6 +549,10 @@
...
@@ -517,6 +549,10 @@
<if
test=
"discountRatio != null"
>
#{discountRatio},
</if>
<if
test=
"discountRatio != null"
>
#{discountRatio},
</if>
<if
test=
"duration != null"
>
#{duration},
</if>
<if
test=
"duration != null"
>
#{duration},
</if>
<if
test=
"balance != null"
>
#{balance},
</if>
<if
test=
"balance != null"
>
#{balance},
</if>
<if
test=
"rechargeAmount != null"
>
#{rechargeAmount},
</if>
<if
test=
"giftAmount != null"
>
#{giftAmount},
</if>
<if
test=
"secondaryCardId != null"
>
#{secondary_card_id},
</if>
<if
test=
"monthlyCardId != null"
>
#{monthly_card_id},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -559,6 +595,10 @@
...
@@ -559,6 +595,10 @@
<if
test=
"discountRatio != null"
>
discount_ratio = #{discountRatio},
</if>
<if
test=
"discountRatio != null"
>
discount_ratio = #{discountRatio},
</if>
<if
test=
"duration != null"
>
duration = #{duration},
</if>
<if
test=
"duration != null"
>
duration = #{duration},
</if>
<if
test=
"balance != null"
>
balance = #{balance},
</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=
"monthlyCardId != null"
>
monthly_card_id = #{monthlyCardId},
</if>
<if
test=
"secondaryCardId != null"
>
secondary_card_id = #{secondaryCardId},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
share-system/src/main/resources/mapper/system/SecondaryCardLogMapper.xml
View file @
811b37e3
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"usageCount"
column=
"usage_count"
/>
<result
property=
"usageCount"
column=
"usage_count"
/>
<result
property=
"residueCount"
column=
"residue_count"
/>
<result
property=
"residueCount"
column=
"residue_count"
/>
<result
property=
"operationType"
column=
"operation_type"
/>
<result
property=
"operationTime"
column=
"operation_time"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
@@ -34,6 +36,8 @@
...
@@ -34,6 +36,8 @@
pack_id,
pack_id,
usage_count,
usage_count,
residue_count,
residue_count,
operation_type,
operation_time,
is_delete,
is_delete,
create_by,
create_by,
create_time,
create_time,
...
@@ -57,6 +61,8 @@
...
@@ -57,6 +61,8 @@
p.price as 'pack_price',
p.price as 'pack_price',
l.usage_count,
l.usage_count,
l.residue_count,
l.residue_count,
l.operation_type,
l.operation_time,
l.is_delete,
l.is_delete,
l.create_by,
l.create_by,
l.create_time,
l.create_time,
...
@@ -74,6 +80,7 @@
...
@@ -74,6 +80,7 @@
<if
test=
"packId != null "
>
and l.pack_id = #{packId}
</if>
<if
test=
"packId != null "
>
and l.pack_id = #{packId}
</if>
<if
test=
"usageCount != null "
>
and l.usage_count = #{usageCount}
</if>
<if
test=
"usageCount != null "
>
and l.usage_count = #{usageCount}
</if>
<if
test=
"residueCount != null "
>
and l.residue_count = #{residueCount}
</if>
<if
test=
"residueCount != null "
>
and l.residue_count = #{residueCount}
</if>
order by l.create_time
</select>
</select>
<select
id=
"selectSecondaryCardLogById"
parameterType=
"Long"
resultMap=
"SecondaryCardLogResult"
>
<select
id=
"selectSecondaryCardLogById"
parameterType=
"Long"
resultMap=
"SecondaryCardLogResult"
>
...
@@ -96,6 +103,8 @@
...
@@ -96,6 +103,8 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"operationType != null"
>
operation_type,
</if>
<if
test=
"operationTime != null"
>
operation_time,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerSecondaryCardId != null"
>
#{consumerSecondaryCardId},
</if>
<if
test=
"consumerSecondaryCardId != null"
>
#{consumerSecondaryCardId},
</if>
...
@@ -110,6 +119,8 @@
...
@@ -110,6 +119,8 @@
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"operationType != null"
>
#{operationType},
</if>
<if
test=
"operationTime != null"
>
#{operationTime},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -128,6 +139,8 @@
...
@@ -128,6 +139,8 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"operationType != null"
>
operation_type = #{operationType},
</if>
<if
test=
"operationTime != null"
>
operation_time = #{operationTime},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</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