Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
62ac4dbb
Commit
62ac4dbb
authored
Jul 24, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
c2b06909
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
UserInfoDTO.java
...va/com/github/wxiaoqi/security/admin/dto/UserInfoDTO.java
+40
-0
ActivityFeign.java
.../java/com/xxfc/platform/activity/feign/ActivityFeign.java
+6
-0
IntegralUserTotalBiz.java
.../com/xxfc/platform/activity/biz/IntegralUserTotalBiz.java
+18
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/UserInfoDTO.java
0 → 100644
View file @
62ac4dbb
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 个人中心信息
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-18 19:38:56
*/
@Data
public
class
UserInfoDTO
{
/**
* 可使用优惠卷个数
*/
@ApiModelProperty
(
value
=
"可使用优惠卷个数"
)
private
Long
couponNumber
;
/**
* 总积分
*/
@ApiModelProperty
(
value
=
"总积分"
)
private
Integer
totalPoint
;
/**
* 钱包总额
*/
@ApiModelProperty
(
value
=
"钱包总额"
)
private
Integer
totalWallet
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/feign/ActivityFeign.java
View file @
62ac4dbb
package
com
.
xxfc
.
platform
.
activity
.
feign
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.entity.IntegralUserTotal
;
import
com.xxfc.platform.activity.vo.UserCouponVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -49,4 +51,8 @@ public interface ActivityFeign {
@RequestMapping
(
value
=
"/join/user"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
join
(
@RequestParam
(
value
=
"userId"
,
defaultValue
=
"0"
)
Integer
userId
);
@ApiModelProperty
(
"获取用户积分"
)
@GetMapping
(
value
=
"/user"
)
public
IntegralUserTotal
user
(
@RequestParam
(
"userId"
)
Integer
userId
);
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralUserTotalBiz.java
View file @
62ac4dbb
...
...
@@ -131,5 +131,23 @@ public class IntegralUserTotalBiz extends BaseBiz<IntegralUserTotalMapper, Integ
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
/**
* 获取某个用户的积分信息
* @return
*/
public
IntegralUserTotal
getIntegralByUser
(
Integer
userId
)
{
IntegralUserTotalDto
integralUserTotalDto
=
new
IntegralUserTotalDto
();
integralUserTotalDto
.
setUserId
(
userId
);
List
<
IntegralUserTotal
>
oldValue
=
mapper
.
selectAllByParam
(
integralUserTotalDto
);
if
(
oldValue
==
null
||
oldValue
.
size
()
<=
0
)
{
IntegralUserTotal
integralUserTotal
=
IntegralUserTotal
.
initIntegralUserTotal
();
integralUserTotal
.
setUserId
(
userId
);
insertSelective
(
integralUserTotal
);
return
integralUserTotal
;
}
return
oldValue
.
get
(
0
);
}
}
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