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
85c83213
Commit
85c83213
authored
Nov 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
5ab69429
7a8b7439
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1591 additions
and
4 deletions
+1591
-4
LotteryRecordsLogController.java
...re/web/controller/system/LotteryRecordsLogController.java
+91
-0
PrizeController.java
...ain/java/share/web/controller/system/PrizeController.java
+91
-0
WheelGameController.java
...java/share/web/controller/system/WheelGameController.java
+91
-0
LotteryRecordsLog.java
.../src/main/java/share/system/domain/LotteryRecordsLog.java
+105
-0
Prize.java
share-system/src/main/java/share/system/domain/Prize.java
+87
-0
WheelGame.java
...e-system/src/main/java/share/system/domain/WheelGame.java
+92
-0
WithdrawLog.java
...system/src/main/java/share/system/domain/WithdrawLog.java
+2
-0
LotteryRecordsLogMapper.java
...ain/java/share/system/mapper/LotteryRecordsLogMapper.java
+62
-0
PrizeMapper.java
...system/src/main/java/share/system/mapper/PrizeMapper.java
+62
-0
WheelGameMapper.java
...em/src/main/java/share/system/mapper/WheelGameMapper.java
+62
-0
LotteryRecordsLogService.java
...n/java/share/system/service/LotteryRecordsLogService.java
+62
-0
PrizeService.java
...stem/src/main/java/share/system/service/PrizeService.java
+62
-0
WheelGameService.java
.../src/main/java/share/system/service/WheelGameService.java
+62
-0
ConsumerMonthlyCardServiceImpl.java
...e/system/service/impl/ConsumerMonthlyCardServiceImpl.java
+8
-3
LotteryRecordsLogServiceImpl.java
...are/system/service/impl/LotteryRecordsLogServiceImpl.java
+91
-0
PrizeServiceImpl.java
...main/java/share/system/service/impl/PrizeServiceImpl.java
+91
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+0
-0
WheelGameServiceImpl.java
.../java/share/system/service/impl/WheelGameServiceImpl.java
+91
-0
LotteryRecordsLogMapper.xml
.../main/resources/mapper/system/LotteryRecordsLogMapper.xml
+134
-0
PrizeMapper.xml
...e-system/src/main/resources/mapper/system/PrizeMapper.xml
+122
-0
SecondaryCardLogMapper.xml
...c/main/resources/mapper/system/SecondaryCardLogMapper.xml
+1
-1
WheelGameMapper.xml
...stem/src/main/resources/mapper/system/WheelGameMapper.xml
+122
-0
No files found.
share-admin/src/main/java/share/web/controller/system/LotteryRecordsLogController.java
0 → 100644
View file @
85c83213
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.LotteryRecordsLog
;
import
share.system.service.LotteryRecordsLogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 抽奖记录日志Controller
*
* @author wuwenlong
* @date 2024-11-12
*/
@RestController
@RequestMapping
(
"/system/lotteryRecordsLog"
)
public
class
LotteryRecordsLogController
extends
BaseController
{
@Autowired
private
LotteryRecordsLogService
lotteryRecordsLogService
;
/**
* 查询抽奖记录日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:lotteryRecordsLog:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
LotteryRecordsLog
lotteryRecordsLog
)
{
startPage
();
List
<
LotteryRecordsLog
>
list
=
lotteryRecordsLogService
.
selectLotteryRecordsLogList
(
lotteryRecordsLog
);
return
getDataTable
(
list
);
}
/**
* 导出抽奖记录日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:lotteryRecordsLog:export')"
)
@Log
(
title
=
"抽奖记录日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
LotteryRecordsLog
lotteryRecordsLog
)
{
List
<
LotteryRecordsLog
>
list
=
lotteryRecordsLogService
.
selectLotteryRecordsLogList
(
lotteryRecordsLog
);
ExcelUtil
<
LotteryRecordsLog
>
util
=
new
ExcelUtil
<
LotteryRecordsLog
>(
LotteryRecordsLog
.
class
);
util
.
exportExcel
(
response
,
list
,
"抽奖记录日志数据"
);
}
/**
* 获取抽奖记录日志详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:lotteryRecordsLog:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
lotteryRecordsLogService
.
selectLotteryRecordsLogById
(
id
));
}
/**
* 新增抽奖记录日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:lotteryRecordsLog:add')"
)
@Log
(
title
=
"抽奖记录日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
LotteryRecordsLog
lotteryRecordsLog
)
{
return
toAjax
(
lotteryRecordsLogService
.
insertLotteryRecordsLog
(
lotteryRecordsLog
));
}
/**
* 修改抽奖记录日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:lotteryRecordsLog:edit')"
)
@Log
(
title
=
"抽奖记录日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
LotteryRecordsLog
lotteryRecordsLog
)
{
return
toAjax
(
lotteryRecordsLogService
.
updateLotteryRecordsLog
(
lotteryRecordsLog
));
}
/**
* 删除抽奖记录日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:lotteryRecordsLog:remove')"
)
@Log
(
title
=
"抽奖记录日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
lotteryRecordsLogService
.
deleteLotteryRecordsLogByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/PrizeController.java
0 → 100644
View file @
85c83213
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.Prize
;
import
share.system.service.PrizeService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 奖品Controller
*
* @author wuwenlong
* @date 2024-11-12
*/
@RestController
@RequestMapping
(
"/system/prize"
)
public
class
PrizeController
extends
BaseController
{
@Autowired
private
PrizeService
prizeService
;
/**
* 查询奖品列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Prize
prize
)
{
startPage
();
List
<
Prize
>
list
=
prizeService
.
selectPrizeList
(
prize
);
return
getDataTable
(
list
);
}
/**
* 导出奖品列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:export')"
)
@Log
(
title
=
"奖品"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Prize
prize
)
{
List
<
Prize
>
list
=
prizeService
.
selectPrizeList
(
prize
);
ExcelUtil
<
Prize
>
util
=
new
ExcelUtil
<
Prize
>(
Prize
.
class
);
util
.
exportExcel
(
response
,
list
,
"奖品数据"
);
}
/**
* 获取奖品详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
prizeService
.
selectPrizeById
(
id
));
}
/**
* 新增奖品
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:add')"
)
@Log
(
title
=
"奖品"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
Prize
prize
)
{
return
toAjax
(
prizeService
.
insertPrize
(
prize
));
}
/**
* 修改奖品
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:edit')"
)
@Log
(
title
=
"奖品"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
Prize
prize
)
{
return
toAjax
(
prizeService
.
updatePrize
(
prize
));
}
/**
* 删除奖品
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:remove')"
)
@Log
(
title
=
"奖品"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
prizeService
.
deletePrizeByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/WheelGameController.java
0 → 100644
View file @
85c83213
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.WheelGame
;
import
share.system.service.WheelGameService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 转盘游戏Controller
*
* @author wuwenlong
* @date 2024-11-12
*/
@RestController
@RequestMapping
(
"/system/wheelGame"
)
public
class
WheelGameController
extends
BaseController
{
@Autowired
private
WheelGameService
wheelGameService
;
/**
* 查询转盘游戏列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:wheelGame:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
WheelGame
wheelGame
)
{
startPage
();
List
<
WheelGame
>
list
=
wheelGameService
.
selectWheelGameList
(
wheelGame
);
return
getDataTable
(
list
);
}
/**
* 导出转盘游戏列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:wheelGame:export')"
)
@Log
(
title
=
"转盘游戏"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
WheelGame
wheelGame
)
{
List
<
WheelGame
>
list
=
wheelGameService
.
selectWheelGameList
(
wheelGame
);
ExcelUtil
<
WheelGame
>
util
=
new
ExcelUtil
<
WheelGame
>(
WheelGame
.
class
);
util
.
exportExcel
(
response
,
list
,
"转盘游戏数据"
);
}
/**
* 获取转盘游戏详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:wheelGame:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
wheelGameService
.
selectWheelGameById
(
id
));
}
/**
* 新增转盘游戏
*/
@PreAuthorize
(
"@ss.hasPermi('system:wheelGame:add')"
)
@Log
(
title
=
"转盘游戏"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
WheelGame
wheelGame
)
{
return
toAjax
(
wheelGameService
.
insertWheelGame
(
wheelGame
));
}
/**
* 修改转盘游戏
*/
@PreAuthorize
(
"@ss.hasPermi('system:wheelGame:edit')"
)
@Log
(
title
=
"转盘游戏"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
WheelGame
wheelGame
)
{
return
toAjax
(
wheelGameService
.
updateWheelGame
(
wheelGame
));
}
/**
* 删除转盘游戏
*/
@PreAuthorize
(
"@ss.hasPermi('system:wheelGame:remove')"
)
@Log
(
title
=
"转盘游戏"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
wheelGameService
.
deleteWheelGameByIds
(
ids
));
}
}
share-system/src/main/java/share/system/domain/LotteryRecordsLog.java
0 → 100644
View file @
85c83213
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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.util.Date
;
/**
* 抽奖记录日志对象 s_lottery_records_log
*
* @author wuwenlong
* @date 2024-11-12
*/
@Data
@TableName
(
"s_lottery_records_log"
)
public
class
LotteryRecordsLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 游戏id
*/
@Excel
(
name
=
"游戏id"
)
private
Long
gameId
;
/**
* 用户id
*/
@Excel
(
name
=
"用户id"
)
private
Long
userId
;
/**
* 用户名
*/
@Excel
(
name
=
"用户名"
)
private
String
userName
;
/**
* 手机号
*/
@Excel
(
name
=
"手机号"
)
private
String
phone
;
/**
* 抽奖时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"抽奖时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
drawTime
;
/**
* 是否中奖 0:未中奖 1:中奖
*/
@Excel
(
name
=
"是否中奖 0:未中奖 1:中奖"
)
private
Long
isHit
;
/**
* 中奖奖品
*/
@Excel
(
name
=
"中奖奖品"
)
private
String
hitPrize
;
/**
* 是否发放 1未发放,2 已发放 3 发放失败
*/
@Excel
(
name
=
" 是否发放 1未发放,2 已发放 3 发放失败"
)
private
Long
isSend
;
/**
* 发放结果
*/
@Excel
(
name
=
"发放结果"
)
private
String
sendMsg
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"gameId"
,
getGameId
())
.
append
(
"userId"
,
getUserId
())
.
append
(
"userName"
,
getUserName
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"drawTime"
,
getDrawTime
())
.
append
(
"isHit"
,
getIsHit
())
.
append
(
"hitPrize"
,
getHitPrize
())
.
append
(
"isSend"
,
getIsSend
())
.
append
(
"sendMsg"
,
getSendMsg
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/Prize.java
0 → 100644
View file @
85c83213
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
/**
* 奖品对象 s_prize
*
* @author wuwenlong
* @date 2024-11-12
*/
@Data
@TableName
(
"s_prize"
)
public
class
Prize
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 游戏id
*/
@Excel
(
name
=
"游戏id"
)
private
Long
gameId
;
/**
* 奖品类型(1优惠券,2商品,3积分,4谢谢参与)
*/
@Excel
(
name
=
"奖品类型"
,
readConverterExp
=
"1=优惠券,2商品,3积分,4谢谢参与"
)
private
String
prizeType
;
/**
* 奖品名字
*/
@Excel
(
name
=
"奖品名字"
)
private
String
prizeName
;
/**
* 奖品值(数量)
*/
@Excel
(
name
=
"奖品值"
,
readConverterExp
=
"数=量"
)
private
Long
prizeValue
;
/**
* 当前命中
*/
@Excel
(
name
=
"当前命中"
)
private
Long
currentNum
;
/**
* 最大中奖数 0:代表不限制
*/
@Excel
(
name
=
"最大中奖数 0:代表不限制"
)
private
Long
maxNum
;
/**
* 中奖几率
*/
@Excel
(
name
=
"中奖几率"
)
private
Long
ratio
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"gameId"
,
getGameId
())
.
append
(
"prizeType"
,
getPrizeType
())
.
append
(
"prizeName"
,
getPrizeName
())
.
append
(
"prizeValue"
,
getPrizeValue
())
.
append
(
"currentNum"
,
getCurrentNum
())
.
append
(
"maxNum"
,
getMaxNum
())
.
append
(
"ratio"
,
getRatio
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/WheelGame.java
0 → 100644
View file @
85c83213
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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.util.Date
;
/**
* 转盘游戏对象 s_wheel_game
*
* @author wuwenlong
* @date 2024-11-12
*/
@Data
@TableName
(
"s_wheel_game"
)
public
class
WheelGame
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 活动名称
*/
@Excel
(
name
=
"活动名称"
)
private
String
name
;
/**
* 开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
startTime
;
/**
* 结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
endTime
;
/**
* 描述
*/
@Excel
(
name
=
"描述"
)
private
String
description
;
/**
* 单人当天限制次数 0:代表不限制
*/
@Excel
(
name
=
"单人当天限制次数 0:代表不限制"
)
private
Long
dayLimit
;
/**
* 单人总次数限制 0:代表不限制
*/
@Excel
(
name
=
"单人总次数限制 0:代表不限制"
)
private
Long
singleLimit
;
/**
* 是否开启1 开启 0 关闭
*/
@Excel
(
name
=
"是否开启1 开启 0 关闭"
)
private
Long
isOpen
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"name"
,
getName
())
.
append
(
"startTime"
,
getStartTime
())
.
append
(
"endTime"
,
getEndTime
())
.
append
(
"description"
,
getDescription
())
.
append
(
"dayLimit"
,
getDayLimit
())
.
append
(
"singleLimit"
,
getSingleLimit
())
.
append
(
"isOpen"
,
getIsOpen
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/WithdrawLog.java
View file @
85c83213
...
...
@@ -2,6 +2,7 @@ package share.system.domain;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
...
@@ -18,6 +19,7 @@ import java.util.Date;
* @date 2024-08-28
*/
@Data
@TableName
(
"s_withdraw_log"
)
public
class
WithdrawLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
share-system/src/main/java/share/system/mapper/LotteryRecordsLogMapper.java
0 → 100644
View file @
85c83213
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.LotteryRecordsLog
;
import
java.util.List
;
/**
* 抽奖记录日志Mapper接口
*
* @author wuwenlong
* @date 2024-11-12
*/
public
interface
LotteryRecordsLogMapper
extends
BaseMapper
<
LotteryRecordsLog
>
{
/**
* 查询抽奖记录日志
*
* @param id 抽奖记录日志主键
* @return 抽奖记录日志
*/
public
LotteryRecordsLog
selectLotteryRecordsLogById
(
Long
id
);
/**
* 查询抽奖记录日志列表
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 抽奖记录日志集合
*/
public
List
<
LotteryRecordsLog
>
selectLotteryRecordsLogList
(
LotteryRecordsLog
lotteryRecordsLog
);
/**
* 新增抽奖记录日志
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 结果
*/
public
int
insertLotteryRecordsLog
(
LotteryRecordsLog
lotteryRecordsLog
);
/**
* 修改抽奖记录日志
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 结果
*/
public
int
updateLotteryRecordsLog
(
LotteryRecordsLog
lotteryRecordsLog
);
/**
* 删除抽奖记录日志
*
* @param id 抽奖记录日志主键
* @return 结果
*/
public
int
deleteLotteryRecordsLogById
(
Long
id
);
/**
* 批量删除抽奖记录日志
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteLotteryRecordsLogByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/PrizeMapper.java
0 → 100644
View file @
85c83213
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.Prize
;
import
java.util.List
;
/**
* 奖品Mapper接口
*
* @author wuwenlong
* @date 2024-11-12
*/
public
interface
PrizeMapper
extends
BaseMapper
<
Prize
>
{
/**
* 查询奖品
*
* @param id 奖品主键
* @return 奖品
*/
public
Prize
selectPrizeById
(
Long
id
);
/**
* 查询奖品列表
*
* @param prize 奖品
* @return 奖品集合
*/
public
List
<
Prize
>
selectPrizeList
(
Prize
prize
);
/**
* 新增奖品
*
* @param prize 奖品
* @return 结果
*/
public
int
insertPrize
(
Prize
prize
);
/**
* 修改奖品
*
* @param prize 奖品
* @return 结果
*/
public
int
updatePrize
(
Prize
prize
);
/**
* 删除奖品
*
* @param id 奖品主键
* @return 结果
*/
public
int
deletePrizeById
(
Long
id
);
/**
* 批量删除奖品
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deletePrizeByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/WheelGameMapper.java
0 → 100644
View file @
85c83213
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.WheelGame
;
import
java.util.List
;
/**
* 转盘游戏Mapper接口
*
* @author wuwenlong
* @date 2024-11-12
*/
public
interface
WheelGameMapper
extends
BaseMapper
<
WheelGame
>
{
/**
* 查询转盘游戏
*
* @param id 转盘游戏主键
* @return 转盘游戏
*/
public
WheelGame
selectWheelGameById
(
Long
id
);
/**
* 查询转盘游戏列表
*
* @param wheelGame 转盘游戏
* @return 转盘游戏集合
*/
public
List
<
WheelGame
>
selectWheelGameList
(
WheelGame
wheelGame
);
/**
* 新增转盘游戏
*
* @param wheelGame 转盘游戏
* @return 结果
*/
public
int
insertWheelGame
(
WheelGame
wheelGame
);
/**
* 修改转盘游戏
*
* @param wheelGame 转盘游戏
* @return 结果
*/
public
int
updateWheelGame
(
WheelGame
wheelGame
);
/**
* 删除转盘游戏
*
* @param id 转盘游戏主键
* @return 结果
*/
public
int
deleteWheelGameById
(
Long
id
);
/**
* 批量删除转盘游戏
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteWheelGameByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/service/LotteryRecordsLogService.java
0 → 100644
View file @
85c83213
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.LotteryRecordsLog
;
import
java.util.List
;
/**
* 抽奖记录日志Service接口
*
* @author wuwenlong
* @date 2024-11-12
*/
public
interface
LotteryRecordsLogService
extends
IService
<
LotteryRecordsLog
>
{
/**
* 查询抽奖记录日志
*
* @param id 抽奖记录日志主键
* @return 抽奖记录日志
*/
public
LotteryRecordsLog
selectLotteryRecordsLogById
(
Long
id
);
/**
* 查询抽奖记录日志列表
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 抽奖记录日志集合
*/
public
List
<
LotteryRecordsLog
>
selectLotteryRecordsLogList
(
LotteryRecordsLog
lotteryRecordsLog
);
/**
* 新增抽奖记录日志
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 结果
*/
public
int
insertLotteryRecordsLog
(
LotteryRecordsLog
lotteryRecordsLog
);
/**
* 修改抽奖记录日志
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 结果
*/
public
int
updateLotteryRecordsLog
(
LotteryRecordsLog
lotteryRecordsLog
);
/**
* 批量删除抽奖记录日志
*
* @param ids 需要删除的抽奖记录日志主键集合
* @return 结果
*/
public
int
deleteLotteryRecordsLogByIds
(
Long
[]
ids
);
/**
* 删除抽奖记录日志信息
*
* @param id 抽奖记录日志主键
* @return 结果
*/
public
int
deleteLotteryRecordsLogById
(
Long
id
);
}
share-system/src/main/java/share/system/service/PrizeService.java
0 → 100644
View file @
85c83213
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.Prize
;
import
java.util.List
;
/**
* 奖品Service接口
*
* @author wuwenlong
* @date 2024-11-12
*/
public
interface
PrizeService
extends
IService
<
Prize
>
{
/**
* 查询奖品
*
* @param id 奖品主键
* @return 奖品
*/
public
Prize
selectPrizeById
(
Long
id
);
/**
* 查询奖品列表
*
* @param prize 奖品
* @return 奖品集合
*/
public
List
<
Prize
>
selectPrizeList
(
Prize
prize
);
/**
* 新增奖品
*
* @param prize 奖品
* @return 结果
*/
public
int
insertPrize
(
Prize
prize
);
/**
* 修改奖品
*
* @param prize 奖品
* @return 结果
*/
public
int
updatePrize
(
Prize
prize
);
/**
* 批量删除奖品
*
* @param ids 需要删除的奖品主键集合
* @return 结果
*/
public
int
deletePrizeByIds
(
Long
[]
ids
);
/**
* 删除奖品信息
*
* @param id 奖品主键
* @return 结果
*/
public
int
deletePrizeById
(
Long
id
);
}
share-system/src/main/java/share/system/service/WheelGameService.java
0 → 100644
View file @
85c83213
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.WheelGame
;
import
java.util.List
;
/**
* 转盘游戏Service接口
*
* @author wuwenlong
* @date 2024-11-12
*/
public
interface
WheelGameService
extends
IService
<
WheelGame
>
{
/**
* 查询转盘游戏
*
* @param id 转盘游戏主键
* @return 转盘游戏
*/
public
WheelGame
selectWheelGameById
(
Long
id
);
/**
* 查询转盘游戏列表
*
* @param wheelGame 转盘游戏
* @return 转盘游戏集合
*/
public
List
<
WheelGame
>
selectWheelGameList
(
WheelGame
wheelGame
);
/**
* 新增转盘游戏
*
* @param wheelGame 转盘游戏
* @return 结果
*/
public
int
insertWheelGame
(
WheelGame
wheelGame
);
/**
* 修改转盘游戏
*
* @param wheelGame 转盘游戏
* @return 结果
*/
public
int
updateWheelGame
(
WheelGame
wheelGame
);
/**
* 批量删除转盘游戏
*
* @param ids 需要删除的转盘游戏主键集合
* @return 结果
*/
public
int
deleteWheelGameByIds
(
Long
[]
ids
);
/**
* 删除转盘游戏信息
*
* @param id 转盘游戏主键
* @return 结果
*/
public
int
deleteWheelGameById
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/ConsumerMonthlyCardServiceImpl.java
View file @
85c83213
...
...
@@ -46,6 +46,8 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
private
IPackService
packService
;
@Autowired
private
ISRoomService
roomService
;
@Autowired
private
ConsumerWalletService
consumerWalletService
;
/**
* 查询用户月卡
...
...
@@ -128,12 +130,14 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
SConsumer
user
=
sConsumerService
.
getInfo
();
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
user
.
getId
()).
eq
(
ConsumerMember:
:
getIsRights
,
YesNoEnum
.
yes
.
getIndex
()));
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>().
eq
(
ConsumerWallet:
:
getConsumerId
,
user
.
getId
()));
ConsumerMonthlyCard
consumerMonthlyCard
=
null
;
List
<
ConsumerSecondaryCard
>
consumerSecondaryCard
=
null
;
MonthlyCardResponse
map
=
new
MonthlyCardResponse
();
List
<
ConsumerMonthlyCard
>
consumerMonthlyCardList
=
new
ArrayList
<>();
List
<
ConsumerSecondaryCard
>
consumerSecondaryCardList
=
new
ArrayList
<>();
//可用时长
BigDecimal
freeDuration
=
consumerWallet
.
getRemainingDuration
();
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
SRoom
room
=
roomService
.
getById
(
monthlyCardRequest
.
getRoomId
());
consumerMonthlyCard
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ConsumerMonthlyCard
>().
eq
(
ConsumerMonthlyCard:
:
getConsumerId
,
user
.
getId
()).
gt
(
ConsumerMonthlyCard:
:
getFreeDuration
,
0
));
...
...
@@ -142,6 +146,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
.
gt
(
ConsumerSecondaryCard:
:
getNumber
,
0
)
.
orderByAsc
(
ConsumerSecondaryCard:
:
getNumber
)
);
freeDuration
=
freeDuration
.
add
(
consumerMonthlyCard
.
getFreeDuration
());
if
(!
ObjectUtils
.
isEmpty
(
monthlyCardRequest
.
getRoomLabelId
()))
{
RoomLabel
roomLabel
=
roomLabelService
.
selectRoomLabelById
(
monthlyCardRequest
.
getRoomLabelId
());
Label
label
=
labelService
.
getById
(
roomLabel
.
getLabelId
());
...
...
@@ -179,7 +184,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
});
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerMonthlyCard
)
&&
consumerMonthlyCard
.
getFreeDuration
()
.
compareTo
(
new
BigDecimal
(
byId
.
getDuration
()))
>=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMonthlyCard
)
&&
freeDuration
.
compareTo
(
new
BigDecimal
(
byId
.
getDuration
()))
>=
0
)
{
consumerMonthlyCardList
.
add
(
consumerMonthlyCard
);
map
.
setConsumerMonthlyCard
(
consumerMonthlyCardList
);
}
...
...
@@ -218,7 +223,7 @@ public class ConsumerMonthlyCardServiceImpl extends ServiceImpl<ConsumerMonthlyC
}
});
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerMonthlyCard
)
&&
consumerMonthlyCard
.
getFreeDuration
()
.
compareTo
(
new
BigDecimal
(
pack
.
getDuration
()))
>=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMonthlyCard
)
&&
freeDuration
.
compareTo
(
new
BigDecimal
(
pack
.
getDuration
()))
>=
0
)
{
consumerMonthlyCardList
.
add
(
consumerMonthlyCard
);
map
.
setConsumerMonthlyCard
(
consumerMonthlyCardList
);
}
...
...
share-system/src/main/java/share/system/service/impl/LotteryRecordsLogServiceImpl.java
0 → 100644
View file @
85c83213
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.LotteryRecordsLog
;
import
share.system.mapper.LotteryRecordsLogMapper
;
import
share.system.service.LotteryRecordsLogService
;
import
java.util.List
;
/**
* 抽奖记录日志Service业务层处理
*
* @author wuwenlong
* @date 2024-11-12
*/
@Service
public
class
LotteryRecordsLogServiceImpl
extends
ServiceImpl
<
LotteryRecordsLogMapper
,
LotteryRecordsLog
>
implements
LotteryRecordsLogService
{
@Autowired
private
LotteryRecordsLogMapper
lotteryRecordsLogMapper
;
/**
* 查询抽奖记录日志
*
* @param id 抽奖记录日志主键
* @return 抽奖记录日志
*/
@Override
public
LotteryRecordsLog
selectLotteryRecordsLogById
(
Long
id
)
{
return
lotteryRecordsLogMapper
.
selectLotteryRecordsLogById
(
id
);
}
/**
* 查询抽奖记录日志列表
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 抽奖记录日志
*/
@Override
public
List
<
LotteryRecordsLog
>
selectLotteryRecordsLogList
(
LotteryRecordsLog
lotteryRecordsLog
)
{
return
lotteryRecordsLogMapper
.
selectLotteryRecordsLogList
(
lotteryRecordsLog
);
}
/**
* 新增抽奖记录日志
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 结果
*/
@Override
public
int
insertLotteryRecordsLog
(
LotteryRecordsLog
lotteryRecordsLog
)
{
lotteryRecordsLog
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
lotteryRecordsLogMapper
.
insertLotteryRecordsLog
(
lotteryRecordsLog
);
}
/**
* 修改抽奖记录日志
*
* @param lotteryRecordsLog 抽奖记录日志
* @return 结果
*/
@Override
public
int
updateLotteryRecordsLog
(
LotteryRecordsLog
lotteryRecordsLog
)
{
lotteryRecordsLog
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
lotteryRecordsLogMapper
.
updateLotteryRecordsLog
(
lotteryRecordsLog
);
}
/**
* 批量删除抽奖记录日志
*
* @param ids 需要删除的抽奖记录日志主键
* @return 结果
*/
@Override
public
int
deleteLotteryRecordsLogByIds
(
Long
[]
ids
)
{
return
lotteryRecordsLogMapper
.
deleteLotteryRecordsLogByIds
(
ids
);
}
/**
* 删除抽奖记录日志信息
*
* @param id 抽奖记录日志主键
* @return 结果
*/
@Override
public
int
deleteLotteryRecordsLogById
(
Long
id
)
{
return
lotteryRecordsLogMapper
.
deleteLotteryRecordsLogById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/PrizeServiceImpl.java
0 → 100644
View file @
85c83213
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.Prize
;
import
share.system.mapper.PrizeMapper
;
import
share.system.service.PrizeService
;
import
java.util.List
;
/**
* 奖品Service业务层处理
*
* @author wuwenlong
* @date 2024-11-12
*/
@Service
public
class
PrizeServiceImpl
extends
ServiceImpl
<
PrizeMapper
,
Prize
>
implements
PrizeService
{
@Autowired
private
PrizeMapper
prizeMapper
;
/**
* 查询奖品
*
* @param id 奖品主键
* @return 奖品
*/
@Override
public
Prize
selectPrizeById
(
Long
id
)
{
return
prizeMapper
.
selectPrizeById
(
id
);
}
/**
* 查询奖品列表
*
* @param prize 奖品
* @return 奖品
*/
@Override
public
List
<
Prize
>
selectPrizeList
(
Prize
prize
)
{
return
prizeMapper
.
selectPrizeList
(
prize
);
}
/**
* 新增奖品
*
* @param prize 奖品
* @return 结果
*/
@Override
public
int
insertPrize
(
Prize
prize
)
{
prize
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
prizeMapper
.
insertPrize
(
prize
);
}
/**
* 修改奖品
*
* @param prize 奖品
* @return 结果
*/
@Override
public
int
updatePrize
(
Prize
prize
)
{
prize
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
prizeMapper
.
updatePrize
(
prize
);
}
/**
* 批量删除奖品
*
* @param ids 需要删除的奖品主键
* @return 结果
*/
@Override
public
int
deletePrizeByIds
(
Long
[]
ids
)
{
return
prizeMapper
.
deletePrizeByIds
(
ids
);
}
/**
* 删除奖品信息
*
* @param id 奖品主键
* @return 结果
*/
@Override
public
int
deletePrizeById
(
Long
id
)
{
return
prizeMapper
.
deletePrizeById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
85c83213
This diff is collapsed.
Click to expand it.
share-system/src/main/java/share/system/service/impl/WheelGameServiceImpl.java
0 → 100644
View file @
85c83213
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.WheelGame
;
import
share.system.mapper.WheelGameMapper
;
import
share.system.service.WheelGameService
;
import
java.util.List
;
/**
* 转盘游戏Service业务层处理
*
* @author wuwenlong
* @date 2024-11-12
*/
@Service
public
class
WheelGameServiceImpl
extends
ServiceImpl
<
WheelGameMapper
,
WheelGame
>
implements
WheelGameService
{
@Autowired
private
WheelGameMapper
wheelGameMapper
;
/**
* 查询转盘游戏
*
* @param id 转盘游戏主键
* @return 转盘游戏
*/
@Override
public
WheelGame
selectWheelGameById
(
Long
id
)
{
return
wheelGameMapper
.
selectWheelGameById
(
id
);
}
/**
* 查询转盘游戏列表
*
* @param wheelGame 转盘游戏
* @return 转盘游戏
*/
@Override
public
List
<
WheelGame
>
selectWheelGameList
(
WheelGame
wheelGame
)
{
return
wheelGameMapper
.
selectWheelGameList
(
wheelGame
);
}
/**
* 新增转盘游戏
*
* @param wheelGame 转盘游戏
* @return 结果
*/
@Override
public
int
insertWheelGame
(
WheelGame
wheelGame
)
{
wheelGame
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
wheelGameMapper
.
insertWheelGame
(
wheelGame
);
}
/**
* 修改转盘游戏
*
* @param wheelGame 转盘游戏
* @return 结果
*/
@Override
public
int
updateWheelGame
(
WheelGame
wheelGame
)
{
wheelGame
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
wheelGameMapper
.
updateWheelGame
(
wheelGame
);
}
/**
* 批量删除转盘游戏
*
* @param ids 需要删除的转盘游戏主键
* @return 结果
*/
@Override
public
int
deleteWheelGameByIds
(
Long
[]
ids
)
{
return
wheelGameMapper
.
deleteWheelGameByIds
(
ids
);
}
/**
* 删除转盘游戏信息
*
* @param id 转盘游戏主键
* @return 结果
*/
@Override
public
int
deleteWheelGameById
(
Long
id
)
{
return
wheelGameMapper
.
deleteWheelGameById
(
id
);
}
}
share-system/src/main/resources/mapper/system/LotteryRecordsLogMapper.xml
0 → 100644
View file @
85c83213
<?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.LotteryRecordsLogMapper"
>
<resultMap
type=
"LotteryRecordsLog"
id=
"LotteryRecordsLogResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"gameId"
column=
"game_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"userName"
column=
"user_name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"drawTime"
column=
"draw_time"
/>
<result
property=
"isHit"
column=
"is_hit"
/>
<result
property=
"hitPrize"
column=
"hit_prize"
/>
<result
property=
"isSend"
column=
"is_send"
/>
<result
property=
"sendMsg"
column=
"send_msg"
/>
<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=
"selectLotteryRecordsLogVo"
>
select id,
game_id,
user_id,
user_name,
phone,
draw_time,
is_hit,
hit_prize,
is_send,
send_msg,
create_by,
create_time,
update_by,
update_time,
remark
from s_lottery_records_log
</sql>
<select
id=
"selectLotteryRecordsLogList"
parameterType=
"LotteryRecordsLog"
resultMap=
"LotteryRecordsLogResult"
>
<include
refid=
"selectLotteryRecordsLogVo"
/>
<where>
<if
test=
"gameId != null "
>
and game_id = #{gameId}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"userName != null and userName != ''"
>
and user_name like concat('%', #{userName}, '%')
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"drawTime != null "
>
and draw_time = #{drawTime}
</if>
<if
test=
"isHit != null "
>
and is_hit = #{isHit}
</if>
<if
test=
"hitPrize != null and hitPrize != ''"
>
and hit_prize = #{hitPrize}
</if>
<if
test=
"isSend != null "
>
and is_send = #{isSend}
</if>
<if
test=
"sendMsg != null and sendMsg != ''"
>
and send_msg = #{sendMsg}
</if>
</where>
</select>
<select
id=
"selectLotteryRecordsLogById"
parameterType=
"Long"
resultMap=
"LotteryRecordsLogResult"
>
<include
refid=
"selectLotteryRecordsLogVo"
/>
where id = #{id}
</select>
<insert
id=
"insertLotteryRecordsLog"
parameterType=
"LotteryRecordsLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_lottery_records_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
game_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"userName != null"
>
user_name,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"drawTime != null"
>
draw_time,
</if>
<if
test=
"isHit != null"
>
is_hit,
</if>
<if
test=
"hitPrize != null"
>
hit_prize,
</if>
<if
test=
"isSend != null"
>
is_send,
</if>
<if
test=
"sendMsg != null"
>
send_msg,
</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=
"gameId != null"
>
#{gameId},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"userName != null"
>
#{userName},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"drawTime != null"
>
#{drawTime},
</if>
<if
test=
"isHit != null"
>
#{isHit},
</if>
<if
test=
"hitPrize != null"
>
#{hitPrize},
</if>
<if
test=
"isSend != null"
>
#{isSend},
</if>
<if
test=
"sendMsg != null"
>
#{sendMsg},
</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=
"updateLotteryRecordsLog"
parameterType=
"LotteryRecordsLog"
>
update s_lottery_records_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
game_id = #{gameId},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"userName != null"
>
user_name = #{userName},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"drawTime != null"
>
draw_time = #{drawTime},
</if>
<if
test=
"isHit != null"
>
is_hit = #{isHit},
</if>
<if
test=
"hitPrize != null"
>
hit_prize = #{hitPrize},
</if>
<if
test=
"isSend != null"
>
is_send = #{isSend},
</if>
<if
test=
"sendMsg != null"
>
send_msg = #{sendMsg},
</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=
"deleteLotteryRecordsLogById"
parameterType=
"Long"
>
delete
from s_lottery_records_log
where id = #{id}
</delete>
<delete
id=
"deleteLotteryRecordsLogByIds"
parameterType=
"String"
>
delete from s_lottery_records_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/PrizeMapper.xml
0 → 100644
View file @
85c83213
<?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.PrizeMapper"
>
<resultMap
type=
"Prize"
id=
"PrizeResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"gameId"
column=
"game_id"
/>
<result
property=
"prizeType"
column=
"prize_type"
/>
<result
property=
"prizeName"
column=
"prize_name"
/>
<result
property=
"prizeValue"
column=
"prize_value"
/>
<result
property=
"currentNum"
column=
"current_num"
/>
<result
property=
"maxNum"
column=
"max_num"
/>
<result
property=
"ratio"
column=
"ratio"
/>
<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=
"selectPrizeVo"
>
select id,
game_id,
prize_type,
prize_name,
prize_value,
current_num,
max_num,
ratio,
create_by,
create_time,
update_by,
update_time,
remark
from s_prize
</sql>
<select
id=
"selectPrizeList"
parameterType=
"Prize"
resultMap=
"PrizeResult"
>
<include
refid=
"selectPrizeVo"
/>
<where>
<if
test=
"gameId != null "
>
and game_id = #{gameId}
</if>
<if
test=
"prizeType != null and prizeType != ''"
>
and prize_type = #{prizeType}
</if>
<if
test=
"prizeName != null and prizeName != ''"
>
and prize_name like concat('%', #{prizeName}, '%')
</if>
<if
test=
"prizeValue != null "
>
and prize_value = #{prizeValue}
</if>
<if
test=
"currentNum != null "
>
and current_num = #{currentNum}
</if>
<if
test=
"maxNum != null "
>
and max_num = #{maxNum}
</if>
<if
test=
"ratio != null "
>
and ratio = #{ratio}
</if>
</where>
</select>
<select
id=
"selectPrizeById"
parameterType=
"Long"
resultMap=
"PrizeResult"
>
<include
refid=
"selectPrizeVo"
/>
where id = #{id}
</select>
<insert
id=
"insertPrize"
parameterType=
"Prize"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_prize
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
game_id,
</if>
<if
test=
"prizeType != null"
>
prize_type,
</if>
<if
test=
"prizeName != null"
>
prize_name,
</if>
<if
test=
"prizeValue != null"
>
prize_value,
</if>
<if
test=
"currentNum != null"
>
current_num,
</if>
<if
test=
"maxNum != null"
>
max_num,
</if>
<if
test=
"ratio != null"
>
ratio,
</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=
"gameId != null"
>
#{gameId},
</if>
<if
test=
"prizeType != null"
>
#{prizeType},
</if>
<if
test=
"prizeName != null"
>
#{prizeName},
</if>
<if
test=
"prizeValue != null"
>
#{prizeValue},
</if>
<if
test=
"currentNum != null"
>
#{currentNum},
</if>
<if
test=
"maxNum != null"
>
#{maxNum},
</if>
<if
test=
"ratio != null"
>
#{ratio},
</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=
"updatePrize"
parameterType=
"Prize"
>
update s_prize
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
game_id = #{gameId},
</if>
<if
test=
"prizeType != null"
>
prize_type = #{prizeType},
</if>
<if
test=
"prizeName != null"
>
prize_name = #{prizeName},
</if>
<if
test=
"prizeValue != null"
>
prize_value = #{prizeValue},
</if>
<if
test=
"currentNum != null"
>
current_num = #{currentNum},
</if>
<if
test=
"maxNum != null"
>
max_num = #{maxNum},
</if>
<if
test=
"ratio != null"
>
ratio = #{ratio},
</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=
"deletePrizeById"
parameterType=
"Long"
>
delete
from s_prize
where id = #{id}
</delete>
<delete
id=
"deletePrizeByIds"
parameterType=
"String"
>
delete from s_prize 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
View file @
85c83213
...
...
@@ -73,7 +73,7 @@
<if
test=
"usageCount != null "
>
and l.usage_count = #{usageCount}
</if>
<if
test=
"residueCount != null "
>
and l.residue_count = #{residueCount}
</if>
order by l.create_time
order by l.create_time
desc
</select>
<select
id=
"selectSecondaryCardLogById"
parameterType=
"Long"
resultMap=
"SecondaryCardLogResult"
>
...
...
share-system/src/main/resources/mapper/system/WheelGameMapper.xml
0 → 100644
View file @
85c83213
<?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.WheelGameMapper"
>
<resultMap
type=
"WheelGame"
id=
"WheelGameResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"dayLimit"
column=
"day_limit"
/>
<result
property=
"singleLimit"
column=
"single_limit"
/>
<result
property=
"isOpen"
column=
"is_open"
/>
<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=
"selectWheelGameVo"
>
select id,
name,
start_time,
end_time,
description,
day_limit,
single_limit,
is_open,
create_by,
create_time,
update_by,
update_time,
remark
from s_wheel_game
</sql>
<select
id=
"selectWheelGameList"
parameterType=
"WheelGame"
resultMap=
"WheelGameResult"
>
<include
refid=
"selectWheelGameVo"
/>
<where>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"startTime != null "
>
and start_time = #{startTime}
</if>
<if
test=
"endTime != null "
>
and end_time = #{endTime}
</if>
<if
test=
"description != null and description != ''"
>
and description = #{description}
</if>
<if
test=
"dayLimit != null "
>
and day_limit = #{dayLimit}
</if>
<if
test=
"singleLimit != null "
>
and single_limit = #{singleLimit}
</if>
<if
test=
"isOpen != null "
>
and is_open = #{isOpen}
</if>
</where>
</select>
<select
id=
"selectWheelGameById"
parameterType=
"Long"
resultMap=
"WheelGameResult"
>
<include
refid=
"selectWheelGameVo"
/>
where id = #{id}
</select>
<insert
id=
"insertWheelGame"
parameterType=
"WheelGame"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_wheel_game
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"startTime != null"
>
start_time,
</if>
<if
test=
"endTime != null"
>
end_time,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"dayLimit != null"
>
day_limit,
</if>
<if
test=
"singleLimit != null"
>
single_limit,
</if>
<if
test=
"isOpen != null"
>
is_open,
</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=
"startTime != null"
>
#{startTime},
</if>
<if
test=
"endTime != null"
>
#{endTime},
</if>
<if
test=
"description != null"
>
#{description},
</if>
<if
test=
"dayLimit != null"
>
#{dayLimit},
</if>
<if
test=
"singleLimit != null"
>
#{singleLimit},
</if>
<if
test=
"isOpen != null"
>
#{isOpen},
</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=
"updateWheelGame"
parameterType=
"WheelGame"
>
update s_wheel_game
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name = #{name},
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime},
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime},
</if>
<if
test=
"description != null"
>
description = #{description},
</if>
<if
test=
"dayLimit != null"
>
day_limit = #{dayLimit},
</if>
<if
test=
"singleLimit != null"
>
single_limit = #{singleLimit},
</if>
<if
test=
"isOpen != null"
>
is_open = #{isOpen},
</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=
"deleteWheelGameById"
parameterType=
"Long"
>
delete
from s_wheel_game
where id = #{id}
</delete>
<delete
id=
"deleteWheelGameByIds"
parameterType=
"String"
>
delete from s_wheel_game 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