Commit 1fc880d9 by giaogiao

用户相关接口, 登陆接口

parent 69543e53
...@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Slf4j @Slf4j
@RestController @RestController
//@Module("api-app")
@Api(value = "短信验证码", tags = {"APP短信验证码相关"}) @Api(value = "短信验证码", tags = {"APP短信验证码相关"})
@RequestMapping("/sms") @RequestMapping("/sms")
public class AppSmsController extends BaseController { public class AppSmsController extends BaseController {
......
...@@ -4,6 +4,8 @@ import com.sien.common.param.app.AppSmsRegisterParam; ...@@ -4,6 +4,8 @@ import com.sien.common.param.app.AppSmsRegisterParam;
import com.sien.common.param.app.AppUserInfoParam; import com.sien.common.param.app.AppUserInfoParam;
import com.sien.common.param.app.AppUserPhoneUpdateParam; import com.sien.common.param.app.AppUserPhoneUpdateParam;
import com.sien.common.service.AppUserApiService; 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 com.sien.common.vo.app.LoginAppUserTokenVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult; import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController; import io.geekidea.springbootplus.framework.common.controller.BaseController;
...@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; 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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
...@@ -34,12 +37,25 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -34,12 +37,25 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/user") @RequestMapping("/user")
public class AppUserController extends BaseController { public class AppUserController extends BaseController {
// @Autowired @Autowired
// private AppUserService appUserService; private AppUserService appUserService;
@Autowired @Autowired
private AppUserApiService appUserApiService; 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") @PostMapping("/registerOrLogin")
@ApiOperation(value = "手机号注册+登陆", notes = "app用户注册+登陆", response = LoginAppUserTokenVo.class) @ApiOperation(value = "手机号注册+登陆", notes = "app用户注册+登陆", response = LoginAppUserTokenVo.class)
public ApiResult<LoginAppUserTokenVo> registerOrLogin(@Validated @RequestBody AppSmsRegisterParam appSmsRegisterParam, @RequestHeader(required = false) String language) throws Exception { public ApiResult<LoginAppUserTokenVo> registerOrLogin(@Validated @RequestBody AppSmsRegisterParam appSmsRegisterParam, @RequestHeader(required = false) String language) throws Exception {
...@@ -140,9 +156,11 @@ public class AppUserController extends BaseController { ...@@ -140,9 +156,11 @@ public class AppUserController extends BaseController {
return ApiResult.result(flag); return ApiResult.result(flag);
} }
*//** */
/**
* 获取APP用户详情 * 获取APP用户详情
*//* */
/*
@GetMapping("/info/{id}") @GetMapping("/info/{id}")
@OperationLog(name = "APP用户详情", type = OperationLogType.INFO) @OperationLog(name = "APP用户详情", type = OperationLogType.INFO)
@ApiOperation(value = "APP用户详情", response = AppUserQueryVo.class) @ApiOperation(value = "APP用户详情", response = AppUserQueryVo.class)
......
package com.sien.common.controller; 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.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.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.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -37,61 +22,61 @@ public class DonationAgentController extends BaseController { ...@@ -37,61 +22,61 @@ public class DonationAgentController extends BaseController {
@Autowired @Autowired
private DonationAgentService donationAgentService; private DonationAgentService donationAgentService;
//
/** // /**
* 添加替他人捐款记录表 // * 添加替他人捐款记录表
*/ // */
@PostMapping("/add") // @PostMapping("/add")
@OperationLog(name = "添加替他人捐款记录表", type = OperationLogType.ADD) // @OperationLog(name = "添加替他人捐款记录表", type = OperationLogType.ADD)
@ApiOperation(value = "添加替他人捐款记录表") // @ApiOperation(value = "添加替他人捐款记录表")
public ApiResult<Boolean> addDonationAgent(@Validated(Add.class) @RequestBody DonationAgent donationAgent) throws Exception { // public ApiResult<Boolean> addDonationAgent(@Validated(Add.class) @RequestBody DonationAgent donationAgent) throws Exception {
boolean flag = donationAgentService.saveDonationAgent(donationAgent); // boolean flag = donationAgentService.saveDonationAgent(donationAgent);
return ApiResult.result(flag); // return ApiResult.result(flag);
} // }
//
/** // /**
* 修改替他人捐款记录表 // * 修改替他人捐款记录表
*/ // */
@PostMapping("/update") // @PostMapping("/update")
@OperationLog(name = "修改替他人捐款记录表", type = OperationLogType.UPDATE) // @OperationLog(name = "修改替他人捐款记录表", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改替他人捐款记录表") // @ApiOperation(value = "修改替他人捐款记录表")
public ApiResult<Boolean> updateDonationAgent(@Validated(Update.class) @RequestBody DonationAgent donationAgent)throws Exception{ // public ApiResult<Boolean> updateDonationAgent(@Validated(Update.class) @RequestBody DonationAgent donationAgent)throws Exception{
boolean flag= donationAgentService.updateDonationAgent(donationAgent); // boolean flag= donationAgentService.updateDonationAgent(donationAgent);
return ApiResult.result(flag); // return ApiResult.result(flag);
} // }
//
/** // /**
* 删除替他人捐款记录表 // * 删除替他人捐款记录表
*/ // */
@PostMapping("/delete/{id}") // @PostMapping("/delete/{id}")
@OperationLog(name = "删除替他人捐款记录表", type = OperationLogType.DELETE) // @OperationLog(name = "删除替他人捐款记录表", type = OperationLogType.DELETE)
@ApiOperation(value = "删除替他人捐款记录表") // @ApiOperation(value = "删除替他人捐款记录表")
public ApiResult<Boolean> deleteDonationAgent(@PathVariable("id") Long id)throws Exception{ // public ApiResult<Boolean> deleteDonationAgent(@PathVariable("id") Long id)throws Exception{
boolean flag= donationAgentService.deleteDonationAgent(id); // boolean flag= donationAgentService.deleteDonationAgent(id);
return ApiResult.result(flag); // return ApiResult.result(flag);
} // }
//
/** // /**
* 获取替他人捐款记录表详情 // * 获取替他人捐款记录表详情
*/ // */
@GetMapping("/info/{id}") // @GetMapping("/info/{id}")
@OperationLog(name = "替他人捐款记录表详情", type = OperationLogType.INFO) // @OperationLog(name = "替他人捐款记录表详情", type = OperationLogType.INFO)
@ApiOperation(value = "替他人捐款记录表详情") // @ApiOperation(value = "替他人捐款记录表详情")
public ApiResult<DonationAgentQueryVo> getDonationAgent(@PathVariable("id") Long id)throws Exception{ // public ApiResult<DonationAgentQueryVo> getDonationAgent(@PathVariable("id") Long id)throws Exception{
DonationAgentQueryVo donationAgentQueryVo = donationAgentService.getDonationAgentById(id); // DonationAgentQueryVo donationAgentQueryVo = donationAgentService.getDonationAgentById(id);
return ApiResult.ok(donationAgentQueryVo); // return ApiResult.ok(donationAgentQueryVo);
} // }
//
/** // /**
* 替他人捐款记录表分页列表 // * 替他人捐款记录表分页列表
*/ // */
@PostMapping("/getPageList") // @PostMapping("/getPageList")
@OperationLog(name = "替他人捐款记录表分页列表", type = OperationLogType.PAGE) // @OperationLog(name = "替他人捐款记录表分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "替他人捐款记录表分页列表") // @ApiOperation(value = "替他人捐款记录表分页列表")
public ApiResult<Paging<DonationAgentQueryVo>>getDonationAgentPageList(@Validated @RequestBody DonationAgentPageParam donationAgentPageParam)throws Exception{ // public ApiResult<Paging<DonationAgentQueryVo>>getDonationAgentPageList(@Validated @RequestBody DonationAgentPageParam donationAgentPageParam)throws Exception{
Paging<DonationAgentQueryVo> paging = donationAgentService.getDonationAgentPageList(donationAgentPageParam); // Paging<DonationAgentQueryVo> paging = donationAgentService.getDonationAgentPageList(donationAgentPageParam);
return ApiResult.ok(paging); // return ApiResult.ok(paging);
} // }
} }
package com.sien.common.controller; 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.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.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.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -38,60 +23,60 @@ public class DonationRecordController extends BaseController { ...@@ -38,60 +23,60 @@ public class DonationRecordController extends BaseController {
@Autowired @Autowired
private DonationRecordService donationRecordService; private DonationRecordService donationRecordService;
/** // /**
* 添加捐款记录 // * 添加捐款记录
*/ // */
@PostMapping("/add") // @PostMapping("/add")
@OperationLog(name = "添加捐款记录", type = OperationLogType.ADD) // @OperationLog(name = "添加捐款记录", type = OperationLogType.ADD)
@ApiOperation(value = "添加捐款记录") // @ApiOperation(value = "添加捐款记录")
public ApiResult<Boolean> addDonationRecord(@Validated(Add.class) @RequestBody DonationRecord donationRecord)throws Exception{ // public ApiResult<Boolean> addDonationRecord(@Validated(Add.class) @RequestBody DonationRecord donationRecord)throws Exception{
boolean flag= donationRecordService.saveDonationRecord(donationRecord); // boolean flag= donationRecordService.saveDonationRecord(donationRecord);
return ApiResult.result(flag); // return ApiResult.result(flag);
} // }
/** // /**
* 修改捐款记录 // * 修改捐款记录
*/ // */
@PostMapping("/update") // @PostMapping("/update")
@OperationLog(name = "修改捐款记录", type = OperationLogType.UPDATE) // @OperationLog(name = "修改捐款记录", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改捐款记录") // @ApiOperation(value = "修改捐款记录")
public ApiResult<Boolean> updateDonationRecord(@Validated(Update.class) @RequestBody DonationRecord donationRecord)throws Exception{ // public ApiResult<Boolean> updateDonationRecord(@Validated(Update.class) @RequestBody DonationRecord donationRecord)throws Exception{
boolean flag= donationRecordService.updateDonationRecord(donationRecord); // boolean flag= donationRecordService.updateDonationRecord(donationRecord);
return ApiResult.result(flag); // 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);
// }
/** }
* 删除捐款记录
*/
@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);
}
}
package com.sien.common.controller; 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 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.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.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -38,60 +23,60 @@ public class VipRecordController extends BaseController { ...@@ -38,60 +23,60 @@ public class VipRecordController extends BaseController {
@Autowired @Autowired
private VipRecordService vipRecordService; private VipRecordService vipRecordService;
/** // /**
* 添加Vip开通记录 // * 添加Vip开通记录
*/ // */
@PostMapping("/add") // @PostMapping("/add")
@OperationLog(name = "添加Vip开通记录", type = OperationLogType.ADD) // @OperationLog(name = "添加Vip开通记录", type = OperationLogType.ADD)
@ApiOperation(value = "添加Vip开通记录") // @ApiOperation(value = "添加Vip开通记录")
public ApiResult<Boolean> addVipRecord(@Validated(Add.class) @RequestBody VipRecord vipRecord)throws Exception{ // public ApiResult<Boolean> addVipRecord(@Validated(Add.class) @RequestBody VipRecord vipRecord)throws Exception{
boolean flag= vipRecordService.saveVipRecord(vipRecord); // boolean flag= vipRecordService.saveVipRecord(vipRecord);
return ApiResult.result(flag); // 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("/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);
}
}
package com.sien.common.mapper; package com.sien.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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.entity.DonationRecord;
import com.sien.common.param.DonationRecordPageParam; import com.sien.common.param.DonationRecordPageParam;
import com.sien.common.vo.DonationRankAndTotal;
import com.sien.common.vo.DonationRecordQueryVo; 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.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.io.Serializable; import java.io.Serializable;
...@@ -22,21 +21,29 @@ import java.io.Serializable; ...@@ -22,21 +21,29 @@ import java.io.Serializable;
@Repository @Repository
public interface DonationRecordMapper extends BaseMapper<DonationRecord> { public interface DonationRecordMapper extends BaseMapper<DonationRecord> {
/** /**
* 根据ID获取查询对象 * 根据ID获取查询对象
* *
* @param id * @param id
* @return * @return
*/ */
DonationRecordQueryVo getDonationRecordById(Serializable id); DonationRecordQueryVo getDonationRecordById(Serializable id);
/** /**
* 获取分页对象 * 获取分页对象
* *
* @param page * @param page
* @param donationRecordPageParam * @param donationRecordPageParam
* @return * @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);
}
...@@ -46,4 +46,7 @@ public class AppSmsRegisterParam implements Serializable { ...@@ -46,4 +46,7 @@ public class AppSmsRegisterParam implements Serializable {
@ApiModelProperty(value = "微信id", example = "adfadlsfadsf", required = false) @ApiModelProperty(value = "微信id", example = "adfadlsfadsf", required = false)
private String openid; private String openid;
@ApiModelProperty("姓名")
private String nickname;
} }
...@@ -19,18 +19,39 @@ import lombok.experimental.Accessors; ...@@ -19,18 +19,39 @@ import lombok.experimental.Accessors;
@ApiModel(value = "AppUserInfoParam对象") @ApiModel(value = "AppUserInfoParam对象")
public class AppUserInfoParam extends BaseEntity { public class AppUserInfoParam extends BaseEntity {
@ApiModelProperty("用户名")
private String username;
@ApiModelProperty("微信id")
private String wechatOpenId;
@ApiModelProperty("姓名") @ApiModelProperty("姓名")
private String nickname; private String nickname;
@ApiModelProperty("性别,0:女,1:男,默认1")
private Integer gender;
@ApiModelProperty("证件号码") @ApiModelProperty("证件号码")
private String idcard; private String idcard;
@ApiModelProperty("民族") @ApiModelProperty("民族")
private String nation; 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("出生日期") @ApiModelProperty("出生日期")
private String dateOfBirth; private String dateOfBirth;
...@@ -55,7 +76,4 @@ public class AppUserInfoParam extends BaseEntity { ...@@ -55,7 +76,4 @@ public class AppUserInfoParam extends BaseEntity {
@ApiModelProperty("紧急电话") @ApiModelProperty("紧急电话")
private String emergencyPhone; private String emergencyPhone;
@ApiModelProperty("头像")
private String head;
} }
...@@ -39,23 +39,23 @@ public class Demo { ...@@ -39,23 +39,23 @@ public class Demo {
// App Master Secret // App Master Secret
// ti5gomxtvmkgehmwgtbq9rtsfhy0khsi // 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("your appkey", "your master secret");
Demo demo = new Demo("5f963f3ea1491772a2aef713", "ti5gomxtvmkgehmwgtbq9rtsfhy0khsi"); Demo demo = new Demo("5f963f3ea1491772a2aef713", "ti5gomxtvmkgehmwgtbq9rtsfhy0khsi");
try { try {
demo.sendAndroidUnicast("As3YYnUpKwDLFVzc35_syVTNSctGjkDNfFLwPHGbXtm_"); demo.sendAndroidUnicast("As3YYnUpKwDLFVzc35_syVTNSctGjkDNfFLwPHGbXtm_");
//demo.sendIOSUnicast(); //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.sendAndroidCustomizedcastFile();
* demo.sendAndroidBroadcast(); * demo.sendAndroidBroadcast();
* demo.sendAndroidGroupcast(); * demo.sendAndroidGroupcast();
* demo.sendAndroidCustomizedcast(); * demo.sendAndroidCustomizedcast();
* demo.sendAndroidFilecast(); * demo.sendAndroidFilecast();
* *
* demo.sendIOSBroadcast(); * demo.sendIOSBroadcast();
* demo.sendIOSUnicast(); * demo.sendIOSUnicast();
* demo.sendIOSGroupcast(); * demo.sendIOSGroupcast();
* demo.sendIOSCustomizedcast(); * demo.sendIOSCustomizedcast();
* demo.sendIOSFilecast(); * demo.sendIOSFilecast();
*/ */
} catch (Exception ex) { } catch (Exception ex) {
...@@ -64,22 +64,22 @@ public class Demo { ...@@ -64,22 +64,22 @@ public class Demo {
} }
public void sendAndroidBroadcast() throws Exception { public void sendAndroidBroadcast() throws Exception {
AndroidBroadcast broadcast = new AndroidBroadcast(appkey, appMasterSecret); AndroidBroadcast broadcast = new AndroidBroadcast(appkey, appMasterSecret);
broadcast.setTicker("Android broadcast ticker"); broadcast.setTicker("Android broadcast ticker");
broadcast.setTitle("中文的title"); broadcast.setTitle("中文的title");
broadcast.setText("Android broadcast text"); broadcast.setText("Android broadcast text");
broadcast.goAppAfterOpen(); broadcast.goAppAfterOpen();
broadcast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION); 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. // For how to register a test device, please see the developer doc.
broadcast.setProductionMode(); broadcast.setProductionMode();
// Set customized fields // Set customized fields
broadcast.setExtraField("test", "helloworld"); broadcast.setExtraField("test", "helloworld");
//厂商通道相关参数 //厂商通道相关参数
broadcast.setChannelActivity("your channel activity"); broadcast.setChannelActivity("your channel activity");
broadcast.setChannelProperties("abc"); broadcast.setChannelProperties("abc");
client.send(broadcast); client.send(broadcast);
} }
/** /**
* 发送安卓单推 * 发送安卓单推
...@@ -87,37 +87,37 @@ public class Demo { ...@@ -87,37 +87,37 @@ public class Demo {
* @throws Exception * @throws Exception
*/ */
public void sendAndroidUnicast(String token) throws Exception { public void sendAndroidUnicast(String token) throws Exception {
AndroidUnicast unicast = new AndroidUnicast(appkey, appMasterSecret); AndroidUnicast unicast = new AndroidUnicast(appkey, appMasterSecret);
// TODO Set your device token // Set your device token
unicast.setDeviceToken(token); unicast.setDeviceToken(token);
unicast.setTicker("Android unicast ticker"); unicast.setTicker("Android unicast ticker");
unicast.setTitle("api 中文的title"); unicast.setTitle("api 中文的title");
unicast.setText("Android unicast text"); unicast.setText("Android unicast text");
unicast.goAppAfterOpen(); unicast.goAppAfterOpen();
unicast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION); 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. // For how to register a test device, please see the developer doc.
unicast.setProductionMode(); unicast.setProductionMode();
// Set customized fields // Set customized fields
unicast.setExtraField("test", "helloworld"); unicast.setExtraField("test", "helloworld");
unicast.setChannelActivity("your channel activity"); unicast.setChannelActivity("your channel activity");
unicast.setChannelProperties("abc"); unicast.setChannelProperties("abc");
client.send(unicast); client.send(unicast);
} }
public void sendAndroidGroupcast() throws Exception { public void sendAndroidGroupcast() throws Exception {
AndroidGroupcast groupcast = new AndroidGroupcast(appkey, appMasterSecret); AndroidGroupcast groupcast = new AndroidGroupcast(appkey, appMasterSecret);
/* TODO /*
* Construct the filter condition: * Construct the filter condition:
* "where": * "where":
* { * {
* "and": * "and":
* [ * [
* {"tag":"test"}, * {"tag":"test"},
* {"tag":"Test"} * {"tag":"Test"}
* ] * ]
* } * }
*/ */
JSONObject filterJson = new JSONObject(); JSONObject filterJson = new JSONObject();
JSONObject whereJson = new JSONObject(); JSONObject whereJson = new JSONObject();
JSONArray tagArray = new JSONArray(); JSONArray tagArray = new JSONArray();
...@@ -127,178 +127,178 @@ public class Demo { ...@@ -127,178 +127,178 @@ public class Demo {
TestTag.put("tag", "Test"); TestTag.put("tag", "Test");
tagArray.put(testTag); tagArray.put(testTag);
tagArray.put(TestTag); tagArray.put(TestTag);
whereJson.put("and", tagArray); whereJson.put("and", tagArray);
filterJson.put("where", whereJson); filterJson.put("where", whereJson);
groupcast.setFilter(filterJson); groupcast.setFilter(filterJson);
groupcast.setTicker("Android groupcast ticker"); groupcast.setTicker("Android groupcast ticker");
groupcast.setTitle("中文的title"); groupcast.setTitle("中文的title");
groupcast.setText("Android groupcast text"); groupcast.setText("Android groupcast text");
groupcast.goAppAfterOpen(); groupcast.goAppAfterOpen();
groupcast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION); groupcast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION);
groupcast.setChannelActivity("your channel activity"); 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. // For how to register a test device, please see the developer doc.
groupcast.setProductionMode(); groupcast.setProductionMode();
//厂商通道相关参数 //厂商通道相关参数
groupcast.setChannelActivity("your channel activity"); groupcast.setChannelActivity("your channel activity");
groupcast.setChannelProperties("abc"); groupcast.setChannelProperties("abc");
client.send(groupcast); client.send(groupcast);
} }
public void sendAndroidCustomizedcast() throws Exception { public void sendAndroidCustomizedcast() throws Exception {
AndroidCustomizedcast customizedcast = new AndroidCustomizedcast(appkey, appMasterSecret); 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 // And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification. // use file_id to send customized notification.
customizedcast.setAlias("alias", "alias_type"); customizedcast.setAlias("alias", "alias_type");
customizedcast.setTicker("Android customizedcast ticker"); customizedcast.setTicker("Android customizedcast ticker");
customizedcast.setTitle("中文的title"); customizedcast.setTitle("中文的title");
customizedcast.setText("Android customizedcast text"); customizedcast.setText("Android customizedcast text");
customizedcast.goAppAfterOpen(); customizedcast.goAppAfterOpen();
customizedcast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION); 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. // For how to register a test device, please see the developer doc.
customizedcast.setProductionMode(); customizedcast.setProductionMode();
//厂商通道相关参数 //厂商通道相关参数
customizedcast.setChannelActivity("your channel activity"); customizedcast.setChannelActivity("your channel activity");
customizedcast.setChannelProperties("abc"); customizedcast.setChannelProperties("abc");
client.send(customizedcast); client.send(customizedcast);
} }
public void sendAndroidCustomizedcastFile() throws Exception { public void sendAndroidCustomizedcastFile() throws Exception {
AndroidCustomizedcast customizedcast = new AndroidCustomizedcast(appkey, appMasterSecret); 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 // And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification. // use file_id to send customized notification.
String fileId = client.uploadContents(appkey, appMasterSecret, "aa" + "\n" + "bb" + "\n" + "alias"); String fileId = client.uploadContents(appkey, appMasterSecret, "aa" + "\n" + "bb" + "\n" + "alias");
customizedcast.setFileId(fileId, "alias_type"); customizedcast.setFileId(fileId, "alias_type");
customizedcast.setTicker("Android customizedcast ticker"); customizedcast.setTicker("Android customizedcast ticker");
customizedcast.setTitle("中文的title"); customizedcast.setTitle("中文的title");
customizedcast.setText("Android customizedcast text"); customizedcast.setText("Android customizedcast text");
customizedcast.goAppAfterOpen(); customizedcast.goAppAfterOpen();
customizedcast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION); 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. // For how to register a test device, please see the developer doc.
customizedcast.setProductionMode(); customizedcast.setProductionMode();
//厂商通道相关参数 //厂商通道相关参数
customizedcast.setChannelActivity("your channel activity"); customizedcast.setChannelActivity("your channel activity");
customizedcast.setChannelProperties("abc"); customizedcast.setChannelProperties("abc");
client.send(customizedcast); client.send(customizedcast);
} }
public void sendAndroidFilecast() throws Exception { public void sendAndroidFilecast() throws Exception {
AndroidFilecast filecast = new AndroidFilecast(appkey, appMasterSecret); 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"); String fileId = client.uploadContents(appkey, appMasterSecret, "aa" + "\n" + "bb");
filecast.setFileId(fileId); filecast.setFileId(fileId);
filecast.setTicker("Android filecast ticker"); filecast.setTicker("Android filecast ticker");
filecast.setTitle("中文的title"); filecast.setTitle("中文的title");
filecast.setText("Android filecast text"); filecast.setText("Android filecast text");
filecast.goAppAfterOpen(); filecast.goAppAfterOpen();
filecast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION); filecast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION);
//厂商通道相关参数 //厂商通道相关参数
filecast.setChannelActivity("your channel activity"); filecast.setChannelActivity("your channel activity");
filecast.setChannelProperties("abc"); filecast.setChannelProperties("abc");
client.send(filecast); client.send(filecast);
} }
public void sendIOSBroadcast() throws Exception { public void sendIOSBroadcast() throws Exception {
IOSBroadcast broadcast = new IOSBroadcast(appkey, appMasterSecret); IOSBroadcast broadcast = new IOSBroadcast(appkey, appMasterSecret);
//alert值设置为字符串 //alert值设置为字符串
//broadcast.setAlert("IOS 广播测试"); //broadcast.setAlert("IOS 广播测试");
//alert的值设置为字典 //alert的值设置为字典
broadcast.setAlert("今日天气", "", "今日可能下雨🌂"); broadcast.setAlert("今日天气", "", "今日可能下雨🌂");
broadcast.setBadge(0); broadcast.setBadge(0);
broadcast.setSound("default"); 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(); broadcast.setTestMode();
// Set customized fields // Set customized fields
broadcast.setCustomizedField("test", "helloworld"); broadcast.setCustomizedField("test", "helloworld");
client.send(broadcast); client.send(broadcast);
} }
public void sendIOSUnicast() throws Exception { public void sendIOSUnicast() throws Exception {
IOSUnicast unicast = new IOSUnicast(appkey, appMasterSecret); IOSUnicast unicast = new IOSUnicast(appkey, appMasterSecret);
// TODO Set your device token // Set your device token
unicast.setDeviceToken("your device_token"); unicast.setDeviceToken("your device_token");
//alert值设置为字符串 //alert值设置为字符串
//unicast.setAlert("IOS 单播测试"); //unicast.setAlert("IOS 单播测试");
//alert的值设置为字典 //alert的值设置为字典
unicast.setAlert("今日天气", "", "今日可能下雨🌂"); unicast.setAlert("今日天气", "", "今日可能下雨🌂");
unicast.setBadge(0); unicast.setBadge(0);
unicast.setSound("default"); 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(); unicast.setTestMode();
// Set customized fields // Set customized fields
unicast.setCustomizedField("test", "helloworld"); unicast.setCustomizedField("test", "helloworld");
client.send(unicast); client.send(unicast);
} }
public void sendIOSGroupcast() throws Exception { public void sendIOSGroupcast() throws Exception {
IOSGroupcast groupcast = new IOSGroupcast(appkey, appMasterSecret); IOSGroupcast groupcast = new IOSGroupcast(appkey, appMasterSecret);
/* TODO /*
* Construct the filter condition: * Construct the filter condition:
* "where": * "where":
* { * {
* "and": * "and":
* [ * [
* {"tag":"iostest"} * {"tag":"iostest"}
* ] * ]
* } * }
*/ */
JSONObject filterJson = new JSONObject(); JSONObject filterJson = new JSONObject();
JSONObject whereJson = new JSONObject(); JSONObject whereJson = new JSONObject();
JSONArray tagArray = new JSONArray(); JSONArray tagArray = new JSONArray();
JSONObject testTag = new JSONObject(); JSONObject testTag = new JSONObject();
testTag.put("tag", "iostest"); testTag.put("tag", "iostest");
tagArray.put(testTag); tagArray.put(testTag);
whereJson.put("and", tagArray); whereJson.put("and", tagArray);
filterJson.put("where", whereJson); filterJson.put("where", whereJson);
System.out.println(filterJson.toString()); System.out.println(filterJson.toString());
// Set filter condition into rootJson // Set filter condition into rootJson
groupcast.setFilter(filterJson); groupcast.setFilter(filterJson);
//groupcast.setAlert("IOS 组播测试"); //groupcast.setAlert("IOS 组播测试");
//alert的值设置为字典 //alert的值设置为字典
groupcast.setAlert("今日天气", "subtitle", "今日可能下雨🌂"); groupcast.setAlert("今日天气", "subtitle", "今日可能下雨🌂");
groupcast.setBadge(0); groupcast.setBadge(0);
groupcast.setSound("default"); 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(); groupcast.setTestMode();
client.send(groupcast); client.send(groupcast);
} }
public void sendIOSCustomizedcast() throws Exception { public void sendIOSCustomizedcast() throws Exception {
IOSCustomizedcast customizedcast = new IOSCustomizedcast(appkey, appMasterSecret); 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 // And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification. // use file_id to send customized notification.
customizedcast.setAlias("alias", "alias_type"); customizedcast.setAlias("alias", "alias_type");
//customizedcast.setAlert("IOS 个性化测试"); //customizedcast.setAlert("IOS 个性化测试");
//alert的值设置为字典 //alert的值设置为字典
customizedcast.setAlert("今日天气", "", "今日可能下雨🌂"); customizedcast.setAlert("今日天气", "", "今日可能下雨🌂");
customizedcast.setBadge(0); customizedcast.setBadge(0);
customizedcast.setSound("default"); 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(); customizedcast.setTestMode();
client.send(customizedcast); client.send(customizedcast);
} }
public void sendIOSFilecast() throws Exception { public void sendIOSFilecast() throws Exception {
IOSFilecast filecast = new IOSFilecast(appkey, appMasterSecret); 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"); String fileId = client.uploadContents(appkey, appMasterSecret, "aa" + "\n" + "bb");
filecast.setFileId(fileId); filecast.setFileId(fileId);
//filecast.setAlert("IOS 文件播测试"); //filecast.setAlert("IOS 文件播测试");
//alert的值设置为字典 //alert的值设置为字典
filecast.setAlert("今日天气", "", "今日可能下雨🌂"); filecast.setAlert("今日天气", "", "今日可能下雨🌂");
filecast.setBadge(0); filecast.setBadge(0);
filecast.setSound("default"); 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(); filecast.setTestMode();
client.send(filecast); client.send(filecast);
} }
} }
......
...@@ -2,9 +2,9 @@ package com.sien.common.service; ...@@ -2,9 +2,9 @@ package com.sien.common.service;
import com.sien.common.entity.AppUser; import com.sien.common.entity.AppUser;
import com.sien.common.param.AppUserPageParam; 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.AppSmsRegisterParam;
import com.sien.common.param.app.DeviceTokenParam; import com.sien.common.param.app.DeviceTokenParam;
import com.sien.common.vo.AppUserQueryVo;
import com.sien.common.vo.app.LoginAppUserTokenVo; import com.sien.common.vo.app.LoginAppUserTokenVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult; import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.service.BaseService; import io.geekidea.springbootplus.framework.common.service.BaseService;
...@@ -84,22 +84,29 @@ public interface AppUserService extends BaseService<AppUser> { ...@@ -84,22 +84,29 @@ public interface AppUserService extends BaseService<AppUser> {
*/ */
boolean deleteAppUser(Long id) throws Exception; boolean deleteAppUser(Long id) throws Exception;
/** /**
* 根据ID获取查询对象 * 根据ID获取查询对象
* *
* @param id * @param id
* @return * @return
* @throws Exception * @throws Exception
*/ */
AppUserQueryVo getAppUserById(Long id) throws Exception; AppUserQueryVo getAppUserById(Long id) throws Exception;
/**
* 获取分页对象 /**
* * 获取自己的信息详情
* @param appUserPageParam */
* @return AppUserQueryVo getMyInfo() throws Exception;
* @throws Exception
*/
Paging<AppUserQueryVo> getAppUserPageList(AppUserPageParam appUserPageParam) throws Exception; /**
* 获取分页对象
*
* @param appUserPageParam
* @return
* @throws Exception
*/
Paging<AppUserQueryVo> getAppUserPageList(AppUserPageParam appUserPageParam) throws Exception;
} }
...@@ -2,8 +2,9 @@ package com.sien.common.service; ...@@ -2,8 +2,9 @@ package com.sien.common.service;
import com.sien.common.entity.DonationRecord; import com.sien.common.entity.DonationRecord;
import com.sien.common.param.DonationRecordPageParam; 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 com.sien.common.vo.DonationRecordQueryVo;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.core.pagination.Paging; import io.geekidea.springbootplus.framework.core.pagination.Paging;
/** /**
...@@ -14,6 +15,15 @@ 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> { public interface DonationRecordService extends BaseService<DonationRecord> {
/**
* 查询捐款排名和总捐款
*
* @param userId
* @return
*/
DonationRankAndTotal getDonationRankAndTotal(Long userId);
/** /**
* 保存 * 保存
* *
...@@ -21,7 +31,7 @@ public interface DonationRecordService extends BaseService<DonationRecord> { ...@@ -21,7 +31,7 @@ public interface DonationRecordService extends BaseService<DonationRecord> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
boolean saveDonationRecord(DonationRecord donationRecord)throws Exception; boolean saveDonationRecord(DonationRecord donationRecord) throws Exception;
/** /**
* 修改 * 修改
......
...@@ -88,14 +88,13 @@ public class AppSmsServiceImpl implements AppSmsService { ...@@ -88,14 +88,13 @@ public class AppSmsServiceImpl implements AppSmsService {
*/ */
private ApiResult<Object> getSmsCodeApiResult(String key, String area, String number) { private ApiResult<Object> getSmsCodeApiResult(String key, String area, String number) {
// 生成验证码code // 生成验证码code
String randomCode = getRandomCode(); String randomCode = getRandomCode();
// 过期时间(秒) // 过期时间(秒)
long expire = 120L; long expire = 120L;
Duration expireDuration = Duration.ofSeconds(expire); Duration expireDuration = Duration.ofSeconds(expire);
// 存至redis
redisTemplate.opsForValue().set(key, randomCode, expireDuration); redisTemplate.opsForValue().set(key, randomCode, expireDuration);
SmsCode smsCode = new SmsCode(); SmsCode smsCode = new SmsCode();
......
...@@ -8,10 +8,10 @@ import com.sien.common.entity.AppUser; ...@@ -8,10 +8,10 @@ import com.sien.common.entity.AppUser;
import com.sien.common.enums.StateEnum; import com.sien.common.enums.StateEnum;
import com.sien.common.mapper.AppUserMapper; import com.sien.common.mapper.AppUserMapper;
import com.sien.common.param.AppUserPageParam; 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.AppSmsRegisterParam;
import com.sien.common.param.app.DeviceTokenParam; import com.sien.common.param.app.DeviceTokenParam;
import com.sien.common.service.AppUserService; import com.sien.common.service.AppUserService;
import com.sien.common.vo.AppUserQueryVo;
import com.sien.common.vo.app.LoginAppUserTokenVo; import com.sien.common.vo.app.LoginAppUserTokenVo;
import io.geekidea.springbootplus.config.properties.JwtProperties; import io.geekidea.springbootplus.config.properties.JwtProperties;
import io.geekidea.springbootplus.config.properties.SpringBootPlusProperties; import io.geekidea.springbootplus.config.properties.SpringBootPlusProperties;
...@@ -143,7 +143,7 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser> ...@@ -143,7 +143,7 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser>
LoginAppUserTokenVo loginAppUserTokenVo = new LoginAppUserTokenVo(); LoginAppUserTokenVo loginAppUserTokenVo = new LoginAppUserTokenVo();
BeanUtils.copyProperties(appUser, loginAppUserTokenVo); BeanUtils.copyProperties(appUser, loginAppUserTokenVo);
loginAppUserTokenVo.setToken(token); loginAppUserTokenVo.setToken(token);
loginAppUserTokenVo.setId(appUser.getId()); // loginAppUserTokenVo.setId(appUser.getId());
loginAppUserTokenVo.setHasRegister(hasRegister); loginAppUserTokenVo.setHasRegister(hasRegister);
return ApiResult.ok(loginAppUserTokenVo); return ApiResult.ok(loginAppUserTokenVo);
...@@ -191,6 +191,13 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser> ...@@ -191,6 +191,13 @@ public class AppUserServiceImpl extends BaseServiceImpl<AppUserMapper, AppUser>
} }
@Override @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 { public Paging<AppUserQueryVo> getAppUserPageList(AppUserPageParam appUserPageParam) throws Exception {
Page<AppUserQueryVo> page = new PageInfo<>(appUserPageParam, OrderItem.desc(getLambdaColumn(AppUser::getCreateTime))); Page<AppUserQueryVo> page = new PageInfo<>(appUserPageParam, OrderItem.desc(getLambdaColumn(AppUser::getCreateTime)));
IPage<AppUserQueryVo> iPage = appUserMapper.getAppUserPageList(page, appUserPageParam); IPage<AppUserQueryVo> iPage = appUserMapper.getAppUserPageList(page, appUserPageParam);
......
package com.sien.common.service.impl; 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.entity.DonationRecord;
import com.sien.common.mapper.DonationRecordMapper; import com.sien.common.mapper.DonationRecordMapper;
import com.sien.common.param.DonationRecordPageParam;
import com.sien.common.service.DonationRecordService; import com.sien.common.service.DonationRecordService;
import com.sien.common.param.DonationRecordPageParam; import com.sien.common.vo.DonationRankAndTotal;
import com.sien.common.vo.DonationRecordQueryVo; import com.sien.common.vo.DonationRecordQueryVo;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl; 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 io.geekidea.springbootplus.framework.core.pagination.PageInfo; import io.geekidea.springbootplus.framework.core.pagination.Paging;
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 lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; 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; ...@@ -26,37 +27,42 @@ import org.springframework.beans.factory.annotation.Autowired;
@Service @Service
public class DonationRecordServiceImpl extends BaseServiceImpl<DonationRecordMapper, DonationRecord> implements DonationRecordService { public class DonationRecordServiceImpl extends BaseServiceImpl<DonationRecordMapper, DonationRecord> implements DonationRecordService {
@Autowired @Autowired
private DonationRecordMapper donationRecordMapper; private DonationRecordMapper donationRecordMapper;
@Transactional(rollbackFor = Exception.class) @Override
@Override public DonationRankAndTotal getDonationRankAndTotal(Long userId) {
public boolean saveDonationRecord(DonationRecord donationRecord)throws Exception{ return donationRecordMapper.getDonationRankAndTotal(userId);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveDonationRecord(DonationRecord donationRecord) throws Exception {
return super.save(donationRecord); return super.save(donationRecord);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public boolean updateDonationRecord(DonationRecord donationRecord)throws Exception{ public boolean updateDonationRecord(DonationRecord donationRecord) throws Exception {
return super.updateById(donationRecord); return super.updateById(donationRecord);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public boolean deleteDonationRecord(Long id)throws Exception{ public boolean deleteDonationRecord(Long id) throws Exception {
return super.removeById(id); return super.removeById(id);
} }
@Override
public DonationRecordQueryVo getDonationRecordById(Long id) throws Exception {
return donationRecordMapper.getDonationRecordById(id);
}
@Override @Override
public DonationRecordQueryVo getDonationRecordById(Long id)throws Exception{ public Paging<DonationRecordQueryVo> getDonationRecordPageList(DonationRecordPageParam donationRecordPageParam) throws Exception {
return donationRecordMapper.getDonationRecordById(id); 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); return new Paging<DonationRecordQueryVo>(iPage);
} }
} }
...@@ -6,11 +6,10 @@ import lombok.Data; ...@@ -6,11 +6,10 @@ import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* <pre> * <pre>
* 系统用户 查询结果对象 * 用户 查询结果对象
* </pre> * </pre>
* *
* @author hewei * @author hewei
...@@ -20,10 +19,6 @@ import java.util.Date; ...@@ -20,10 +19,6 @@ import java.util.Date;
@Accessors(chain = true) @Accessors(chain = true)
@ApiModel(value = "AppUserQueryVo对象") @ApiModel(value = "AppUserQueryVo对象")
public class AppUserQueryVo implements Serializable { public class AppUserQueryVo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private Long id;
@ApiModelProperty("用户名") @ApiModelProperty("用户名")
private String username; private String username;
...@@ -40,12 +35,6 @@ public class AppUserQueryVo implements Serializable { ...@@ -40,12 +35,6 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty("民族") @ApiModelProperty("民族")
private String nation; private String nation;
@ApiModelProperty("密码")
private String password;
@ApiModelProperty("盐值")
private String salt;
@ApiModelProperty("手机号码") @ApiModelProperty("手机号码")
private String phone; private String phone;
...@@ -64,18 +53,6 @@ public class AppUserQueryVo implements Serializable { ...@@ -64,18 +53,6 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty("状态,0:禁用,1:启用,2:锁定") @ApiModelProperty("状态,0:禁用,1:启用,2:锁定")
private Integer state; private Integer state;
@ApiModelProperty("逻辑删除,0:未删除,1:已删除")
private Integer deleted;
@ApiModelProperty("版本")
private Integer version;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("修改时间")
private Date updateTime;
@ApiModelProperty("出生日期") @ApiModelProperty("出生日期")
private String dateOfBirth; private String dateOfBirth;
...@@ -99,4 +76,6 @@ public class AppUserQueryVo implements Serializable { ...@@ -99,4 +76,6 @@ public class AppUserQueryVo implements Serializable {
@ApiModelProperty("紧急电话") @ApiModelProperty("紧急电话")
private String emergencyPhone; private String emergencyPhone;
} }
\ No newline at end of file
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;
}
...@@ -34,32 +34,24 @@ public class LoginAppUserTokenVo implements LoginToken { ...@@ -34,32 +34,24 @@ public class LoginAppUserTokenVo implements LoginToken {
@ApiModelProperty("token") @ApiModelProperty("token")
private String token; private String token;
@ApiModelProperty("主键")
private Long id;
// @ApiModelProperty("用户名")
// private String username;
@ApiModelProperty("是否已经注册, true = 已经注册, false = 没有注册") @ApiModelProperty("是否已经注册, true = 已经注册, false = 没有注册")
private Boolean hasRegister; private Boolean hasRegister;
@ApiModelProperty("姓")
private String surname;
@ApiModelProperty("名") @ApiModelProperty("用户名")
private String name; private String username;
@ApiModelProperty("公司名") @ApiModelProperty("微信id")
private String companyName; private String wechatOpenId;
@ApiModelProperty("微信号") @ApiModelProperty("姓名")
private String wechat; private String nickname;
@ApiModelProperty("出生日期") @ApiModelProperty("证件号码")
private String dateOfBirth; private String idcard;
// @ApiModelProperty("昵称") @ApiModelProperty("民族")
// private String nickname; private String nation;
@ApiModelProperty("手机号码") @ApiModelProperty("手机号码")
private String phone; private String phone;
...@@ -72,4 +64,35 @@ public class LoginAppUserTokenVo implements LoginToken { ...@@ -72,4 +64,35 @@ public class LoginAppUserTokenVo implements LoginToken {
@ApiModelProperty("头像") @ApiModelProperty("头像")
private String head; 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;
} }
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <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> </sql>
<select id="getDonationRecordById" resultType="com.sien.common.vo.DonationRecordQueryVo"> <select id="getDonationRecordById" resultType="com.sien.common.vo.DonationRecordQueryVo">
...@@ -13,10 +14,20 @@ ...@@ -13,10 +14,20 @@
from donation_record where id = #{id} from donation_record where id = #{id}
</select> </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"
select resultType="com.sien.common.vo.DonationRecordQueryVo">
<include refid="Base_Column_List"/> select
from donation_record <include refid="Base_Column_List"/>
</select> 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> </mapper>
...@@ -183,11 +183,8 @@ spring-boot-plus: ...@@ -183,11 +183,8 @@ spring-boot-plus:
# 权限配置 # 权限配置
anon: anon:
# 排除登录 注册 登出 # 排除登录 注册 登出
- /app/user/registerOrLogin,/app/user/login - /user/registerOrLogin,/user/login
- /sys/login,/sys/logout,/sys/register - /sms/registerOrLoginCode
- /merchant/user/login,/merchant/user/register
- /app/sms/registerOrLoginCode,/merchant/sms/registerCode
- /app/versionControl/lastOne/**
# 排除静态资源 # 排除静态资源
- /static/**,/templates/** - /static/**,/templates/**
# 排除Swagger # 排除Swagger
...@@ -196,15 +193,7 @@ spring-boot-plus: ...@@ -196,15 +193,7 @@ spring-boot-plus:
# - /actuator/** # - /actuator/**
- # 排除首页 - # 排除首页
- /,/index.html - /,/index.html
- /app/noRole,/merchant/hello/world
# 航空公司介绍分页列表
- /app/airline/getPageList
# 公务机出售托管表分页列表
- /app/businessPlain/getPageList
# 包机介绍分页列表
- /app/charterIntroduction/getPageList
# 优惠调机列表分页查询
- /app/strokeDiscount/getPageList
# 多行字符串权限配置 # 多行字符串权限配置
filter-chain-definitions: | filter-chain-definitions: |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment