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