Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
2262ace3
提交
2262ace3
authored
8月 07, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UserPoints(update)
上级
9ca3605e
隐藏空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
970 行增加
和
2 行删除
+970
-2
UserPointsDTO.java
...com/mmc/iuav/user/model/dto/userpoints/UserPointsDTO.java
+44
-0
UserPointsDetailsDTO.java
.../iuav/user/model/dto/userpoints/UserPointsDetailsDTO.java
+50
-0
AppPointsDetailsQO.java
...mmc/iuav/user/model/qo/userpoints/AppPointsDetailsQO.java
+40
-0
UserPointQO.java
...va/com/mmc/iuav/user/model/qo/userpoints/UserPointQO.java
+45
-0
UserPointsDetailsQO.java
...mc/iuav/user/model/qo/userpoints/UserPointsDetailsQO.java
+40
-0
UserAccountVO.java
...c/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
+2
-0
UserPointsVO.java
...a/com/mmc/iuav/user/model/vo/userpoints/UserPointsVO.java
+35
-0
UserPointsController.java
...iuav/user/controller/userpoints/UserPointsController.java
+61
-0
NumberOfUserPoints.java
...user/controller/userpoints/config/NumberOfUserPoints.java
+55
-0
UserPointsEnum.java
...uav/user/controller/userpoints/config/UserPointsEnum.java
+53
-0
UserPointsDao.java
.../java/com/mmc/iuav/user/dao/userpoints/UserPointsDao.java
+26
-0
UserPointsDetailsDao.java
...om/mmc/iuav/user/dao/userpoints/UserPointsDetailsDao.java
+26
-0
UserAccountDO.java
...src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
+3
-0
UserPointsDO.java
...ava/com/mmc/iuav/user/entity/userpoints/UserPointsDO.java
+64
-0
UserPointsDetails.java
...om/mmc/iuav/user/entity/userpoints/UserPointsDetails.java
+68
-0
PilotCertificationServiceImpl.java
...ervice/dronepilot/impl/PilotCertificationServiceImpl.java
+35
-0
RealNameAuthServiceImpl.java
...m/mmc/iuav/user/service/impl/RealNameAuthServiceImpl.java
+37
-0
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+41
-0
UserPointsService.java
...m/mmc/iuav/user/service/userpoints/UserPointsService.java
+19
-0
UserPointsServiceImpl.java
...v/user/service/userpoints/impl/UserPointsServiceImpl.java
+74
-0
UserServiceDao.xml
...service-user/src/main/resources/mapper/UserServiceDao.xml
+4
-2
UserPointsDao.xml
...er/src/main/resources/mapper/userpoints/UserPointsDao.xml
+71
-0
UserPointsDetailsDao.xml
...main/resources/mapper/userpoints/UserPointsDetailsDao.xml
+77
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/userpoints/UserPointsDTO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
userpoints
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @Author small
* @Date 2023/8/5 16:33
* @Version 1.0
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public
class
UserPointsDTO
{
@ApiModelProperty
(
value
=
"积分id"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"微信昵称"
,
example
=
"张三"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"189213123312"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"积分总额"
,
example
=
"3"
)
private
Integer
totalPoints
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
updateTime
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/userpoints/UserPointsDetailsDTO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
userpoints
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @Author small
* @Date 2023/8/7 11:23
* @Version 1.0
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public
class
UserPointsDetailsDTO
{
@ApiModelProperty
(
value
=
"id不能为空"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"积分"
,
example
=
"1"
)
private
Integer
point
;
@ApiModelProperty
(
value
=
"积分来源"
,
example
=
"1"
)
private
String
pointSource
;
@ApiModelProperty
(
value
=
"积分发放时间"
,
example
=
"1"
)
private
Date
timeOfRelease
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"微信昵称"
,
example
=
"张三"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"189893132"
)
private
String
phoneNum
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/userpoints/AppPointsDetailsQO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
userpoints
;
import
com.mmc.iuav.group.Freeze
;
import
com.mmc.iuav.group.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
/**
* @Author small
* @Date 2023/8/7 13:51
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
AppPointsDetailsQO
{
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"页大小"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"页大小不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"26"
,
hidden
=
true
)
private
Integer
userAccountId
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/userpoints/UserPointQO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
userpoints
;
import
com.mmc.iuav.group.Freeze
;
import
com.mmc.iuav.group.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
/**
* @Author small
* @Date 2023/8/5 16:40
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
UserPointQO
{
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"页大小"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"页大小不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"189213123312"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"微信昵称"
,
example
=
"张三"
)
private
String
nickName
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/userpoints/UserPointsDetailsQO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
userpoints
;
import
com.mmc.iuav.group.Freeze
;
import
com.mmc.iuav.group.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
/**
* @Author small
* @Date 2023/8/7 13:45
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
UserPointsDetailsQO
{
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"页大小"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"页大小不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"26"
,
required
=
true
)
private
Integer
userAccountId
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
浏览文件 @
2262ace3
...
...
@@ -71,4 +71,6 @@ public class UserAccountVO implements Serializable {
private
Integer
realNameAuthStatus
;
@ApiModelProperty
(
value
=
"飞手审核 0审核中 1审核通过 2审核不通过 null不是飞手"
)
private
Integer
auditStatus
;
@ApiModelProperty
(
value
=
"总积分 null表示无积分"
)
private
Integer
totalPoints
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/userpoints/UserPointsVO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
userpoints
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/8/5 15:15
* @Version 1.0
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
UserPointsVO
{
@ApiModelProperty
(
value
=
"id不能为空"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"积分总额"
,
example
=
"10"
)
private
Integer
totalPoints
;
public
UserPointsVO
(
Integer
userAccountId
,
Integer
totalPoints
)
{
this
.
userAccountId
=
userAccountId
;
this
.
totalPoints
=
totalPoints
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/userpoints/UserPointsController.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
controller
.
userpoints
;
import
com.mmc.iuav.group.Page
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.controller.BaseController
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO
;
import
com.mmc.iuav.user.model.dto.userpoints.UserPointsDTO
;
import
com.mmc.iuav.user.model.dto.userpoints.UserPointsDetailsDTO
;
import
com.mmc.iuav.user.model.qo.userpoints.AppPointsDetailsQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointsDetailsQO
;
import
com.mmc.iuav.user.service.userpoints.UserPointsService
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @Author small
* @Date 2023/8/5 16:28
* @Version 1.0
*/
@Api
(
tags
=
"积分"
)
@RequestMapping
(
"/userPoint"
)
@RestController
public
class
UserPointsController
extends
BaseController
{
@Autowired
private
UserPointsService
userPointsService
;
@ApiOperation
(
value
=
"后台管理——积分列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/userPointList"
)
public
ResultBody
<
UserPointsDTO
>
userPointList
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"积分查询"
,
required
=
true
)
@RequestBody
UserPointQO
param
)
{
return
ResultBody
.
success
(
userPointsService
.
userPointList
(
param
));
}
@ApiOperation
(
value
=
"后台管理——积分详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/detailPoint"
)
public
ResultBody
<
UserPointsDetailsDTO
>
detailPoint
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"积分查询"
,
required
=
true
)
@RequestBody
UserPointsDetailsQO
param
)
{
return
ResultBody
.
success
(
userPointsService
.
detailPoint
(
param
));
}
@ApiOperation
(
value
=
"小程序用户——积分详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/appDetailPoint"
)
public
ResultBody
<
UserPointsDetailsDTO
>
appDetailPoint
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"积分查询"
,
required
=
true
)
@RequestBody
AppPointsDetailsQO
param
)
{
return
ResultBody
.
success
(
userPointsService
.
appDetailPoint
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
param
));
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/userpoints/config/NumberOfUserPoints.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
controller
.
userpoints
.
config
;
/**
* @Author small
* @Date 2023/8/5 16:20
* @Version 1.0
*/
public
enum
NumberOfUserPoints
{
//注册
REGISTER
(
0
,
5
),
//实名认证
REAL_NAME_AUTHENTICATION
(
1
,
10
),
//飞手认证
PILOT_CERTIFICATION
(
2
,
20
);
private
int
code
;
private
int
message
;
private
NumberOfUserPoints
(
int
code
,
int
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
int
getMessage
()
{
return
message
;
}
public
void
setMessage
(
int
message
)
{
this
.
message
=
message
;
}
public
static
NumberOfUserPoints
match
(
int
key
)
{
NumberOfUserPoints
result
=
null
;
for
(
NumberOfUserPoints
s
:
values
())
{
if
(
s
.
getCode
()
==
key
)
{
result
=
s
;
break
;
}
}
return
result
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/userpoints/config/UserPointsEnum.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
controller
.
userpoints
.
config
;
/**
* @Author small
* @Date 2023/8/5 11:14
* @Version 1.0
*/
public
enum
UserPointsEnum
{
REGISTER
(
0
,
"注册"
),
REAL_NAME_AUTHENTICATION
(
1
,
"实名认证"
),
PILOT_CERTIFICATION
(
2
,
"飞手认证"
);
private
int
code
;
private
String
message
;
private
UserPointsEnum
(
int
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
static
UserPointsEnum
match
(
int
key
)
{
UserPointsEnum
result
=
null
;
for
(
UserPointsEnum
s
:
values
())
{
if
(
s
.
getCode
()
==
key
)
{
result
=
s
;
break
;
}
}
return
result
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/userpoints/UserPointsDao.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
dao
.
userpoints
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/8/5 13:20
* @Version 1.0
*/
@Mapper
public
interface
UserPointsDao
{
UserPointsDO
selectUserPoints
(
Integer
id
);
void
updatePoints
(
UserPointsDO
userPointsDO
);
void
insertPoints
(
UserPointsDO
userPointsDO
);
List
<
UserPointsDO
>
userPointList
(
UserPointQO
param
);
int
count
(
UserPointQO
param
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/userpoints/UserPointsDetailsDao.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
dao
.
userpoints
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDetails
;
import
com.mmc.iuav.user.model.qo.userpoints.AppPointsDetailsQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointsDetailsQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/8/5 13:21
* @Version 1.0
*/
@Mapper
public
interface
UserPointsDetailsDao
{
void
insertPointsDetails
(
UserPointsDetails
userPointsDetails
);
List
<
UserPointsDetails
>
detailPoint
(
UserPointsDetailsQO
param
);
int
detailPointCount
(
UserPointsDetailsQO
param
);
List
<
UserPointsDetails
>
appDetailPoint
(
AppPointsDetailsQO
param
);
int
appDetailPointCount
(
AppPointsDetailsQO
param
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
浏览文件 @
2262ace3
...
...
@@ -75,6 +75,8 @@ public class UserAccountDO implements Serializable {
*/
private
Integer
auditStatus
;
private
Integer
totalPoints
;
public
UserAccountDO
(
UserAccountVO
userAccountVO
)
{
this
.
id
=
userAccountVO
.
getId
();
this
.
phoneNum
=
userAccountVO
.
getPhoneNum
();
...
...
@@ -110,6 +112,7 @@ public class UserAccountDO implements Serializable {
.
leader
(
this
.
leader
)
.
realNameAuthStatus
(
this
.
realNameAuthStatus
)
.
auditStatus
(
this
.
auditStatus
)
.
totalPoints
(
this
.
totalPoints
)
.
build
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/userpoints/UserPointsDO.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
entity
.
userpoints
;
import
com.mmc.iuav.user.model.dto.userpoints.UserPointsDTO
;
import
com.mmc.iuav.user.model.vo.userpoints.UserPointsVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @Author small
* @Date 2023/8/5 13:14
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
UserPointsDO
{
@ApiModelProperty
(
value
=
"id不能为空"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"积分总额"
,
example
=
"10"
)
private
Integer
totalPoints
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"微信昵称"
,
example
=
"张三"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"189231321"
)
private
String
phoneNum
;
public
UserPointsDO
(
UserPointsVO
userPointsVO
)
{
this
.
id
=
userPointsVO
.
getId
();
this
.
userAccountId
=
userPointsVO
.
getUserAccountId
();
this
.
totalPoints
=
userPointsVO
.
getTotalPoints
();
}
public
UserPointsDTO
buildUserPointsDTO
()
{
return
UserPointsDTO
.
builder
()
.
id
(
this
.
id
)
.
userAccountId
(
this
.
userAccountId
)
.
totalPoints
(
this
.
totalPoints
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
nickName
(
this
.
nickName
)
.
phoneNum
(
this
.
phoneNum
)
.
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/userpoints/UserPointsDetails.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
entity
.
userpoints
;
import
com.mmc.iuav.user.model.dto.userpoints.UserPointsDetailsDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @Author small
* @Date 2023/8/5 13:18
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
UserPointsDetails
{
@ApiModelProperty
(
value
=
"id不能为空"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"积分"
,
example
=
"5"
)
private
Integer
point
;
@ApiModelProperty
(
value
=
"积分来源"
,
example
=
"注册"
)
private
String
pointSource
;
@ApiModelProperty
(
value
=
"积分发放时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
timeOfRelease
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-08-05 16:25:02"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"微信昵称"
,
example
=
"张三"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"189893132"
)
private
String
phoneNum
;
public
UserPointsDetails
(
Integer
userAccountId
,
Integer
point
,
String
message
)
{
this
.
userAccountId
=
userAccountId
;
this
.
point
=
point
;
this
.
pointSource
=
message
;
}
public
UserPointsDetailsDTO
buildPoint
()
{
return
UserPointsDetailsDTO
.
builder
()
.
id
(
this
.
id
)
.
userAccountId
(
this
.
userAccountId
)
.
point
(
this
.
point
)
.
pointSource
(
this
.
pointSource
)
.
timeOfRelease
(
this
.
timeOfRelease
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
nickName
(
this
.
nickName
)
.
phoneNum
(
this
.
phoneNum
)
.
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/dronepilot/impl/PilotCertificationServiceImpl.java
浏览文件 @
2262ace3
...
...
@@ -7,10 +7,16 @@ import com.mmc.iuav.response.ResultBody;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.constant.UserSystemConstant
;
import
com.mmc.iuav.user.constant.WxConstant
;
import
com.mmc.iuav.user.controller.userpoints.config.NumberOfUserPoints
;
import
com.mmc.iuav.user.controller.userpoints.config.UserPointsEnum
;
import
com.mmc.iuav.user.controller.wx.*
;
import
com.mmc.iuav.user.dao.dronepilot.PilotCertificationDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.entity.dronepilot.*
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDO
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDetails
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO
;
...
...
@@ -22,6 +28,7 @@ import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotRemarkQO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO
;
import
com.mmc.iuav.user.model.vo.userpoints.UserPointsVO
;
import
com.mmc.iuav.user.service.dronepilot.PilotCertificationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
...
...
@@ -50,6 +57,12 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
@Autowired
private
UserSystemConstant
userSystemConstant
;
@Autowired
private
UserPointsDao
userPointsDao
;
@Autowired
private
UserPointsDetailsDao
userPointsDetailsDao
;
@Override
public
ResultBody
insertPilot
(
PilotCertificationVO
certificationVO
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
...
...
@@ -70,9 +83,31 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
certificationDao
.
insertAbility
(
pilotAbility
);
PilotCertificationLogDO
pilotCertificationLog
=
new
PilotCertificationLogDO
(
pilotCertificationDO
,
CertificationMessage
.
match
(
0
));
certificationDao
.
insertPilotLog
(
pilotCertificationLog
);
//积分
extracted
(
pilotCertificationDO
.
getUserAccountId
());
return
ResultBody
.
success
();
}
private
void
extracted
(
Integer
id
)
{
UserPointsVO
userPointsVO
=
new
UserPointsVO
(
id
,
NumberOfUserPoints
.
match
(
2
).
getMessage
());
//积分
UserPointsDO
pointsDO
=
userPointsDao
.
selectUserPoints
(
userPointsVO
.
getUserAccountId
());
UserPointsDO
points
=
null
;
if
(
pointsDO
!=
null
)
{
Integer
totalPoints
=
userPointsVO
.
getTotalPoints
();
Integer
totalPoints1
=
pointsDO
.
getTotalPoints
();
totalPoints
+=
totalPoints1
;
userPointsVO
.
setTotalPoints
(
totalPoints
);
points
=
new
UserPointsDO
(
userPointsVO
);
userPointsDao
.
updatePoints
(
points
);
}
else
if
(
pointsDO
==
null
)
{
points
=
new
UserPointsDO
(
userPointsVO
);
userPointsDao
.
insertPoints
(
points
);
}
UserPointsDetails
userPointsDetails
=
new
UserPointsDetails
(
id
,
NumberOfUserPoints
.
match
(
2
).
getMessage
(),
UserPointsEnum
.
match
(
2
).
getMessage
());
userPointsDetailsDao
.
insertPointsDetails
(
userPointsDetails
);
}
@Override
public
ResultBody
<
PilotAbilityDTO
>
abilityList
()
{
List
<
PilotAbilityDO
>
abilityDOList
=
certificationDao
.
abilityList
();
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/RealNameAuthServiceImpl.java
浏览文件 @
2262ace3
...
...
@@ -4,12 +4,19 @@ import com.alibaba.fastjson2.JSONObject;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.controller.userpoints.config.NumberOfUserPoints
;
import
com.mmc.iuav.user.controller.userpoints.config.UserPointsEnum
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
import
com.mmc.iuav.user.entity.RealNameAuthDO
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDO
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDetails
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDetailDTO
;
import
com.mmc.iuav.user.model.qo.RealNameAuthQO
;
import
com.mmc.iuav.user.model.vo.RealNameAuthVO
;
import
com.mmc.iuav.user.model.vo.userpoints.UserPointsVO
;
import
com.mmc.iuav.user.service.RealNameAuthService
;
import
com.mmc.iuav.user.util.RealNameAuthUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -31,6 +38,12 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
@Autowired
private
RealNameAuthDao
realNameAuthDao
;
@Autowired
private
UserPointsDao
userPointsDao
;
@Autowired
private
UserPointsDetailsDao
userPointsDetailsDao
;
@Override
public
ResultBody
add
(
RealNameAuthVO
realNameAuthVO
)
{
RealNameAuthDO
realNameAuthDO0
=
realNameAuthDao
.
getRealNameAuthByUId
(
realNameAuthVO
.
getUserAccountId
());
...
...
@@ -108,12 +121,36 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
realNameAuthDO
.
setId
(
beforeRealNameAuthDO
.
getId
());
realNameAuthDao
.
updateRealNameAuth
(
realNameAuthDO
);
}
//积分 todo
extracted
(
realNameAuthDO
.
getUserAccountId
());
return
ResultBody
.
success
();
}
else
{
return
ResultBody
.
error
(
ResultEnum
.
PHOTO_FORMAT_ERROR
);
}
}
private
void
extracted
(
Integer
id
)
{
UserPointsVO
userPointsVO
=
new
UserPointsVO
(
id
,
NumberOfUserPoints
.
match
(
1
).
getMessage
());
//积分
UserPointsDO
pointsDO
=
userPointsDao
.
selectUserPoints
(
userPointsVO
.
getUserAccountId
());
UserPointsDO
points
=
null
;
if
(
pointsDO
!=
null
)
{
Integer
totalPoints
=
userPointsVO
.
getTotalPoints
();
Integer
totalPoints1
=
pointsDO
.
getTotalPoints
();
totalPoints
+=
totalPoints1
;
userPointsVO
.
setTotalPoints
(
totalPoints
);
points
=
new
UserPointsDO
(
userPointsVO
);
userPointsDao
.
updatePoints
(
points
);
}
else
if
(
pointsDO
==
null
)
{
points
=
new
UserPointsDO
(
userPointsVO
);
userPointsDao
.
insertPoints
(
points
);
}
UserPointsDetails
userPointsDetails
=
new
UserPointsDetails
(
id
,
NumberOfUserPoints
.
match
(
1
).
getMessage
(),
UserPointsEnum
.
match
(
1
).
getMessage
());
userPointsDetailsDao
.
insertPointsDetails
(
userPointsDetails
);
}
@Override
public
ResultBody
<
RealNameAuthDetailDTO
>
detail
(
Integer
id
)
{
RealNameAuthDO
realNameAuthDO
=
realNameAuthDao
.
getRealNameAuthById
(
id
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
2262ace3
...
...
@@ -4,11 +4,17 @@ import com.mmc.iuav.general.CodeUtil;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.controller.userpoints.config.NumberOfUserPoints
;
import
com.mmc.iuav.user.controller.userpoints.config.UserPointsEnum
;
import
com.mmc.iuav.user.dao.CooperationDao
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
import
com.mmc.iuav.user.entity.CooperationTagDO
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.entity.UserRcdDO
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDO
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDetails
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.dto.UserAccountSimpleDTO
;
...
...
@@ -18,6 +24,7 @@ import com.mmc.iuav.user.model.vo.CompanyAuthVO;
import
com.mmc.iuav.user.model.vo.CooperationTagVO
;
import
com.mmc.iuav.user.model.vo.TopInviteVO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
com.mmc.iuav.user.model.vo.userpoints.UserPointsVO
;
import
com.mmc.iuav.user.mq.MqProducer
;
import
com.mmc.iuav.user.service.CompanyAuthService
;
import
com.mmc.iuav.user.service.RealNameAuthService
;
...
...
@@ -58,6 +65,13 @@ public class UserAccountServiceImpl implements UserAccountService {
@Autowired
private
MqProducer
mqProducer
;
@Autowired
private
UserPointsDao
userPointsDao
;
@Autowired
private
UserPointsDetailsDao
userPointsDetailsDao
;
@Override
public
UserAccountVO
getUserAccountInfoByUnionId
(
String
unionId
)
{
UserAccountDO
userAccountDO
=
userServiceDao
.
getUserAccountInfoByUnionId
(
unionId
);
...
...
@@ -178,9 +192,36 @@ public class UserAccountServiceImpl implements UserAccountService {
userRcd
.
setRcdUserId
(
rcdUserId
);
userServiceDao
.
insertUserRcd
(
userRcd
);
}
/**
* 积分
*/
extracted
(
id
);
return
ResultBody
.
success
();
}
private
void
extracted
(
Integer
id
)
{
UserPointsVO
userPointsVO
=
new
UserPointsVO
(
id
,
NumberOfUserPoints
.
match
(
0
).
getMessage
());
//积分
UserPointsDO
pointsDO
=
userPointsDao
.
selectUserPoints
(
userPointsVO
.
getUserAccountId
());
UserPointsDO
points
=
null
;
if
(
pointsDO
!=
null
)
{
Integer
totalPoints
=
userPointsVO
.
getTotalPoints
();
Integer
totalPoints1
=
pointsDO
.
getTotalPoints
();
totalPoints
+=
totalPoints1
;
userPointsVO
.
setTotalPoints
(
totalPoints
);
points
=
new
UserPointsDO
(
userPointsVO
);
userPointsDao
.
updatePoints
(
points
);
}
else
if
(
pointsDO
==
null
)
{
points
=
new
UserPointsDO
(
userPointsVO
);
userPointsDao
.
insertPoints
(
points
);
}
UserPointsDetails
userPointsDetails
=
new
UserPointsDetails
(
id
,
NumberOfUserPoints
.
match
(
0
).
getMessage
(),
UserPointsEnum
.
match
(
0
).
getMessage
());
userPointsDetailsDao
.
insertPointsDetails
(
userPointsDetails
);
}
@Override
public
List
<
UserAccountSimpleDTO
>
feignListUserAccountByIds
(
List
<
Integer
>
ids
)
{
List
<
UserAccountDO
>
userAccountDOS
=
userServiceDao
.
listUserAccountByIds
(
ids
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/userpoints/UserPointsService.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
service
.
userpoints
;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.user.model.qo.userpoints.AppPointsDetailsQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointsDetailsQO
;
/**
* @Author small
* @Date 2023/8/5 16:31
* @Version 1.0
*/
public
interface
UserPointsService
{
PageResult
userPointList
(
UserPointQO
param
);
PageResult
detailPoint
(
UserPointsDetailsQO
param
);
PageResult
appDetailPoint
(
Integer
userAccountId
,
AppPointsDetailsQO
param
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/userpoints/impl/UserPointsServiceImpl.java
0 → 100644
浏览文件 @
2262ace3
package
com
.
mmc
.
iuav
.
user
.
service
.
userpoints
.
impl
;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDao
;
import
com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDO
;
import
com.mmc.iuav.user.entity.userpoints.UserPointsDetails
;
import
com.mmc.iuav.user.model.dto.userpoints.UserPointsDTO
;
import
com.mmc.iuav.user.model.dto.userpoints.UserPointsDetailsDTO
;
import
com.mmc.iuav.user.model.qo.userpoints.AppPointsDetailsQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointsDetailsQO
;
import
com.mmc.iuav.user.service.userpoints.UserPointsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @Author small
* @Date 2023/8/5 16:31
* @Version 1.0
*/
@Service
public
class
UserPointsServiceImpl
implements
UserPointsService
{
@Autowired
private
UserPointsDao
userPointsDao
;
@Autowired
private
UserPointsDetailsDao
userPointsDetailsDao
;
@Override
public
PageResult
userPointList
(
UserPointQO
param
)
{
int
count
=
userPointsDao
.
count
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
UserPointsDO
>
userPointList
=
userPointsDao
.
userPointList
(
param
);
List
<
UserPointsDTO
>
collect
=
userPointList
.
stream
().
map
(
UserPointsDO:
:
buildUserPointsDTO
).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
collect
);
}
@Override
public
PageResult
detailPoint
(
UserPointsDetailsQO
param
)
{
int
count
=
userPointsDetailsDao
.
detailPointCount
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
UserPointsDetails
>
userPointsDetails
=
userPointsDetailsDao
.
detailPoint
(
param
);
List
<
UserPointsDetailsDTO
>
collect
=
userPointsDetails
.
stream
().
map
(
UserPointsDetails:
:
buildPoint
).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
collect
);
}
@Override
public
PageResult
appDetailPoint
(
Integer
userAccountId
,
AppPointsDetailsQO
param
)
{
param
.
setUserAccountId
(
userAccountId
);
int
count
=
userPointsDetailsDao
.
appDetailPointCount
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
UserPointsDetails
>
userPointsDetails
=
userPointsDetailsDao
.
appDetailPoint
(
param
);
List
<
UserPointsDetailsDTO
>
collect
=
userPointsDetails
.
stream
().
map
(
UserPointsDetails:
:
buildPoint
).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
collect
);
}
}
csm-service/cms-service-user/src/main/resources/mapper/UserServiceDao.xml
浏览文件 @
2262ace3
...
...
@@ -139,10 +139,12 @@
ua.`DISABLE`,
ua.create_time,
ua.update_time,
pc.audit_status
pc.audit_status,
up.total_points
FROM user_account ua
LEFT JOIN pilot_certification pc ON pc.user_account_id = ua.id
WHERE ua.id = #{id}
LEFT JOIN user_points up ON up.user_account_id = ua.id
WHERE ua.id = ua.id = #{id}
</select>
<select
id=
"listUserAccountIdsByDistrictCode"
resultType=
"java.lang.Integer"
>
...
...
csm-service/cms-service-user/src/main/resources/mapper/userpoints/UserPointsDao.xml
0 → 100644
浏览文件 @
2262ace3
<?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=
"com.mmc.iuav.user.dao.userpoints.UserPointsDao"
>
<resultMap
id=
"pointList"
type=
"com.mmc.iuav.user.entity.userpoints.UserPointsDO"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userAccountId"
column=
"user_account_id"
/>
<result
property=
"totalPoints"
column=
"total_points"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"phoneNum"
column=
"phone_num"
/>
</resultMap>
<select
id=
"selectUserPoints"
resultType=
"com.mmc.iuav.user.entity.userpoints.UserPointsDO"
>
select id, user_account_id, total_points
from user_points
where user_account_id = #{id}
</select>
<update
id=
"updatePoints"
parameterType=
"com.mmc.iuav.user.entity.userpoints.UserPointsDO"
>
UPDATE user_points
<set>
total_points = #{totalPoints},
update_time=NOW()
</set>
where user_account_id = #{userAccountId}
</update>
<insert
id=
"insertPoints"
parameterType=
"com.mmc.iuav.user.entity.userpoints.UserPointsDO"
>
insert into user_points(total_points, user_account_id, create_time,
update_time)
values (#{totalPoints}, #{userAccountId}, NOW(), NOW())
</insert>
<select
id=
"userPointList"
resultMap=
"pointList"
parameterType=
"com.mmc.iuav.user.model.qo.userpoints.UserPointQO"
>
SELECT up.id,
up.user_account_id,
up.total_points,
up.create_time,
up.update_time,
ua.nick_name,
ua.phone_num
FROM user_points up
INNER JOIN user_account ua ON up.user_account_id = ua.id
WHERE ua.`disable` = 0
<if
test=
" phoneNum != null and phoneNum != '' "
>
and ua.phone_num like CONCAT("%",#{phoneNum},"%")
</if>
<if
test=
" nickName != null and nickName != '' "
>
and ua.nick_name like CONCAT("%",#{nickName},"%")
</if>
order by up.create_time desc
limit #{pageNo}, #{pageSize}
</select>
<select
id=
"count"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM user_points up
INNER JOIN user_account ua ON up.user_account_id = ua.id
WHERE ua.`disable` = 0
<if
test=
" phoneNum != null and phoneNum != '' "
>
and ua.phone_num like CONCAT("%",#{phoneNum},"%")
</if>
<if
test=
" nickName != null and nickName != '' "
>
and ua.nick_name like CONCAT("%",#{nickName},"%")
</if>
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/mapper/userpoints/UserPointsDetailsDao.xml
0 → 100644
浏览文件 @
2262ace3
<?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=
"com.mmc.iuav.user.dao.userpoints.UserPointsDetailsDao"
>
<resultMap
id=
"detailPointList"
type=
"com.mmc.iuav.user.entity.userpoints.UserPointsDetails"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userAccountId"
column=
"user_account_id"
/>
<result
property=
"point"
column=
"point"
/>
<result
property=
"pointSource"
column=
"point_source"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"timeOfRelease"
column=
"time_of_release"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"phoneNum"
column=
"phone_num"
/>
</resultMap>
<insert
id=
"insertPointsDetails"
parameterType=
"com.mmc.iuav.user.entity.userpoints.UserPointsDetails"
>
insert into user_points_details(point, user_account_id, create_time,
update_time, point_source, time_of_release)
values (#{point}, #{userAccountId}, NOW(), NOW(), #{pointSource}, NOW())
</insert>
<select
id=
"detailPoint"
resultMap=
"detailPointList"
>
SELECT upd.id,
upd.user_account_id,
upd.point,
upd.point_source,
upd.create_time,
upd.update_time,
upd.time_of_release,
ua.nick_name,
ua.phone_num
FROM user_points_details upd
INNER JOIN user_account ua ON upd.user_account_id = ua.id
WHERE ua.`disable` = 0
AND upd.user_account_id = #{userAccountId}
order by upd.create_time desc
limit #{pageNo}, #{pageSize}
</select>
<select
id=
"detailPointCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM user_points_details upd
INNER JOIN user_account ua ON upd.user_account_id = ua.id
WHERE ua.`disable` = 0
AND upd.user_account_id = #{userAccountId}
</select>
<select
id=
"appDetailPoint"
resultMap=
"detailPointList"
>
SELECT upd.id,
upd.user_account_id,
upd.point,
upd.point_source,
upd.create_time,
upd.update_time,
upd.time_of_release,
ua.nick_name,
ua.phone_num
FROM user_points_details upd
INNER JOIN user_account ua ON upd.user_account_id = ua.id
WHERE ua.`disable` = 0
AND upd.user_account_id = #{userAccountId}
order by upd.create_time desc
limit #{pageNo}, #{pageSize}
</select>
<select
id=
"appDetailPointCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM user_points_details upd
INNER JOIN user_account ua ON upd.user_account_id = ua.id
WHERE ua.`disable` = 0
AND upd.user_account_id = #{userAccountId}
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论