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
b84e681a
Commit
b84e681a
authored
Aug 22, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加次卡数据
parent
3c2a2bf7
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
2117 additions
and
0 deletions
+2117
-0
ConsumerSecondaryCardController.java
...eb/controller/system/ConsumerSecondaryCardController.java
+91
-0
SecondaryCardConfController.java
...re/web/controller/system/SecondaryCardConfController.java
+91
-0
SecondaryCardLogController.java
...are/web/controller/system/SecondaryCardLogController.java
+91
-0
SecondaryCardOrderController.java
...e/web/controller/system/SecondaryCardOrderController.java
+91
-0
ConsumerSecondaryCard.java
.../main/java/share/system/domain/ConsumerSecondaryCard.java
+89
-0
SecondaryCardConf.java
.../src/main/java/share/system/domain/SecondaryCardConf.java
+84
-0
SecondaryCardLog.java
...m/src/main/java/share/system/domain/SecondaryCardLog.java
+89
-0
SecondaryCardOrder.java
...src/main/java/share/system/domain/SecondaryCardOrder.java
+122
-0
ConsumerSecondaryCardMapper.java
...java/share/system/mapper/ConsumerSecondaryCardMapper.java
+62
-0
SecondaryCardConfMapper.java
...ain/java/share/system/mapper/SecondaryCardConfMapper.java
+62
-0
SecondaryCardLogMapper.java
...main/java/share/system/mapper/SecondaryCardLogMapper.java
+62
-0
SecondaryCardOrderMapper.java
...in/java/share/system/mapper/SecondaryCardOrderMapper.java
+62
-0
ConsumerSecondaryCardService.java
...va/share/system/service/ConsumerSecondaryCardService.java
+62
-0
SecondaryCardConfService.java
...n/java/share/system/service/SecondaryCardConfService.java
+62
-0
SecondaryCardLogService.java
...in/java/share/system/service/SecondaryCardLogService.java
+62
-0
SecondaryCardOrderService.java
.../java/share/system/service/SecondaryCardOrderService.java
+62
-0
ConsumerSecondaryCardServiceImpl.java
...system/service/impl/ConsumerSecondaryCardServiceImpl.java
+91
-0
SecondaryCardConfServiceImpl.java
...are/system/service/impl/SecondaryCardConfServiceImpl.java
+91
-0
SecondaryCardLogServiceImpl.java
...hare/system/service/impl/SecondaryCardLogServiceImpl.java
+91
-0
SecondaryCardOrderServiceImpl.java
...re/system/service/impl/SecondaryCardOrderServiceImpl.java
+91
-0
ConsumerSecondaryCardMapper.xml
...n/resources/mapper/system/ConsumerSecondaryCardMapper.xml
+124
-0
SecondaryCardConfMapper.xml
.../main/resources/mapper/system/SecondaryCardConfMapper.xml
+116
-0
SecondaryCardLogMapper.xml
...c/main/resources/mapper/system/SecondaryCardLogMapper.xml
+122
-0
SecondaryCardOrderMapper.xml
...main/resources/mapper/system/SecondaryCardOrderMapper.xml
+147
-0
No files found.
share-admin/src/main/java/share/web/controller/system/ConsumerSecondaryCardController.java
0 → 100644
View file @
b84e681a
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.ConsumerSecondaryCard
;
import
share.system.service.ConsumerSecondaryCardService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 用户次卡Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping
(
"/system/consumerSecondaryCard"
)
public
class
ConsumerSecondaryCardController
extends
BaseController
{
@Autowired
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
/**
* 查询用户次卡列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:consumerSecondaryCard:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
ConsumerSecondaryCard
consumerSecondaryCard
)
{
startPage
();
List
<
ConsumerSecondaryCard
>
list
=
consumerSecondaryCardService
.
selectConsumerSecondaryCardList
(
consumerSecondaryCard
);
return
getDataTable
(
list
);
}
/**
* 导出用户次卡列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:consumerSecondaryCard:export')"
)
@Log
(
title
=
"用户次卡"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
ConsumerSecondaryCard
consumerSecondaryCard
)
{
List
<
ConsumerSecondaryCard
>
list
=
consumerSecondaryCardService
.
selectConsumerSecondaryCardList
(
consumerSecondaryCard
);
ExcelUtil
<
ConsumerSecondaryCard
>
util
=
new
ExcelUtil
<
ConsumerSecondaryCard
>(
ConsumerSecondaryCard
.
class
);
util
.
exportExcel
(
response
,
list
,
"用户次卡数据"
);
}
/**
* 获取用户次卡详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:consumerSecondaryCard:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
consumerSecondaryCardService
.
selectConsumerSecondaryCardById
(
id
));
}
/**
* 新增用户次卡
*/
@PreAuthorize
(
"@ss.hasPermi('system:consumerSecondaryCard:add')"
)
@Log
(
title
=
"用户次卡"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
ConsumerSecondaryCard
consumerSecondaryCard
)
{
return
toAjax
(
consumerSecondaryCardService
.
insertConsumerSecondaryCard
(
consumerSecondaryCard
));
}
/**
* 修改用户次卡
*/
@PreAuthorize
(
"@ss.hasPermi('system:consumerSecondaryCard:edit')"
)
@Log
(
title
=
"用户次卡"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
ConsumerSecondaryCard
consumerSecondaryCard
)
{
return
toAjax
(
consumerSecondaryCardService
.
updateConsumerSecondaryCard
(
consumerSecondaryCard
));
}
/**
* 删除用户次卡
*/
@PreAuthorize
(
"@ss.hasPermi('system:consumerSecondaryCard:remove')"
)
@Log
(
title
=
"用户次卡"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
consumerSecondaryCardService
.
deleteConsumerSecondaryCardByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/SecondaryCardConfController.java
0 → 100644
View file @
b84e681a
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.SecondaryCardConf
;
import
share.system.service.SecondaryCardConfService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 次卡配置Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping
(
"/system/secondaryCardConf"
)
public
class
SecondaryCardConfController
extends
BaseController
{
@Autowired
private
SecondaryCardConfService
secondaryCardConfService
;
/**
* 查询次卡配置列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SecondaryCardConf
secondaryCardConf
)
{
startPage
();
List
<
SecondaryCardConf
>
list
=
secondaryCardConfService
.
selectSecondaryCardConfList
(
secondaryCardConf
);
return
getDataTable
(
list
);
}
/**
* 导出次卡配置列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:export')"
)
@Log
(
title
=
"次卡配置"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
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
,
"次卡配置数据"
);
}
/**
* 获取次卡配置详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
secondaryCardConfService
.
selectSecondaryCardConfById
(
id
));
}
/**
* 新增次卡配置
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:add')"
)
@Log
(
title
=
"次卡配置"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SecondaryCardConf
secondaryCardConf
)
{
return
toAjax
(
secondaryCardConfService
.
insertSecondaryCardConf
(
secondaryCardConf
));
}
/**
* 修改次卡配置
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:edit')"
)
@Log
(
title
=
"次卡配置"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SecondaryCardConf
secondaryCardConf
)
{
return
toAjax
(
secondaryCardConfService
.
updateSecondaryCardConf
(
secondaryCardConf
));
}
/**
* 删除次卡配置
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardConf:remove')"
)
@Log
(
title
=
"次卡配置"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
secondaryCardConfService
.
deleteSecondaryCardConfByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/SecondaryCardLogController.java
0 → 100644
View file @
b84e681a
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.SecondaryCardLog
;
import
share.system.service.SecondaryCardLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 次卡使用记录Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping
(
"/system/secondaryCardLog"
)
public
class
SecondaryCardLogController
extends
BaseController
{
@Autowired
private
SecondaryCardLogService
secondaryCardLogService
;
/**
* 查询次卡使用记录列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardLog:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SecondaryCardLog
secondaryCardLog
)
{
startPage
();
List
<
SecondaryCardLog
>
list
=
secondaryCardLogService
.
selectSecondaryCardLogList
(
secondaryCardLog
);
return
getDataTable
(
list
);
}
/**
* 导出次卡使用记录列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardLog:export')"
)
@Log
(
title
=
"次卡使用记录"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SecondaryCardLog
secondaryCardLog
)
{
List
<
SecondaryCardLog
>
list
=
secondaryCardLogService
.
selectSecondaryCardLogList
(
secondaryCardLog
);
ExcelUtil
<
SecondaryCardLog
>
util
=
new
ExcelUtil
<
SecondaryCardLog
>(
SecondaryCardLog
.
class
);
util
.
exportExcel
(
response
,
list
,
"次卡使用记录数据"
);
}
/**
* 获取次卡使用记录详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardLog:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
secondaryCardLogService
.
selectSecondaryCardLogById
(
id
));
}
/**
* 新增次卡使用记录
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardLog:add')"
)
@Log
(
title
=
"次卡使用记录"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SecondaryCardLog
secondaryCardLog
)
{
return
toAjax
(
secondaryCardLogService
.
insertSecondaryCardLog
(
secondaryCardLog
));
}
/**
* 修改次卡使用记录
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardLog:edit')"
)
@Log
(
title
=
"次卡使用记录"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SecondaryCardLog
secondaryCardLog
)
{
return
toAjax
(
secondaryCardLogService
.
updateSecondaryCardLog
(
secondaryCardLog
));
}
/**
* 删除次卡使用记录
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardLog:remove')"
)
@Log
(
title
=
"次卡使用记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
secondaryCardLogService
.
deleteSecondaryCardLogByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/SecondaryCardOrderController.java
0 → 100644
View file @
b84e681a
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.SecondaryCardOrder
;
import
share.system.service.SecondaryCardOrderService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 次卡购买记录Controller
*
* @author wuwenlong
* @date 2024-08-22
*/
@RestController
@RequestMapping
(
"/system/secondaryCardOrder"
)
public
class
SecondaryCardOrderController
extends
BaseController
{
@Autowired
private
SecondaryCardOrderService
secondaryCardOrderService
;
/**
* 查询次卡购买记录列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardOrder:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SecondaryCardOrder
secondaryCardOrder
)
{
startPage
();
List
<
SecondaryCardOrder
>
list
=
secondaryCardOrderService
.
selectSecondaryCardOrderList
(
secondaryCardOrder
);
return
getDataTable
(
list
);
}
/**
* 导出次卡购买记录列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardOrder:export')"
)
@Log
(
title
=
"次卡购买记录"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SecondaryCardOrder
secondaryCardOrder
)
{
List
<
SecondaryCardOrder
>
list
=
secondaryCardOrderService
.
selectSecondaryCardOrderList
(
secondaryCardOrder
);
ExcelUtil
<
SecondaryCardOrder
>
util
=
new
ExcelUtil
<
SecondaryCardOrder
>(
SecondaryCardOrder
.
class
);
util
.
exportExcel
(
response
,
list
,
"次卡购买记录数据"
);
}
/**
* 获取次卡购买记录详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardOrder:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
secondaryCardOrderService
.
selectSecondaryCardOrderById
(
id
));
}
/**
* 新增次卡购买记录
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardOrder:add')"
)
@Log
(
title
=
"次卡购买记录"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SecondaryCardOrder
secondaryCardOrder
)
{
return
toAjax
(
secondaryCardOrderService
.
insertSecondaryCardOrder
(
secondaryCardOrder
));
}
/**
* 修改次卡购买记录
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardOrder:edit')"
)
@Log
(
title
=
"次卡购买记录"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SecondaryCardOrder
secondaryCardOrder
)
{
return
toAjax
(
secondaryCardOrderService
.
updateSecondaryCardOrder
(
secondaryCardOrder
));
}
/**
* 删除次卡购买记录
*/
@PreAuthorize
(
"@ss.hasPermi('system:secondaryCardOrder:remove')"
)
@Log
(
title
=
"次卡购买记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
secondaryCardOrderService
.
deleteSecondaryCardOrderByIds
(
ids
));
}
}
share-system/src/main/java/share/system/domain/ConsumerSecondaryCard.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
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
;
/**
* 用户次卡对象 s_consumer_secondary_card
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public
class
ConsumerSecondaryCard
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 次卡配置表id
*/
@Excel
(
name
=
"次卡配置表id"
)
private
Long
secondaryCardConfId
;
/**
* 用户ID
*/
@Excel
(
name
=
"用户ID"
)
private
Long
consumerId
;
/**
* 用户手机号
*/
@Excel
(
name
=
"用户手机号"
)
private
String
phone
;
/**
* 套餐id
*/
@Excel
(
name
=
"套餐id"
)
private
Long
packId
;
/**
* 次卡有效期
*/
@Excel
(
name
=
"次卡有效期"
)
private
Long
validityPeriod
;
/**
* 次卡次数
*/
@Excel
(
name
=
"次卡次数"
)
private
Long
number
;
/**
* 删除标记:1-删除,0-正常
*/
//逻辑删除注解(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
(
"secondaryCardConfId"
,
getSecondaryCardConfId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"phone"
,
getPhone
())
.
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/SecondaryCardConf.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
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
;
/**
* 次卡配置对象 s_secondary_card_conf
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public
class
SecondaryCardConf
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 配置名称
*/
@Excel
(
name
=
"配置名称"
)
private
String
name
;
/**
* 次卡金额
*/
@Excel
(
name
=
"次卡金额"
)
private
BigDecimal
secondaryCardAmount
;
/**
* 套餐id
*/
@Excel
(
name
=
"套餐id"
)
private
Long
packId
;
/**
* 次卡有效期
*/
@Excel
(
name
=
"次卡有效期"
)
private
Long
validityPeriod
;
/**
* 次卡次数
*/
@Excel
(
name
=
"次卡次数"
)
private
Long
number
;
/**
* 是否删除(0:否,1:是)
*/
//逻辑删除注解(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
(
"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
0 → 100644
View file @
b84e681a
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
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
;
/**
* 次卡使用记录对象 s_secondary_card_log
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public
class
SecondaryCardLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 用户次卡id
*/
@Excel
(
name
=
"用户次卡id"
)
private
Long
consumerSecondaryCardId
;
/**
* 用户ID
*/
@Excel
(
name
=
"用户ID"
)
private
Long
consumerId
;
/**
* 用户手机号
*/
@Excel
(
name
=
"用户手机号"
)
private
String
phone
;
/**
* 套餐id
*/
@Excel
(
name
=
"套餐id"
)
private
Long
packId
;
/**
* 使用次数
*/
@Excel
(
name
=
"使用次数"
)
private
Long
usageCount
;
/**
* 剩余次数
*/
@Excel
(
name
=
"剩余次数"
)
private
Long
residueCount
;
/**
* 删除标记:1-删除,0-正常
*/
//逻辑删除注解(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
(
"consumerSecondaryCardId"
,
getConsumerSecondaryCardId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"packId"
,
getPackId
())
.
append
(
"usageCount"
,
getUsageCount
())
.
append
(
"residueCount"
,
getResidueCount
())
.
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/SecondaryCardOrder.java
0 → 100644
View file @
b84e681a
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_secondary_card_order
*
* @author wuwenlong
* @date 2024-08-22
*/
@Data
public
class
SecondaryCardOrder
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 次卡购买记录编号
*/
@Excel
(
name
=
"次卡购买记录编号"
)
private
String
secondaryCardNo
;
/**
* 扫呗平台唯一订单号
*/
@Excel
(
name
=
"扫呗平台唯一订单号"
)
private
String
outTradeNo
;
/**
* 商户订单号
*/
@Excel
(
name
=
"商户订单号"
)
private
String
terminalTrace
;
/**
* 次卡购买金额
*/
@Excel
(
name
=
"次卡购买金额"
)
private
BigDecimal
secondaryCardAmount
;
/**
* 次卡配置表id
*/
@Excel
(
name
=
"次卡配置表id"
)
private
Long
secondaryCardConfId
;
/**
* 次卡用户ID
*/
@Excel
(
name
=
"次卡用户ID"
)
private
Long
consumerId
;
/**
* 次卡用户手机号
*/
@Excel
(
name
=
"次卡用户手机号"
)
private
String
phone
;
/**
* 支付方式
*/
@Excel
(
name
=
"支付方式"
)
private
Long
payType
;
/**
* 状态:0-待支付,1-支付成功,2-退款中,3-退款完成
*/
@Excel
(
name
=
"状态:0-待支付,1-支付成功,2-退款中,3-退款完成"
)
private
Long
payStatus
;
/**
* 支付时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"支付时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
payTime
;
/**
* 删除标记:1-删除,0-正常
*/
//逻辑删除注解(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
(
"secondaryCardNo"
,
getSecondaryCardNo
())
.
append
(
"outTradeNo"
,
getOutTradeNo
())
.
append
(
"terminalTrace"
,
getTerminalTrace
())
.
append
(
"secondaryCardAmount"
,
getSecondaryCardAmount
())
.
append
(
"secondaryCardConfId"
,
getSecondaryCardConfId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"payType"
,
getPayType
())
.
append
(
"payStatus"
,
getPayStatus
())
.
append
(
"payTime"
,
getPayTime
())
.
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/mapper/ConsumerSecondaryCardMapper.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.ConsumerSecondaryCard
;
import
java.util.List
;
/**
* 用户次卡Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
ConsumerSecondaryCardMapper
extends
BaseMapper
<
ConsumerSecondaryCard
>
{
/**
* 查询用户次卡
*
* @param id 用户次卡主键
* @return 用户次卡
*/
public
ConsumerSecondaryCard
selectConsumerSecondaryCardById
(
Long
id
);
/**
* 查询用户次卡列表
*
* @param consumerSecondaryCard 用户次卡
* @return 用户次卡集合
*/
public
List
<
ConsumerSecondaryCard
>
selectConsumerSecondaryCardList
(
ConsumerSecondaryCard
consumerSecondaryCard
);
/**
* 新增用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public
int
insertConsumerSecondaryCard
(
ConsumerSecondaryCard
consumerSecondaryCard
);
/**
* 修改用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public
int
updateConsumerSecondaryCard
(
ConsumerSecondaryCard
consumerSecondaryCard
);
/**
* 删除用户次卡
*
* @param id 用户次卡主键
* @return 结果
*/
public
int
deleteConsumerSecondaryCardById
(
Long
id
);
/**
* 批量删除用户次卡
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteConsumerSecondaryCardByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/SecondaryCardConfMapper.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SecondaryCardConf
;
import
java.util.List
;
/**
* 次卡配置Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
SecondaryCardConfMapper
extends
BaseMapper
<
SecondaryCardConf
>
{
/**
* 查询次卡配置
*
* @param id 次卡配置主键
* @return 次卡配置
*/
public
SecondaryCardConf
selectSecondaryCardConfById
(
Long
id
);
/**
* 查询次卡配置列表
*
* @param secondaryCardConf 次卡配置
* @return 次卡配置集合
*/
public
List
<
SecondaryCardConf
>
selectSecondaryCardConfList
(
SecondaryCardConf
secondaryCardConf
);
/**
* 新增次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public
int
insertSecondaryCardConf
(
SecondaryCardConf
secondaryCardConf
);
/**
* 修改次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public
int
updateSecondaryCardConf
(
SecondaryCardConf
secondaryCardConf
);
/**
* 删除次卡配置
*
* @param id 次卡配置主键
* @return 结果
*/
public
int
deleteSecondaryCardConfById
(
Long
id
);
/**
* 批量删除次卡配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSecondaryCardConfByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/SecondaryCardLogMapper.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SecondaryCardLog
;
import
java.util.List
;
/**
* 次卡使用记录Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
SecondaryCardLogMapper
extends
BaseMapper
<
SecondaryCardLog
>
{
/**
* 查询次卡使用记录
*
* @param id 次卡使用记录主键
* @return 次卡使用记录
*/
public
SecondaryCardLog
selectSecondaryCardLogById
(
Long
id
);
/**
* 查询次卡使用记录列表
*
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录集合
*/
public
List
<
SecondaryCardLog
>
selectSecondaryCardLogList
(
SecondaryCardLog
secondaryCardLog
);
/**
* 新增次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public
int
insertSecondaryCardLog
(
SecondaryCardLog
secondaryCardLog
);
/**
* 修改次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public
int
updateSecondaryCardLog
(
SecondaryCardLog
secondaryCardLog
);
/**
* 删除次卡使用记录
*
* @param id 次卡使用记录主键
* @return 结果
*/
public
int
deleteSecondaryCardLogById
(
Long
id
);
/**
* 批量删除次卡使用记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSecondaryCardLogByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/SecondaryCardOrderMapper.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SecondaryCardOrder
;
import
java.util.List
;
/**
* 次卡购买记录Mapper接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
SecondaryCardOrderMapper
extends
BaseMapper
<
SecondaryCardOrder
>
{
/**
* 查询次卡购买记录
*
* @param id 次卡购买记录主键
* @return 次卡购买记录
*/
public
SecondaryCardOrder
selectSecondaryCardOrderById
(
Long
id
);
/**
* 查询次卡购买记录列表
*
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录集合
*/
public
List
<
SecondaryCardOrder
>
selectSecondaryCardOrderList
(
SecondaryCardOrder
secondaryCardOrder
);
/**
* 新增次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public
int
insertSecondaryCardOrder
(
SecondaryCardOrder
secondaryCardOrder
);
/**
* 修改次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public
int
updateSecondaryCardOrder
(
SecondaryCardOrder
secondaryCardOrder
);
/**
* 删除次卡购买记录
*
* @param id 次卡购买记录主键
* @return 结果
*/
public
int
deleteSecondaryCardOrderById
(
Long
id
);
/**
* 批量删除次卡购买记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSecondaryCardOrderByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/service/ConsumerSecondaryCardService.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.ConsumerSecondaryCard
;
import
java.util.List
;
/**
* 用户次卡Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
ConsumerSecondaryCardService
extends
IService
<
ConsumerSecondaryCard
>
{
/**
* 查询用户次卡
*
* @param id 用户次卡主键
* @return 用户次卡
*/
public
ConsumerSecondaryCard
selectConsumerSecondaryCardById
(
Long
id
);
/**
* 查询用户次卡列表
*
* @param consumerSecondaryCard 用户次卡
* @return 用户次卡集合
*/
public
List
<
ConsumerSecondaryCard
>
selectConsumerSecondaryCardList
(
ConsumerSecondaryCard
consumerSecondaryCard
);
/**
* 新增用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public
int
insertConsumerSecondaryCard
(
ConsumerSecondaryCard
consumerSecondaryCard
);
/**
* 修改用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
public
int
updateConsumerSecondaryCard
(
ConsumerSecondaryCard
consumerSecondaryCard
);
/**
* 批量删除用户次卡
*
* @param ids 需要删除的用户次卡主键集合
* @return 结果
*/
public
int
deleteConsumerSecondaryCardByIds
(
Long
[]
ids
);
/**
* 删除用户次卡信息
*
* @param id 用户次卡主键
* @return 结果
*/
public
int
deleteConsumerSecondaryCardById
(
Long
id
);
}
share-system/src/main/java/share/system/service/SecondaryCardConfService.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SecondaryCardConf
;
import
java.util.List
;
/**
* 次卡配置Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
SecondaryCardConfService
extends
IService
<
SecondaryCardConf
>
{
/**
* 查询次卡配置
*
* @param id 次卡配置主键
* @return 次卡配置
*/
public
SecondaryCardConf
selectSecondaryCardConfById
(
Long
id
);
/**
* 查询次卡配置列表
*
* @param secondaryCardConf 次卡配置
* @return 次卡配置集合
*/
public
List
<
SecondaryCardConf
>
selectSecondaryCardConfList
(
SecondaryCardConf
secondaryCardConf
);
/**
* 新增次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public
int
insertSecondaryCardConf
(
SecondaryCardConf
secondaryCardConf
);
/**
* 修改次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
public
int
updateSecondaryCardConf
(
SecondaryCardConf
secondaryCardConf
);
/**
* 批量删除次卡配置
*
* @param ids 需要删除的次卡配置主键集合
* @return 结果
*/
public
int
deleteSecondaryCardConfByIds
(
Long
[]
ids
);
/**
* 删除次卡配置信息
*
* @param id 次卡配置主键
* @return 结果
*/
public
int
deleteSecondaryCardConfById
(
Long
id
);
}
share-system/src/main/java/share/system/service/SecondaryCardLogService.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SecondaryCardLog
;
import
java.util.List
;
/**
* 次卡使用记录Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
SecondaryCardLogService
extends
IService
<
SecondaryCardLog
>
{
/**
* 查询次卡使用记录
*
* @param id 次卡使用记录主键
* @return 次卡使用记录
*/
public
SecondaryCardLog
selectSecondaryCardLogById
(
Long
id
);
/**
* 查询次卡使用记录列表
*
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录集合
*/
public
List
<
SecondaryCardLog
>
selectSecondaryCardLogList
(
SecondaryCardLog
secondaryCardLog
);
/**
* 新增次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public
int
insertSecondaryCardLog
(
SecondaryCardLog
secondaryCardLog
);
/**
* 修改次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
public
int
updateSecondaryCardLog
(
SecondaryCardLog
secondaryCardLog
);
/**
* 批量删除次卡使用记录
*
* @param ids 需要删除的次卡使用记录主键集合
* @return 结果
*/
public
int
deleteSecondaryCardLogByIds
(
Long
[]
ids
);
/**
* 删除次卡使用记录信息
*
* @param id 次卡使用记录主键
* @return 结果
*/
public
int
deleteSecondaryCardLogById
(
Long
id
);
}
share-system/src/main/java/share/system/service/SecondaryCardOrderService.java
0 → 100644
View file @
b84e681a
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SecondaryCardOrder
;
import
java.util.List
;
/**
* 次卡购买记录Service接口
*
* @author wuwenlong
* @date 2024-08-22
*/
public
interface
SecondaryCardOrderService
extends
IService
<
SecondaryCardOrder
>
{
/**
* 查询次卡购买记录
*
* @param id 次卡购买记录主键
* @return 次卡购买记录
*/
public
SecondaryCardOrder
selectSecondaryCardOrderById
(
Long
id
);
/**
* 查询次卡购买记录列表
*
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录集合
*/
public
List
<
SecondaryCardOrder
>
selectSecondaryCardOrderList
(
SecondaryCardOrder
secondaryCardOrder
);
/**
* 新增次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public
int
insertSecondaryCardOrder
(
SecondaryCardOrder
secondaryCardOrder
);
/**
* 修改次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
public
int
updateSecondaryCardOrder
(
SecondaryCardOrder
secondaryCardOrder
);
/**
* 批量删除次卡购买记录
*
* @param ids 需要删除的次卡购买记录主键集合
* @return 结果
*/
public
int
deleteSecondaryCardOrderByIds
(
Long
[]
ids
);
/**
* 删除次卡购买记录信息
*
* @param id 次卡购买记录主键
* @return 结果
*/
public
int
deleteSecondaryCardOrderById
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/ConsumerSecondaryCardServiceImpl.java
0 → 100644
View file @
b84e681a
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.ConsumerSecondaryCard
;
import
share.system.mapper.ConsumerSecondaryCardMapper
;
import
share.system.service.ConsumerSecondaryCardService
;
import
java.util.List
;
/**
* 用户次卡Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public
class
ConsumerSecondaryCardServiceImpl
extends
ServiceImpl
<
ConsumerSecondaryCardMapper
,
ConsumerSecondaryCard
>
implements
ConsumerSecondaryCardService
{
@Autowired
private
ConsumerSecondaryCardMapper
consumerSecondaryCardMapper
;
/**
* 查询用户次卡
*
* @param id 用户次卡主键
* @return 用户次卡
*/
@Override
public
ConsumerSecondaryCard
selectConsumerSecondaryCardById
(
Long
id
)
{
return
consumerSecondaryCardMapper
.
selectConsumerSecondaryCardById
(
id
);
}
/**
* 查询用户次卡列表
*
* @param consumerSecondaryCard 用户次卡
* @return 用户次卡
*/
@Override
public
List
<
ConsumerSecondaryCard
>
selectConsumerSecondaryCardList
(
ConsumerSecondaryCard
consumerSecondaryCard
)
{
return
consumerSecondaryCardMapper
.
selectConsumerSecondaryCardList
(
consumerSecondaryCard
);
}
/**
* 新增用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
@Override
public
int
insertConsumerSecondaryCard
(
ConsumerSecondaryCard
consumerSecondaryCard
)
{
consumerSecondaryCard
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
consumerSecondaryCardMapper
.
insertConsumerSecondaryCard
(
consumerSecondaryCard
);
}
/**
* 修改用户次卡
*
* @param consumerSecondaryCard 用户次卡
* @return 结果
*/
@Override
public
int
updateConsumerSecondaryCard
(
ConsumerSecondaryCard
consumerSecondaryCard
)
{
consumerSecondaryCard
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
consumerSecondaryCardMapper
.
updateConsumerSecondaryCard
(
consumerSecondaryCard
);
}
/**
* 批量删除用户次卡
*
* @param ids 需要删除的用户次卡主键
* @return 结果
*/
@Override
public
int
deleteConsumerSecondaryCardByIds
(
Long
[]
ids
)
{
return
consumerSecondaryCardMapper
.
deleteConsumerSecondaryCardByIds
(
ids
);
}
/**
* 删除用户次卡信息
*
* @param id 用户次卡主键
* @return 结果
*/
@Override
public
int
deleteConsumerSecondaryCardById
(
Long
id
)
{
return
consumerSecondaryCardMapper
.
deleteConsumerSecondaryCardById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/SecondaryCardConfServiceImpl.java
0 → 100644
View file @
b84e681a
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.SecondaryCardConf
;
import
share.system.mapper.SecondaryCardConfMapper
;
import
share.system.service.SecondaryCardConfService
;
import
java.util.List
;
/**
* 次卡配置Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public
class
SecondaryCardConfServiceImpl
extends
ServiceImpl
<
SecondaryCardConfMapper
,
SecondaryCardConf
>
implements
SecondaryCardConfService
{
@Autowired
private
SecondaryCardConfMapper
secondaryCardConfMapper
;
/**
* 查询次卡配置
*
* @param id 次卡配置主键
* @return 次卡配置
*/
@Override
public
SecondaryCardConf
selectSecondaryCardConfById
(
Long
id
)
{
return
secondaryCardConfMapper
.
selectSecondaryCardConfById
(
id
);
}
/**
* 查询次卡配置列表
*
* @param secondaryCardConf 次卡配置
* @return 次卡配置
*/
@Override
public
List
<
SecondaryCardConf
>
selectSecondaryCardConfList
(
SecondaryCardConf
secondaryCardConf
)
{
return
secondaryCardConfMapper
.
selectSecondaryCardConfList
(
secondaryCardConf
);
}
/**
* 新增次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
@Override
public
int
insertSecondaryCardConf
(
SecondaryCardConf
secondaryCardConf
)
{
secondaryCardConf
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
secondaryCardConfMapper
.
insertSecondaryCardConf
(
secondaryCardConf
);
}
/**
* 修改次卡配置
*
* @param secondaryCardConf 次卡配置
* @return 结果
*/
@Override
public
int
updateSecondaryCardConf
(
SecondaryCardConf
secondaryCardConf
)
{
secondaryCardConf
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
secondaryCardConfMapper
.
updateSecondaryCardConf
(
secondaryCardConf
);
}
/**
* 批量删除次卡配置
*
* @param ids 需要删除的次卡配置主键
* @return 结果
*/
@Override
public
int
deleteSecondaryCardConfByIds
(
Long
[]
ids
)
{
return
secondaryCardConfMapper
.
deleteSecondaryCardConfByIds
(
ids
);
}
/**
* 删除次卡配置信息
*
* @param id 次卡配置主键
* @return 结果
*/
@Override
public
int
deleteSecondaryCardConfById
(
Long
id
)
{
return
secondaryCardConfMapper
.
deleteSecondaryCardConfById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/SecondaryCardLogServiceImpl.java
0 → 100644
View file @
b84e681a
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.SecondaryCardLog
;
import
share.system.mapper.SecondaryCardLogMapper
;
import
share.system.service.SecondaryCardLogService
;
import
java.util.List
;
/**
* 次卡使用记录Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public
class
SecondaryCardLogServiceImpl
extends
ServiceImpl
<
SecondaryCardLogMapper
,
SecondaryCardLog
>
implements
SecondaryCardLogService
{
@Autowired
private
SecondaryCardLogMapper
secondaryCardLogMapper
;
/**
* 查询次卡使用记录
*
* @param id 次卡使用记录主键
* @return 次卡使用记录
*/
@Override
public
SecondaryCardLog
selectSecondaryCardLogById
(
Long
id
)
{
return
secondaryCardLogMapper
.
selectSecondaryCardLogById
(
id
);
}
/**
* 查询次卡使用记录列表
*
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录
*/
@Override
public
List
<
SecondaryCardLog
>
selectSecondaryCardLogList
(
SecondaryCardLog
secondaryCardLog
)
{
return
secondaryCardLogMapper
.
selectSecondaryCardLogList
(
secondaryCardLog
);
}
/**
* 新增次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
@Override
public
int
insertSecondaryCardLog
(
SecondaryCardLog
secondaryCardLog
)
{
secondaryCardLog
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
secondaryCardLogMapper
.
insertSecondaryCardLog
(
secondaryCardLog
);
}
/**
* 修改次卡使用记录
*
* @param secondaryCardLog 次卡使用记录
* @return 结果
*/
@Override
public
int
updateSecondaryCardLog
(
SecondaryCardLog
secondaryCardLog
)
{
secondaryCardLog
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
secondaryCardLogMapper
.
updateSecondaryCardLog
(
secondaryCardLog
);
}
/**
* 批量删除次卡使用记录
*
* @param ids 需要删除的次卡使用记录主键
* @return 结果
*/
@Override
public
int
deleteSecondaryCardLogByIds
(
Long
[]
ids
)
{
return
secondaryCardLogMapper
.
deleteSecondaryCardLogByIds
(
ids
);
}
/**
* 删除次卡使用记录信息
*
* @param id 次卡使用记录主键
* @return 结果
*/
@Override
public
int
deleteSecondaryCardLogById
(
Long
id
)
{
return
secondaryCardLogMapper
.
deleteSecondaryCardLogById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/SecondaryCardOrderServiceImpl.java
0 → 100644
View file @
b84e681a
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.SecondaryCardOrder
;
import
share.system.mapper.SecondaryCardOrderMapper
;
import
share.system.service.SecondaryCardOrderService
;
import
java.util.List
;
/**
* 次卡购买记录Service业务层处理
*
* @author wuwenlong
* @date 2024-08-22
*/
@Service
public
class
SecondaryCardOrderServiceImpl
extends
ServiceImpl
<
SecondaryCardOrderMapper
,
SecondaryCardOrder
>
implements
SecondaryCardOrderService
{
@Autowired
private
SecondaryCardOrderMapper
secondaryCardOrderMapper
;
/**
* 查询次卡购买记录
*
* @param id 次卡购买记录主键
* @return 次卡购买记录
*/
@Override
public
SecondaryCardOrder
selectSecondaryCardOrderById
(
Long
id
)
{
return
secondaryCardOrderMapper
.
selectSecondaryCardOrderById
(
id
);
}
/**
* 查询次卡购买记录列表
*
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录
*/
@Override
public
List
<
SecondaryCardOrder
>
selectSecondaryCardOrderList
(
SecondaryCardOrder
secondaryCardOrder
)
{
return
secondaryCardOrderMapper
.
selectSecondaryCardOrderList
(
secondaryCardOrder
);
}
/**
* 新增次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
@Override
public
int
insertSecondaryCardOrder
(
SecondaryCardOrder
secondaryCardOrder
)
{
secondaryCardOrder
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
secondaryCardOrderMapper
.
insertSecondaryCardOrder
(
secondaryCardOrder
);
}
/**
* 修改次卡购买记录
*
* @param secondaryCardOrder 次卡购买记录
* @return 结果
*/
@Override
public
int
updateSecondaryCardOrder
(
SecondaryCardOrder
secondaryCardOrder
)
{
secondaryCardOrder
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
secondaryCardOrderMapper
.
updateSecondaryCardOrder
(
secondaryCardOrder
);
}
/**
* 批量删除次卡购买记录
*
* @param ids 需要删除的次卡购买记录主键
* @return 结果
*/
@Override
public
int
deleteSecondaryCardOrderByIds
(
Long
[]
ids
)
{
return
secondaryCardOrderMapper
.
deleteSecondaryCardOrderByIds
(
ids
);
}
/**
* 删除次卡购买记录信息
*
* @param id 次卡购买记录主键
* @return 结果
*/
@Override
public
int
deleteSecondaryCardOrderById
(
Long
id
)
{
return
secondaryCardOrderMapper
.
deleteSecondaryCardOrderById
(
id
);
}
}
share-system/src/main/resources/mapper/system/ConsumerSecondaryCardMapper.xml
0 → 100644
View file @
b84e681a
<?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.ConsumerSecondaryCardMapper"
>
<resultMap
type=
"ConsumerSecondaryCard"
id=
"ConsumerSecondaryCardResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"secondaryCardConfId"
column=
"secondary_card_conf_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"validityPeriod"
column=
"validity_period"
/>
<result
property=
"number"
column=
"number"
/>
<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=
"selectConsumerSecondaryCardVo"
>
select id,
secondary_card_conf_id,
consumer_id,
phone,
pack_id,
validity_period,
number,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_consumer_secondary_card
</sql>
<select
id=
"selectConsumerSecondaryCardList"
parameterType=
"ConsumerSecondaryCard"
resultMap=
"ConsumerSecondaryCardResult"
>
<include
refid=
"selectConsumerSecondaryCardVo"
/>
<where>
<if
test=
"secondaryCardConfId != null "
>
and secondary_card_conf_id = #{secondaryCardConfId}
</if>
<if
test=
"consumerId != null "
>
and consumer_id = #{consumerId}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"packId != null "
>
and pack_id = #{packId}
</if>
<if
test=
"validityPeriod != null "
>
and validity_period = #{validityPeriod}
</if>
<if
test=
"number != null "
>
and number = #{number}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
</select>
<select
id=
"selectConsumerSecondaryCardById"
parameterType=
"Long"
resultMap=
"ConsumerSecondaryCardResult"
>
<include
refid=
"selectConsumerSecondaryCardVo"
/>
where id = #{id}
</select>
<insert
id=
"insertConsumerSecondaryCard"
parameterType=
"ConsumerSecondaryCard"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_consumer_secondary_card
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<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=
"validityPeriod != null"
>
validity_period,
</if>
<if
test=
"number != null"
>
number,
</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=
"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=
"validityPeriod != null"
>
#{validityPeriod},
</if>
<if
test=
"number != null"
>
#{number},
</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=
"updateConsumerSecondaryCard"
parameterType=
"ConsumerSecondaryCard"
>
update s_consumer_secondary_card
<trim
prefix=
"SET"
suffixOverrides=
","
>
<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=
"validityPeriod != null"
>
validity_period = #{validityPeriod},
</if>
<if
test=
"number != null"
>
number = #{number},
</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=
"deleteConsumerSecondaryCardById"
parameterType=
"Long"
>
delete
from s_consumer_secondary_card
where id = #{id}
</delete>
<delete
id=
"deleteConsumerSecondaryCardByIds"
parameterType=
"String"
>
delete from s_consumer_secondary_card 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/SecondaryCardConfMapper.xml
0 → 100644
View file @
b84e681a
<?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.SecondaryCardConfMapper"
>
<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=
"validityPeriod"
column=
"validity_period"
/>
<result
property=
"number"
column=
"number"
/>
<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=
"selectSecondaryCardConfVo"
>
select id,
name,
secondary_card_amount,
pack_id,
validity_period,
number,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_secondary_card_conf
</sql>
<select
id=
"selectSecondaryCardConfList"
parameterType=
"SecondaryCardConf"
resultMap=
"SecondaryCardConfResult"
>
<include
refid=
"selectSecondaryCardConfVo"
/>
<where>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"secondaryCardAmount != null "
>
and secondary_card_amount = #{secondaryCardAmount}
</if>
<if
test=
"packId != null "
>
and pack_id = #{packId}
</if>
<if
test=
"validityPeriod != null "
>
and validity_period = #{validityPeriod}
</if>
<if
test=
"number != null "
>
and number = #{number}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
</select>
<select
id=
"selectSecondaryCardConfById"
parameterType=
"Long"
resultMap=
"SecondaryCardConfResult"
>
<include
refid=
"selectSecondaryCardConfVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSecondaryCardConf"
parameterType=
"SecondaryCardConf"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_secondary_card_conf
<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=
"validityPeriod != null"
>
validity_period,
</if>
<if
test=
"number != null"
>
number,
</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=
"name != null"
>
#{name},
</if>
<if
test=
"secondaryCardAmount != null"
>
#{secondaryCardAmount},
</if>
<if
test=
"packId != null"
>
#{packId},
</if>
<if
test=
"validityPeriod != null"
>
#{validityPeriod},
</if>
<if
test=
"number != null"
>
#{number},
</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=
"updateSecondaryCardConf"
parameterType=
"SecondaryCardConf"
>
update s_secondary_card_conf
<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=
"validityPeriod != null"
>
validity_period = #{validityPeriod},
</if>
<if
test=
"number != null"
>
number = #{number},
</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=
"deleteSecondaryCardConfById"
parameterType=
"Long"
>
delete
from s_secondary_card_conf
where id = #{id}
</delete>
<delete
id=
"deleteSecondaryCardConfByIds"
parameterType=
"String"
>
delete from s_secondary_card_conf 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/SecondaryCardLogMapper.xml
0 → 100644
View file @
b84e681a
<?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.SecondaryCardLogMapper"
>
<resultMap
type=
"SecondaryCardLog"
id=
"SecondaryCardLogResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"consumerSecondaryCardId"
column=
"consumer_secondary_card_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"packId"
column=
"pack_id"
/>
<result
property=
"usageCount"
column=
"usage_count"
/>
<result
property=
"residueCount"
column=
"residue_count"
/>
<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=
"selectSecondaryCardLogVo"
>
select id,
consumer_secondary_card_id,
consumer_id,
phone,
pack_id,
usage_count,
residue_count,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_secondary_card_log
</sql>
<select
id=
"selectSecondaryCardLogList"
parameterType=
"SecondaryCardLog"
resultMap=
"SecondaryCardLogResult"
>
<include
refid=
"selectSecondaryCardLogVo"
/>
<where>
<if
test=
"consumerSecondaryCardId != null "
>
and consumer_secondary_card_id = #{consumerSecondaryCardId}
</if>
<if
test=
"consumerId != null "
>
and consumer_id = #{consumerId}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"packId != null "
>
and pack_id = #{packId}
</if>
<if
test=
"usageCount != null "
>
and usage_count = #{usageCount}
</if>
<if
test=
"residueCount != null "
>
and residue_count = #{residueCount}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
</select>
<select
id=
"selectSecondaryCardLogById"
parameterType=
"Long"
resultMap=
"SecondaryCardLogResult"
>
<include
refid=
"selectSecondaryCardLogVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSecondaryCardLog"
parameterType=
"SecondaryCardLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_secondary_card_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<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>
<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=
"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>
<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=
"updateSecondaryCardLog"
parameterType=
"SecondaryCardLog"
>
update s_secondary_card_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<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>
<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=
"deleteSecondaryCardLogById"
parameterType=
"Long"
>
delete
from s_secondary_card_log
where id = #{id}
</delete>
<delete
id=
"deleteSecondaryCardLogByIds"
parameterType=
"String"
>
delete from s_secondary_card_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/SecondaryCardOrderMapper.xml
0 → 100644
View file @
b84e681a
<?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.SecondaryCardOrderMapper"
>
<resultMap
type=
"SecondaryCardOrder"
id=
"SecondaryCardOrderResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"secondaryCardNo"
column=
"secondary_card_no"
/>
<result
property=
"outTradeNo"
column=
"out_trade_no"
/>
<result
property=
"terminalTrace"
column=
"terminal_trace"
/>
<result
property=
"secondaryCardAmount"
column=
"secondary_card_amount"
/>
<result
property=
"secondaryCardConfId"
column=
"secondary_card_conf_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"payType"
column=
"pay_type"
/>
<result
property=
"payStatus"
column=
"pay_status"
/>
<result
property=
"payTime"
column=
"pay_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=
"selectSecondaryCardOrderVo"
>
select id,
secondary_card_no,
out_trade_no,
terminal_trace,
secondary_card_amount,
secondary_card_conf_id,
consumer_id,
phone,
pay_type,
pay_status,
pay_time,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_secondary_card_order
</sql>
<select
id=
"selectSecondaryCardOrderList"
parameterType=
"SecondaryCardOrder"
resultMap=
"SecondaryCardOrderResult"
>
<include
refid=
"selectSecondaryCardOrderVo"
/>
<where>
<if
test=
"secondaryCardNo != null and secondaryCardNo != ''"
>
and secondary_card_no = #{secondaryCardNo}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"terminalTrace != null and terminalTrace != ''"
>
and terminal_trace = #{terminalTrace}
</if>
<if
test=
"secondaryCardAmount != null "
>
and secondary_card_amount = #{secondaryCardAmount}
</if>
<if
test=
"secondaryCardConfId != null "
>
and secondary_card_conf_id = #{secondaryCardConfId}
</if>
<if
test=
"consumerId != null "
>
and consumer_id = #{consumerId}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"payType != null "
>
and pay_type = #{payType}
</if>
<if
test=
"payStatus != null "
>
and pay_status = #{payStatus}
</if>
<if
test=
"payTime != null "
>
and pay_time = #{payTime}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
</select>
<select
id=
"selectSecondaryCardOrderById"
parameterType=
"Long"
resultMap=
"SecondaryCardOrderResult"
>
<include
refid=
"selectSecondaryCardOrderVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSecondaryCardOrder"
parameterType=
"SecondaryCardOrder"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_secondary_card_order
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"secondaryCardNo != null and secondaryCardNo != ''"
>
secondary_card_no,
</if>
<if
test=
"outTradeNo != null"
>
out_trade_no,
</if>
<if
test=
"terminalTrace != null"
>
terminal_trace,
</if>
<if
test=
"secondaryCardAmount != null"
>
secondary_card_amount,
</if>
<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=
"payType != null"
>
pay_type,
</if>
<if
test=
"payStatus != null"
>
pay_status,
</if>
<if
test=
"payTime != null"
>
pay_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=
"secondaryCardNo != null and secondaryCardNo != ''"
>
#{secondaryCardNo},
</if>
<if
test=
"outTradeNo != null"
>
#{outTradeNo},
</if>
<if
test=
"terminalTrace != null"
>
#{terminalTrace},
</if>
<if
test=
"secondaryCardAmount != null"
>
#{secondaryCardAmount},
</if>
<if
test=
"secondaryCardConfId != null"
>
#{secondaryCardConfId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"phone != null and phone != ''"
>
#{phone},
</if>
<if
test=
"payType != null"
>
#{payType},
</if>
<if
test=
"payStatus != null"
>
#{payStatus},
</if>
<if
test=
"payTime != null"
>
#{payTime},
</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=
"updateSecondaryCardOrder"
parameterType=
"SecondaryCardOrder"
>
update s_secondary_card_order
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"secondaryCardNo != null and secondaryCardNo != ''"
>
secondary_card_no = #{secondaryCardNo},
</if>
<if
test=
"outTradeNo != null"
>
out_trade_no = #{outTradeNo},
</if>
<if
test=
"terminalTrace != null"
>
terminal_trace = #{terminalTrace},
</if>
<if
test=
"secondaryCardAmount != null"
>
secondary_card_amount = #{secondaryCardAmount},
</if>
<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=
"payType != null"
>
pay_type = #{payType},
</if>
<if
test=
"payStatus != null"
>
pay_status = #{payStatus},
</if>
<if
test=
"payTime != null"
>
pay_time = #{payTime},
</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=
"deleteSecondaryCardOrderById"
parameterType=
"Long"
>
delete
from s_secondary_card_order
where id = #{id}
</delete>
<delete
id=
"deleteSecondaryCardOrderByIds"
parameterType=
"String"
>
delete from s_secondary_card_order where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment