Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
659913ee
Commit
659913ee
authored
Jul 23, 2024
by
zhaobiyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员积分模块
parent
4dd96931
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
324 additions
and
0 deletions
+324
-0
MemberUserScoreController.java
...member/api/memberUserScore/MemberUserScoreController.java
+40
-0
MemberUserScoreConvert.java
...ember/convert/memberUserScore/MemberUserScoreConvert.java
+14
-0
MemberUserScoreBackDO.java
...dal/dataobject/memberUserScore/MemberUserScoreBackDO.java
+4
-0
MemberUserScoreDO.java
...ber/dal/dataobject/memberUserScore/MemberUserScoreDO.java
+44
-0
MemberUserScoreMapper.java
...mber/dal/mysql/memberUserScore/MemberUserScoreMapper.java
+50
-0
MemberUserScoreService.java
...ember/service/memberUserScore/MemberUserScoreService.java
+52
-0
MemberUserScoreServiceImpl.java
...r/service/memberUserScore/MemberUserScoreServiceImpl.java
+57
-0
MemberUserScoreBackVO.java
...dule/member/vo/memberUserScore/MemberUserScoreBackVO.java
+29
-0
MemberUserScoreQueryVO.java
...ule/member/vo/memberUserScore/MemberUserScoreQueryVO.java
+34
-0
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/api/memberUserScore/MemberUserScoreController.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
api
.
memberUserScore
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.member.convert.memberUserScore.MemberUserScoreConvert
;
import
cn.iocoder.yudao.module.member.dal.dataobject.memberUserScore.MemberUserScoreDO
;
import
cn.iocoder.yudao.module.member.service.memberUserScore.MemberUserScoreService
;
import
cn.iocoder.yudao.module.member.vo.memberUserScore.MemberUserScoreBackVO
;
import
cn.iocoder.yudao.module.member.vo.memberUserScore.MemberUserScoreQueryVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@Validated
@RestController
@Api
(
tags
=
"管理后台 - 会员积分"
)
@RequestMapping
(
"/member/user-score"
)
public
class
MemberUserScoreController
{
@Resource
private
MemberUserScoreService
userScoreService
;
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得会员积分分页"
)
@PreAuthorize
(
"@ss.hasPermission('member:user-score:query')"
)
public
CommonResult
<
PageResult
<
MemberUserScoreBackVO
>>
getUserScorePage
(
@Valid
MemberUserScoreQueryVO
query
,
PageVO
page
)
{
PageResult
<
MemberUserScoreBackVO
>
pageResult
=
userScoreService
.
getUserScorePage
(
query
,
page
);
return
success
(
pageResult
);
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/convert/memberUserScore/MemberUserScoreConvert.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
convert
.
memberUserScore
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.factory.Mappers
;
/**
* 会员积分 Convert
* @author 系统管理员
*/
@Mapper
public
interface
MemberUserScoreConvert
{
/*****转换MapStruct*****/
MemberUserScoreConvert
INSTANCE
=
Mappers
.
getMapper
(
MemberUserScoreConvert
.
class
);
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/memberUserScore/MemberUserScoreBackDO.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
dal
.
dataobject
.
memberUserScore
;
public
class
MemberUserScoreBackDO
{
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/memberUserScore/MemberUserScoreDO.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
dal
.
dataobject
.
memberUserScore
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
/**
* 会员积分 DO
*
* @author 系统管理员
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"member_user_score"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
MemberUserScoreDO
extends
BaseDO
{
/**
* 主键
*/
@TableId
private
Long
id
;
/**
* 会员id
*/
private
Long
memberId
;
/**
* 持有积分
*/
private
Integer
holdScore
;
/**
* 已使用积分
*/
private
Integer
usedScore
;
/**
* 过期积分
*/
private
Integer
expiredScore
;
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/memberUserScore/MemberUserScoreMapper.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
dal
.
mysql
.
memberUserScore
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.memberUserScore.MemberUserScoreDO
;
import
cn.iocoder.yudao.module.member.vo.memberUserScore.MemberUserScoreQueryVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* 会员积分 Mapper
* @author 系统管理员
*/
@Mapper
public
interface
MemberUserScoreMapper
extends
AbstractMapper
<
MemberUserScoreDO
>
{
@Override
default
PageResult
<
MemberUserScoreDO
>
selectPage
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
MemberUserScoreQueryVO
)
{
MemberUserScoreQueryVO
vo
=
(
MemberUserScoreQueryVO
)
object
;
return
selectPage
(
page
,
new
LambdaQuery
<
MemberUserScoreDO
>()
.
eqIfPresent
(
MemberUserScoreDO:
:
getMemberId
,
vo
.
getMemberId
())
.
eqIfPresent
(
MemberUserScoreDO:
:
getHoldScore
,
vo
.
getHoldScore
())
.
eqIfPresent
(
MemberUserScoreDO:
:
getUsedScore
,
vo
.
getUsedScore
())
.
eqIfPresent
(
MemberUserScoreDO:
:
getExpiredScore
,
vo
.
getExpiredScore
())
.
betweenIfPresent
(
MemberUserScoreDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
MemberUserScoreDO:
:
getId
));
}
return
null
;
}
@Override
default
List
<
MemberUserScoreDO
>
selectList
(
Object
object
)
{
if
(
object
instanceof
MemberUserScoreQueryVO
)
{
MemberUserScoreQueryVO
vo
=
(
MemberUserScoreQueryVO
)
object
;
return
selectList
(
new
LambdaQuery
<
MemberUserScoreDO
>()
.
eqIfPresent
(
MemberUserScoreDO:
:
getMemberId
,
vo
.
getMemberId
())
.
eqIfPresent
(
MemberUserScoreDO:
:
getHoldScore
,
vo
.
getHoldScore
())
.
eqIfPresent
(
MemberUserScoreDO:
:
getUsedScore
,
vo
.
getUsedScore
())
.
eqIfPresent
(
MemberUserScoreDO:
:
getExpiredScore
,
vo
.
getExpiredScore
())
.
betweenIfPresent
(
MemberUserScoreDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
MemberUserScoreDO:
:
getId
));
}
return
null
;
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/memberUserScore/MemberUserScoreService.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
service
.
memberUserScore
;
import
java.util.*
;
import
javax.validation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.module.member.vo.memberUserScore.*
;
import
cn.iocoder.yudao.module.member.dal.dataobject.memberUserScore.MemberUserScoreDO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
/**
* 会员积分 Service 接口
*
* @author 系统管理员
*/
public
interface
MemberUserScoreService
extends
IService
<
MemberUserScoreDO
>
{
/**
* 删除会员积分
* @param id 编号
*/
void
deleteUserScore
(
Long
id
);
/**
* 获得会员积分
* @param id 编号
* @return 会员积分
*/
MemberUserScoreDO
getUserScore
(
Long
id
);
/**
* 获得会员积分列表
* @param ids 编号
* @return 会员积分列表
*/
List
<
MemberUserScoreDO
>
getUserScoreList
(
Collection
<
Long
>
ids
);
/**
* 获得会员积分分页
* @param page 分页查询
* @param query 查询
* @return 会员积分分页
*/
PageResult
<
MemberUserScoreBackVO
>
getUserScorePage
(
MemberUserScoreQueryVO
query
,
PageVO
page
);
/**
* 获得会员积分列表, 用于 Excel 导出
* @param query 查询
* @return 会员积分列表
*/
List
<
MemberUserScoreDO
>
getUserScoreList
(
MemberUserScoreQueryVO
query
);
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/memberUserScore/MemberUserScoreServiceImpl.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
service
.
memberUserScore
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.member.convert.memberUserScore.MemberUserScoreConvert
;
import
cn.iocoder.yudao.module.member.dal.dataobject.memberUserScore.MemberUserScoreDO
;
import
cn.iocoder.yudao.module.member.dal.mysql.memberUserScore.MemberUserScoreMapper
;
import
cn.iocoder.yudao.module.member.vo.memberUserScore.MemberUserScoreBackVO
;
import
cn.iocoder.yudao.module.member.vo.memberUserScore.MemberUserScoreQueryVO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
javax.annotation.Resource
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 会员积分 Service 实现类
*
* @author 系统管理员
*/
@Service
@Validated
public
class
MemberUserScoreServiceImpl
extends
AbstractService
<
MemberUserScoreMapper
,
MemberUserScoreDO
>
implements
MemberUserScoreService
{
@Resource
private
MemberUserScoreMapper
userScoreMapper
;
@Override
public
void
deleteUserScore
(
Long
id
)
{
// 删除
userScoreMapper
.
deleteById
(
id
);
}
@Override
public
MemberUserScoreDO
getUserScore
(
Long
id
)
{
return
userScoreMapper
.
selectById
(
id
);
}
@Override
public
List
<
MemberUserScoreDO
>
getUserScoreList
(
Collection
<
Long
>
ids
)
{
return
userScoreMapper
.
selectBatchIds
(
ids
);
}
@Override
public
PageResult
<
MemberUserScoreBackVO
>
getUserScorePage
(
MemberUserScoreQueryVO
query
,
PageVO
page
)
{
PageResult
<
MemberUserScoreBackVO
>
pageResult
=
new
PageResult
<>();
pageResult
.
set
return
pageResult
;
}
@Override
public
List
<
MemberUserScoreDO
>
getUserScoreList
(
MemberUserScoreQueryVO
query
)
{
return
userScoreMapper
.
selectList
(
query
);
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/memberUserScore/MemberUserScoreBackVO.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
memberUserScore
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author zhaobiyan
*/
@Data
@ApiModel
(
"管理后台 - 会员积分查询 VO"
)
public
class
MemberUserScoreBackVO
{
@ApiModelProperty
(
value
=
"会员id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"会员昵称"
)
private
String
nickname
;
@ApiModelProperty
(
value
=
"联系方式"
)
private
String
areaCodeMobile
;
@ApiModelProperty
(
value
=
"国家"
)
private
String
countryName
;
@ApiModelProperty
(
value
=
"当前积分"
)
private
Integer
holdScore
;
@ApiModelProperty
(
value
=
"已兑换积分"
)
private
Integer
usedScore
;
@ApiModelProperty
(
value
=
"会员注册时间"
)
private
Date
createTime
;
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/memberUserScore/MemberUserScoreQueryVO.java
0 → 100644
View file @
659913ee
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
memberUserScore
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
* @author zhaobiyan
*/
@Data
@ApiModel
(
"管理后台 - 会员积分查询 VO"
)
public
class
MemberUserScoreQueryVO
{
@ApiModelProperty
(
value
=
"关键词"
)
private
String
key
;
@ApiModelProperty
(
value
=
"国家"
)
private
String
country
;
@ApiModelProperty
(
value
=
"当前积分"
)
private
Integer
holdScore
;
@ApiModelProperty
(
value
=
"当前积分操作"
)
private
Integer
holdScoreOperate
;
@ApiModelProperty
(
value
=
"已使用积分"
)
private
Integer
usedScore
;
@ApiModelProperty
(
value
=
"已使用积分操作"
)
private
Integer
usedScoreOperate
;
@ApiModelProperty
(
value
=
"会员创建时间开始"
)
private
Date
memberCreateTimeStart
;
@ApiModelProperty
(
value
=
"会员创建时间结束"
)
private
Date
memberCreateTimeEnd
;
}
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