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
0289d079
Commit
0289d079
authored
Nov 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
85c83213
02f3366a
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
241 additions
and
23 deletions
+241
-23
PrizeController.java
...ain/java/share/web/controller/system/PrizeController.java
+6
-5
WheelGameController.java
...java/share/web/controller/system/WheelGameController.java
+6
-0
PrizeTypeEnum.java
...ommon/src/main/java/share/common/enums/PrizeTypeEnum.java
+36
-0
LotteryRecordsLogController.java
...re/web/controller/system/LotteryRecordsLogController.java
+37
-0
WheelGameController.java
...java/share/web/controller/system/WheelGameController.java
+91
-0
Prize.java
share-system/src/main/java/share/system/domain/Prize.java
+13
-5
PrizeVo.java
...-system/src/main/java/share/system/domain/vo/PrizeVo.java
+10
-0
PrizeMapper.java
...system/src/main/java/share/system/mapper/PrizeMapper.java
+2
-1
PrizeService.java
...stem/src/main/java/share/system/service/PrizeService.java
+2
-1
PrizeServiceImpl.java
...main/java/share/system/service/impl/PrizeServiceImpl.java
+2
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+2
-1
PrizeMapper.xml
...e-system/src/main/resources/mapper/system/PrizeMapper.xml
+34
-9
No files found.
share-admin/src/main/java/share/web/controller/system/PrizeController.java
View file @
0289d079
...
@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
...
@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.Prize
;
import
share.system.domain.Prize
;
import
share.system.domain.vo.PrizeVo
;
import
share.system.service.PrizeService
;
import
share.system.service.PrizeService
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -32,9 +33,9 @@ public class PrizeController extends BaseController {
...
@@ -32,9 +33,9 @@ public class PrizeController extends BaseController {
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:prize:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:prize:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Prize
prize
)
{
public
TableDataInfo
list
(
Prize
Vo
prize
)
{
startPage
();
startPage
();
List
<
Prize
>
list
=
prizeService
.
selectPrizeList
(
prize
);
List
<
Prize
Vo
>
list
=
prizeService
.
selectPrizeList
(
prize
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -44,9 +45,9 @@ public class PrizeController extends BaseController {
...
@@ -44,9 +45,9 @@ public class PrizeController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:prize:export')"
)
@PreAuthorize
(
"@ss.hasPermi('system:prize:export')"
)
@Log
(
title
=
"奖品"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"奖品"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Prize
prize
)
{
public
void
export
(
HttpServletResponse
response
,
Prize
Vo
prize
)
{
List
<
Prize
>
list
=
prizeService
.
selectPrizeList
(
prize
);
List
<
Prize
Vo
>
list
=
prizeService
.
selectPrizeList
(
prize
);
ExcelUtil
<
Prize
>
util
=
new
ExcelUtil
<
Prize
>(
Prize
.
class
);
ExcelUtil
<
Prize
Vo
>
util
=
new
ExcelUtil
<
PrizeVo
>(
PrizeVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"奖品数据"
);
util
.
exportExcel
(
response
,
list
,
"奖品数据"
);
}
}
...
...
share-admin/src/main/java/share/web/controller/system/WheelGameController.java
View file @
0289d079
...
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
import
share.common.annotation.Log
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.R
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
...
@@ -38,6 +39,11 @@ public class WheelGameController extends BaseController {
...
@@ -38,6 +39,11 @@ public class WheelGameController extends BaseController {
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
@GetMapping
(
"/query"
)
public
R
<
List
<
WheelGame
>>
query
(
WheelGame
wheelGame
)
{
return
R
.
ok
(
wheelGameService
.
selectWheelGameList
(
wheelGame
));
}
/**
/**
* 导出转盘游戏列表
* 导出转盘游戏列表
*/
*/
...
...
share-common/src/main/java/share/common/enums/PrizeTypeEnum.java
0 → 100644
View file @
0289d079
package
share
.
common
.
enums
;
public
enum
PrizeTypeEnum
{
//1=优惠券,2商品,3积分,4谢谢参与
COUPON
(
1
,
"优惠券"
),
GOODS
(
2
,
"商品"
),
INTEGRAL
(
3
,
"积分"
),
THANK
(
4
,
"谢谢参与"
);
private
Integer
index
;
private
String
name
;
PrizeTypeEnum
()
{
}
PrizeTypeEnum
(
Integer
index
,
String
name
)
{
this
.
index
=
index
;
this
.
name
=
name
;
}
public
Integer
getIndex
()
{
return
index
;
}
public
void
setIndex
(
Integer
index
)
{
this
.
index
=
index
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
share-front/src/main/java/share/web/controller/system/LotteryRecordsLogController.java
0 → 100644
View file @
0289d079
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.LotteryRecordsLog
;
import
share.system.service.LotteryRecordsLogService
;
import
java.util.List
;
/**
* 抽奖记录日志Controller
*
* @author wuwenlong
* @date 2024-11-12
*/
@RestController
@RequestMapping
(
"/lotteryRecordsLog"
)
public
class
LotteryRecordsLogController
extends
BaseController
{
@Autowired
private
LotteryRecordsLogService
lotteryRecordsLogService
;
/**
* 查询抽奖记录日志列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
LotteryRecordsLog
lotteryRecordsLog
)
{
startPage
();
List
<
LotteryRecordsLog
>
list
=
lotteryRecordsLogService
.
selectLotteryRecordsLogList
(
lotteryRecordsLog
);
return
getDataTable
(
list
);
}
}
share-front/src/main/java/share/web/controller/system/WheelGameController.java
0 → 100644
View file @
0289d079
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
(
"/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/Prize.java
View file @
0289d079
...
@@ -7,6 +7,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
...
@@ -7,6 +7,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
/**
/**
* 奖品对象 s_prize
* 奖品对象 s_prize
*
*
...
@@ -30,10 +32,16 @@ public class Prize extends BaseEntity {
...
@@ -30,10 +32,16 @@ public class Prize extends BaseEntity {
private
Long
gameId
;
private
Long
gameId
;
/**
/**
* 优惠券ID
*/
@Excel
(
name
=
"优惠券ID"
)
private
Long
couponId
;
/**
* 奖品类型(1优惠券,2商品,3积分,4谢谢参与)
* 奖品类型(1优惠券,2商品,3积分,4谢谢参与)
*/
*/
@Excel
(
name
=
"奖品类型"
,
readConverterExp
=
"1=优惠券,2商品,3积分,4谢谢参与"
)
@Excel
(
name
=
"奖品类型"
,
readConverterExp
=
"1=优惠券,2商品,3积分,4谢谢参与"
)
private
String
prizeType
;
private
Integer
prizeType
;
/**
/**
* 奖品名字
* 奖品名字
...
@@ -45,25 +53,25 @@ public class Prize extends BaseEntity {
...
@@ -45,25 +53,25 @@ public class Prize extends BaseEntity {
* 奖品值(数量)
* 奖品值(数量)
*/
*/
@Excel
(
name
=
"奖品值"
,
readConverterExp
=
"数=量"
)
@Excel
(
name
=
"奖品值"
,
readConverterExp
=
"数=量"
)
private
Long
prizeValue
;
private
Integer
prizeValue
;
/**
/**
* 当前命中
* 当前命中
*/
*/
@Excel
(
name
=
"当前命中"
)
@Excel
(
name
=
"当前命中"
)
private
Long
currentNum
;
private
Integer
currentNum
;
/**
/**
* 最大中奖数 0:代表不限制
* 最大中奖数 0:代表不限制
*/
*/
@Excel
(
name
=
"最大中奖数 0:代表不限制"
)
@Excel
(
name
=
"最大中奖数 0:代表不限制"
)
private
Long
maxNum
;
private
Integer
maxNum
;
/**
/**
* 中奖几率
* 中奖几率
*/
*/
@Excel
(
name
=
"中奖几率"
)
@Excel
(
name
=
"中奖几率"
)
private
Long
ratio
;
private
BigDecimal
ratio
;
@Override
@Override
...
...
share-system/src/main/java/share/system/domain/vo/PrizeVo.java
0 → 100644
View file @
0289d079
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.system.domain.Prize
;
@Data
public
class
PrizeVo
extends
Prize
{
private
String
gameName
;
private
String
couponName
;
}
share-system/src/main/java/share/system/mapper/PrizeMapper.java
View file @
0289d079
...
@@ -2,6 +2,7 @@ package share.system.mapper;
...
@@ -2,6 +2,7 @@ package share.system.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.Prize
;
import
share.system.domain.Prize
;
import
share.system.domain.vo.PrizeVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,7 +27,7 @@ public interface PrizeMapper extends BaseMapper<Prize> {
...
@@ -26,7 +27,7 @@ public interface PrizeMapper extends BaseMapper<Prize> {
* @param prize 奖品
* @param prize 奖品
* @return 奖品集合
* @return 奖品集合
*/
*/
public
List
<
Prize
>
selectPrizeList
(
Prize
prize
);
public
List
<
Prize
Vo
>
selectPrizeList
(
PrizeVo
prize
);
/**
/**
* 新增奖品
* 新增奖品
...
...
share-system/src/main/java/share/system/service/PrizeService.java
View file @
0289d079
...
@@ -2,6 +2,7 @@ package share.system.service;
...
@@ -2,6 +2,7 @@ package share.system.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.Prize
;
import
share.system.domain.Prize
;
import
share.system.domain.vo.PrizeVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,7 +27,7 @@ public interface PrizeService extends IService<Prize> {
...
@@ -26,7 +27,7 @@ public interface PrizeService extends IService<Prize> {
* @param prize 奖品
* @param prize 奖品
* @return 奖品集合
* @return 奖品集合
*/
*/
public
List
<
Prize
>
selectPrizeList
(
Prize
prize
);
public
List
<
Prize
Vo
>
selectPrizeList
(
PrizeVo
prize
);
/**
/**
* 新增奖品
* 新增奖品
...
...
share-system/src/main/java/share/system/service/impl/PrizeServiceImpl.java
View file @
0289d079
...
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
share.system.domain.Prize
;
import
share.system.domain.Prize
;
import
share.system.domain.vo.PrizeVo
;
import
share.system.mapper.PrizeMapper
;
import
share.system.mapper.PrizeMapper
;
import
share.system.service.PrizeService
;
import
share.system.service.PrizeService
;
...
@@ -39,7 +40,7 @@ public class PrizeServiceImpl extends ServiceImpl<PrizeMapper, Prize> implements
...
@@ -39,7 +40,7 @@ public class PrizeServiceImpl extends ServiceImpl<PrizeMapper, Prize> implements
* @return 奖品
* @return 奖品
*/
*/
@Override
@Override
public
List
<
Prize
>
selectPrizeList
(
Prize
prize
)
{
public
List
<
Prize
Vo
>
selectPrizeList
(
PrizeVo
prize
)
{
return
prizeMapper
.
selectPrizeList
(
prize
);
return
prizeMapper
.
selectPrizeList
(
prize
);
}
}
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
0289d079
...
@@ -2940,7 +2940,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2940,7 +2940,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse
.
setMemberDiscount
(
BigDecimal
.
ZERO
);
priceResponse
.
setMemberDiscount
(
BigDecimal
.
ZERO
);
priceResponse
.
setTotalFee
(
payPrice
);
priceResponse
.
setTotalFee
(
payPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
// priceResponse.setDiscount(BigDecimal.ZERO);
SConsumerCoupon
consumerCoupon
=
consumerCouponService
.
getById
(
request
.
getCouponId
());
SConsumerCoupon
consumerCoupon
=
consumerCouponService
.
getById
(
request
.
getCouponId
());
computedCouponPrice
(
request
,
priceResponse
,
user
,
consumerCoupon
);
computedCouponPrice
(
request
,
priceResponse
,
user
,
consumerCoupon
);
priceResponse
.
setDuration
(
new
BigDecimal
(
0
));
priceResponse
.
setDuration
(
new
BigDecimal
(
0
));
...
@@ -2952,6 +2952,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2952,6 +2952,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
priceResponse
.
getPayFee
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
if
(
priceResponse
.
getPayFee
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
)
&&
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
)
&&
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>().
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()));
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>().
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()));
priceResponse
.
setDiscount
(
memberConfig
.
getDiscountRatio
());
if
(
consumerWallet
.
getBalance
().
compareTo
(
priceResponse
.
getPayFee
())
>=
0
)
{
if
(
consumerWallet
.
getBalance
().
compareTo
(
priceResponse
.
getPayFee
())
>=
0
)
{
BigDecimal
payFee
=
priceResponse
.
getPayFee
();
BigDecimal
payFee
=
priceResponse
.
getPayFee
();
BigDecimal
divide
=
priceResponse
.
getPayFee
().
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
divide
=
priceResponse
.
getPayFee
().
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
);
...
...
share-system/src/main/resources/mapper/system/PrizeMapper.xml
View file @
0289d079
...
@@ -4,9 +4,12 @@
...
@@ -4,9 +4,12 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.PrizeMapper"
>
<mapper
namespace=
"share.system.mapper.PrizeMapper"
>
<resultMap
type=
"Prize"
id=
"PrizeResult"
>
<resultMap
type=
"Prize
Vo
"
id=
"PrizeResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"gameId"
column=
"game_id"
/>
<result
property=
"gameId"
column=
"game_id"
/>
<result
property=
"gameName"
column=
"game_name"
/>
<result
property=
"couponName"
column=
"coupon_name"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"prizeType"
column=
"prize_type"
/>
<result
property=
"prizeType"
column=
"prize_type"
/>
<result
property=
"prizeName"
column=
"prize_name"
/>
<result
property=
"prizeName"
column=
"prize_name"
/>
<result
property=
"prizeValue"
column=
"prize_value"
/>
<result
property=
"prizeValue"
column=
"prize_value"
/>
...
@@ -23,6 +26,7 @@
...
@@ -23,6 +26,7 @@
<sql
id=
"selectPrizeVo"
>
<sql
id=
"selectPrizeVo"
>
select id,
select id,
game_id,
game_id,
coupon_id,
prize_type,
prize_type,
prize_name,
prize_name,
prize_value,
prize_value,
...
@@ -38,15 +42,33 @@
...
@@ -38,15 +42,33 @@
</sql>
</sql>
<select
id=
"selectPrizeList"
parameterType=
"Prize"
resultMap=
"PrizeResult"
>
<select
id=
"selectPrizeList"
parameterType=
"Prize"
resultMap=
"PrizeResult"
>
<include
refid=
"selectPrizeVo"
/>
select p.id,
p.game_id,
w.name as 'game_name',
p.coupon_id,
c.name as 'coupon_name',
p. prize_type,
p.prize_name,
p.prize_value,
p.current_num,
p.max_num,
p.ratio,
p. create_by,
p. create_time,
p. update_by,
p. update_time,
p. remark
from s_prize p left join s_wheel_game w on p.game_id = w.id
left join s_coupon c on p.coupon_id = c.id
<where>
<where>
<if
test=
"gameId != null "
>
and game_id = #{gameId}
</if>
<if
test=
"gameId != null "
>
and p.game_id = #{gameId}
</if>
<if
test=
"prizeType != null and prizeType != ''"
>
and prize_type = #{prizeType}
</if>
<if
test=
"couponId != null "
>
and p.coupon_id = #{couponId}
</if>
<if
test=
"prizeName != null and prizeName != ''"
>
and prize_name like concat('%', #{prizeName}, '%')
</if>
<if
test=
"prizeType != null and prizeType != ''"
>
and p.prize_type = #{prizeType}
</if>
<if
test=
"prizeValue != null "
>
and prize_value = #{prizeValue}
</if>
<if
test=
"prizeName != null and prizeName != ''"
>
and p.prize_name like concat('%', #{prizeName}, '%')
</if>
<if
test=
"currentNum != null "
>
and current_num = #{currentNum}
</if>
<if
test=
"prizeValue != null "
>
and p.prize_value = #{prizeValue}
</if>
<if
test=
"maxNum != null "
>
and max_num = #{maxNum}
</if>
<if
test=
"currentNum != null "
>
and p.current_num = #{currentNum}
</if>
<if
test=
"ratio != null "
>
and ratio = #{ratio}
</if>
<if
test=
"maxNum != null "
>
and p.max_num = #{maxNum}
</if>
<if
test=
"ratio != null "
>
and p.ratio = #{ratio}
</if>
</where>
</where>
</select>
</select>
...
@@ -59,6 +81,7 @@
...
@@ -59,6 +81,7 @@
insert into s_prize
insert into s_prize
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
game_id,
</if>
<if
test=
"gameId != null"
>
game_id,
</if>
<if
test=
"couponId != null"
>
coupon_id,
</if>
<if
test=
"prizeType != null"
>
prize_type,
</if>
<if
test=
"prizeType != null"
>
prize_type,
</if>
<if
test=
"prizeName != null"
>
prize_name,
</if>
<if
test=
"prizeName != null"
>
prize_name,
</if>
<if
test=
"prizeValue != null"
>
prize_value,
</if>
<if
test=
"prizeValue != null"
>
prize_value,
</if>
...
@@ -73,6 +96,7 @@
...
@@ -73,6 +96,7 @@
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
#{gameId},
</if>
<if
test=
"gameId != null"
>
#{gameId},
</if>
<if
test=
"couponId != null"
>
#{couponId}
</if>
<if
test=
"prizeType != null"
>
#{prizeType},
</if>
<if
test=
"prizeType != null"
>
#{prizeType},
</if>
<if
test=
"prizeName != null"
>
#{prizeName},
</if>
<if
test=
"prizeName != null"
>
#{prizeName},
</if>
<if
test=
"prizeValue != null"
>
#{prizeValue},
</if>
<if
test=
"prizeValue != null"
>
#{prizeValue},
</if>
...
@@ -91,6 +115,7 @@
...
@@ -91,6 +115,7 @@
update s_prize
update s_prize
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"gameId != null"
>
game_id = #{gameId},
</if>
<if
test=
"gameId != null"
>
game_id = #{gameId},
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId}
</if>
<if
test=
"prizeType != null"
>
prize_type = #{prizeType},
</if>
<if
test=
"prizeType != null"
>
prize_type = #{prizeType},
</if>
<if
test=
"prizeName != null"
>
prize_name = #{prizeName},
</if>
<if
test=
"prizeName != null"
>
prize_name = #{prizeName},
</if>
<if
test=
"prizeValue != null"
>
prize_value = #{prizeValue},
</if>
<if
test=
"prizeValue != null"
>
prize_value = #{prizeValue},
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment