Commit 1a435d4e authored by m1991's avatar m1991

后台接口——用户与资讯后台接口

parent 5027eab7
...@@ -73,7 +73,7 @@ public interface UploadService { ...@@ -73,7 +73,7 @@ public interface UploadService {
* @param zxid * @param zxid
* @return * @return
*/ */
Map toExamine(Integer zxid); Map toExamine(Integer zxid,Integer approval);
} }
...@@ -486,24 +486,23 @@ public class UploadServiceImpl implements UploadService { ...@@ -486,24 +486,23 @@ public class UploadServiceImpl implements UploadService {
} }
return map; return map;
} }
/** /**
* 资讯审核 * 资讯审核-----1是通过 0是驳回
*
* @param zxid * @param zxid
* @param approval
* @return * @return
*/ */
@Override @Override
public Map toExamine(Integer zxid) { public Map toExamine(Integer zxid,Integer approval) {
Map map = new HashMap(); Map map = new HashMap();
try { try {
shopZx shopZx = shopZxMapper.selectByzxid(zxid); shopZx shopZx = shopZxMapper.selectByzxid(zxid);
if (null != shopZx) { if (null != shopZx) {
Integer ZxToExamine = shopZx.setZxToExamine(1); Integer ZxToExamine = shopZx.setZxToExamine(approval);
shopZxMapper.updateZxToExaminezxid(zxid, ZxToExamine); shopZxMapper.updateZxToExaminezxid(zxid, ZxToExamine);
} }
map.put("code", 0); map.put("code", 0);
map.put("msg", "审核通过!"); map.put("msg", "审核成功!");
} catch (BaseException e) { } catch (BaseException e) {
map.put("code", 1); map.put("code", 1);
map.put("msg", "审核失败!"); map.put("msg", "审核失败!");
......
...@@ -27,7 +27,7 @@ import java.util.Map; ...@@ -27,7 +27,7 @@ import java.util.Map;
*/ */
@Api(tags = "资讯管理") @Api(tags = "资讯管理")
@RestController @RestController
@RequestMapping("/ZX") @RequestMapping("")
@Slf4j @Slf4j
public class UploadController { public class UploadController {
...@@ -56,7 +56,7 @@ public class UploadController { ...@@ -56,7 +56,7 @@ public class UploadController {
@ApiImplicitParam(name = "file", value = "视频文件", dataType = "MultipartFile"), @ApiImplicitParam(name = "file", value = "视频文件", dataType = "MultipartFile"),
@ApiImplicitParam(name = "zxAddress", value = "资讯发布地址", dataType = "String"), @ApiImplicitParam(name = "zxAddress", value = "资讯发布地址", dataType = "String"),
@ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = true, dataType = "String")}) @ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = true, dataType = "String")})
@RequestMapping(value = "/uploadVideo", method = RequestMethod.POST) @RequestMapping(value = "/admin/ZX/uploadVideo", method = RequestMethod.POST)
public Map<String, Object> uploadVideo(@RequestParam(value = "files")MultipartFile file, HttpServletRequest request, String zxField, String inviteCode) throws Exception { public Map<String, Object> uploadVideo(@RequestParam(value = "files")MultipartFile file, HttpServletRequest request, String zxField, String inviteCode) throws Exception {
return uploadService.uploadVideo(file, request, zxField,inviteCode); return uploadService.uploadVideo(file, request, zxField,inviteCode);
} }
...@@ -70,7 +70,7 @@ public class UploadController { ...@@ -70,7 +70,7 @@ public class UploadController {
*/ */
@ApiOperation(value = "用户头像上传接口", notes = "返回路径给前台", httpMethod = "POST", produces = "application/json; charset=UTF-8") @ApiOperation(value = "用户头像上传接口", notes = "返回路径给前台", httpMethod = "POST", produces = "application/json; charset=UTF-8")
@ApiImplicitParam(name = "file", value = "单图片", dataType = "MultipartFile") @ApiImplicitParam(name = "file", value = "单图片", dataType = "MultipartFile")
@RequestMapping(value = "/uploadImage", method = RequestMethod.POST) @RequestMapping(value = "/ZX/uploadImage", method = RequestMethod.POST)
public Map<String, Object> uploadImage(@RequestParam(value = "files")MultipartFile file,String inviteCode) throws Exception { public Map<String, Object> uploadImage(@RequestParam(value = "files")MultipartFile file,String inviteCode) throws Exception {
return uploadService.uploadImage(file,inviteCode); return uploadService.uploadImage(file,inviteCode);
} }
...@@ -90,7 +90,7 @@ public class UploadController { ...@@ -90,7 +90,7 @@ public class UploadController {
@ApiImplicitParam(name = "files", value = "多图片", paramType = "form", allowMultiple=true, dataType = "__file"), @ApiImplicitParam(name = "files", value = "多图片", paramType = "form", allowMultiple=true, dataType = "__file"),
@ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = true, dataType = "String")}) @ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = true, dataType = "String")})
@RequestMapping(method = RequestMethod.POST, value = "/multipleImageUpload", headers = "content-type=multipart/form-data") @RequestMapping(method = RequestMethod.POST, value = "/ZX/multipleImageUpload", headers = "content-type=multipart/form-data")
public Map multipleImageUpload(@RequestParam(required=false,value = "files") MultipartFile[] files, String zxField, String inviteCode) { public Map multipleImageUpload(@RequestParam(required=false,value = "files") MultipartFile[] files, String zxField, String inviteCode) {
return uploadService.imageUpload(files, zxField,inviteCode); return uploadService.imageUpload(files, zxField,inviteCode);
...@@ -107,7 +107,7 @@ public class UploadController { ...@@ -107,7 +107,7 @@ public class UploadController {
@ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = false, dataType = "String"), @ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = false, dataType = "String"),
@ApiImplicitParam(name = "pageNum", value = "从几开始", required = true,dataType = "Integer"), @ApiImplicitParam(name = "pageNum", value = "从几开始", required = true,dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "一页展示数量", required = true, dataType = "Integer")}) @ApiImplicitParam(name = "pageSize", value = "一页展示数量", required = true, dataType = "Integer")})
@RequestMapping(method = RequestMethod.GET, value = "/zxAll") @RequestMapping(method = RequestMethod.GET, value = "/ZX/zxAll")
public Map selectPage(int pageNum, int pageSize,String inviteCode){ public Map selectPage(int pageNum, int pageSize,String inviteCode){
return uploadService.selectPage(pageNum,pageSize,inviteCode); return uploadService.selectPage(pageNum,pageSize,inviteCode);
...@@ -120,20 +120,22 @@ public class UploadController { ...@@ -120,20 +120,22 @@ public class UploadController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "zxid", value = "资讯ID", required = true, dataType = "int"), @ApiImplicitParam(name = "zxid", value = "资讯ID", required = true, dataType = "int"),
@ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = true, dataType = "String")}) @ApiImplicitParam(name = "inviteCode", value = "用户本人邀请码(发布人)", required = true, dataType = "String")})
@RequestMapping(method = RequestMethod.POST, value = "/thumbUp") @RequestMapping(method = RequestMethod.POST, value = "/admin/ZX/thumbUp")
public Map like(int zxid,String inviteCode){ public Map like(int zxid,String inviteCode){
return uploadService.Ilike(zxid,inviteCode); return uploadService.Ilike(zxid,inviteCode);
} }
/** /**
* TODO 审核接口 * TODO 审核接口 0通过 1驳回
*/ */
@ApiOperation(value = "用户发布资讯信息审核接口", notes = "审核接口",produces = "application/json; charset=UTF-8") @ApiOperation(value = "用户发布资讯信息审核接口", notes = "审核接口",produces = "application/json; charset=UTF-8")
@ApiImplicitParam(name = "zxid", value = "资讯ID", required = true, dataType = "int") @ApiImplicitParams({
@RequestMapping(method = RequestMethod.POST, value = "/toExamine") @ApiImplicitParam(name = "zxid", value = "资讯ID", required = true, dataType = "int"),
public Map ToExamine(int zxid){ @ApiImplicitParam(name = "approval", value = "核准字段:1是通过 0是驳回", required = true, dataType = "int")})
@RequestMapping(method = RequestMethod.POST, value = "/admin/ZX/toExamine")
public Map ToExamine(int zxid ,int approval){
return uploadService.toExamine(zxid); return uploadService.toExamine(zxid,approval);
} }
/** /**
...@@ -141,7 +143,7 @@ public class UploadController { ...@@ -141,7 +143,7 @@ public class UploadController {
*/ */
@ApiOperation(value = "后台-资讯列表", notes = "资讯列表", httpMethod = "GET") @ApiOperation(value = "后台-资讯列表", notes = "资讯列表", httpMethod = "GET")
@ApiImplicitParam(name = "query", value = "查询参数", dataType = "CultivatingPrizeDto") @ApiImplicitParam(name = "query", value = "查询参数", dataType = "CultivatingPrizeDto")
@GetMapping("/queryShopZxList") @GetMapping("/admin/ZX/queryShopZxList")
public R<PageInfo<ShopZxUserVo>> queryShopZxList(ShopZxUserDto shopZxUserDto){ public R<PageInfo<ShopZxUserVo>> queryShopZxList(ShopZxUserDto shopZxUserDto){
return uploadService.getShopZxUserList(shopZxUserDto); return uploadService.getShopZxUserList(shopZxUserDto);
} }
......
...@@ -28,7 +28,6 @@ import java.util.Map; ...@@ -28,7 +28,6 @@ import java.util.Map;
*/ */
@Api(tags = "用户管理") @Api(tags = "用户管理")
@RestController @RestController
@RequestMapping("/user")
@Slf4j @Slf4j
public class UserController extends BaseController { public class UserController extends BaseController {
...@@ -65,7 +64,7 @@ public class UserController extends BaseController { ...@@ -65,7 +64,7 @@ public class UserController extends BaseController {
@ApiOperation(value = "获取用户信息", notes = "获取用户信息", httpMethod = "GET") @ApiOperation(value = "获取用户信息", notes = "获取用户信息", httpMethod = "GET")
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "String") @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String")
@GetMapping("/getByUserId") @GetMapping("/user/getByUserId")
public User getByUserId(String userId) { public User getByUserId(String userId) {
return userService.getById(userId); return userService.getById(userId);
} }
...@@ -73,10 +72,10 @@ public class UserController extends BaseController { ...@@ -73,10 +72,10 @@ public class UserController extends BaseController {
/** /**
* shiro登录 * shiro登录
* *
* @return * @return/user
*/ */
@ApiOperation(value = "获取token接口", notes = "获取token接口", httpMethod = "POST") @ApiOperation(value = "获取token接口", notes = "获取token接口", httpMethod = "POST")
@PostMapping(value = "/login") @PostMapping(value = "/user/login")
public R<String> login(String id) { public R<String> login(String id) {
if (null == id) { if (null == id) {
return R.error("入参为空!"); return R.error("入参为空!");
...@@ -93,7 +92,7 @@ public class UserController extends BaseController { ...@@ -93,7 +92,7 @@ public class UserController extends BaseController {
} }
@ApiOperation(value = "获取用户森林状态接口", notes = "获取用户森林状态接口", httpMethod = "GET") @ApiOperation(value = "获取用户森林状态接口", notes = "获取用户森林状态接口", httpMethod = "GET")
@GetMapping("/forestStatus") @GetMapping("/user/forestStatus")
public R<Map> forestStatus(String userId) { public R<Map> forestStatus(String userId) {
if (null == userId) { if (null == userId) {
return R.error("入参为空"); return R.error("入参为空");
...@@ -108,7 +107,7 @@ public class UserController extends BaseController { ...@@ -108,7 +107,7 @@ public class UserController extends BaseController {
} }
@ApiOperation(value = "获取用户我的直推信息", notes = "获取用户我的直推信息", httpMethod = "GET") @ApiOperation(value = "获取用户我的直推信息", notes = "获取用户我的直推信息", httpMethod = "GET")
@GetMapping("/myRecommend") @GetMapping("/user/myRecommend")
public R<Map> getMyRecommend(String userId) { public R<Map> getMyRecommend(String userId) {
//用户id //用户id
int userLevel = userService.getByUserId(userId).getUserLevel(); int userLevel = userService.getByUserId(userId).getUserLevel();
...@@ -121,21 +120,21 @@ public class UserController extends BaseController { ...@@ -121,21 +120,21 @@ public class UserController extends BaseController {
} }
@ApiOperation(value = "获取用户我的团队信息", notes = "获取用户我的团队推信息", httpMethod = "GET") @ApiOperation(value = "获取用户我的团队信息", notes = "获取用户我的团队推信息", httpMethod = "GET")
@GetMapping("/myTeam") @GetMapping("/user/myTeam")
public R<TeamUserInfo> getMyTeam(String userId) { public R<TeamUserInfo> getMyTeam(String userId) {
TeamUserInfo myTeam = teamUserInfoService.getOneById(userId); TeamUserInfo myTeam = teamUserInfoService.getOneById(userId);
return R.ok(myTeam); return R.ok(myTeam);
} }
@ApiOperation(value = "获取用户我的直推信息详情", notes = "获取用户我的直推信息详情", httpMethod = "GET") @ApiOperation(value = "获取用户我的直推信息详情", notes = "获取用户我的直推信息详情", httpMethod = "GET")
@GetMapping("/myRecommendInfo") @GetMapping("/user/myRecommendInfo")
public R<List<UserAndRecommendVo>> getMyRecommendInfo(@RequestParam("userId") String userId, @RequestParam("userlevel") int userlevel) { public R<List<UserAndRecommendVo>> getMyRecommendInfo(@RequestParam("userId") String userId, @RequestParam("userlevel") int userlevel) {
List<UserAndRecommendVo> myRecommendInfo = recommendUserService.getMyRecommendInfo(userId, userlevel); List<UserAndRecommendVo> myRecommendInfo = recommendUserService.getMyRecommendInfo(userId, userlevel);
return R.ok(myRecommendInfo); return R.ok(myRecommendInfo);
} }
@ApiOperation(value = "查询空投池信息", notes = "查询空投池信息", httpMethod = "GET") @ApiOperation(value = "查询空投池信息", notes = "查询空投池信息", httpMethod = "GET")
@GetMapping("/queryAerialDelivery") @GetMapping("/user/queryAerialDelivery")
public R<AerialDeliveryVo> queryAerialDelivery() { public R<AerialDeliveryVo> queryAerialDelivery() {
log.info("shop-mall[]UserController[]queryAerialDelivery[]input.method"); log.info("shop-mall[]UserController[]queryAerialDelivery[]input.method");
...@@ -148,7 +147,7 @@ public class UserController extends BaseController { ...@@ -148,7 +147,7 @@ public class UserController extends BaseController {
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "String"), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String"),
@ApiImplicitParam(name = "headImage", value = "头像Url", dataType = "String") @ApiImplicitParam(name = "headImage", value = "头像Url", dataType = "String")
}) })
@PostMapping("/setHeadImage") @PostMapping("/user/setHeadImage")
public R<Boolean> setHeadImage(String userId, String headImage) { public R<Boolean> setHeadImage(String userId, String headImage) {
log.info("shop-mall[]UserController[]setHeadImage[]input.param.userId,headImage:" + userId, headImage); log.info("shop-mall[]UserController[]setHeadImage[]input.param.userId,headImage:" + userId, headImage);
if (StringUtils.isBlank(userId) || StringUtils.isBlank(headImage)) { if (StringUtils.isBlank(userId) || StringUtils.isBlank(headImage)) {
...@@ -163,7 +162,7 @@ public class UserController extends BaseController { ...@@ -163,7 +162,7 @@ public class UserController extends BaseController {
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "String"), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String"),
@ApiImplicitParam(name = "inviteCode", value = "邀请码", dataType = "String") @ApiImplicitParam(name = "inviteCode", value = "邀请码", dataType = "String")
}) })
@PostMapping("/fillInInviteCode") @PostMapping("/user/fillInInviteCode")
public R<Boolean> fillInInviteCode(String userId, String inviteCode) { public R<Boolean> fillInInviteCode(String userId, String inviteCode) {
log.info("shop-mall[]UserController[]fillInInviteCode[]input.param.userId,inviteCode:" + userId, inviteCode); log.info("shop-mall[]UserController[]fillInInviteCode[]input.param.userId,inviteCode:" + userId, inviteCode);
if (StringUtils.isBlank(userId) || StringUtils.isBlank(inviteCode)) { if (StringUtils.isBlank(userId) || StringUtils.isBlank(inviteCode)) {
...@@ -175,7 +174,7 @@ public class UserController extends BaseController { ...@@ -175,7 +174,7 @@ public class UserController extends BaseController {
@ApiOperation(value = "后台-用户列表", notes = "用户列表", httpMethod = "GET") @ApiOperation(value = "后台-用户列表", notes = "用户列表", httpMethod = "GET")
@ApiImplicitParam(name = "query", value = "查询参数", dataType = "TeamQueryDto") @ApiImplicitParam(name = "query", value = "查询参数", dataType = "TeamQueryDto")
@GetMapping("/queryUserList") @GetMapping("/admin/user/queryUserList")
public R<PageInfo<User>> queryUserList(TeamQueryDto queryDto) { public R<PageInfo<User>> queryUserList(TeamQueryDto queryDto) {
log.info("shop-mall[]UserController[]queryUserList[]input.param.query:" + queryDto); log.info("shop-mall[]UserController[]queryUserList[]input.param.query:" + queryDto);
return userService.getUserList(queryDto); return userService.getUserList(queryDto);
...@@ -183,7 +182,7 @@ public class UserController extends BaseController { ...@@ -183,7 +182,7 @@ public class UserController extends BaseController {
@ApiOperation(value = "后台-直推用户列表", notes = "直推用户列表", httpMethod = "GET") @ApiOperation(value = "后台-直推用户列表", notes = "直推用户列表", httpMethod = "GET")
@ApiImplicitParam(name = "query", value = "查询参数", dataType = "RecommendUserDto") @ApiImplicitParam(name = "query", value = "查询参数", dataType = "RecommendUserDto")
@GetMapping("/queryRecommendUserList") @GetMapping("/admin/user/queryRecommendUserList")
public R<PageInfo<RecommendUserVo>> queryRecommendUserList(RecommendUserDto recommendUserDto) { public R<PageInfo<RecommendUserVo>> queryRecommendUserList(RecommendUserDto recommendUserDto) {
log.info("shop-mall[]UserController[]queryRecommendUserList[]input.param.query:" + recommendUserDto); log.info("shop-mall[]UserController[]queryRecommendUserList[]input.param.query:" + recommendUserDto);
return recommendUserService.getRecommendUserList(recommendUserDto); return recommendUserService.getRecommendUserList(recommendUserDto);
...@@ -191,7 +190,7 @@ public class UserController extends BaseController { ...@@ -191,7 +190,7 @@ public class UserController extends BaseController {
@ApiOperation(value = "后台-团队用户列表", notes = "团队用户列表", httpMethod = "GET") @ApiOperation(value = "后台-团队用户列表", notes = "团队用户列表", httpMethod = "GET")
@ApiImplicitParam(name = "query", value = "查询参数", dataType = "TeamUserInfoDto") @ApiImplicitParam(name = "query", value = "查询参数", dataType = "TeamUserInfoDto")
@GetMapping("/queryTeamUserInfoList") @GetMapping("/admin/user/queryTeamUserInfoList")
public R<PageInfo<TeamUserInfoVo>> queryTeamUserInfoList(TeamUserInfoDto teamUserInfoDto) { public R<PageInfo<TeamUserInfoVo>> queryTeamUserInfoList(TeamUserInfoDto teamUserInfoDto) {
log.info("shop-mall[]UserController[]queryTeamUserInfoList[]input.param.query:" + teamUserInfoDto); log.info("shop-mall[]UserController[]queryTeamUserInfoList[]input.param.query:" + teamUserInfoDto);
return teamUserInfoService.getTeamUserInfoList(teamUserInfoDto); return teamUserInfoService.getTeamUserInfoList(teamUserInfoDto);
...@@ -199,14 +198,14 @@ public class UserController extends BaseController { ...@@ -199,14 +198,14 @@ public class UserController extends BaseController {
@ApiOperation(value = "后台-培育奖记录表", notes = "培育奖记录表", httpMethod = "GET") @ApiOperation(value = "后台-培育奖记录表", notes = "培育奖记录表", httpMethod = "GET")
@ApiImplicitParam(name = "query", value = "查询参数", dataType = "CultivatingPrizeInfoDto") @ApiImplicitParam(name = "query", value = "查询参数", dataType = "CultivatingPrizeInfoDto")
@GetMapping("/queryCultivatingInfo") @GetMapping("/admin/user/queryCultivatingInfo")
public R<PageInfo<CultivatingPrizeInfoVo>> queryCultivatingPrizeInfoList(CultivatingPrizeInfoDto cultivatingPrizeInfoDto) { public R<PageInfo<CultivatingPrizeInfoVo>> queryCultivatingPrizeInfoList(CultivatingPrizeInfoDto cultivatingPrizeInfoDto) {
log.info("shop-mall[]UserController[]queryCultivatingPrizeInfoList[]input.param.query:" + cultivatingPrizeInfoDto); log.info("shop-mall[]UserController[]queryCultivatingPrizeInfoList[]input.param.query:" + cultivatingPrizeInfoDto);
return cultivatingPrizeInfoService.getCultivatingPrizeInfoList(cultivatingPrizeInfoDto); return cultivatingPrizeInfoService.getCultivatingPrizeInfoList(cultivatingPrizeInfoDto);
} }
@ApiOperation(value = "后台-培育奖表列表", notes = "培育奖表列表", httpMethod = "GET") @ApiOperation(value = "后台-培育奖表列表", notes = "培育奖表列表", httpMethod = "GET")
@GetMapping("/queryCultivatingPrizeInfoList") @GetMapping("/admin/user/queryCultivatingPrizeInfoList")
public R<List<CultivatingPrize>> queryCultivatingPrizeList() { public R<List<CultivatingPrize>> queryCultivatingPrizeList() {
log.info("shop-mall[]UserController[]queryCultivatingPrizeList[]input.param.query:"); log.info("shop-mall[]UserController[]queryCultivatingPrizeList[]input.param.query:");
return cultivatingPrizeService.getCultivatingPrizeList(); return cultivatingPrizeService.getCultivatingPrizeList();
......
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