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
c115fa9e
Commit
c115fa9e
authored
Oct 17, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
7ad74a14
9aa4e690
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
122 additions
and
172 deletions
+122
-172
SecondaryCardConfController.java
...re/web/controller/system/SecondaryCardConfController.java
+5
-6
SecondaryCardConfController.java
...re/web/controller/system/SecondaryCardConfController.java
+4
-4
ConsumerSecondaryCard.java
.../main/java/share/system/domain/ConsumerSecondaryCard.java
+9
-29
SecondaryCardConf.java
.../src/main/java/share/system/domain/SecondaryCardConf.java
+9
-22
SecondaryCardLog.java
...m/src/main/java/share/system/domain/SecondaryCardLog.java
+0
-6
ConsumerSecondaryCardVo.java
.../java/share/system/domain/vo/ConsumerSecondaryCardVo.java
+0
-4
SecondaryCardLogVo.java
.../main/java/share/system/domain/vo/SecondaryCardLogVo.java
+1
-4
SecondaryCardConfMapper.java
...ain/java/share/system/mapper/SecondaryCardConfMapper.java
+1
-2
SecondaryCardConfService.java
...n/java/share/system/service/SecondaryCardConfService.java
+1
-2
ConsumerSecondaryCardServiceImpl.java
...system/service/impl/ConsumerSecondaryCardServiceImpl.java
+8
-9
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+42
-42
SecondaryCardConfServiceImpl.java
...are/system/service/impl/SecondaryCardConfServiceImpl.java
+1
-2
SecondaryCardOrderServiceImpl.java
...re/system/service/impl/SecondaryCardOrderServiceImpl.java
+2
-1
ConsumerSecondaryCardMapper.xml
...n/resources/mapper/system/ConsumerSecondaryCardMapper.xml
+17
-13
SecondaryCardConfMapper.xml
.../main/resources/mapper/system/SecondaryCardConfMapper.xml
+17
-14
SecondaryCardLogMapper.xml
...c/main/resources/mapper/system/SecondaryCardLogMapper.xml
+5
-12
No files found.
share-admin/src/main/java/share/web/controller/system/SecondaryCardConfController.java
View file @
c115fa9e
...
...
@@ -10,7 +10,6 @@ import share.common.core.page.TableDataInfo;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.SecondaryCardConf
;
import
share.system.domain.vo.SecondaryCardConfVo
;
import
share.system.service.SecondaryCardConfService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -33,9 +32,9 @@ public class SecondaryCardConfController extends BaseController {
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SecondaryCardConf
Vo
secondaryCardConf
)
{
public
TableDataInfo
list
(
SecondaryCardConf
secondaryCardConf
)
{
startPage
();
List
<
SecondaryCardConf
Vo
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
List
<
SecondaryCardConf
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
return
getDataTable
(
list
);
}
...
...
@@ -45,9 +44,9 @@ public class SecondaryCardConfController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:export')"
)
@Log
(
title
=
"次卡配置"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SecondaryCardConf
Vo
secondaryCardConf
)
{
List
<
SecondaryCardConf
Vo
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
ExcelUtil
<
SecondaryCardConf
Vo
>
util
=
new
ExcelUtil
<
SecondaryCardConfVo
>(
SecondaryCardConfVo
.
class
);
public
void
export
(
HttpServletResponse
response
,
SecondaryCardConf
secondaryCardConf
)
{
List
<
SecondaryCardConf
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
ExcelUtil
<
SecondaryCardConf
>
util
=
new
ExcelUtil
<
SecondaryCardConf
>(
SecondaryCardConf
.
class
);
util
.
exportExcel
(
response
,
list
,
"次卡配置数据"
);
}
...
...
share-front/src/main/java/share/web/controller/system/SecondaryCardConfController.java
View file @
c115fa9e
...
...
@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RestController;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.R
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.
vo.SecondaryCardConfVo
;
import
share.system.domain.
SecondaryCardConf
;
import
share.system.service.SecondaryCardConfService
;
import
java.util.List
;
...
...
@@ -28,9 +28,9 @@ public class SecondaryCardConfController extends BaseController {
* 查询次卡配置列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SecondaryCardConf
Vo
secondaryCardConf
)
{
public
TableDataInfo
list
(
SecondaryCardConf
secondaryCardConf
)
{
startPage
();
List
<
SecondaryCardConf
Vo
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
List
<
SecondaryCardConf
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
return
getDataTable
(
list
);
}
...
...
@@ -38,7 +38,7 @@ public class SecondaryCardConfController extends BaseController {
* 查询次卡配置列表
*/
@GetMapping
(
"/query"
)
public
R
<
List
<
SecondaryCardConf
Vo
>>
query
()
{
public
R
<
List
<
SecondaryCardConf
>>
query
()
{
return
R
.
ok
(
secondaryCardConfService
.
selectSecondaryCardConfList
(
null
));
}
...
...
share-system/src/main/java/share/system/domain/ConsumerSecondaryCard.java
View file @
c115fa9e
...
...
@@ -3,11 +3,10 @@ package share.system.domain;
import
com.baomidou.mybatisplus.annotation.*
;
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
;
/**
...
...
@@ -46,16 +45,16 @@ public class ConsumerSecondaryCard extends BaseEntity {
private
String
phone
;
/**
*
套餐id
*
单次时长
*/
@Excel
(
name
=
"
套餐id
"
)
private
Long
packId
;
@Excel
(
name
=
"
单次时长
"
)
private
Integer
singleDuration
;
//
/**
// * 次卡有效期
//
*/
// @Excel(name = "次卡有效期
")
// private Long validityPeriod
;
/**
* 单次金额
*/
@Excel
(
name
=
"单次金额
"
)
private
BigDecimal
singleAmount
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"次卡有效期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
...
...
@@ -75,23 +74,4 @@ public class ConsumerSecondaryCard extends BaseEntity {
@TableField
(
select
=
false
)
private
Integer
isDelete
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"secondaryCardConfId"
,
getSecondaryCardConfId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"packId"
,
getPackId
())
.
append
(
"expirationDate"
,
getExpirationDate
())
.
append
(
"number"
,
getNumber
())
.
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/SecondaryCardConf.java
View file @
c115fa9e
...
...
@@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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
;
...
...
@@ -40,10 +38,16 @@ public class SecondaryCardConf extends BaseEntity {
private
BigDecimal
secondaryCardAmount
;
/**
*
套餐id
*
单次时长
*/
@Excel
(
name
=
"套餐id"
)
private
Long
packId
;
@Excel
(
name
=
"单次时长"
)
private
Integer
singleDuration
;
/**
* 单次金额
*/
@Excel
(
name
=
"单次金额"
)
private
BigDecimal
singleAmount
;
/**
* 次卡有效期
...
...
@@ -66,21 +70,4 @@ public class SecondaryCardConf extends BaseEntity {
private
Long
isDelete
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"name"
,
getName
())
.
append
(
"secondaryCardAmount"
,
getSecondaryCardAmount
())
.
append
(
"packId"
,
getPackId
())
.
append
(
"validityPeriod"
,
getValidityPeriod
())
.
append
(
"number"
,
getNumber
())
.
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/SecondaryCardLog.java
View file @
c115fa9e
...
...
@@ -46,11 +46,6 @@ public class SecondaryCardLog extends BaseEntity {
@Excel
(
name
=
"用户手机号"
)
private
String
phone
;
/**
* 套餐id
*/
@Excel
(
name
=
"套餐id"
)
private
Long
packId
;
/**
* 使用次数
...
...
@@ -94,7 +89,6 @@ public class SecondaryCardLog extends BaseEntity {
.
append
(
"consumerSecondaryCardId"
,
getConsumerSecondaryCardId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"packId"
,
getPackId
())
.
append
(
"usageCount"
,
getUsageCount
())
.
append
(
"residueCount"
,
getResidueCount
())
.
append
(
"isDelete"
,
getIsDelete
())
...
...
share-system/src/main/java/share/system/domain/vo/ConsumerSecondaryCardVo.java
View file @
c115fa9e
...
...
@@ -11,10 +11,6 @@ public class ConsumerSecondaryCardVo extends ConsumerSecondaryCard {
private
String
nickName
;
//用户头像
private
String
avatar
;
//套餐名称
private
String
packName
;
//套餐金额
private
BigDecimal
packPrice
;
//配置名称
private
String
confName
;
//次卡金额
...
...
share-system/src/main/java/share/system/domain/vo/SecondaryCardLogVo.java
View file @
c115fa9e
...
...
@@ -11,10 +11,7 @@ public class SecondaryCardLogVo extends SecondaryCardLog {
private
String
nickName
;
//用户头像
private
String
avatar
;
//套餐名称
private
String
packName
;
//套餐金额
private
BigDecimal
packPrice
;
//配置名称
private
String
confName
;
//次卡金额
...
...
share-system/src/main/java/share/system/mapper/SecondaryCardConfMapper.java
View file @
c115fa9e
...
...
@@ -2,7 +2,6 @@ package share.system.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SecondaryCardConf
;
import
share.system.domain.vo.SecondaryCardConfVo
;
import
java.util.List
;
...
...
@@ -27,7 +26,7 @@ public interface SecondaryCardConfMapper extends BaseMapper<SecondaryCardConf> {
* @param secondaryCardConf 次卡配置
* @return 次卡配置集合
*/
public
List
<
SecondaryCardConf
Vo
>
selectSecondaryCardConfList
(
SecondaryCardConfVo
secondaryCardConf
);
public
List
<
SecondaryCardConf
>
selectSecondaryCardConfList
(
SecondaryCardConf
secondaryCardConf
);
/**
* 新增次卡配置
...
...
share-system/src/main/java/share/system/service/SecondaryCardConfService.java
View file @
c115fa9e
...
...
@@ -2,7 +2,6 @@ package share.system.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SecondaryCardConf
;
import
share.system.domain.vo.SecondaryCardConfVo
;
import
java.util.List
;
...
...
@@ -27,7 +26,7 @@ public interface SecondaryCardConfService extends IService<SecondaryCardConf> {
* @param secondaryCardConf 次卡配置
* @return 次卡配置集合
*/
public
List
<
SecondaryCardConf
Vo
>
selectSecondaryCardConfList
(
SecondaryCardConfVo
secondaryCardConf
);
public
List
<
SecondaryCardConf
>
selectSecondaryCardConfList
(
SecondaryCardConf
secondaryCardConf
);
/**
* 新增次卡配置
...
...
share-system/src/main/java/share/system/service/impl/ConsumerSecondaryCardServiceImpl.java
View file @
c115fa9e
...
...
@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.enums.YesNoEnum
;
import
share.common.exception.base.BaseException
;
import
share.common.utils.DateUtils
;
import
share.system.domain.ConsumerSecondaryCard
;
...
...
@@ -125,14 +124,14 @@ public class ConsumerSecondaryCardServiceImpl extends ServiceImpl<ConsumerSecond
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
()
+
"套餐"
);
}
});
//
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/SOrderServiceImpl.java
View file @
c115fa9e
...
...
@@ -1330,23 +1330,23 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
monthlyCardLogService
.
save
(
monthlyCardLog
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
sOrder
.
getSecondaryCardId
())
&&
!
ObjectUtils
.
isEmpty
(
sOrder
.
getPackId
()))
{
if
(
sOrder
.
getPackId
().
equals
(
consumerSecondaryCard
.
getPackId
()))
{
consumerSecondaryCard
.
setNumber
(
consumerSecondaryCard
.
getNumber
()
-
1
);
SecondaryCardLog
secondaryCardLog
=
new
SecondaryCardLog
();
secondaryCardLog
.
setConsumerSecondaryCardId
(
sOrder
.
getSecondaryCardId
());
secondaryCardLog
.
setConsumerId
(
consumerSecondaryCard
.
getConsumerId
());
secondaryCardLog
.
setPhone
(
sOrder
.
getConsumerPhone
());
secondaryCardLog
.
setPackId
(
sOrder
.
getPackId
());
secondaryCardLog
.
setUsageCount
(
1L
);
secondaryCardLog
.
setResidueCount
(
Long
.
valueOf
(
consumerSecondaryCard
.
getNumber
()));
secondaryCardLog
.
setOperationType
(
YesNoEnum
.
no
.
getIndex
());
secondaryCardLog
.
setOperationTime
(
new
Date
());
secondaryCardLog
.
setCreateTime
(
new
Date
());
consumerSecondaryCardService
.
updateById
(
consumerSecondaryCard
);
secondaryCardLogService
.
save
(
secondaryCardLog
);
}
}
//
if (!ObjectUtils.isEmpty(sOrder.getSecondaryCardId()) && !ObjectUtils.isEmpty(sOrder.getPackId())) {
//
if (sOrder.getPackId().equals(consumerSecondaryCard.getPackId())) {
//
consumerSecondaryCard.setNumber(consumerSecondaryCard.getNumber() - 1);
//
SecondaryCardLog secondaryCardLog = new SecondaryCardLog();
//
secondaryCardLog.setConsumerSecondaryCardId(sOrder.getSecondaryCardId());
//
secondaryCardLog.setConsumerId(consumerSecondaryCard.getConsumerId());
//
secondaryCardLog.setPhone(sOrder.getConsumerPhone());
//
secondaryCardLog.setPackId(sOrder.getPackId());
//
secondaryCardLog.setUsageCount(1L);
//
secondaryCardLog.setResidueCount(Long.valueOf(consumerSecondaryCard.getNumber()));
//
secondaryCardLog.setOperationType(YesNoEnum.no.getIndex());
//
secondaryCardLog.setOperationTime(new Date());
//
secondaryCardLog.setCreateTime(new Date());
//
consumerSecondaryCardService.updateById(consumerSecondaryCard);
//
secondaryCardLogService.save(secondaryCardLog);
//
}
//
}
}
private
void
refundExtracted
(
ConsumerWallet
consumerWallet
,
SOrder
sOrder
,
ConsumerMember
consumerMember
)
{
...
...
@@ -1579,23 +1579,23 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
monthlyCardLogService
.
save
(
monthlyCardLog
);
}
if
(!
ObjectUtils
.
isEmpty
(
sOrder
.
getSecondaryCardId
())
&&
!
ObjectUtils
.
isEmpty
(
sOrder
.
getPackId
()))
{
if
(
sOrder
.
getPackId
().
equals
(
consumerSecondaryCard
.
getPackId
()))
{
consumerSecondaryCard
.
setNumber
(
consumerSecondaryCard
.
getNumber
()
+
1
);
SecondaryCardLog
secondaryCardLog
=
new
SecondaryCardLog
();
secondaryCardLog
.
setConsumerSecondaryCardId
(
sOrder
.
getSecondaryCardId
());
secondaryCardLog
.
setConsumerId
(
consumerSecondaryCard
.
getConsumerId
());
secondaryCardLog
.
setPhone
(
sOrder
.
getConsumerPhone
());
secondaryCardLog
.
setPackId
(
sOrder
.
getPackId
());
secondaryCardLog
.
setUsageCount
(
1L
);
secondaryCardLog
.
setResidueCount
(
Long
.
valueOf
(
consumerSecondaryCard
.
getNumber
()));
secondaryCardLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
secondaryCardLog
.
setOperationTime
(
new
Date
());
secondaryCardLog
.
setCreateTime
(
new
Date
());
consumerSecondaryCardService
.
updateById
(
consumerSecondaryCard
);
secondaryCardLogService
.
save
(
secondaryCardLog
);
}
}
//
if (!ObjectUtils.isEmpty(sOrder.getSecondaryCardId()) && !ObjectUtils.isEmpty(sOrder.getPackId())) {
//
if (sOrder.getPackId().equals(consumerSecondaryCard.getPackId())) {
//
consumerSecondaryCard.setNumber(consumerSecondaryCard.getNumber() + 1);
//
SecondaryCardLog secondaryCardLog = new SecondaryCardLog();
//
secondaryCardLog.setConsumerSecondaryCardId(sOrder.getSecondaryCardId());
//
secondaryCardLog.setConsumerId(consumerSecondaryCard.getConsumerId());
//
secondaryCardLog.setPhone(sOrder.getConsumerPhone());
//
secondaryCardLog.setPackId(sOrder.getPackId());
//
secondaryCardLog.setUsageCount(1L);
//
secondaryCardLog.setResidueCount(Long.valueOf(consumerSecondaryCard.getNumber()));
//
secondaryCardLog.setOperationType(YesNoEnum.yes.getIndex());
//
secondaryCardLog.setOperationTime(new Date());
//
secondaryCardLog.setCreateTime(new Date());
//
consumerSecondaryCardService.updateById(consumerSecondaryCard);
//
secondaryCardLogService.save(secondaryCardLog);
//
}
//
}
}
private
String
lockOrder
(
CreateOrderRequest
request
)
throws
BaseException
{
try
{
...
...
@@ -3156,14 +3156,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
private
BigDecimal
getBigDecimal
(
ConsumerSecondaryCard
consumerSecondaryCard
,
ComputedOrderPriceResponse
priceResponse
,
SPack
byId
,
BigDecimal
payPrice
)
{
if
(
consumerSecondaryCard
.
getPackId
().
equals
(
byId
.
getId
()))
{
priceResponse
.
setDiscount
(
BigDecimal
.
ZERO
);
priceResponse
.
setMemberDiscount
(
BigDecimal
.
ZERO
);
priceResponse
.
setTotalFeeNow
(
BigDecimal
.
ZERO
);
priceResponse
.
setPayFee
(
BigDecimal
.
ZERO
);
priceResponse
.
setSecondaryCardId
(
consumerSecondaryCard
.
getId
());
payPrice
=
BigDecimal
.
ZERO
;
}
//
if (consumerSecondaryCard.getPackId().equals(byId.getId())) {
//
priceResponse.setDiscount(BigDecimal.ZERO);
//
priceResponse.setMemberDiscount(BigDecimal.ZERO);
//
priceResponse.setTotalFeeNow(BigDecimal.ZERO);
//
priceResponse.setPayFee(BigDecimal.ZERO);
//
priceResponse.setSecondaryCardId(consumerSecondaryCard.getId());
//
payPrice = BigDecimal.ZERO;
//
}
return
payPrice
;
}
...
...
share-system/src/main/java/share/system/service/impl/SecondaryCardConfServiceImpl.java
View file @
c115fa9e
...
...
@@ -5,7 +5,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.SecondaryCardConf
;
import
share.system.domain.vo.SecondaryCardConfVo
;
import
share.system.mapper.SecondaryCardConfMapper
;
import
share.system.service.SecondaryCardConfService
;
...
...
@@ -40,7 +39,7 @@ public class SecondaryCardConfServiceImpl extends ServiceImpl<SecondaryCardConfM
* @return 次卡配置
*/
@Override
public
List
<
SecondaryCardConf
Vo
>
selectSecondaryCardConfList
(
SecondaryCardConfVo
secondaryCardConf
)
{
public
List
<
SecondaryCardConf
>
selectSecondaryCardConfList
(
SecondaryCardConf
secondaryCardConf
)
{
return
secondaryCardConfMapper
.
selectSecondaryCardConfList
(
secondaryCardConf
);
}
...
...
share-system/src/main/java/share/system/service/impl/SecondaryCardOrderServiceImpl.java
View file @
c115fa9e
...
...
@@ -162,7 +162,8 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
consumerSecondaryCard
.
setSecondaryCardConfId
(
secondaryCardOrder
.
getSecondaryCardConfId
());
consumerSecondaryCard
.
setConsumerId
(
secondaryCardOrder
.
getConsumerId
());
consumerSecondaryCard
.
setPhone
(
secondaryCardOrder
.
getPhone
());
consumerSecondaryCard
.
setPackId
(
secondaryCardConf
.
getPackId
());
consumerSecondaryCard
.
setSingleAmount
(
secondaryCardConf
.
getSingleAmount
());
consumerSecondaryCard
.
setSingleDuration
(
secondaryCardConf
.
getSingleDuration
());
consumerSecondaryCard
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
secondaryCardConf
.
getValidityPeriod
()));
consumerSecondaryCard
.
setNumber
(
secondaryCardConf
.
getNumber
());
consumerSecondaryCard
.
setCreateTime
(
new
Date
());
...
...
share-system/src/main/resources/mapper/system/ConsumerSecondaryCardMapper.xml
View file @
c115fa9e
...
...
@@ -13,9 +13,8 @@
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"packName"
column=
"pack_name"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"singleDuration"
column=
"single_duration"
/>
<result
property=
"singleAmount"
column=
"single_amount"
/>
<result
property=
"expirationDate"
column=
"expiration_date"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
...
...
@@ -31,7 +30,8 @@
secondary_card_conf_id,
consumer_id,
phone,
pack_id,
single_duration,
single_amount,
expiration_date,
number,
is_delete,
...
...
@@ -51,11 +51,10 @@
c.phone,
m.nick_name,
m.avatar,
p.name as 'pack_name',
p.price as 'pack_price',
c2.name as 'conf_name',
c2.secondary_card_amount as 'conf_amount',
c. pack_id,
c.single_duration,
c.single_amount,
c.expiration_date,
c.number,
c.is_delete,
...
...
@@ -65,13 +64,14 @@
c.update_time,
c. remark
from s_consumer_secondary_card c join s_consumer m on c.consumer_id = m.id
join s_
pack p on c.pack_id = p.id join s_
secondary_card_conf c2 on c.secondary_card_conf_id = c2.id
join s_secondary_card_conf c2 on c.secondary_card_conf_id = c2.id
where
c.is_delete = 0
<if
test=
"secondaryCardConfId != null "
>
and c.secondary_card_conf_id = #{secondaryCardConfId}
</if>
<if
test=
"consumerId != null "
>
and c.consumer_id = #{consumerId}
</if>
<if
test=
"phone != null and phone != ''"
>
and c.phone = #{phone}
</if>
<if
test=
"packId != null "
>
and c.pack_id = #{packId}
</if>
<if
test=
"singleDuration != null "
>
and c.single_duration = #{singleDuration}
</if>
<if
test=
"singleAmount != null "
>
and c.single_amount = #{singleAmount}
</if>
<if
test=
"expirationDate != null "
>
and c.expiration_date = #{expirationDate}
</if>
<if
test=
"number != null "
>
and c.number = #{number}
</if>
</select>
...
...
@@ -87,7 +87,8 @@
c.phone,
m.nick_name,
m.avatar,
c.pack_id,
c.single_duration,
c.single_amount,
c.expiration_date,
c.number,
c.is_delete,
...
...
@@ -109,7 +110,8 @@
<if
test=
"secondaryCardConfId != null"
>
secondary_card_conf_id,
</if>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"phone != null and phone != ''"
>
phone,
</if>
<if
test=
"packId != null"
>
pack_id,
</if>
<if
test=
"singleDuration != null"
>
single_duration,
</if>
<if
test=
"singleAmount != null"
>
single_amount,
</if>
<if
test=
"expirationDate != null"
>
expiration_date,
</if>
<if
test=
"number != null"
>
number,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
...
...
@@ -123,7 +125,8 @@
<if
test=
"secondaryCardConfId != null"
>
#{secondaryCardConfId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"phone != null and phone != ''"
>
#{phone},
</if>
<if
test=
"packId != null"
>
#{packId},
</if>
<if
test=
"singleDuration != null"
>
#{singleDuration},
</if>
<if
test=
"singleAmount != null"
>
#{singleAmount},
</if>
<if
test=
"expirationDate != null"
>
#{expiration_date},
</if>
<if
test=
"number != null"
>
#{number},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
...
...
@@ -141,7 +144,8 @@
<if
test=
"secondaryCardConfId != null"
>
secondary_card_conf_id = #{secondaryCardConfId},
</if>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"phone != null and phone != ''"
>
phone = #{phone},
</if>
<if
test=
"packId != null"
>
pack_id = #{packId},
</if>
<if
test=
"singleDuration != null"
>
single_duration = #{singleDuration},
</if>
<if
test=
"singleAmount != null"
>
single_amount = #{singleAmount},
</if>
<if
test=
"expirationDate != null"
>
expiration_date = #{expirationDate},
</if>
<if
test=
"number != null"
>
number = #{number},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
...
...
share-system/src/main/resources/mapper/system/SecondaryCardConfMapper.xml
View file @
c115fa9e
...
...
@@ -4,13 +4,12 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.SecondaryCardConfMapper"
>
<resultMap
type=
"SecondaryCardConf
Vo
"
id=
"SecondaryCardConfResult"
>
<resultMap
type=
"SecondaryCardConf"
id=
"SecondaryCardConfResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"secondaryCardAmount"
column=
"secondary_card_amount"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"packName"
column=
"pack_name"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"singleDuration"
column=
"single_duration"
/>
<result
property=
"singleAmount"
column=
"single_amount"
/>
<result
property=
"validityPeriod"
column=
"validity_period"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
...
...
@@ -25,7 +24,8 @@
select id,
name,
secondary_card_amount,
pack_id,
single_duration,
single_amount,
validity_period,
number,
is_delete,
...
...
@@ -37,13 +37,12 @@
from s_secondary_card_conf
</sql>
<select
id=
"selectSecondaryCardConfList"
parameterType=
"SecondaryCardConf
Vo
"
resultMap=
"SecondaryCardConfResult"
>
<select
id=
"selectSecondaryCardConfList"
parameterType=
"SecondaryCardConf"
resultMap=
"SecondaryCardConfResult"
>
select c.id,
c.name,
c.secondary_card_amount,
c.pack_id,
p.name as pack_name,
p.price as pack_price,
c.single_duration,
c.single_amount,
c.validity_period,
c.number,
c.is_delete,
...
...
@@ -52,11 +51,12 @@
c.update_by,
c.update_time,
c.remark
from s_secondary_card_conf c
join s_pack p on c.pack_id = p.id
from s_secondary_card_conf c
where c.is_delete = 0
<if
test=
"name != null and name != ''"
>
and c.name like concat('%', #{name}, '%')
</if>
<if
test=
"secondaryCardAmount != null "
>
and c.secondary_card_amount = #{secondaryCardAmount}
</if>
<if
test=
"packId != null "
>
and c.pack_id = #{packId}
</if>
<if
test=
"singleDuration != null "
>
and c.single_duration = #{singleDuration}
</if>
<if
test=
"singleAmount != null "
>
and c.single_amount = #{singleAmount}
</if>
<if
test=
"validityPeriod != null "
>
and c.validity_period = #{validityPeriod}
</if>
<if
test=
"number != null "
>
and c.number = #{number}
</if>
</select>
...
...
@@ -71,7 +71,8 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"secondaryCardAmount != null"
>
secondary_card_amount,
</if>
<if
test=
"packId != null"
>
pack_id,
</if>
<if
test=
"singleDuration != null"
>
single_duration,
</if>
<if
test=
"singleAmount != null"
>
single_amount,
</if>
<if
test=
"validityPeriod != null"
>
validity_period,
</if>
<if
test=
"number != null"
>
number,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
...
...
@@ -84,7 +85,8 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"secondaryCardAmount != null"
>
#{secondaryCardAmount},
</if>
<if
test=
"packId != null"
>
#{packId},
</if>
<if
test=
"singleDuration != null"
>
#{singleDuration},
</if>
<if
test=
"singleAmount != null"
>
#{singleAmount},
</if>
<if
test=
"validityPeriod != null"
>
#{validityPeriod},
</if>
<if
test=
"number != null"
>
#{number},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
...
...
@@ -101,7 +103,8 @@
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name = #{name},
</if>
<if
test=
"secondaryCardAmount != null"
>
secondary_card_amount = #{secondaryCardAmount},
</if>
<if
test=
"packId != null"
>
pack_id = #{packId},
</if>
<if
test=
"singleDuration != null"
>
single_duration = #{singleDuration},
</if>
<if
test=
"singleAmount != null"
>
single_amount = #{singleAmount},
</if>
<if
test=
"validityPeriod != null"
>
validity_period = #{validityPeriod},
</if>
<if
test=
"number != null"
>
number = #{number},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
...
...
share-system/src/main/resources/mapper/system/SecondaryCardLogMapper.xml
View file @
c115fa9e
...
...
@@ -13,9 +13,6 @@
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"avatar"
column=
"avatar"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"packName"
column=
"pack_name"
/>
<result
property=
"packPrice"
column=
"pack_price"
/>
<result
property=
"usageCount"
column=
"usage_count"
/>
<result
property=
"residueCount"
column=
"residue_count"
/>
<result
property=
"operationType"
column=
"operation_type"
/>
...
...
@@ -33,7 +30,6 @@
consumer_secondary_card_id,
consumer_id,
phone,
pack_id,
usage_count,
residue_count,
operation_type,
...
...
@@ -56,9 +52,6 @@
c.nick_name as 'nick_name',
c.avatar,
l.phone,
l.pack_id,
p.name as 'pack_name',
p.price as 'pack_price',
l.usage_count,
l.residue_count,
l.operation_type,
...
...
@@ -69,7 +62,7 @@
l. update_by,
l.update_time,
l.remark
from s_secondary_card_log l join s_
pack p on l.pack_id = p.id join s_
consumer c on l.consumer_id = c.id
from s_secondary_card_log l join s_consumer c on l.consumer_id = c.id
join s_consumer_secondary_card s on l.consumer_secondary_card_id = s.id join s_secondary_card_conf c1 on
s.secondary_card_conf_id = c1.id
where l.is_delete = 0
...
...
@@ -77,7 +70,7 @@
</if>
<if
test=
"consumerId != null "
>
and l.consumer_id = #{consumerId}
</if>
<if
test=
"phone != null and phone != ''"
>
and l.phone = #{phone}
</if>
<if
test=
"packId != null "
>
and l.pack_id = #{packId}
</if>
<if
test=
"usageCount != null "
>
and l.usage_count = #{usageCount}
</if>
<if
test=
"residueCount != null "
>
and l.residue_count = #{residueCount}
</if>
order by l.create_time
...
...
@@ -94,7 +87,7 @@
<if
test=
"consumerSecondaryCardId != null"
>
consumer_secondary_card_id,
</if>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"phone != null and phone != ''"
>
phone,
</if>
<if
test=
"packId != null"
>
pack_id,
</if>
<if
test=
"usageCount != null"
>
usage_count,
</if>
<if
test=
"residueCount != null"
>
residue_count,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
...
...
@@ -110,7 +103,7 @@
<if
test=
"consumerSecondaryCardId != null"
>
#{consumerSecondaryCardId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"phone != null and phone != ''"
>
#{phone},
</if>
<if
test=
"packId != null"
>
#{packId},
</if>
<if
test=
"usageCount != null"
>
#{usageCount},
</if>
<if
test=
"residueCount != null"
>
#{residueCount},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
...
...
@@ -130,7 +123,7 @@
<if
test=
"consumerSecondaryCardId != null"
>
consumer_secondary_card_id = #{consumerSecondaryCardId},
</if>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"phone != null and phone != ''"
>
phone = #{phone},
</if>
<if
test=
"packId != null"
>
pack_id = #{packId},
</if>
<if
test=
"usageCount != null"
>
usage_count = #{usageCount},
</if>
<if
test=
"residueCount != null"
>
residue_count = #{residueCount},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
...
...
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