Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
1fc880d9
Commit
1fc880d9
authored
Mar 02, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户相关接口, 登陆接口
parent
69543e53
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
388 additions
and
339 deletions
+388
-339
common/src/main/java/com/sien/common/controller/AppSmsController.java
+0
-1
common/src/main/java/com/sien/common/controller/AppUserController.java
+22
-4
common/src/main/java/com/sien/common/controller/DonationAgentController.java
+55
-70
common/src/main/java/com/sien/common/controller/DonationRecordController.java
+54
-69
common/src/main/java/com/sien/common/controller/VipRecordController.java
+55
-70
common/src/main/java/com/sien/common/mapper/DonationRecordMapper.java
+14
-7
common/src/main/java/com/sien/common/param/app/AppSmsRegisterParam.java
+3
-0
common/src/main/java/com/sien/common/param/app/AppUserInfoParam.java
+24
-6
common/src/main/java/com/sien/common/push/umeng/Demo.java
+21
-21
common/src/main/java/com/sien/common/service/AppUserService.java
+8
-1
common/src/main/java/com/sien/common/service/DonationRecordService.java
+12
-2
common/src/main/java/com/sien/common/service/impl/AppSmsServiceImpl.java
+1
-2
common/src/main/java/com/sien/common/service/impl/AppUserServiceImpl.java
+9
-2
common/src/main/java/com/sien/common/service/impl/DonationRecordServiceImpl.java
+32
-26
common/src/main/java/com/sien/common/vo/AppUserQueryVo.java
+4
-24
common/src/main/java/com/sien/common/vo/DonationRankAndTotal.java
+17
-0
common/src/main/java/com/sien/common/vo/app/LoginAppUserTokenVo.java
+41
-18
common/src/main/resources/mapper/DonationRecordMapper.xml
+13
-2
config/src/main/resources/config/application.yml
+3
-14
No files found.
common/src/main/java/com/sien/common/controller/AppSmsController.java
View file @
1fc880d9
...
...
@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
*/
@Slf4j
@RestController
//@Module("api-app")
@Api
(
value
=
"短信验证码"
,
tags
=
{
"APP短信验证码相关"
})
@RequestMapping
(
"/sms"
)
public
class
AppSmsController
extends
BaseController
{
...
...
common/src/main/java/com/sien/common/controller/AppUserController.java
View file @
1fc880d9
...
...
@@ -4,6 +4,8 @@ import com.sien.common.param.app.AppSmsRegisterParam;
import
com.sien.common.param.app.AppUserInfoParam
;
import
com.sien.common.param.app.AppUserPhoneUpdateParam
;
import
com.sien.common.service.AppUserApiService
;
import
com.sien.common.service.AppUserService
;
import
com.sien.common.vo.AppUserQueryVo
;
import
com.sien.common.vo.app.LoginAppUserTokenVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
...
...
@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
...
...
@@ -34,12 +37,25 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/user"
)
public
class
AppUserController
extends
BaseController
{
//
@Autowired
//
private AppUserService appUserService;
@Autowired
private
AppUserService
appUserService
;
@Autowired
private
AppUserApiService
appUserApiService
;
/**
* 获取自己的信息详情
*/
@GetMapping
(
"/myInfo/"
)
@OperationLog
(
name
=
"APP用户详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"APP用户详情"
,
response
=
AppUserQueryVo
.
class
)
public
ApiResult
<
AppUserQueryVo
>
getAppUser
()
throws
Exception
{
AppUserQueryVo
appUserQueryVo
=
appUserService
.
getMyInfo
();
return
ApiResult
.
ok
(
appUserQueryVo
);
}
@PostMapping
(
"/registerOrLogin"
)
@ApiOperation
(
value
=
"手机号注册+登陆"
,
notes
=
"app用户注册+登陆"
,
response
=
LoginAppUserTokenVo
.
class
)
public
ApiResult
<
LoginAppUserTokenVo
>
registerOrLogin
(
@Validated
@RequestBody
AppSmsRegisterParam
appSmsRegisterParam
,
@RequestHeader
(
required
=
false
)
String
language
)
throws
Exception
{
...
...
@@ -140,9 +156,11 @@ public class AppUserController extends BaseController {
return ApiResult.result(flag);
}
*//**
*/
/**
* 获取APP用户详情
*//*
*/
/*
@GetMapping("/info/{id}")
@OperationLog(name = "APP用户详情", type = OperationLogType.INFO)
@ApiOperation(value = "APP用户详情", response = AppUserQueryVo.class)
...
...
common/src/main/java/com/sien/common/controller/DonationAgentController.java
View file @
1fc880d9
package
com
.
sien
.
common
.
controller
;
import
com.sien.common.entity.DonationAgent
;
import
com.sien.common.param.DonationAgentPageParam
;
import
com.sien.common.service.DonationAgentService
;
import
com.sien.common.vo.DonationAgentQueryVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
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
;
...
...
@@ -37,61 +22,61 @@ public class DonationAgentController extends BaseController {
@Autowired
private
DonationAgentService
donationAgentService
;
/**
* 添加替他人捐款记录表
*/
@PostMapping
(
"/add"
)
@OperationLog
(
name
=
"添加替他人捐款记录表"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"添加替他人捐款记录表"
)
public
ApiResult
<
Boolean
>
addDonationAgent
(
@Validated
(
Add
.
class
)
@RequestBody
DonationAgent
donationAgent
)
throws
Exception
{
boolean
flag
=
donationAgentService
.
saveDonationAgent
(
donationAgent
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改替他人捐款记录表
*/
@PostMapping
(
"/update"
)
@OperationLog
(
name
=
"修改替他人捐款记录表"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改替他人捐款记录表"
)
public
ApiResult
<
Boolean
>
updateDonationAgent
(
@Validated
(
Update
.
class
)
@RequestBody
DonationAgent
donationAgent
)
throws
Exception
{
boolean
flag
=
donationAgentService
.
updateDonationAgent
(
donationAgent
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除替他人捐款记录表
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除替他人捐款记录表"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除替他人捐款记录表"
)
public
ApiResult
<
Boolean
>
deleteDonationAgent
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
donationAgentService
.
deleteDonationAgent
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取替他人捐款记录表详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"替他人捐款记录表详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"替他人捐款记录表详情"
)
public
ApiResult
<
DonationAgentQueryVo
>
getDonationAgent
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
DonationAgentQueryVo
donationAgentQueryVo
=
donationAgentService
.
getDonationAgentById
(
id
);
return
ApiResult
.
ok
(
donationAgentQueryVo
);
}
/**
* 替他人捐款记录表分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"替他人捐款记录表分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"替他人捐款记录表分页列表"
)
public
ApiResult
<
Paging
<
DonationAgentQueryVo
>>
getDonationAgentPageList
(
@Validated
@RequestBody
DonationAgentPageParam
donationAgentPageParam
)
throws
Exception
{
Paging
<
DonationAgentQueryVo
>
paging
=
donationAgentService
.
getDonationAgentPageList
(
donationAgentPageParam
);
return
ApiResult
.
ok
(
paging
);
}
//
//
/**
//
* 添加替他人捐款记录表
//
*/
//
@PostMapping("/add")
//
@OperationLog(name = "添加替他人捐款记录表", type = OperationLogType.ADD)
//
@ApiOperation(value = "添加替他人捐款记录表")
//
public ApiResult<Boolean> addDonationAgent(@Validated(Add.class) @RequestBody DonationAgent donationAgent) throws Exception {
//
boolean flag = donationAgentService.saveDonationAgent(donationAgent);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 修改替他人捐款记录表
//
*/
//
@PostMapping("/update")
//
@OperationLog(name = "修改替他人捐款记录表", type = OperationLogType.UPDATE)
//
@ApiOperation(value = "修改替他人捐款记录表")
//
public ApiResult<Boolean> updateDonationAgent(@Validated(Update.class) @RequestBody DonationAgent donationAgent)throws Exception{
//
boolean flag= donationAgentService.updateDonationAgent(donationAgent);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 删除替他人捐款记录表
//
*/
//
@PostMapping("/delete/{id}")
//
@OperationLog(name = "删除替他人捐款记录表", type = OperationLogType.DELETE)
//
@ApiOperation(value = "删除替他人捐款记录表")
//
public ApiResult<Boolean> deleteDonationAgent(@PathVariable("id") Long id)throws Exception{
//
boolean flag= donationAgentService.deleteDonationAgent(id);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 获取替他人捐款记录表详情
//
*/
//
@GetMapping("/info/{id}")
//
@OperationLog(name = "替他人捐款记录表详情", type = OperationLogType.INFO)
//
@ApiOperation(value = "替他人捐款记录表详情")
//
public ApiResult<DonationAgentQueryVo> getDonationAgent(@PathVariable("id") Long id)throws Exception{
//
DonationAgentQueryVo donationAgentQueryVo = donationAgentService.getDonationAgentById(id);
//
return ApiResult.ok(donationAgentQueryVo);
//
}
//
//
/**
//
* 替他人捐款记录表分页列表
//
*/
//
@PostMapping("/getPageList")
//
@OperationLog(name = "替他人捐款记录表分页列表", type = OperationLogType.PAGE)
//
@ApiOperation(value = "替他人捐款记录表分页列表")
//
public ApiResult<Paging<DonationAgentQueryVo>>getDonationAgentPageList(@Validated @RequestBody DonationAgentPageParam donationAgentPageParam)throws Exception{
//
Paging<DonationAgentQueryVo> paging = donationAgentService.getDonationAgentPageList(donationAgentPageParam);
//
return ApiResult.ok(paging);
//
}
}
common/src/main/java/com/sien/common/controller/DonationRecordController.java
View file @
1fc880d9
package
com
.
sien
.
common
.
controller
;
import
com.sien.common.entity.DonationRecord
;
import
com.sien.common.param.DonationRecordPageParam
;
import
com.sien.common.service.DonationRecordService
;
import
com.sien.common.vo.DonationRecordQueryVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
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
;
...
...
@@ -38,60 +23,60 @@ public class DonationRecordController extends BaseController {
@Autowired
private
DonationRecordService
donationRecordService
;
/**
* 添加捐款记录
*/
@PostMapping
(
"/add"
)
@OperationLog
(
name
=
"添加捐款记录"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"添加捐款记录"
)
public
ApiResult
<
Boolean
>
addDonationRecord
(
@Validated
(
Add
.
class
)
@RequestBody
DonationRecord
donationRecord
)
throws
Exception
{
boolean
flag
=
donationRecordService
.
saveDonationRecord
(
donationRecord
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改捐款记录
*/
@PostMapping
(
"/update"
)
@OperationLog
(
name
=
"修改捐款记录"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改捐款记录"
)
public
ApiResult
<
Boolean
>
updateDonationRecord
(
@Validated
(
Update
.
class
)
@RequestBody
DonationRecord
donationRecord
)
throws
Exception
{
boolean
flag
=
donationRecordService
.
updateDonationRecord
(
donationRecord
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除捐款记录
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除捐款记录"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除捐款记录"
)
public
ApiResult
<
Boolean
>
deleteDonationRecord
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
donationRecordService
.
deleteDonationRecord
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取捐款记录详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"捐款记录详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"捐款记录详情"
)
public
ApiResult
<
DonationRecordQueryVo
>
getDonationRecord
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
DonationRecordQueryVo
donationRecordQueryVo
=
donationRecordService
.
getDonationRecordById
(
id
);
return
ApiResult
.
ok
(
donationRecordQueryVo
);
}
// /**
// * 添加捐款记录
// */
// @PostMapping("/add")
// @OperationLog(name = "添加捐款记录", type = OperationLogType.ADD)
// @ApiOperation(value = "添加捐款记录")
// public ApiResult<Boolean> addDonationRecord(@Validated(Add.class) @RequestBody DonationRecord donationRecord)throws Exception{
// boolean flag= donationRecordService.saveDonationRecord(donationRecord);
// return ApiResult.result(flag);
// }
/**
* 捐款记录分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"捐款记录分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"捐款记录分页列表"
)
public
ApiResult
<
Paging
<
DonationRecordQueryVo
>>
getDonationRecordPageList
(
@Validated
@RequestBody
DonationRecordPageParam
donationRecordPageParam
)
throws
Exception
{
Paging
<
DonationRecordQueryVo
>
paging
=
donationRecordService
.
getDonationRecordPageList
(
donationRecordPageParam
);
return
ApiResult
.
ok
(
paging
);
}
// /**
// * 修改捐款记录
// */
// @PostMapping("/update")
// @OperationLog(name = "修改捐款记录", type = OperationLogType.UPDATE)
// @ApiOperation(value = "修改捐款记录")
// public ApiResult<Boolean> updateDonationRecord(@Validated(Update.class) @RequestBody DonationRecord donationRecord)throws Exception{
// boolean flag= donationRecordService.updateDonationRecord(donationRecord);
// return ApiResult.result(flag);
// }
//
// /**
// * 删除捐款记录
// */
// @PostMapping("/delete/{id}")
// @OperationLog(name = "删除捐款记录", type = OperationLogType.DELETE)
// @ApiOperation(value = "删除捐款记录")
// public ApiResult<Boolean> deleteDonationRecord(@PathVariable("id") Long id)throws Exception{
// boolean flag= donationRecordService.deleteDonationRecord(id);
// return ApiResult.result(flag);
// }
//
// /**
// * 获取捐款记录详情
// */
// @GetMapping("/info/{id}")
// @OperationLog(name = "捐款记录详情", type = OperationLogType.INFO)
// @ApiOperation(value = "捐款记录详情")
// public ApiResult<DonationRecordQueryVo> getDonationRecord(@PathVariable("id") Long id)throws Exception{
// DonationRecordQueryVo donationRecordQueryVo = donationRecordService.getDonationRecordById(id);
// return ApiResult.ok(donationRecordQueryVo);
// }
//
// /**
// * 捐款记录分页列表
// */
// @PostMapping("/getPageList")
// @OperationLog(name = "捐款记录分页列表", type = OperationLogType.PAGE)
// @ApiOperation(value = "捐款记录分页列表")
// public ApiResult<Paging<DonationRecordQueryVo>>getDonationRecordPageList(@Validated @RequestBody DonationRecordPageParam donationRecordPageParam)throws Exception{
// Paging<DonationRecordQueryVo> paging = donationRecordService.getDonationRecordPageList(donationRecordPageParam);
// return ApiResult.ok(paging);
// }
}
}
common/src/main/java/com/sien/common/controller/VipRecordController.java
View file @
1fc880d9
package
com
.
sien
.
common
.
controller
;
import
com.sien.common.entity.VipRecord
;
import
com.sien.common.param.VipRecordPageParam
;
import
com.sien.common.vo.VipRecordQueryVo
;
import
com.sien.common.service.VipRecordService
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
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
;
...
...
@@ -38,60 +23,60 @@ public class VipRecordController extends BaseController {
@Autowired
private
VipRecordService
vipRecordService
;
/**
* 添加Vip开通记录
*/
@PostMapping
(
"/add"
)
@OperationLog
(
name
=
"添加Vip开通记录"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"添加Vip开通记录"
)
public
ApiResult
<
Boolean
>
addVipRecord
(
@Validated
(
Add
.
class
)
@RequestBody
VipRecord
vipRecord
)
throws
Exception
{
boolean
flag
=
vipRecordService
.
saveVipRecord
(
vipRecord
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改Vip开通记录
*/
@PostMapping
(
"/update"
)
@OperationLog
(
name
=
"修改Vip开通记录"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改Vip开通记录"
)
public
ApiResult
<
Boolean
>
updateVipRecord
(
@Validated
(
Update
.
class
)
@RequestBody
VipRecord
vipRecord
)
throws
Exception
{
boolean
flag
=
vipRecordService
.
updateVipRecord
(
vipRecord
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除Vip开通记录
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除Vip开通记录"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除Vip开通记录"
)
public
ApiResult
<
Boolean
>
deleteVipRecord
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
vipRecordService
.
deleteVipRecord
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取Vip开通记录详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"Vip开通记录详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"Vip开通记录详情"
)
public
ApiResult
<
VipRecordQueryVo
>
getVipRecord
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
VipRecordQueryVo
vipRecordQueryVo
=
vipRecordService
.
getVipRecordById
(
id
);
return
ApiResult
.
ok
(
vipRecordQueryVo
);
}
/**
* Vip开通记录分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"Vip开通记录分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"Vip开通记录分页列表"
)
public
ApiResult
<
Paging
<
VipRecordQueryVo
>>
getVipRecordPageList
(
@Validated
@RequestBody
VipRecordPageParam
vipRecordPageParam
)
throws
Exception
{
Paging
<
VipRecordQueryVo
>
paging
=
vipRecordService
.
getVipRecordPageList
(
vipRecordPageParam
);
return
ApiResult
.
ok
(
paging
);
}
//
/**
//
* 添加Vip开通记录
//
*/
//
@PostMapping("/add")
//
@OperationLog(name = "添加Vip开通记录", type = OperationLogType.ADD)
//
@ApiOperation(value = "添加Vip开通记录")
//
public ApiResult<Boolean> addVipRecord(@Validated(Add.class) @RequestBody VipRecord vipRecord)throws Exception{
//
boolean flag= vipRecordService.saveVipRecord(vipRecord);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 修改Vip开通记录
//
*/
//
@PostMapping("/update")
//
@OperationLog(name = "修改Vip开通记录", type = OperationLogType.UPDATE)
//
@ApiOperation(value = "修改Vip开通记录")
//
public ApiResult<Boolean> updateVipRecord(@Validated(Update.class) @RequestBody VipRecord vipRecord)throws Exception{
//
boolean flag= vipRecordService.updateVipRecord(vipRecord);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 删除Vip开通记录
//
*/
//
@PostMapping("/delete/{id}")
//
@OperationLog(name = "删除Vip开通记录", type = OperationLogType.DELETE)
//
@ApiOperation(value = "删除Vip开通记录")
//
public ApiResult<Boolean> deleteVipRecord(@PathVariable("id") Long id)throws Exception{
//
boolean flag= vipRecordService.deleteVipRecord(id);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 获取Vip开通记录详情
//
*/
//
@GetMapping("/info/{id}")
//
@OperationLog(name = "Vip开通记录详情", type = OperationLogType.INFO)
//
@ApiOperation(value = "Vip开通记录详情")
//
public ApiResult<VipRecordQueryVo> getVipRecord(@PathVariable("id") Long id)throws Exception{
//
VipRecordQueryVo vipRecordQueryVo = vipRecordService.getVipRecordById(id);
//
return ApiResult.ok(vipRecordQueryVo);
//
}
//
//
/**
//
* Vip开通记录分页列表
//
*/
//
@PostMapping("/getPageList")
//
@OperationLog(name = "Vip开通记录分页列表", type = OperationLogType.PAGE)
//
@ApiOperation(value = "Vip开通记录分页列表")
//
public ApiResult<Paging<VipRecordQueryVo>>getVipRecordPageList(@Validated @RequestBody VipRecordPageParam vipRecordPageParam)throws Exception{
//
Paging<VipRecordQueryVo> paging = vipRecordService.getVipRecordPageList(vipRecordPageParam);
//
return ApiResult.ok(paging);
//
}
}
}
common/src/main/java/com/sien/common/mapper/DonationRecordMapper.java
View file @
1fc880d9
package
com
.
sien
.
common
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sien.common.entity.DonationRecord
;
import
com.sien.common.param.DonationRecordPageParam
;
import
com.sien.common.vo.DonationRankAndTotal
;
import
com.sien.common.vo.DonationRecordQueryVo
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.io.Serializable
;
...
...
@@ -37,6 +36,14 @@ public interface DonationRecordMapper extends BaseMapper<DonationRecord> {
* @param donationRecordPageParam
* @return
*/
IPage
<
DonationRecordQueryVo
>
getDonationRecordPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
DonationRecordPageParam
donationRecordPageParam
);
IPage
<
DonationRecordQueryVo
>
getDonationRecordPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
DonationRecordPageParam
donationRecordPageParam
);
}
/**
* 查询捐款排名
*
* @param userId
* @return
*/
DonationRankAndTotal
getDonationRankAndTotal
(
@Param
(
"userId"
)
Long
userId
);
}
common/src/main/java/com/sien/common/param/app/AppSmsRegisterParam.java
View file @
1fc880d9
...
...
@@ -46,4 +46,7 @@ public class AppSmsRegisterParam implements Serializable {
@ApiModelProperty
(
value
=
"微信id"
,
example
=
"adfadlsfadsf"
,
required
=
false
)
private
String
openid
;
@ApiModelProperty
(
"姓名"
)
private
String
nickname
;
}
common/src/main/java/com/sien/common/param/app/AppUserInfoParam.java
View file @
1fc880d9
...
...
@@ -19,18 +19,39 @@ import lombok.experimental.Accessors;
@ApiModel
(
value
=
"AppUserInfoParam对象"
)
public
class
AppUserInfoParam
extends
BaseEntity
{
@ApiModelProperty
(
"用户名"
)
private
String
username
;
@ApiModelProperty
(
"微信id"
)
private
String
wechatOpenId
;
@ApiModelProperty
(
"姓名"
)
private
String
nickname
;
@ApiModelProperty
(
"性别,0:女,1:男,默认1"
)
private
Integer
gender
;
@ApiModelProperty
(
"证件号码"
)
private
String
idcard
;
@ApiModelProperty
(
"民族"
)
private
String
nation
;
@ApiModelProperty
(
"手机号码"
)
private
String
phone
;
@ApiModelProperty
(
"手机区号"
)
private
String
phoneArea
;
@ApiModelProperty
(
"性别,0:女,1:男,默认1"
)
private
Integer
gender
;
@ApiModelProperty
(
"头像"
)
private
String
head
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"状态,0:禁用,1:启用,2:锁定"
)
private
Integer
state
;
@ApiModelProperty
(
"出生日期"
)
private
String
dateOfBirth
;
...
...
@@ -55,7 +76,4 @@ public class AppUserInfoParam extends BaseEntity {
@ApiModelProperty
(
"紧急电话"
)
private
String
emergencyPhone
;
@ApiModelProperty
(
"头像"
)
private
String
head
;
}
common/src/main/java/com/sien/common/push/umeng/Demo.java
View file @
1fc880d9
...
...
@@ -39,13 +39,13 @@ public class Demo {
// App Master Secret
// ti5gomxtvmkgehmwgtbq9rtsfhy0khsi
// TODO
set your appkey and master secret here
//
set your appkey and master secret here
// Demo demo = new Demo("your appkey", "your master secret");
Demo
demo
=
new
Demo
(
"5f963f3ea1491772a2aef713"
,
"ti5gomxtvmkgehmwgtbq9rtsfhy0khsi"
);
try
{
demo
.
sendAndroidUnicast
(
"As3YYnUpKwDLFVzc35_syVTNSctGjkDNfFLwPHGbXtm_"
);
//demo.sendIOSUnicast();
/* TODO
these methods are all available, just fill in some fields and do the test
/*
these methods are all available, just fill in some fields and do the test
* demo.sendAndroidCustomizedcastFile();
* demo.sendAndroidBroadcast();
* demo.sendAndroidGroupcast();
...
...
@@ -70,7 +70,7 @@ public class Demo {
broadcast
.
setText
(
"Android broadcast text"
);
broadcast
.
goAppAfterOpen
();
broadcast
.
setDisplayType
(
AndroidNotification
.
DisplayType
.
NOTIFICATION
);
// TODO
Set 'production_mode' to 'false' if it's a test device.
//
Set 'production_mode' to 'false' if it's a test device.
// For how to register a test device, please see the developer doc.
broadcast
.
setProductionMode
();
// Set customized fields
...
...
@@ -88,14 +88,14 @@ public class Demo {
*/
public
void
sendAndroidUnicast
(
String
token
)
throws
Exception
{
AndroidUnicast
unicast
=
new
AndroidUnicast
(
appkey
,
appMasterSecret
);
// TODO
Set your device token
//
Set your device token
unicast
.
setDeviceToken
(
token
);
unicast
.
setTicker
(
"Android unicast ticker"
);
unicast
.
setTitle
(
"api 中文的title"
);
unicast
.
setText
(
"Android unicast text"
);
unicast
.
goAppAfterOpen
();
unicast
.
setDisplayType
(
AndroidNotification
.
DisplayType
.
NOTIFICATION
);
// TODO
Set 'production_mode' to 'false' if it's a test device.
//
Set 'production_mode' to 'false' if it's a test device.
// For how to register a test device, please see the developer doc.
unicast
.
setProductionMode
();
// Set customized fields
...
...
@@ -107,7 +107,7 @@ public class Demo {
public
void
sendAndroidGroupcast
()
throws
Exception
{
AndroidGroupcast
groupcast
=
new
AndroidGroupcast
(
appkey
,
appMasterSecret
);
/* TODO
/*
* Construct the filter condition:
* "where":
* {
...
...
@@ -137,7 +137,7 @@ public class Demo {
groupcast
.
goAppAfterOpen
();
groupcast
.
setDisplayType
(
AndroidNotification
.
DisplayType
.
NOTIFICATION
);
groupcast
.
setChannelActivity
(
"your channel activity"
);
// TODO
Set 'production_mode' to 'false' if it's a test device.
//
Set 'production_mode' to 'false' if it's a test device.
// For how to register a test device, please see the developer doc.
groupcast
.
setProductionMode
();
//厂商通道相关参数
...
...
@@ -148,7 +148,7 @@ public class Demo {
public
void
sendAndroidCustomizedcast
()
throws
Exception
{
AndroidCustomizedcast
customizedcast
=
new
AndroidCustomizedcast
(
appkey
,
appMasterSecret
);
// TODO
Set your alias here, and use comma to split them if there are multiple alias.
//
Set your alias here, and use comma to split them if there are multiple alias.
// And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification.
customizedcast
.
setAlias
(
"alias"
,
"alias_type"
);
...
...
@@ -157,7 +157,7 @@ public class Demo {
customizedcast
.
setText
(
"Android customizedcast text"
);
customizedcast
.
goAppAfterOpen
();
customizedcast
.
setDisplayType
(
AndroidNotification
.
DisplayType
.
NOTIFICATION
);
// TODO
Set 'production_mode' to 'false' if it's a test device.
//
Set 'production_mode' to 'false' if it's a test device.
// For how to register a test device, please see the developer doc.
customizedcast
.
setProductionMode
();
//厂商通道相关参数
...
...
@@ -168,7 +168,7 @@ public class Demo {
public
void
sendAndroidCustomizedcastFile
()
throws
Exception
{
AndroidCustomizedcast
customizedcast
=
new
AndroidCustomizedcast
(
appkey
,
appMasterSecret
);
// TODO
Set your alias here, and use comma to split them if there are multiple alias.
//
Set your alias here, and use comma to split them if there are multiple alias.
// And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification.
String
fileId
=
client
.
uploadContents
(
appkey
,
appMasterSecret
,
"aa"
+
"\n"
+
"bb"
+
"\n"
+
"alias"
);
...
...
@@ -178,7 +178,7 @@ public class Demo {
customizedcast
.
setText
(
"Android customizedcast text"
);
customizedcast
.
goAppAfterOpen
();
customizedcast
.
setDisplayType
(
AndroidNotification
.
DisplayType
.
NOTIFICATION
);
// TODO
Set 'production_mode' to 'false' if it's a test device.
//
Set 'production_mode' to 'false' if it's a test device.
// For how to register a test device, please see the developer doc.
customizedcast
.
setProductionMode
();
//厂商通道相关参数
...
...
@@ -189,7 +189,7 @@ public class Demo {
public
void
sendAndroidFilecast
()
throws
Exception
{
AndroidFilecast
filecast
=
new
AndroidFilecast
(
appkey
,
appMasterSecret
);
// TODO
upload your device tokens, and use '\n' to split them if there are multiple tokens
//
upload your device tokens, and use '\n' to split them if there are multiple tokens
String
fileId
=
client
.
uploadContents
(
appkey
,
appMasterSecret
,
"aa"
+
"\n"
+
"bb"
);
filecast
.
setFileId
(
fileId
);
filecast
.
setTicker
(
"Android filecast ticker"
);
...
...
@@ -211,7 +211,7 @@ public class Demo {
broadcast
.
setAlert
(
"今日天气"
,
""
,
"今日可能下雨🌂"
);
broadcast
.
setBadge
(
0
);
broadcast
.
setSound
(
"default"
);
// TODO
set 'production_mode' to 'true' if your app is under production mode
//
set 'production_mode' to 'true' if your app is under production mode
broadcast
.
setTestMode
();
// Set customized fields
broadcast
.
setCustomizedField
(
"test"
,
"helloworld"
);
...
...
@@ -220,7 +220,7 @@ public class Demo {
public
void
sendIOSUnicast
()
throws
Exception
{
IOSUnicast
unicast
=
new
IOSUnicast
(
appkey
,
appMasterSecret
);
// TODO
Set your device token
//
Set your device token
unicast
.
setDeviceToken
(
"your device_token"
);
//alert值设置为字符串
//unicast.setAlert("IOS 单播测试");
...
...
@@ -228,7 +228,7 @@ public class Demo {
unicast
.
setAlert
(
"今日天气"
,
""
,
"今日可能下雨🌂"
);
unicast
.
setBadge
(
0
);
unicast
.
setSound
(
"default"
);
// TODO
set 'production_mode' to 'true' if your app is under production mode
//
set 'production_mode' to 'true' if your app is under production mode
unicast
.
setTestMode
();
// Set customized fields
unicast
.
setCustomizedField
(
"test"
,
"helloworld"
);
...
...
@@ -237,7 +237,7 @@ public class Demo {
public
void
sendIOSGroupcast
()
throws
Exception
{
IOSGroupcast
groupcast
=
new
IOSGroupcast
(
appkey
,
appMasterSecret
);
/* TODO
/*
* Construct the filter condition:
* "where":
* {
...
...
@@ -264,14 +264,14 @@ public class Demo {
groupcast
.
setAlert
(
"今日天气"
,
"subtitle"
,
"今日可能下雨🌂"
);
groupcast
.
setBadge
(
0
);
groupcast
.
setSound
(
"default"
);
// TODO
set 'production_mode' to 'true' if your app is under production mode
//
set 'production_mode' to 'true' if your app is under production mode
groupcast
.
setTestMode
();
client
.
send
(
groupcast
);
}
public
void
sendIOSCustomizedcast
()
throws
Exception
{
IOSCustomizedcast
customizedcast
=
new
IOSCustomizedcast
(
appkey
,
appMasterSecret
);
// TODO
Set your alias and alias_type here, and use comma to split them if there are multiple alias.
//
Set your alias and alias_type here, and use comma to split them if there are multiple alias.
// And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification.
customizedcast
.
setAlias
(
"alias"
,
"alias_type"
);
...
...
@@ -280,14 +280,14 @@ public class Demo {
customizedcast
.
setAlert
(
"今日天气"
,
""
,
"今日可能下雨🌂"
);
customizedcast
.
setBadge
(
0
);
customizedcast
.
setSound
(
"default"
);
// TODO
set 'production_mode' to 'true' if your app is under production mode
//
set 'production_mode' to 'true' if your app is under production mode
customizedcast
.
setTestMode
();
client
.
send
(
customizedcast
);
}
public
void
sendIOSFilecast
()
throws
Exception
{
IOSFilecast
filecast
=
new
IOSFilecast
(
appkey
,
appMasterSecret
);
// TODO
upload your device tokens, and use '\n' to split them if there are multiple tokens
//
upload your device tokens, and use '\n' to split them if there are multiple tokens
String
fileId
=
client
.
uploadContents
(
appkey
,
appMasterSecret
,
"aa"
+
"\n"
+
"bb"
);
filecast
.
setFileId
(
fileId
);
//filecast.setAlert("IOS 文件播测试");
...
...
@@ -295,7 +295,7 @@ public class Demo {
filecast
.
setAlert
(
"今日天气"
,
""
,
"今日可能下雨🌂"
);
filecast
.
setBadge
(
0
);
filecast
.
setSound
(
"default"
);
// TODO
set 'production_mode' to 'true' if your app is under production mode
//
set 'production_mode' to 'true' if your app is under production mode
filecast
.
setTestMode
();
client
.
send
(
filecast
);
}
...
...
common/src/main/java/com/sien/common/service/AppUserService.java
View file @
1fc880d9
...
...
@@ -2,9 +2,9 @@ package com.sien.common.service;
import
com.sien.common.entity.AppUser
;
import
com.sien.common.param.AppUserPageParam
;
import
com.sien.common.vo.AppUserQueryVo
;
import
com.sien.common.param.app.AppSmsRegisterParam
;
import
com.sien.common.param.app.DeviceTokenParam
;
import
com.sien.common.vo.AppUserQueryVo
;
import
com.sien.common.vo.app.LoginAppUserTokenVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
...
...
@@ -93,6 +93,13 @@ public interface AppUserService extends BaseService<AppUser> {
*/
AppUserQueryVo
getAppUserById
(
Long
id
)
throws
Exception
;
/**
* 获取自己的信息详情
*/
AppUserQueryVo
getMyInfo
()
throws
Exception
;
/**
* 获取分页对象
*
...
...
common/src/main/java/com/sien/common/service/DonationRecordService.java
View file @
1fc880d9
...
...
@@ -2,8 +2,9 @@ package com.sien.common.service;
import
com.sien.common.entity.DonationRecord
;
import
com.sien.common.param.DonationRecordPageParam
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
import
com.sien.common.vo.DonationRankAndTotal
;
import
com.sien.common.vo.DonationRecordQueryVo
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
/**
...
...
@@ -14,6 +15,15 @@ import io.geekidea.springbootplus.framework.core.pagination.Paging;
*/
public
interface
DonationRecordService
extends
BaseService
<
DonationRecord
>
{
/**
* 查询捐款排名和总捐款
*
* @param userId
* @return
*/
DonationRankAndTotal
getDonationRankAndTotal
(
Long
userId
);
/**
* 保存
*
...
...
@@ -21,7 +31,7 @@ public interface DonationRecordService extends BaseService<DonationRecord> {
* @return
* @throws Exception
*/
boolean
saveDonationRecord
(
DonationRecord
donationRecord
)
throws
Exception
;
boolean
saveDonationRecord
(
DonationRecord
donationRecord
)
throws
Exception
;
/**
* 修改
...
...
common/src/main/java/com/sien/common/service/impl/AppSmsServiceImpl.java
View file @
1fc880d9
...
...
@@ -93,9 +93,8 @@ public class AppSmsServiceImpl implements AppSmsService {
// 过期时间(秒)
long
expire
=
120L
;
Duration
expireDuration
=
Duration
.
ofSeconds
(
expire
);
// 存至redis
redisTemplate
.
opsForValue
().
set
(
key
,
randomCode
,
expireDuration
);
SmsCode
smsCode
=
new
SmsCode
();
...
...
common/src/main/java/com/sien/common/service/impl/AppUserServiceImpl.java
View file @
1fc880d9
...
...
@@ -8,10 +8,10 @@ import com.sien.common.entity.AppUser;
import
com.sien.common.enums.StateEnum
;
import
com.sien.common.mapper.AppUserMapper
;
import
com.sien.common.param.AppUserPageParam
;
import
com.sien.common.vo.AppUserQueryVo
;
import
com.sien.common.param.app.AppSmsRegisterParam
;
import
com.sien.common.param.app.DeviceTokenParam
;
import
com.sien.common.service.AppUserService
;
import
com.sien.common.vo.AppUserQueryVo
;
import
com.sien.common.vo.app.LoginAppUserTokenVo
;
import
io.geekidea.springbootplus.config.properties.JwtProperties
;
import
io.geekidea.springbootplus.config.properties.SpringBootPlusProperties
;
...
...
@@ -143,7 +143,7 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser>
LoginAppUserTokenVo
loginAppUserTokenVo
=
new
LoginAppUserTokenVo
();
BeanUtils
.
copyProperties
(
appUser
,
loginAppUserTokenVo
);
loginAppUserTokenVo
.
setToken
(
token
);
loginAppUserTokenVo
.
setId
(
appUser
.
getId
());
//
loginAppUserTokenVo.setId(appUser.getId());
loginAppUserTokenVo
.
setHasRegister
(
hasRegister
);
return
ApiResult
.
ok
(
loginAppUserTokenVo
);
...
...
@@ -191,6 +191,13 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser>
}
@Override
public
AppUserQueryVo
getMyInfo
()
throws
Exception
{
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
AppUserQueryVo
appUserById
=
appUserMapper
.
getAppUserById
(
jwtToken
.
getUserId
());
return
appUserById
;
}
@Override
public
Paging
<
AppUserQueryVo
>
getAppUserPageList
(
AppUserPageParam
appUserPageParam
)
throws
Exception
{
Page
<
AppUserQueryVo
>
page
=
new
PageInfo
<>(
appUserPageParam
,
OrderItem
.
desc
(
getLambdaColumn
(
AppUser:
:
getCreateTime
)));
IPage
<
AppUserQueryVo
>
iPage
=
appUserMapper
.
getAppUserPageList
(
page
,
appUserPageParam
);
...
...
common/src/main/java/com/sien/common/service/impl/DonationRecordServiceImpl.java
View file @
1fc880d9
package
com
.
sien
.
common
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sien.common.entity.DonationRecord
;
import
com.sien.common.mapper.DonationRecordMapper
;
import
com.sien.common.param.DonationRecordPageParam
;
import
com.sien.common.service.DonationRecordService
;
import
com.sien.common.param.DonationRecordPageParam
;
import
com.sien.common.vo.DonationRecordQueryVo
;
import
com.sien.common.vo.DonationRankAndTotal
;
import
com.sien.common.vo.DonationRecordQueryVo
;
import
io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.pagination.PageInfo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.springframework.transaction.annotation.Transactional
;
import
io.geekidea.springbootplus.framework.core.pagination.PageInfo
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 捐款记录 服务实现类
...
...
@@ -26,37 +27,42 @@ import org.springframework.beans.factory.annotation.Autowired;
@Service
public
class
DonationRecordServiceImpl
extends
BaseServiceImpl
<
DonationRecordMapper
,
DonationRecord
>
implements
DonationRecordService
{
@Autowired
private
DonationRecordMapper
donationRecordMapper
;
@Autowired
private
DonationRecordMapper
donationRecordMapper
;
@Override
public
DonationRankAndTotal
getDonationRankAndTotal
(
Long
userId
)
{
return
donationRecordMapper
.
getDonationRankAndTotal
(
userId
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveDonationRecord
(
DonationRecord
donationRecord
)
throws
Exception
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveDonationRecord
(
DonationRecord
donationRecord
)
throws
Exception
{
return
super
.
save
(
donationRecord
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
updateDonationRecord
(
DonationRecord
donationRecord
)
throws
Exception
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
updateDonationRecord
(
DonationRecord
donationRecord
)
throws
Exception
{
return
super
.
updateById
(
donationRecord
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
deleteDonationRecord
(
Long
id
)
throws
Exception
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
deleteDonationRecord
(
Long
id
)
throws
Exception
{
return
super
.
removeById
(
id
);
}
@Override
public
DonationRecordQueryVo
getDonationRecordById
(
Long
id
)
throws
Exception
{
public
DonationRecordQueryVo
getDonationRecordById
(
Long
id
)
throws
Exception
{
return
donationRecordMapper
.
getDonationRecordById
(
id
);
}
@Override
public
Paging
<
DonationRecordQueryVo
>
getDonationRecordPageList
(
DonationRecordPageParam
donationRecordPageParam
)
throws
Exception
{
Page
<
DonationRecordQueryVo
>
page
=
new
PageInfo
<>(
donationRecordPageParam
,
OrderItem
.
desc
(
getLambdaColumn
(
DonationRecord:
:
getCreateTime
)));
IPage
<
DonationRecordQueryVo
>
iPage
=
donationRecordMapper
.
getDonationRecordPageList
(
page
,
donationRecordPageParam
);
@Override
public
Paging
<
DonationRecordQueryVo
>
getDonationRecordPageList
(
DonationRecordPageParam
donationRecordPageParam
)
throws
Exception
{
Page
<
DonationRecordQueryVo
>
page
=
new
PageInfo
<>(
donationRecordPageParam
,
OrderItem
.
desc
(
getLambdaColumn
(
DonationRecord:
:
getCreateTime
)));
IPage
<
DonationRecordQueryVo
>
iPage
=
donationRecordMapper
.
getDonationRecordPageList
(
page
,
donationRecordPageParam
);
return
new
Paging
<
DonationRecordQueryVo
>(
iPage
);
}
}
}
common/src/main/java/com/sien/common/vo/AppUserQueryVo.java
View file @
1fc880d9
...
...
@@ -6,11 +6,10 @@ import lombok.Data;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <pre>
*
系统
用户 查询结果对象
* 用户 查询结果对象
* </pre>
*
* @author hewei
...
...
@@ -20,10 +19,6 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"AppUserQueryVo对象"
)
public
class
AppUserQueryVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键"
)
private
Long
id
;
@ApiModelProperty
(
"用户名"
)
private
String
username
;
...
...
@@ -40,12 +35,6 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty
(
"民族"
)
private
String
nation
;
@ApiModelProperty
(
"密码"
)
private
String
password
;
@ApiModelProperty
(
"盐值"
)
private
String
salt
;
@ApiModelProperty
(
"手机号码"
)
private
String
phone
;
...
...
@@ -64,18 +53,6 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty
(
"状态,0:禁用,1:启用,2:锁定"
)
private
Integer
state
;
@ApiModelProperty
(
"逻辑删除,0:未删除,1:已删除"
)
private
Integer
deleted
;
@ApiModelProperty
(
"版本"
)
private
Integer
version
;
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"出生日期"
)
private
String
dateOfBirth
;
...
...
@@ -99,4 +76,6 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty
(
"紧急电话"
)
private
String
emergencyPhone
;
}
\ No newline at end of file
common/src/main/java/com/sien/common/vo/DonationRankAndTotal.java
0 → 100644
View file @
1fc880d9
package
com
.
sien
.
common
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
@Data
public
class
DonationRankAndTotal
implements
Serializable
{
@ApiModelProperty
(
"总捐款金额"
)
private
BigDecimal
drTotal
;
@ApiModelProperty
(
"排名"
)
private
Long
rank
;
}
common/src/main/java/com/sien/common/vo/app/LoginAppUserTokenVo.java
View file @
1fc880d9
...
...
@@ -34,32 +34,24 @@ public class LoginAppUserTokenVo implements LoginToken {
@ApiModelProperty
(
"token"
)
private
String
token
;
@ApiModelProperty
(
"主键"
)
private
Long
id
;
// @ApiModelProperty("用户名")
// private String username;
@ApiModelProperty
(
"是否已经注册, true = 已经注册, false = 没有注册"
)
private
Boolean
hasRegister
;
@ApiModelProperty
(
"姓"
)
private
String
surname
;
@ApiModelProperty
(
"名"
)
private
String
name
;
@ApiModelProperty
(
"
用户
名"
)
private
String
user
name
;
@ApiModelProperty
(
"
公司名
"
)
private
String
companyName
;
@ApiModelProperty
(
"
微信id
"
)
private
String
wechatOpenId
;
@ApiModelProperty
(
"
微信号
"
)
private
String
wechat
;
@ApiModelProperty
(
"
姓名
"
)
private
String
nickname
;
@ApiModelProperty
(
"
出生日期
"
)
private
String
dateOfBirth
;
@ApiModelProperty
(
"
证件号码
"
)
private
String
idcard
;
// @ApiModelProperty("昵称
")
// private String nickname
;
@ApiModelProperty
(
"民族
"
)
private
String
nation
;
@ApiModelProperty
(
"手机号码"
)
private
String
phone
;
...
...
@@ -72,4 +64,35 @@ public class LoginAppUserTokenVo implements LoginToken {
@ApiModelProperty
(
"头像"
)
private
String
head
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"状态,0:禁用,1:启用,2:锁定"
)
private
Integer
state
;
@ApiModelProperty
(
"出生日期"
)
private
String
dateOfBirth
;
@ApiModelProperty
(
"文化程度"
)
private
String
educationBackground
;
@ApiModelProperty
(
"邮件"
)
private
String
email
;
@ApiModelProperty
(
"省市区"
)
private
String
location
;
@ApiModelProperty
(
"详细地址"
)
private
String
locationDetail
;
@ApiModelProperty
(
"职业"
)
private
String
profession
;
@ApiModelProperty
(
"工作单位"
)
private
String
company
;
@ApiModelProperty
(
"紧急电话"
)
private
String
emergencyPhone
;
}
common/src/main/resources/mapper/DonationRecordMapper.xml
View file @
1fc880d9
...
...
@@ -4,7 +4,8 @@
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, fk_user_id, money, purpose, way, remark, create_time, update_time, is_replace
id
, fk_user_id, money, purpose, way, remark, create_time, update_time, is_replace
</sql>
<select
id=
"getDonationRecordById"
resultType=
"com.sien.common.vo.DonationRecordQueryVo"
>
...
...
@@ -13,10 +14,20 @@
from donation_record where id = #{id}
</select>
<select
id=
"getDonationRecordPageList"
parameterType=
"com.sien.common.param.DonationRecordPageParam"
resultType=
"com.sien.common.vo.DonationRecordQueryVo"
>
<select
id=
"getDonationRecordPageList"
parameterType=
"com.sien.common.param.DonationRecordPageParam"
resultType=
"com.sien.common.vo.DonationRecordQueryVo"
>
select
<include
refid=
"Base_Column_List"
/>
from donation_record
</select>
<select
id=
"getDonationRankAndTotal"
resultType=
"com.sien.common.vo.DonationRankAndTotal"
>
SELECT tb.*,
@curRank := @curRank + 1 AS rank
FROM
( SELECT fk_user_id, sum ( money ) AS dr_total FROM donation_record GROUP BY fk_user_id ORDER BY dr_total DESC ) AS tb,
( SELECT @curRank := 0 ) r
WHERE
fk_user_id = #{userId}
</select>
</mapper>
config/src/main/resources/config/application.yml
View file @
1fc880d9
...
...
@@ -183,11 +183,8 @@ spring-boot-plus:
# 权限配置
anon
:
# 排除登录 注册 登出
-
/app/user/registerOrLogin,/app/user/login
-
/sys/login,/sys/logout,/sys/register
-
/merchant/user/login,/merchant/user/register
-
/app/sms/registerOrLoginCode,/merchant/sms/registerCode
-
/app/versionControl/lastOne/**
-
/user/registerOrLogin,/user/login
-
/sms/registerOrLoginCode
# 排除静态资源
-
/static/**,/templates/**
# 排除Swagger
...
...
@@ -196,15 +193,7 @@ spring-boot-plus:
# - /actuator/**
-
# 排除首页
-
/,/index.html
-
/app/noRole,/merchant/hello/world
# 航空公司介绍分页列表
-
/app/airline/getPageList
# 公务机出售托管表分页列表
-
/app/businessPlain/getPageList
# 包机介绍分页列表
-
/app/charterIntroduction/getPageList
# 优惠调机列表分页查询
-
/app/strokeDiscount/getPageList
# 多行字符串权限配置
filter-chain-definitions
:
|
...
...
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