init
This commit is contained in:
@@ -55,9 +55,16 @@ public class AuthAppController {
|
|||||||
@Log(title = "登陆", businessType = BusinessType.OTHER, isSaveDb = false)
|
@Log(title = "登陆", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
public R<LoginVo> login(@Validated @RequestBody LoginUser loginBody){
|
public R<LoginVo> login(@Validated @RequestBody LoginUser loginBody){
|
||||||
LoginVo vo = new LoginVo();
|
LoginVo vo = new LoginVo();
|
||||||
String token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
|
String token;
|
||||||
|
if(loginBody.getLoginType() == 2){
|
||||||
|
token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
|
||||||
|
}else if(loginBody.getLoginType() == 1){
|
||||||
|
token = caiLoginManager.loginSms(loginBody.getUsername(), loginBody.getCode(), loginBody.getInviteCode());
|
||||||
|
}else{
|
||||||
|
return R.fail(600,"登陆失败,参数异常");
|
||||||
|
}
|
||||||
vo.setToken(token);
|
vo.setToken(token);
|
||||||
vo.setUserInfo(currentUserManager.currentInfo());
|
vo.setUserInfo(currentUserManager.currentBaseInfo());
|
||||||
return R.ok(vo);
|
return R.ok(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,26 @@
|
|||||||
package com.ruoyi.xq.controller;
|
package com.ruoyi.xq.controller;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
import com.ruoyi.common.core.validate.QueryGroup;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.xq.domain.DynamicImage;
|
||||||
import com.ruoyi.xq.domain.vo.DynamicImageVo;
|
import com.ruoyi.xq.service.DynamicImageService;
|
||||||
import com.ruoyi.xq.domain.bo.DynamicImageBo;
|
import lombok.RequiredArgsConstructor;
|
||||||
import com.ruoyi.xq.service.IDynamicImageService;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态图片
|
* 动态图片
|
||||||
@@ -37,27 +34,18 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
@RequestMapping("/xq/dynamicImage")
|
@RequestMapping("/xq/dynamicImage")
|
||||||
public class DynamicImageController extends BaseController {
|
public class DynamicImageController extends BaseController {
|
||||||
|
|
||||||
private final IDynamicImageService iDynamicImageService;
|
private final DynamicImageService dynamicImageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询动态图片列表
|
* 查询动态图片列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xq:dynamicImage:list")
|
@SaCheckPermission("xq:dynamicImage:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<DynamicImageVo> list(DynamicImageBo bo, PageQuery pageQuery) {
|
public TableDataInfo<DynamicImage> list(DynamicImage bo, PageQuery pageQuery) {
|
||||||
return iDynamicImageService.queryPageList(bo, pageQuery);
|
Page<DynamicImage> page = dynamicImageService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||||
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出动态图片列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("xq:dynamicImage:export")
|
|
||||||
@Log(title = "动态图片", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(DynamicImageBo bo, HttpServletResponse response) {
|
|
||||||
List<DynamicImageVo> list = iDynamicImageService.queryList(bo);
|
|
||||||
ExcelUtil.exportExcel(list, "动态图片", DynamicImageVo.class, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取动态图片详细信息
|
* 获取动态图片详细信息
|
||||||
@@ -66,9 +54,9 @@ public class DynamicImageController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("xq:dynamicImage:query")
|
@SaCheckPermission("xq:dynamicImage:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<DynamicImageVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<DynamicImage> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
return R.ok(iDynamicImageService.queryById(id));
|
return R.ok(dynamicImageService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,8 +66,8 @@ public class DynamicImageController extends BaseController {
|
|||||||
@Log(title = "动态图片", businessType = BusinessType.INSERT)
|
@Log(title = "动态图片", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody DynamicImageBo bo) {
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody DynamicImage bo) {
|
||||||
return toAjax(iDynamicImageService.insertByBo(bo));
|
return toAjax(dynamicImageService.save(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,8 +77,8 @@ public class DynamicImageController extends BaseController {
|
|||||||
@Log(title = "动态图片", businessType = BusinessType.UPDATE)
|
@Log(title = "动态图片", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DynamicImageBo bo) {
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DynamicImage bo) {
|
||||||
return toAjax(iDynamicImageService.updateByBo(bo));
|
return toAjax(dynamicImageService.updateById(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,6 +91,6 @@ public class DynamicImageController extends BaseController {
|
|||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(iDynamicImageService.deleteWithValidByIds(Arrays.asList(ids), true));
|
return toAjax(dynamicImageService.removeBatchByIds(Arrays.asList(ids)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,26 @@
|
|||||||
package com.ruoyi.xq.controller;
|
package com.ruoyi.xq.controller;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
import com.ruoyi.common.core.validate.QueryGroup;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.xq.domain.UserExtend;
|
||||||
import com.ruoyi.xq.domain.vo.UserExtendVo;
|
import com.ruoyi.xq.service.UserExtendService;
|
||||||
import com.ruoyi.xq.domain.bo.UserExtendBo;
|
import lombok.RequiredArgsConstructor;
|
||||||
import com.ruoyi.xq.service.IUserExtendService;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户邀请
|
* 用户邀请
|
||||||
@@ -37,27 +34,18 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
@RequestMapping("/xq/userExtend")
|
@RequestMapping("/xq/userExtend")
|
||||||
public class UserExtendController extends BaseController {
|
public class UserExtendController extends BaseController {
|
||||||
|
|
||||||
private final IUserExtendService iUserExtendService;
|
private final UserExtendService userExtendService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户邀请列表
|
* 查询用户邀请列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xq:userExtend:list")
|
@SaCheckPermission("xq:userExtend:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<UserExtendVo> list(UserExtendBo bo, PageQuery pageQuery) {
|
public TableDataInfo<UserExtend> list(UserExtend bo, PageQuery pageQuery) {
|
||||||
return iUserExtendService.queryPageList(bo, pageQuery);
|
Page<UserExtend> page = userExtendService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||||
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出用户邀请列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("xq:userExtend:export")
|
|
||||||
@Log(title = "用户邀请", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(UserExtendBo bo, HttpServletResponse response) {
|
|
||||||
List<UserExtendVo> list = iUserExtendService.queryList(bo);
|
|
||||||
ExcelUtil.exportExcel(list, "用户邀请", UserExtendVo.class, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户邀请详细信息
|
* 获取用户邀请详细信息
|
||||||
@@ -66,9 +54,9 @@ public class UserExtendController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("xq:userExtend:query")
|
@SaCheckPermission("xq:userExtend:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<UserExtendVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<UserExtend> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
return R.ok(iUserExtendService.queryById(id));
|
return R.ok(userExtendService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,8 +66,8 @@ public class UserExtendController extends BaseController {
|
|||||||
@Log(title = "用户邀请", businessType = BusinessType.INSERT)
|
@Log(title = "用户邀请", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserExtendBo bo) {
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserExtend bo) {
|
||||||
return toAjax(iUserExtendService.insertByBo(bo));
|
return toAjax(userExtendService.save(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,8 +77,8 @@ public class UserExtendController extends BaseController {
|
|||||||
@Log(title = "用户邀请", businessType = BusinessType.UPDATE)
|
@Log(title = "用户邀请", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserExtendBo bo) {
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserExtend bo) {
|
||||||
return toAjax(iUserExtendService.updateByBo(bo));
|
return toAjax(userExtendService.updateById(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,6 +91,6 @@ public class UserExtendController extends BaseController {
|
|||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(iUserExtendService.deleteWithValidByIds(Arrays.asList(ids), true));
|
return toAjax(userExtendService.removeBatchByIds(Arrays.asList(ids)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.ruoyi.xq.controller.app;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
|
import com.ruoyi.xq.domain.Dynamic;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.AddDynamicReq;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicListVo;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicQuery;
|
||||||
|
import com.ruoyi.xq.service.DynamicService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.Registration;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/dynamic")
|
||||||
|
@Tag(name = "动态相关接口")
|
||||||
|
public class DynamicAppController {
|
||||||
|
@Autowired
|
||||||
|
private DynamicService dynamicService;
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@Operation(summary = "新增动态")
|
||||||
|
@Log(title = "新增动态", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> addDynamic(@RequestBody AddDynamicReq req){
|
||||||
|
req.setUserId(LoginHelper.getUserId());
|
||||||
|
dynamicService.push(req);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "动态列表-分页")
|
||||||
|
@Log(title = "动态列表-分页", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<List<DynamicListVo>> page(PageQuery pageQuery, DynamicQuery dynamicQuery){
|
||||||
|
Page<DynamicListVo> page = dynamicService.pageApp(pageQuery, dynamicQuery);
|
||||||
|
return R.ok(page.getRecords());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.xq.controller.app;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.HomeUserVo;
|
||||||
|
import com.ruoyi.xq.service.UserService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/home")
|
||||||
|
@Tag(name = "首页相关接口")
|
||||||
|
public class HomeAppController {
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
@GetMapping("/user/info")
|
||||||
|
@Operation(summary = "查询用户主页信息")
|
||||||
|
@Log(title = "查询用户主页信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<HomeUserVo> homeUser(Long userId){
|
||||||
|
HomeUserVo vo = userService.homeUser(userId);
|
||||||
|
return R.ok(vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.ruoyi.xq.controller.app;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.xq.dto.app.common.IdsReq;
|
||||||
|
import com.ruoyi.xq.dto.app.user.*;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.CurrentUserFullInfoVo;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.CurrentUserInfoVo;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.UserAuthInfoVo;
|
||||||
|
import com.ruoyi.xq.manager.CurrentUserManager;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/current")
|
||||||
|
@Tag(name = "当前用户相关接口")
|
||||||
|
public class UserAppController {
|
||||||
|
@Autowired
|
||||||
|
private CurrentUserManager currentUserManager;
|
||||||
|
|
||||||
|
@GetMapping("/user/query/homeInfo")
|
||||||
|
@Operation(summary = "当前用户信息")
|
||||||
|
@Log(title = "当前用户信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<CurrentUserInfoVo> homeInfo(){
|
||||||
|
CurrentUserInfoVo vo = currentUserManager.currentBaseInfo();
|
||||||
|
return R.ok(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/user/query/fullInfo")
|
||||||
|
@Operation(summary = "当前用户的详细信息")
|
||||||
|
@Log(title = "当前用户的详细信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<CurrentUserFullInfoVo> fullInfo(){
|
||||||
|
CurrentUserFullInfoVo vo = currentUserManager.currentFullInfo();
|
||||||
|
return R.ok(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/user/query/authInfo")
|
||||||
|
@Operation(summary = "当前用户的认证信息")
|
||||||
|
@Log(title = "当前用户的认证信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<UserAuthInfoVo> authInfo(){
|
||||||
|
UserAuthInfoVo vo = currentUserManager.currentAuthInfo();
|
||||||
|
return R.ok(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/update/base")
|
||||||
|
@Operation(summary = "更新用户基本信息")
|
||||||
|
@Log(title = "更新用户基本信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> updateBaseInfo(@RequestBody UpdateBaseInfoReq req){
|
||||||
|
currentUserManager.updateBaseInfo(req);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/update/auth")
|
||||||
|
@Operation(summary = "更新用户认证信息")
|
||||||
|
@Log(title = "更新用户认证信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> updateAuth(@RequestBody UpdateUserAuthInfoReq req){
|
||||||
|
currentUserManager.updateInfoAuth(req);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/update/info")
|
||||||
|
@Operation(summary = "更新用户信息")
|
||||||
|
@Log(title = "更新用户信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> updateInfo(@RequestBody UpdateUserFullInfoReq req){
|
||||||
|
currentUserManager.updateInfo(req);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/update/avatar")
|
||||||
|
@Operation(summary = "更新用户头像信息")
|
||||||
|
@Log(title = "更新用户信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> updateAvatarInfo(@RequestBody UpdateAvatarReq req){
|
||||||
|
currentUserManager.updateAvatar(req.getAvatar());
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/update/remark")
|
||||||
|
@Operation(summary = "更新用户备注信息")
|
||||||
|
@Log(title = "更新用户备注信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> updateRemarkInfo(@RequestBody UpdateRemarkReq req){
|
||||||
|
currentUserManager.updateRemark(req.getRemark());
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/add/picture")
|
||||||
|
@Operation(summary = "新增用户照片")
|
||||||
|
@Log(title = "新增用户照片", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> addUserPicture(@RequestBody AddPicturesReq req){
|
||||||
|
currentUserManager.addUserPicture(req);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/remove/picture")
|
||||||
|
@Operation(summary = "删除用户照片")
|
||||||
|
@Log(title = "删除用户照片", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||||
|
public R<Void> removeUserPicture(@RequestBody IdsReq req){
|
||||||
|
List<Long> ids = Arrays.stream(req.getIds().split(","))
|
||||||
|
.map(Long::valueOf)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
currentUserManager.removeUserPictures(ids);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
package com.ruoyi.xq.domain;
|
package com.ruoyi.xq.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态图片对象 xq_dynamic_image
|
* 动态图片对象 xq_dynamic_image
|
||||||
@@ -16,14 +13,13 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("xq_dynamic_image")
|
@TableName("xq_dynamic_image")
|
||||||
public class DynamicImage extends BaseEntity {
|
public class DynamicImage implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ package com.ruoyi.xq.domain;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.joda.time.LocalDate;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,6 +130,9 @@ public class User implements Serializable {
|
|||||||
* 状态 0-可用 1-不可用
|
* 状态 0-可用 1-不可用
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "基础资料是否完成 0 未完成 1已完成")
|
||||||
|
private Integer finishBaseStatus;
|
||||||
/**
|
/**
|
||||||
* 邀请人
|
* 邀请人
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.ruoyi.xq.domain;
|
package com.ruoyi.xq.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户邀请对象 xq_user_extend
|
* 用户邀请对象 xq_user_extend
|
||||||
@@ -17,14 +15,13 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("xq_user_extend")
|
@TableName("xq_user_extend")
|
||||||
public class UserExtend extends BaseEntity {
|
public class UserExtend implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
@@ -61,4 +58,7 @@ public class UserExtend extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal cashbackTotal;
|
private BigDecimal cashbackTotal;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ public class UserInfoAudit implements Serializable {
|
|||||||
* 1-头像 1-自我描述
|
* 1-头像 1-自我描述
|
||||||
*/
|
*/
|
||||||
private Integer infoType;
|
private Integer infoType;
|
||||||
|
|
||||||
|
private String auditContent;
|
||||||
/**
|
/**
|
||||||
* 1-待审核 2-审核成功 3-审核失败
|
* 1-待审核 2-审核成功 3-审核失败
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
package com.ruoyi.xq.domain.bo;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 动态图片业务对象 xq_dynamic_image
|
|
||||||
*
|
|
||||||
* @author 77
|
|
||||||
* @date 2024-03-04
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class DynamicImageBo extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户号
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "用户号不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String usercode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 动态ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "动态ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long dynamicId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件URL
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "文件URL不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String url;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
package com.ruoyi.xq.domain.bo;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户邀请业务对象 xq_user_extend
|
|
||||||
*
|
|
||||||
* @author 77
|
|
||||||
* @date 2024-03-04
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class UserExtendBo extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
@NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户号
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "用户号不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String usercode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 收益的余额
|
|
||||||
*/
|
|
||||||
@NotNull(message = "收益的余额不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private BigDecimal incomeCoin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 邀请人
|
|
||||||
*/
|
|
||||||
@NotNull(message = "邀请人不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long inviteId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 邀请人Code
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "邀请人Code不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String inviteCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 消费统计
|
|
||||||
*/
|
|
||||||
@NotNull(message = "消费统计不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private BigDecimal consumeTotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提现统计
|
|
||||||
*/
|
|
||||||
@NotNull(message = "提现统计不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private BigDecimal withdrawTotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 给上家的返现提成
|
|
||||||
*/
|
|
||||||
@NotNull(message = "给上家的返现提成不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private BigDecimal cashbackTotal;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
package com.ruoyi.xq.domain.vo;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
|
||||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
|
||||||
import lombok.Data;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 动态图片视图对象 xq_dynamic_image
|
|
||||||
*
|
|
||||||
* @author 77
|
|
||||||
* @date 2024-03-04
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class DynamicImageVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户ID")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户号
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户号")
|
|
||||||
private String usercode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 动态ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "动态ID")
|
|
||||||
private Long dynamicId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件URL
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "文件URL")
|
|
||||||
private String url;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
package com.ruoyi.xq.domain.vo;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
|
||||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
|
||||||
import lombok.Data;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户邀请视图对象 xq_user_extend
|
|
||||||
*
|
|
||||||
* @author 77
|
|
||||||
* @date 2024-03-04
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class UserExtendVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户ID")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户号
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户号")
|
|
||||||
private String usercode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 收益的余额
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "收益的余额")
|
|
||||||
private BigDecimal incomeCoin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 邀请人
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "邀请人")
|
|
||||||
private Long inviteId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 邀请人Code
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "邀请人Code")
|
|
||||||
private String inviteCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 消费统计
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "消费统计")
|
|
||||||
private BigDecimal consumeTotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提现统计
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "提现统计")
|
|
||||||
private BigDecimal withdrawTotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 给上家的返现提成
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "给上家的返现提成")
|
|
||||||
private BigDecimal cashbackTotal;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
18
ruoyi-xq/src/main/java/com/ruoyi/xq/dto/app/PageInfo.java
Normal file
18
ruoyi-xq/src/main/java/com/ruoyi/xq/dto/app/PageInfo.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.xq.dto.app;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PageInfo<T> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表数据
|
||||||
|
*/
|
||||||
|
private List<T> rows;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.common;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class IdsReq {
|
||||||
|
@Schema(description = "id逗号分割")
|
||||||
|
private String ids;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.common;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserPicturesDTO {
|
||||||
|
@Schema(description = "id")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
@Schema(description = "用户号")
|
||||||
|
private String usercode;
|
||||||
|
@Schema(description = "照片")
|
||||||
|
private String picture;
|
||||||
|
@Schema(description = "1-待审核 2-审核成功 3-审核失败")
|
||||||
|
private Integer auditStatus;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.dynamic;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AddDynamicReq {
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private Long userId;
|
||||||
|
@Schema(description = "动态内容")
|
||||||
|
private String content;
|
||||||
|
@Schema(description = "动态图片")
|
||||||
|
private List<String> imageList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.dynamic;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DynamicListVo {
|
||||||
|
|
||||||
|
@Schema(description = "动态ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@Schema(description = "头像")
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
@Schema(description = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
@Schema(description = "年龄")
|
||||||
|
private Integer age;
|
||||||
|
|
||||||
|
private LocalDate birthday;
|
||||||
|
@Schema(description = "性别 0-未知 1-女 2-男")
|
||||||
|
private Integer gender;
|
||||||
|
/**
|
||||||
|
* 居住城市
|
||||||
|
*/
|
||||||
|
@Schema(description = "居住城市")
|
||||||
|
private String residenceCity;
|
||||||
|
/**
|
||||||
|
* 学历
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历")
|
||||||
|
private Integer education;
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
@Schema(description = "职业")
|
||||||
|
private Integer profession;
|
||||||
|
|
||||||
|
@Schema(description = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Schema(description = "图片列表")
|
||||||
|
private List<String> imageList;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.dynamic;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DynamicQuery {
|
||||||
|
|
||||||
|
@Schema(description = "性别 1-女 2-男")
|
||||||
|
private Integer gender;
|
||||||
|
|
||||||
|
@Schema(description = "居住城市")
|
||||||
|
private String residenceCity;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -18,4 +18,6 @@ public class LoginUser {
|
|||||||
private String password;
|
private String password;
|
||||||
@Schema(description = "登陆验证码")
|
@Schema(description = "登陆验证码")
|
||||||
private String code;
|
private String code;
|
||||||
|
@Schema(description = "邀请码")
|
||||||
|
private String inviteCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.xq.dto.app.login;
|
package com.ruoyi.xq.dto.app.login;
|
||||||
|
|
||||||
import com.ruoyi.xq.dto.app.user.CurrentUserInfoVo;
|
import com.ruoyi.xq.dto.app.user.vo.CurrentUserInfoVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AddPicturesReq {
|
||||||
|
private String picture;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpdateAvatarReq {
|
||||||
|
@Schema(description = "头像")
|
||||||
|
private String avatar;
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpdateBaseInfoReq {
|
||||||
|
@Schema(description = "为谁征婚")
|
||||||
|
private Integer forPersonals;
|
||||||
|
@Schema(description = "性别 0-未知 1-女 2-男")
|
||||||
|
private Integer gender;
|
||||||
|
@Schema(description = "生日")
|
||||||
|
private LocalDate birthday;
|
||||||
|
/**
|
||||||
|
* 身高
|
||||||
|
*/
|
||||||
|
@Schema(description = "身高")
|
||||||
|
private Integer height;
|
||||||
|
/**
|
||||||
|
* 体重
|
||||||
|
*/
|
||||||
|
@Schema(description = "体重")
|
||||||
|
private Integer weight;
|
||||||
|
/**
|
||||||
|
* 居住地
|
||||||
|
*/
|
||||||
|
@Schema(description = "居住地")
|
||||||
|
private String residence;
|
||||||
|
/**
|
||||||
|
* 户籍地
|
||||||
|
*/
|
||||||
|
@Schema(description = "户籍地")
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 学历
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历")
|
||||||
|
private Integer education;
|
||||||
|
/**
|
||||||
|
* 婚况
|
||||||
|
*/
|
||||||
|
@Schema(description = "婚况")
|
||||||
|
private Integer marriage;
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
@Schema(description = "职业")
|
||||||
|
private Integer profession;
|
||||||
|
/**
|
||||||
|
* 年收入
|
||||||
|
*/
|
||||||
|
@Schema(description = "年收入")
|
||||||
|
private Integer annualIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住房情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "住房情况")
|
||||||
|
private Integer housingStatus;
|
||||||
|
/**
|
||||||
|
* 购车情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "购车情况")
|
||||||
|
private Integer carStatus;
|
||||||
|
|
||||||
|
@Schema(description = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpdateRemarkReq {
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpdateUserAuthInfoReq {
|
||||||
|
@Schema(description = "提交学历认证")
|
||||||
|
private Boolean pushEducationAuth;
|
||||||
|
/**
|
||||||
|
* 学历照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历照片")
|
||||||
|
private String educationPic;
|
||||||
|
@Schema(description = "提交工作认证")
|
||||||
|
private Boolean pushJobAuthBoo;
|
||||||
|
/**
|
||||||
|
* 工作认证类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "工作认证类型")
|
||||||
|
private Integer jobAuthType;
|
||||||
|
/**
|
||||||
|
* 工作照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "工作照片")
|
||||||
|
private String jobPic;
|
||||||
|
@Schema(description = "提交车辆认证")
|
||||||
|
private Boolean pushCarAuth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "车辆照片")
|
||||||
|
private String carPic;
|
||||||
|
@Schema(description = "提交房子认证")
|
||||||
|
private Boolean pushHouseAuth;
|
||||||
|
/**
|
||||||
|
* 房子照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "房子照片")
|
||||||
|
private String housePic;
|
||||||
|
@Schema(description = "提交婚况认证")
|
||||||
|
private Boolean pushMarriageAuth;
|
||||||
|
/**
|
||||||
|
* 婚况照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "婚况照片")
|
||||||
|
private String marriagePic;
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户详细资料
|
||||||
|
* <p>created on 2024/3/5 10:31</p>
|
||||||
|
* @author 77
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UpdateUserFullInfoReq {
|
||||||
|
@Schema(description = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
@Schema(description = "生日")
|
||||||
|
private LocalDate birthday;
|
||||||
|
@Schema(description = "生肖")
|
||||||
|
private Integer zodiac;
|
||||||
|
@Schema(description = "星座")
|
||||||
|
private Integer sign;
|
||||||
|
@Schema(description = "身高")
|
||||||
|
private Integer height;
|
||||||
|
@Schema(description = "体重")
|
||||||
|
private Integer weight;
|
||||||
|
@Schema(description = "体型")
|
||||||
|
private Integer somatotype;
|
||||||
|
|
||||||
|
@Schema(description = "居住地")
|
||||||
|
private String residence;
|
||||||
|
@Schema(description = "户籍地")
|
||||||
|
private String address;
|
||||||
|
@Schema(description = "学历")
|
||||||
|
private Integer education;
|
||||||
|
@Schema(description = "婚况")
|
||||||
|
private Integer marriage;
|
||||||
|
@Schema(description = "职业")
|
||||||
|
private Integer profession;
|
||||||
|
@Schema(description = "年收入")
|
||||||
|
private Integer annualIncome;
|
||||||
|
@Schema(description = "公司性质")
|
||||||
|
private Integer companyNature;
|
||||||
|
@Schema(description = "为谁征婚")
|
||||||
|
private Integer forPersonals;
|
||||||
|
|
||||||
|
@Schema(description = "住房情况")
|
||||||
|
private Integer housingStatus;
|
||||||
|
@Schema(description = "购车情况")
|
||||||
|
private Integer carStatus;
|
||||||
|
@Schema(description = "是否吸烟")
|
||||||
|
private Integer smokeStatus;
|
||||||
|
@Schema(description = "是否喝酒")
|
||||||
|
private Integer drinkStatus;
|
||||||
|
@Schema(description = "民族")
|
||||||
|
private String nation;
|
||||||
|
@Schema(description = "有没有小孩")
|
||||||
|
private Integer childStatus;
|
||||||
|
@Schema(description = "家庭背景")
|
||||||
|
private Integer familyBackground;
|
||||||
|
@Schema(description = "家中排行")
|
||||||
|
private Integer familyRanking;
|
||||||
|
@Schema(description = "是否接受异地恋")
|
||||||
|
private Integer loveAtDistance;
|
||||||
|
@Schema(description = "何时结婚")
|
||||||
|
private Integer whenMarriage;
|
||||||
|
@Schema(description = "是否要小孩")
|
||||||
|
private Integer wantChild;
|
||||||
|
@Schema(description = "愿与对方父母同住")
|
||||||
|
private Integer liveAtParent;
|
||||||
|
@Schema(description = "交友目的")
|
||||||
|
private Integer findTag;
|
||||||
|
@Schema(description = "毕业院校")
|
||||||
|
private String graduateSchool;
|
||||||
|
@Schema(description = "兴趣爱好")
|
||||||
|
private String hobbys;
|
||||||
|
@Schema(description = "择偶条件-年龄")
|
||||||
|
private String filterAge;
|
||||||
|
@Schema(description = "择偶条件-身高")
|
||||||
|
private String filterHeight;
|
||||||
|
@Schema(description = "择偶条件-体型")
|
||||||
|
private String filterSomatotype;
|
||||||
|
@Schema(description = "择偶条件-婚况")
|
||||||
|
private String filterMarriage;
|
||||||
|
@Schema(description = "择偶条件-学历")
|
||||||
|
private Integer filterEducation;
|
||||||
|
@Schema(description = "择偶条件-地区")
|
||||||
|
private String filterResidence;
|
||||||
|
@Schema(description = "择偶条件-年收入")
|
||||||
|
private Integer filterAnnualIncome;
|
||||||
|
@Schema(description = "择偶条件-小孩情况")
|
||||||
|
private Integer filterChildStatus;
|
||||||
|
@Schema(description = "择偶条件-住房情况")
|
||||||
|
private Integer filterHousingStatus;
|
||||||
|
@Schema(description = "择偶条件-购车情况")
|
||||||
|
private Integer filterCarStatus;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AvatarMinAuditDTO {
|
||||||
|
|
||||||
|
private String avatar;
|
||||||
|
@Schema(description = "1-待审核 2-审核成功 3-审核失败")
|
||||||
|
private Integer auditStatus;
|
||||||
|
}
|
||||||
@@ -0,0 +1,236 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user.vo;
|
||||||
|
|
||||||
|
import com.ruoyi.xq.dto.app.common.UserPicturesDTO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户详细资料
|
||||||
|
* <p>created on 2024/3/5 10:31</p>
|
||||||
|
* @author 77
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CurrentUserFullInfoVo {
|
||||||
|
@Schema(description = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
@Schema(description = "用户编号")
|
||||||
|
private Long usercode;
|
||||||
|
@Schema(description = "用户头像")
|
||||||
|
private AvatarMinAuditDTO avatarAudit;
|
||||||
|
@Schema(description = "相册")
|
||||||
|
private List<UserPicturesDTO> userPicturesList;
|
||||||
|
@Schema(description = "自我描述")
|
||||||
|
private RemarkMinAuditDTO remarkAudit;
|
||||||
|
@Schema(description = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
@Schema(description = "性别 0-未知 1-女 2-男")
|
||||||
|
private Integer gender;
|
||||||
|
@Schema(description = "手机")
|
||||||
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
@Schema(description = "生日")
|
||||||
|
private LocalDate birthday;
|
||||||
|
/**
|
||||||
|
* 生肖
|
||||||
|
*/
|
||||||
|
@Schema(description = "生肖")
|
||||||
|
private Integer zodiac;
|
||||||
|
/**
|
||||||
|
* 星座
|
||||||
|
*/
|
||||||
|
@Schema(description = "星座")
|
||||||
|
private Integer sign;
|
||||||
|
/**
|
||||||
|
* 身高
|
||||||
|
*/
|
||||||
|
@Schema(description = "身高")
|
||||||
|
private Integer height;
|
||||||
|
/**
|
||||||
|
* 体重
|
||||||
|
*/
|
||||||
|
@Schema(description = "体重")
|
||||||
|
private Integer weight;
|
||||||
|
/**
|
||||||
|
* 体型
|
||||||
|
*/
|
||||||
|
@Schema(description = "体型")
|
||||||
|
private Integer somatotype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居住地
|
||||||
|
*/
|
||||||
|
@Schema(description = "居住地")
|
||||||
|
private String residence;
|
||||||
|
/**
|
||||||
|
* 户籍地
|
||||||
|
*/
|
||||||
|
@Schema(description = "户籍地")
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 学历
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历")
|
||||||
|
private Integer education;
|
||||||
|
/**
|
||||||
|
* 婚况
|
||||||
|
*/
|
||||||
|
@Schema(description = "婚况")
|
||||||
|
private Integer marriage;
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
@Schema(description = "职业")
|
||||||
|
private Integer profession;
|
||||||
|
/**
|
||||||
|
* 年收入
|
||||||
|
*/
|
||||||
|
@Schema(description = "年收入")
|
||||||
|
private Integer annualIncome;
|
||||||
|
/**
|
||||||
|
* 公司性质
|
||||||
|
*/
|
||||||
|
@Schema(description = "公司性质")
|
||||||
|
private Integer companyNature;
|
||||||
|
/**
|
||||||
|
* 为谁征婚
|
||||||
|
*/
|
||||||
|
@Schema(description = "为谁征婚")
|
||||||
|
private Integer forPersonals;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住房情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "住房情况")
|
||||||
|
private Integer housingStatus;
|
||||||
|
/**
|
||||||
|
* 购车情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "购车情况")
|
||||||
|
private Integer carStatus;
|
||||||
|
/**
|
||||||
|
* 是否吸烟
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否吸烟")
|
||||||
|
private Integer smokeStatus;
|
||||||
|
/**
|
||||||
|
* 是否喝酒
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否喝酒")
|
||||||
|
private Integer drinkStatus;
|
||||||
|
/**
|
||||||
|
* 民族
|
||||||
|
*/
|
||||||
|
@Schema(description = "民族")
|
||||||
|
private String nation;
|
||||||
|
/**
|
||||||
|
* 有没有小孩
|
||||||
|
*/
|
||||||
|
@Schema(description = "有没有小孩")
|
||||||
|
private Integer childStatus;
|
||||||
|
/**
|
||||||
|
* 家庭背景
|
||||||
|
*/
|
||||||
|
@Schema(description = "家庭背景")
|
||||||
|
private Integer familyBackground;
|
||||||
|
/**
|
||||||
|
* 家中排行
|
||||||
|
*/
|
||||||
|
@Schema(description = "家中排行")
|
||||||
|
private Integer familyRanking;
|
||||||
|
/**
|
||||||
|
* 是否接受异地恋
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否接受异地恋")
|
||||||
|
private Integer loveAtDistance;
|
||||||
|
/**
|
||||||
|
* 何时结婚
|
||||||
|
*/
|
||||||
|
@Schema(description = "何时结婚")
|
||||||
|
private Integer whenMarriage;
|
||||||
|
/**
|
||||||
|
* 是否要小孩
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否要小孩")
|
||||||
|
private Integer wantChild;
|
||||||
|
/**
|
||||||
|
* 愿与对方父母同住
|
||||||
|
*/
|
||||||
|
@Schema(description = "愿与对方父母同住")
|
||||||
|
private Integer liveAtParent;
|
||||||
|
/**
|
||||||
|
* 交友目的
|
||||||
|
*/
|
||||||
|
@Schema(description = "交友目的")
|
||||||
|
private Integer findTag;
|
||||||
|
/**
|
||||||
|
* 毕业院校
|
||||||
|
*/
|
||||||
|
@Schema(description = "毕业院校")
|
||||||
|
private String graduateSchool;
|
||||||
|
/**
|
||||||
|
* 兴趣爱好
|
||||||
|
*/
|
||||||
|
@Schema(description = "兴趣爱好")
|
||||||
|
private String hobbys;
|
||||||
|
/**
|
||||||
|
* 择偶条件-年龄
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-年龄")
|
||||||
|
private String filterAge;
|
||||||
|
/**
|
||||||
|
* 择偶条件-身高
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-身高")
|
||||||
|
private String filterHeight;
|
||||||
|
/**
|
||||||
|
* 择偶条件-体型
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-体型")
|
||||||
|
private String filterSomatotype;
|
||||||
|
/**
|
||||||
|
* 择偶条件-婚况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-婚况")
|
||||||
|
private String filterMarriage;
|
||||||
|
/**
|
||||||
|
* 择偶条件-学历
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-学历")
|
||||||
|
private Integer filterEducation;
|
||||||
|
/**
|
||||||
|
* 择偶条件-地区
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-地区")
|
||||||
|
private String filterResidence;
|
||||||
|
/**
|
||||||
|
* 择偶条件-年收入
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-年收入")
|
||||||
|
private Integer filterAnnualIncome;
|
||||||
|
/**
|
||||||
|
* 择偶条件-小孩情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-小孩情况")
|
||||||
|
private Integer filterChildStatus;
|
||||||
|
/**
|
||||||
|
* 择偶条件-住房情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-住房情况")
|
||||||
|
private Integer filterHousingStatus;
|
||||||
|
/**
|
||||||
|
* 择偶条件-购车情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-购车情况")
|
||||||
|
private Integer filterCarStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0-可用 1-不可用
|
||||||
|
*/
|
||||||
|
@Schema(description = "状态 0-可用 1-不可用")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@@ -1,26 +1,21 @@
|
|||||||
package com.ruoyi.xq.dto.app.user;
|
package com.ruoyi.xq.dto.app.user.vo;
|
||||||
|
|
||||||
|
import com.ruoyi.xq.dto.app.common.UserPicturesDTO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "当前用户模型")
|
@Schema(description = "当前用户模型")
|
||||||
public class CurrentUserInfoVo {
|
public class CurrentUserInfoVo {
|
||||||
|
|
||||||
@Schema(description = "用户ID")
|
@Schema(description = "用户ID")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
@Schema(description = "用户编号")
|
||||||
@Schema(description = "邀请人ID")
|
private String usercode;
|
||||||
private Long inviteId;
|
|
||||||
@Schema(description = "用户类型 0-普通用户 1-内部用户")
|
@Schema(description = "用户类型 0-普通用户 1-内部用户")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
/**
|
|
||||||
* 用户号/ID号
|
|
||||||
*/
|
|
||||||
@Schema(description = "蜜瓜号")
|
|
||||||
private String usercode;
|
|
||||||
/**
|
/**
|
||||||
* 昵称
|
* 昵称
|
||||||
*/
|
*/
|
||||||
@@ -36,58 +31,42 @@ public class CurrentUserInfoVo {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "头像")
|
@Schema(description = "头像")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
/**
|
|
||||||
* 头像状态,0 系统默认头像,1 用户自定义头像
|
|
||||||
*/
|
|
||||||
@Schema(description = "头像状态 0-默认 1-自定义")
|
|
||||||
private Integer avatarState;
|
|
||||||
/**
|
/**
|
||||||
* 性别 0 未知 1 女 2 男
|
* 性别 0 未知 1 女 2 男
|
||||||
*/
|
*/
|
||||||
@Schema(description = "性别 0-未知 1-女 2-男")
|
@Schema(description = "性别 0-未知 1-女 2-男")
|
||||||
private Integer gender;
|
private Integer gender;
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Schema(description = "生日")
|
@Schema(description = "生日")
|
||||||
private LocalDate birthday;
|
private LocalDate birthday;
|
||||||
@Schema(description = "年龄")
|
@Schema(description = "年龄")
|
||||||
private Integer age = 18;
|
private Integer age;
|
||||||
/**
|
// @Schema(description = "城市ID")
|
||||||
* 城市
|
// private Integer cityId;
|
||||||
*/
|
@Schema(description = "居住城市")
|
||||||
@Schema(description = "城市ID")
|
private String residenceCity;
|
||||||
private Integer cityId;
|
|
||||||
@Schema(description = "城市")
|
|
||||||
private String city;
|
|
||||||
/**
|
|
||||||
* 是否是播主 0 否 1 是
|
|
||||||
*/
|
|
||||||
@Schema(description = "主播 0-否 1-是")
|
|
||||||
private Integer isAnchor;
|
|
||||||
/**
|
|
||||||
* 开启视频接听 0 未开启 1 已开启
|
|
||||||
*/
|
|
||||||
@Schema(description = "开启视频接听 0-否 1-是")
|
|
||||||
private Integer openVideoStatus;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态 0 可用 1 不可用
|
* 状态 0 可用 1 不可用
|
||||||
*/
|
*/
|
||||||
@Schema(description = "可用状态 0-可用 1-封禁")
|
@Schema(description = "可用状态 0-可用 1-封禁")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
/**
|
@Schema(description = "基础资料是否完成 0 未完成 1已完成")
|
||||||
* 资料是否完成 0 未完成 1已完成
|
private Integer finishBaseStatus;
|
||||||
*/
|
|
||||||
@Schema(description = "资料是否完成 0 未完成 1已完成")
|
|
||||||
private Integer finishStatus;
|
|
||||||
|
|
||||||
@Schema(description = "imToken")
|
@Schema(description = "imToken")
|
||||||
private String imToken;
|
private String imToken;
|
||||||
|
|
||||||
|
@Schema(description = "交换微信次数")
|
||||||
|
private Integer wxExchangeNum = 0;
|
||||||
|
|
||||||
|
@Schema(description = "已认证数量")
|
||||||
|
private Integer alreadyAuthNum = 0;
|
||||||
|
|
||||||
|
@Schema(description = "最大认证数量")
|
||||||
|
private Integer maxAuthNum = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 相册
|
* 相册
|
||||||
*/
|
*/
|
||||||
// @Schema(description = "相册")
|
@Schema(description = "相册")
|
||||||
// private List<UserAlbumDTO> userAlbumList;
|
private List<UserPicturesDTO> userPicturesList;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HomeUserVo {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
@Schema(description = "用户编号")
|
||||||
|
private Long usercode;
|
||||||
|
@Schema(description = "用户头像")
|
||||||
|
private String avatar;
|
||||||
|
@Schema(description = "相册")
|
||||||
|
private List<String> userPictureList;
|
||||||
|
@Schema(description = "自我描述")
|
||||||
|
private String remark;
|
||||||
|
@Schema(description = "昵称")
|
||||||
|
private String nickname;
|
||||||
|
@Schema(description = "性别 0-未知 1-女 2-男")
|
||||||
|
private Integer gender;
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
@Schema(description = "生日")
|
||||||
|
private LocalDate birthday;
|
||||||
|
/**
|
||||||
|
* 生肖
|
||||||
|
*/
|
||||||
|
@Schema(description = "生肖")
|
||||||
|
private Integer zodiac;
|
||||||
|
/**
|
||||||
|
* 星座
|
||||||
|
*/
|
||||||
|
@Schema(description = "星座")
|
||||||
|
private Integer sign;
|
||||||
|
/**
|
||||||
|
* 身高
|
||||||
|
*/
|
||||||
|
@Schema(description = "身高")
|
||||||
|
private Integer height;
|
||||||
|
/**
|
||||||
|
* 体重
|
||||||
|
*/
|
||||||
|
@Schema(description = "体重")
|
||||||
|
private Integer weight;
|
||||||
|
/**
|
||||||
|
* 体型
|
||||||
|
*/
|
||||||
|
@Schema(description = "体型")
|
||||||
|
private Integer somatotype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居住地
|
||||||
|
*/
|
||||||
|
@Schema(description = "居住地")
|
||||||
|
private String residence;
|
||||||
|
/**
|
||||||
|
* 户籍地
|
||||||
|
*/
|
||||||
|
@Schema(description = "户籍地")
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 学历
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历")
|
||||||
|
private Integer education;
|
||||||
|
/**
|
||||||
|
* 婚况
|
||||||
|
*/
|
||||||
|
@Schema(description = "婚况")
|
||||||
|
private Integer marriage;
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
@Schema(description = "职业")
|
||||||
|
private Integer profession;
|
||||||
|
/**
|
||||||
|
* 年收入
|
||||||
|
*/
|
||||||
|
@Schema(description = "年收入")
|
||||||
|
private Integer annualIncome;
|
||||||
|
/**
|
||||||
|
* 公司性质
|
||||||
|
*/
|
||||||
|
@Schema(description = "公司性质")
|
||||||
|
private Integer companyNature;
|
||||||
|
/**
|
||||||
|
* 为谁征婚
|
||||||
|
*/
|
||||||
|
@Schema(description = "为谁征婚")
|
||||||
|
private Integer forPersonals;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住房情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "住房情况")
|
||||||
|
private Integer housingStatus;
|
||||||
|
/**
|
||||||
|
* 购车情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "购车情况")
|
||||||
|
private Integer carStatus;
|
||||||
|
/**
|
||||||
|
* 是否吸烟
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否吸烟")
|
||||||
|
private Integer smokeStatus;
|
||||||
|
/**
|
||||||
|
* 是否喝酒
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否喝酒")
|
||||||
|
private Integer drinkStatus;
|
||||||
|
/**
|
||||||
|
* 民族
|
||||||
|
*/
|
||||||
|
@Schema(description = "民族")
|
||||||
|
private String nation;
|
||||||
|
/**
|
||||||
|
* 有没有小孩
|
||||||
|
*/
|
||||||
|
@Schema(description = "有没有小孩")
|
||||||
|
private Integer childStatus;
|
||||||
|
/**
|
||||||
|
* 家庭背景
|
||||||
|
*/
|
||||||
|
@Schema(description = "家庭背景")
|
||||||
|
private Integer familyBackground;
|
||||||
|
/**
|
||||||
|
* 家中排行
|
||||||
|
*/
|
||||||
|
@Schema(description = "家中排行")
|
||||||
|
private Integer familyRanking;
|
||||||
|
/**
|
||||||
|
* 是否接受异地恋
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否接受异地恋")
|
||||||
|
private Integer loveAtDistance;
|
||||||
|
/**
|
||||||
|
* 何时结婚
|
||||||
|
*/
|
||||||
|
@Schema(description = "何时结婚")
|
||||||
|
private Integer whenMarriage;
|
||||||
|
/**
|
||||||
|
* 是否要小孩
|
||||||
|
*/
|
||||||
|
@Schema(description = "是否要小孩")
|
||||||
|
private Integer wantChild;
|
||||||
|
/**
|
||||||
|
* 愿与对方父母同住
|
||||||
|
*/
|
||||||
|
@Schema(description = "愿与对方父母同住")
|
||||||
|
private Integer liveAtParent;
|
||||||
|
/**
|
||||||
|
* 交友目的
|
||||||
|
*/
|
||||||
|
@Schema(description = "交友目的")
|
||||||
|
private Integer findTag;
|
||||||
|
/**
|
||||||
|
* 毕业院校
|
||||||
|
*/
|
||||||
|
@Schema(description = "毕业院校")
|
||||||
|
private String graduateSchool;
|
||||||
|
/**
|
||||||
|
* 兴趣爱好
|
||||||
|
*/
|
||||||
|
@Schema(description = "兴趣爱好")
|
||||||
|
private String hobbys;
|
||||||
|
/**
|
||||||
|
* 择偶条件-年龄
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-年龄")
|
||||||
|
private String filterAge;
|
||||||
|
/**
|
||||||
|
* 择偶条件-身高
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-身高")
|
||||||
|
private String filterHeight;
|
||||||
|
/**
|
||||||
|
* 择偶条件-体型
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-体型")
|
||||||
|
private String filterSomatotype;
|
||||||
|
/**
|
||||||
|
* 择偶条件-婚况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-婚况")
|
||||||
|
private String filterMarriage;
|
||||||
|
/**
|
||||||
|
* 择偶条件-学历
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-学历")
|
||||||
|
private Integer filterEducation;
|
||||||
|
/**
|
||||||
|
* 择偶条件-地区
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-地区")
|
||||||
|
private String filterResidence;
|
||||||
|
/**
|
||||||
|
* 择偶条件-年收入
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-年收入")
|
||||||
|
private Integer filterAnnualIncome;
|
||||||
|
/**
|
||||||
|
* 择偶条件-小孩情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-小孩情况")
|
||||||
|
private Integer filterChildStatus;
|
||||||
|
/**
|
||||||
|
* 择偶条件-住房情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-住房情况")
|
||||||
|
private Integer filterHousingStatus;
|
||||||
|
/**
|
||||||
|
* 择偶条件-购车情况
|
||||||
|
*/
|
||||||
|
@Schema(description = "择偶条件-购车情况")
|
||||||
|
private Integer filterCarStatus;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RemarkMinAuditDTO {
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
@Schema(description = "正在审核中的备注")
|
||||||
|
private String auditRemark;
|
||||||
|
@Schema(description = "1-待审核 2-审核成功 3-审核失败")
|
||||||
|
private Integer auditStatus;
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package com.ruoyi.xq.dto.app.user.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserAuthInfoVo {
|
||||||
|
|
||||||
|
@Schema(description = "用户Id")
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 用户号
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户编号")
|
||||||
|
private String usercode;
|
||||||
|
/**
|
||||||
|
* 实名认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "实名认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer cardNumAuth;
|
||||||
|
/**
|
||||||
|
* 身份证ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "身份证ID")
|
||||||
|
private String cardNumId;
|
||||||
|
/**
|
||||||
|
* 身份证ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "身份证名称")
|
||||||
|
private String cardNumName;
|
||||||
|
/**
|
||||||
|
* 手机认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "手机认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer phoneAuth;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
@Schema(description = "手机号")
|
||||||
|
private String phone;
|
||||||
|
/**
|
||||||
|
* 单身认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "单身认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer singlePersonAuth;
|
||||||
|
/**
|
||||||
|
* 学历认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer educationAuth;
|
||||||
|
/**
|
||||||
|
* 学历照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "学历照片")
|
||||||
|
private String educationPic;
|
||||||
|
/**
|
||||||
|
* 工作认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "工作认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer jobAuth;
|
||||||
|
/**
|
||||||
|
* 工作认证类型
|
||||||
|
*/
|
||||||
|
@Schema(description = "工作认证类型")
|
||||||
|
private Integer jobAuthType;
|
||||||
|
/**
|
||||||
|
* 工作照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "工作照片")
|
||||||
|
private String jobPic;
|
||||||
|
/**
|
||||||
|
* 车辆认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "车辆认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer carAuth;
|
||||||
|
/**
|
||||||
|
* 车辆照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "车辆照片")
|
||||||
|
private String carPic;
|
||||||
|
/**
|
||||||
|
* 房子认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "房子认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer houseAuth;
|
||||||
|
/**
|
||||||
|
* 房子照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "房子照片")
|
||||||
|
private String housePic;
|
||||||
|
/**
|
||||||
|
* 婚况认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||||
|
*/
|
||||||
|
@Schema(description = "婚况认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败")
|
||||||
|
private Integer marriageAuth;
|
||||||
|
/**
|
||||||
|
* 婚况照片
|
||||||
|
*/
|
||||||
|
@Schema(description = "婚况照片")
|
||||||
|
private String marriagePic;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.ruoyi.xq.enums.user;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
// single-单身认证 education-学历认证 job-工作认证 car-车辆认证 house-房子认证 marriage-婚况认证
|
||||||
|
@Getter
|
||||||
|
public enum UserAuthTypeEnum {
|
||||||
|
SINGLE("single","单身认证"),
|
||||||
|
EDUCATION("education","学历认证"),
|
||||||
|
JOB("job","工作认证"),
|
||||||
|
CAR("car","车辆认证"),
|
||||||
|
HOUSE("house","房子认证"),
|
||||||
|
MARRIAGE("marriage","婚况认证"),
|
||||||
|
|
||||||
|
;
|
||||||
|
private final String code;
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
UserAuthTypeEnum(String code, String text) {
|
||||||
|
this.code = code;
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.xq.enums.user;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum UserInfoAuditTypeEnum {
|
||||||
|
AVATAR(1,"头像"),
|
||||||
|
REMARK(2,"备注"),
|
||||||
|
|
||||||
|
;
|
||||||
|
private final Integer code;
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
UserInfoAuditTypeEnum(Integer code, String text) {
|
||||||
|
this.code = code;
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ public class LockKey {
|
|||||||
public static final String LOCK_SEND_GIFT_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGift:%s";
|
public static final String LOCK_SEND_GIFT_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGift:%s";
|
||||||
public static final String LOCK_VIDEO_SETTLE_REDIS = RedisHttpConstant.REDIS_P + "lock:videoSettle:%s";
|
public static final String LOCK_VIDEO_SETTLE_REDIS = RedisHttpConstant.REDIS_P + "lock:videoSettle:%s";
|
||||||
public static final String LOCK_ONLINE_LOGIN_NOTICE_REDIS = RedisHttpConstant.REDIS_P + "lockHand:loginFansNotice:%s";
|
public static final String LOCK_ONLINE_LOGIN_NOTICE_REDIS = RedisHttpConstant.REDIS_P + "lockHand:loginFansNotice:%s";
|
||||||
|
public static final String LOCK_USER_INFO_AUDIT_REDIS = RedisHttpConstant.REDIS_P + "lock:userInfoAudit:%s";
|
||||||
|
|
||||||
public static String getRegisterLockKey(String mobile){
|
public static String getRegisterLockKey(String mobile){
|
||||||
return String.format(LOCK_REGISTER_REDIS,mobile);
|
return String.format(LOCK_REGISTER_REDIS,mobile);
|
||||||
@@ -45,4 +46,8 @@ public class LockKey {
|
|||||||
public static String getLoginNoticeFansLock(Long userId){
|
public static String getLoginNoticeFansLock(Long userId){
|
||||||
return String.format(LOCK_ONLINE_LOGIN_NOTICE_REDIS,userId);
|
return String.format(LOCK_ONLINE_LOGIN_NOTICE_REDIS,userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getUserInfoAuditLock(Long userId) {
|
||||||
|
return String.format(LOCK_USER_INFO_AUDIT_REDIS,userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
|||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.enums.UserType;
|
import com.ruoyi.common.enums.UserType;
|
||||||
@@ -14,10 +15,7 @@ import com.ruoyi.common.helper.LoginHelper;
|
|||||||
import com.ruoyi.common.utils.MessageUtils;
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
import com.ruoyi.system.service.SysLoginService;
|
import com.ruoyi.system.service.SysLoginService;
|
||||||
import com.ruoyi.xq.domain.User;
|
import com.ruoyi.xq.domain.*;
|
||||||
import com.ruoyi.xq.domain.UserAuth;
|
|
||||||
import com.ruoyi.xq.domain.UserInfo;
|
|
||||||
import com.ruoyi.xq.domain.UserLogin;
|
|
||||||
import com.ruoyi.xq.enums.common.AuditEnum;
|
import com.ruoyi.xq.enums.common.AuditEnum;
|
||||||
import com.ruoyi.xq.enums.common.CodeEnum;
|
import com.ruoyi.xq.enums.common.CodeEnum;
|
||||||
import com.ruoyi.xq.enums.common.SystemConfigEnum;
|
import com.ruoyi.xq.enums.common.SystemConfigEnum;
|
||||||
@@ -66,6 +64,8 @@ public class CaiLoginManager {
|
|||||||
private ImUserClient imUserClient;
|
private ImUserClient imUserClient;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SmsVerifyService smsVerifyService;
|
private SmsVerifyService smsVerifyService;
|
||||||
|
@Autowired
|
||||||
|
private UserExtendService userExtendService;
|
||||||
|
|
||||||
public String login(String username,String password){
|
public String login(String username,String password){
|
||||||
User user = userService.getByUsername(username);
|
User user = userService.getByUsername(username);
|
||||||
@@ -128,7 +128,6 @@ public class CaiLoginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void dealInviteId(User user){
|
public void dealInviteId(User user){
|
||||||
String inviteCode = user.getInviteCode();
|
String inviteCode = user.getInviteCode();
|
||||||
if(StringUtils.isEmpty(inviteCode)){
|
if(StringUtils.isEmpty(inviteCode)){
|
||||||
@@ -138,34 +137,16 @@ public class CaiLoginManager {
|
|||||||
if(inviteUser == null){
|
if(inviteUser == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String key = LockKey.getDealInviteLockKey(user.getId());
|
userService.update(Wrappers.lambdaUpdate(User.class)
|
||||||
RLock lock = redissonClient.getLock(key);
|
.eq(User::getId,user.getId())
|
||||||
if(lock.isLocked()){
|
.set(User::getInviteId, inviteUser.getId()));
|
||||||
log.warn("点击太快了,等一等,dealInviteId");
|
userExtendService.update(Wrappers.lambdaUpdate(UserExtend.class)
|
||||||
return;
|
.eq(UserExtend::getUserId, user.getId())
|
||||||
}
|
.set(UserExtend::getInviteId, inviteUser.getId())
|
||||||
lock.lock(5,TimeUnit.SECONDS);
|
.set(UserExtend::getInviteCode, inviteUser.getUsercode()));
|
||||||
try {
|
|
||||||
/*UserInvite check = userInviteService.getByUserId(user.getId());
|
|
||||||
if(check == null){
|
|
||||||
UserInvite userInvite = new UserInvite();
|
|
||||||
userInvite.setUserId(user.getId());
|
|
||||||
userInvite.setInviteId(user.getInviteId());
|
|
||||||
userInviteService.save(userInvite);
|
|
||||||
}else{
|
|
||||||
userInviteService.update(Wrappers.lambdaUpdate(UserInvite.class)
|
|
||||||
.eq(UserInvite::getId,check.getId())
|
|
||||||
.set(UserInvite::getInviteId,user.getInviteId())
|
|
||||||
.set(UserInvite::getRewardCoinTotal,0L));
|
|
||||||
}*/
|
|
||||||
}finally {
|
|
||||||
lock.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退出登录
|
* 退出登录
|
||||||
*/
|
*/
|
||||||
@@ -248,8 +229,13 @@ public class CaiLoginManager {
|
|||||||
UserAuth userAuth = new UserAuth();
|
UserAuth userAuth = new UserAuth();
|
||||||
userAuth.setUsercode(usercode);
|
userAuth.setUsercode(usercode);
|
||||||
userAuth.setUserId(add.getId());
|
userAuth.setUserId(add.getId());
|
||||||
|
userAuth.setPhone(add.getMobile());
|
||||||
userAuth.setPhoneAuth(AuditEnum.SUCCESS.getCode());
|
userAuth.setPhoneAuth(AuditEnum.SUCCESS.getCode());
|
||||||
userAuthService.save(userAuth);
|
userAuthService.save(userAuth);
|
||||||
|
UserExtend userExtend = new UserExtend();
|
||||||
|
userExtend.setUsercode(usercode);
|
||||||
|
userExtend.setUserId(add.getId());
|
||||||
|
userExtendService.save(userExtend);
|
||||||
return add;
|
return add;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,301 @@
|
|||||||
package com.ruoyi.xq.manager;
|
package com.ruoyi.xq.manager;
|
||||||
|
|
||||||
import com.ruoyi.xq.dto.app.user.CurrentUserInfoVo;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.Data;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.helper.LoginHelper;
|
||||||
|
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||||
|
import com.ruoyi.xq.domain.*;
|
||||||
|
import com.ruoyi.xq.dto.app.common.UserPicturesDTO;
|
||||||
|
import com.ruoyi.xq.dto.app.user.AddPicturesReq;
|
||||||
|
import com.ruoyi.xq.dto.app.user.UpdateBaseInfoReq;
|
||||||
|
import com.ruoyi.xq.dto.app.user.UpdateUserAuthInfoReq;
|
||||||
|
import com.ruoyi.xq.dto.app.user.UpdateUserFullInfoReq;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.*;
|
||||||
|
import com.ruoyi.xq.enums.common.AuditEnum;
|
||||||
|
import com.ruoyi.xq.enums.user.UserAuthTypeEnum;
|
||||||
|
import com.ruoyi.xq.enums.user.UserInfoAuditTypeEnum;
|
||||||
|
import com.ruoyi.xq.lock.LockKey;
|
||||||
|
import com.ruoyi.xq.service.*;
|
||||||
|
import com.ruoyi.xq.util.AgeUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.redisson.api.RLock;
|
||||||
|
import org.redisson.api.RedissonClient;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@Slf4j
|
||||||
public class CurrentUserManager {
|
public class CurrentUserManager {
|
||||||
public CurrentUserInfoVo currentInfo() {
|
@Autowired
|
||||||
return null;
|
private UserService userService;
|
||||||
|
@Autowired
|
||||||
|
private UserPicturesService userPicturesService;
|
||||||
|
@Autowired
|
||||||
|
private UserInfoService userInfoService;
|
||||||
|
@Autowired
|
||||||
|
private UserAuthService userAuthService;
|
||||||
|
@Autowired
|
||||||
|
private UserAuthAuditService userAuthAuditService;
|
||||||
|
@Autowired
|
||||||
|
private UserInfoAuditService userInfoAuditService;
|
||||||
|
|
||||||
|
|
||||||
|
public CurrentUserFullInfoVo currentFullInfo(){
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
UserInfo userInfo = userInfoService.getByUserId(userId);
|
||||||
|
CurrentUserFullInfoVo result = new CurrentUserFullInfoVo();
|
||||||
|
BeanConvertUtil.copyProperties(userInfo,result);
|
||||||
|
BeanConvertUtil.copyProperties(user,result);
|
||||||
|
UserInfoAudit avatarAudit = userInfoAuditService.getByUserIdAndType(userId, UserInfoAuditTypeEnum.AVATAR);
|
||||||
|
AvatarMinAuditDTO avatarAuditInfo = new AvatarMinAuditDTO();
|
||||||
|
avatarAuditInfo.setAvatar(user.getAvatar());
|
||||||
|
avatarAuditInfo.setAuditStatus(AuditEnum.NO.getCode());
|
||||||
|
if(avatarAudit != null){
|
||||||
|
avatarAuditInfo.setAvatar(avatarAudit.getAuditContent());
|
||||||
|
avatarAuditInfo.setAuditStatus(avatarAudit.getAuditStatus());
|
||||||
|
}
|
||||||
|
result.setAvatarAudit(avatarAuditInfo);
|
||||||
|
|
||||||
|
UserInfoAudit remarkAudit = userInfoAuditService.getByUserIdAndType(userId, UserInfoAuditTypeEnum.REMARK);
|
||||||
|
RemarkMinAuditDTO remarkAuditInfo = new RemarkMinAuditDTO();
|
||||||
|
remarkAuditInfo.setRemark(user.getAvatar());
|
||||||
|
remarkAuditInfo.setAuditStatus(AuditEnum.NO.getCode());
|
||||||
|
if(remarkAudit != null){
|
||||||
|
remarkAuditInfo.setAuditRemark(remarkAudit.getAuditContent());
|
||||||
|
remarkAuditInfo.setAuditStatus(remarkAudit.getAuditStatus());
|
||||||
|
}
|
||||||
|
result.setRemarkAudit(remarkAuditInfo);
|
||||||
|
|
||||||
|
List<UserPictures> userPictures = userPicturesService.listByUserId(user.getId());
|
||||||
|
result.setUserPicturesList(BeanConvertUtil.convertListTo(userPictures, UserPicturesDTO::new));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public CurrentUserInfoVo currentBaseInfo() {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
CurrentUserInfoVo vo = new CurrentUserInfoVo();
|
||||||
|
vo.setUserId(user.getId());
|
||||||
|
vo.setUsercode(user.getUsercode());
|
||||||
|
vo.setType(user.getType());
|
||||||
|
vo.setNickname(user.getNickname());
|
||||||
|
vo.setMobile(user.getMobile());
|
||||||
|
vo.setAvatar(user.getAvatar());
|
||||||
|
vo.setGender(user.getGender());
|
||||||
|
vo.setBirthday(user.getBirthday());
|
||||||
|
vo.setAge(AgeUtil.getAge(user.getBirthday()));
|
||||||
|
vo.setResidenceCity(user.getResidenceCity());
|
||||||
|
vo.setStatus(user.getStatus());
|
||||||
|
vo.setFinishBaseStatus(user.getFinishBaseStatus());
|
||||||
|
vo.setImToken(user.getImToken());
|
||||||
|
List<UserPictures> userPictures = userPicturesService.listByUserId(user.getId());
|
||||||
|
vo.setUserPicturesList(BeanConvertUtil.convertListTo(userPictures, UserPicturesDTO::new));
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateBaseInfo(UpdateBaseInfoReq req) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User updateUser = BeanConvertUtil.convertTo(req, User::new);
|
||||||
|
updateUser.setId(userId);
|
||||||
|
userService.updateById(updateUser);
|
||||||
|
UserInfo updateUserInfo = BeanConvertUtil.convertTo(req, UserInfo::new);
|
||||||
|
UserInfo userInfo = userInfoService.getByUserId(userId);
|
||||||
|
updateUserInfo.setId(userInfo.getId());
|
||||||
|
userInfoService.updateById(updateUserInfo);
|
||||||
|
// 检查finishStatus
|
||||||
|
boolean finishBaseStatus = true;
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
if(user.getForPersonals() == null || user.getGender() == 0
|
||||||
|
|| user.getBirthday() == null || user.getHeight() == null
|
||||||
|
|| user.getWeight() == null || user.getResidence() == null
|
||||||
|
|| user.getAddress() == null || user.getEducation() == null
|
||||||
|
|| user.getMarriage() == null || user.getProfession() == null
|
||||||
|
|| user.getAnnualIncome() == null || user.getUsercode() == null){
|
||||||
|
finishBaseStatus = false;
|
||||||
|
}
|
||||||
|
userInfo = userInfoService.getById(userInfo.getId());
|
||||||
|
if(userInfo.getCarStatus() == null || userInfo.getHousingStatus() == null){
|
||||||
|
finishBaseStatus = false;
|
||||||
|
}
|
||||||
|
if(finishBaseStatus){
|
||||||
|
userService.update(Wrappers.lambdaUpdate(User.class)
|
||||||
|
.eq(User::getId,user.getId())
|
||||||
|
.set(User::getFinishBaseStatus, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedissonClient redissonClient;
|
||||||
|
|
||||||
|
public void updateRemark(String remark){
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
RLock lock = redissonClient.getLock(LockKey.getUserInfoAuditLock(userId));
|
||||||
|
try {
|
||||||
|
if(lock.isLocked()){
|
||||||
|
log.warn("点击太快了,等一等,dealInviteId");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lock.lock(5,TimeUnit.SECONDS);
|
||||||
|
UserInfoAudit audit = userInfoAuditService.getByUserIdAndType(userId, UserInfoAuditTypeEnum.REMARK);
|
||||||
|
if(audit == null){
|
||||||
|
audit = new UserInfoAudit();
|
||||||
|
audit.setUserId(userId);
|
||||||
|
audit.setUsercode(user.getUsercode());
|
||||||
|
audit.setInfoType(UserInfoAuditTypeEnum.REMARK.getCode());
|
||||||
|
audit.setAuditContent(remark);
|
||||||
|
audit.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||||
|
userInfoAuditService.save(audit);
|
||||||
|
}else{
|
||||||
|
userInfoAuditService.update(Wrappers.lambdaUpdate(UserInfoAudit.class)
|
||||||
|
.set(UserInfoAudit::getAuditContent, remark)
|
||||||
|
.eq(UserInfoAudit::getId, audit.getId()));
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
lock.unlockAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateAvatar(String avatar){
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
RLock lock = redissonClient.getLock(LockKey.getUserInfoAuditLock(userId));
|
||||||
|
try {
|
||||||
|
if(lock.isLocked()){
|
||||||
|
log.warn("点击太快了,等一等,dealInviteId");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lock.lock(5,TimeUnit.SECONDS);
|
||||||
|
UserInfoAudit audit = userInfoAuditService.getByUserIdAndType(userId, UserInfoAuditTypeEnum.AVATAR);
|
||||||
|
if(audit == null){
|
||||||
|
audit = new UserInfoAudit();
|
||||||
|
audit.setUserId(userId);
|
||||||
|
audit.setUsercode(user.getUsercode());
|
||||||
|
audit.setInfoType(UserInfoAuditTypeEnum.AVATAR.getCode());
|
||||||
|
audit.setAuditContent(avatar);
|
||||||
|
audit.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||||
|
userInfoAuditService.save(audit);
|
||||||
|
}else{
|
||||||
|
userInfoAuditService.update(Wrappers.lambdaUpdate(UserInfoAudit.class)
|
||||||
|
.set(UserInfoAudit::getAuditContent, avatar)
|
||||||
|
.eq(UserInfoAudit::getId, audit.getId()));
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
lock.unlockAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateInfo(UpdateUserFullInfoReq req) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User updateUser = BeanConvertUtil.convertTo(req, User::new);
|
||||||
|
updateUser.setId(userId);
|
||||||
|
userService.updateById(updateUser);
|
||||||
|
UserInfo updateUserInfo = BeanConvertUtil.convertTo(req, UserInfo::new);
|
||||||
|
UserInfo userInfo = userInfoService.getByUserId(userId);
|
||||||
|
updateUserInfo.setId(userInfo.getId());
|
||||||
|
userInfoService.updateById(updateUserInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserAuthInfoVo currentAuthInfo() {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
UserAuth userAuth = userAuthService.getByUserId(userId);
|
||||||
|
return BeanConvertUtil.convertTo(userAuth, UserAuthInfoVo::new);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateInfoAuth(UpdateUserAuthInfoReq req) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
if(BooleanUtils.isTrue(req.getPushCarAuth())){ // 车辆认证
|
||||||
|
if(req.getCarPic() == null){
|
||||||
|
throw new ServiceException("请上传车辆认证照片");
|
||||||
|
}
|
||||||
|
boolean update = userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId)
|
||||||
|
.in(UserAuth::getCarAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
|
.set(UserAuth::getCarAuth, AuditEnum.AUDITING.getCode()));
|
||||||
|
if(!update){
|
||||||
|
throw new ServiceException("车辆认证正在审核中,请勿重复提交");
|
||||||
|
}
|
||||||
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.CAR,req.getCarPic());
|
||||||
|
}
|
||||||
|
if(BooleanUtils.isTrue(req.getPushHouseAuth())){ // 房子认证
|
||||||
|
if(req.getHousePic() == null){
|
||||||
|
throw new ServiceException("请上传房产认证照片");
|
||||||
|
}
|
||||||
|
boolean update = userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId)
|
||||||
|
.in(UserAuth::getHouseAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
|
.set(UserAuth::getHouseAuth, AuditEnum.AUDITING.getCode()));
|
||||||
|
if(!update){
|
||||||
|
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
||||||
|
}
|
||||||
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.HOUSE,req.getHousePic());
|
||||||
|
}
|
||||||
|
if(BooleanUtils.isTrue(req.getPushEducationAuth())){ // 学历认证
|
||||||
|
if(req.getEducationPic() == null){
|
||||||
|
throw new ServiceException("请上传最高学历认证照片");
|
||||||
|
}
|
||||||
|
boolean update = userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId)
|
||||||
|
.in(UserAuth::getEducationAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
|
.set(UserAuth::getEducationAuth, AuditEnum.AUDITING.getCode()));
|
||||||
|
if(!update){
|
||||||
|
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
||||||
|
}
|
||||||
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.EDUCATION,req.getEducationPic());
|
||||||
|
}
|
||||||
|
if(BooleanUtils.isTrue(req.getPushMarriageAuth())){ // 婚况认证
|
||||||
|
if(req.getMarriagePic() == null){
|
||||||
|
throw new ServiceException("请上传婚况认证照片");
|
||||||
|
}
|
||||||
|
boolean update = userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId)
|
||||||
|
.in(UserAuth::getMarriageAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
|
.set(UserAuth::getMarriageAuth, AuditEnum.AUDITING.getCode()));
|
||||||
|
if(!update){
|
||||||
|
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
||||||
|
}
|
||||||
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.MARRIAGE,req.getMarriagePic());
|
||||||
|
}
|
||||||
|
if(BooleanUtils.isTrue(req.getPushJobAuthBoo())){ // 工作认证
|
||||||
|
if(req.getJobAuthType() == null){
|
||||||
|
throw new ServiceException("请选择工作认证方式");
|
||||||
|
}
|
||||||
|
if(req.getJobPic() == null){
|
||||||
|
throw new ServiceException("请上传工作认证照片");
|
||||||
|
}
|
||||||
|
boolean update = userAuthService.update(Wrappers.lambdaUpdate(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId)
|
||||||
|
.in(UserAuth::getJobAuth, AuditEnum.NO.getCode(), AuditEnum.FAIL.getCode())
|
||||||
|
.set(UserAuth::getJobAuth, AuditEnum.AUDITING.getCode()));
|
||||||
|
if(!update){
|
||||||
|
throw new ServiceException("房产认证正在审核中,请勿重复提交");
|
||||||
|
}
|
||||||
|
String authRemark = "工作认证";
|
||||||
|
userAuthAuditService.saveAuthAudit(user,UserAuthTypeEnum.JOB,req.getJobPic(),authRemark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void addUserPicture(AddPicturesReq req) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
User user = userService.getById(userId);
|
||||||
|
UserPictures userPictures = new UserPictures();
|
||||||
|
userPictures.setUserId(user.getId());
|
||||||
|
userPictures.setUsercode(user.getUsercode());
|
||||||
|
userPictures.setPicture(req.getPicture());
|
||||||
|
userPictures.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||||
|
userPicturesService.save(userPictures);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeUserPictures(List<Long> ids) {
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
userPicturesService.remove(Wrappers.lambdaQuery(UserPictures.class)
|
||||||
|
.eq(UserPictures::getUserId,userId)
|
||||||
|
.in(UserPictures::getId, ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.ruoyi.xq.mapper;
|
package com.ruoyi.xq.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.ruoyi.xq.domain.DynamicImage;
|
import com.ruoyi.xq.domain.DynamicImage;
|
||||||
import com.ruoyi.xq.domain.vo.DynamicImageVo;
|
|
||||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态图片Mapper接口
|
* 动态图片Mapper接口
|
||||||
@@ -10,6 +9,6 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
|||||||
* @author 77
|
* @author 77
|
||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
public interface DynamicImageMapper extends BaseMapperPlus<DynamicImageMapper, DynamicImage, DynamicImageVo> {
|
public interface DynamicImageMapper extends BaseMapper<DynamicImage> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.ruoyi.xq.mapper;
|
package com.ruoyi.xq.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.xq.domain.Dynamic;
|
import com.ruoyi.xq.domain.Dynamic;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicListVo;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicQuery;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态审核Mapper接口
|
* 动态审核Mapper接口
|
||||||
@@ -11,4 +15,5 @@ import com.ruoyi.xq.domain.Dynamic;
|
|||||||
*/
|
*/
|
||||||
public interface DynamicMapper extends BaseMapper<Dynamic> {
|
public interface DynamicMapper extends BaseMapper<Dynamic> {
|
||||||
|
|
||||||
|
Page<DynamicListVo> pageApp(@Param("build") Page<Object> build, @Param("query") DynamicQuery query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.ruoyi.xq.mapper;
|
package com.ruoyi.xq.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.ruoyi.xq.domain.UserExtend;
|
import com.ruoyi.xq.domain.UserExtend;
|
||||||
import com.ruoyi.xq.domain.vo.UserExtendVo;
|
|
||||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户邀请Mapper接口
|
* 用户邀请Mapper接口
|
||||||
@@ -10,6 +9,6 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
|||||||
* @author 77
|
* @author 77
|
||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
public interface UserExtendMapper extends BaseMapperPlus<UserExtendMapper, UserExtend, UserExtendVo> {
|
public interface UserExtendMapper extends BaseMapper<UserExtend> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.xq.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.xq.domain.DynamicImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态图片Service接口
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2024-03-04
|
||||||
|
*/
|
||||||
|
public interface DynamicImageService extends IService<DynamicImage> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
package com.ruoyi.xq.service;
|
package com.ruoyi.xq.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.xq.domain.Dynamic;
|
import com.ruoyi.xq.domain.Dynamic;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.AddDynamicReq;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicListVo;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态审核Service接口
|
* 动态审核Service接口
|
||||||
@@ -11,4 +16,7 @@ import com.ruoyi.xq.domain.Dynamic;
|
|||||||
*/
|
*/
|
||||||
public interface DynamicService extends IService<Dynamic> {
|
public interface DynamicService extends IService<Dynamic> {
|
||||||
|
|
||||||
|
void push(AddDynamicReq req);
|
||||||
|
|
||||||
|
Page<DynamicListVo> pageApp(PageQuery pageQuery, DynamicQuery dynamicQuery);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
package com.ruoyi.xq.service;
|
|
||||||
|
|
||||||
import com.ruoyi.xq.domain.DynamicImage;
|
|
||||||
import com.ruoyi.xq.domain.vo.DynamicImageVo;
|
|
||||||
import com.ruoyi.xq.domain.bo.DynamicImageBo;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 动态图片Service接口
|
|
||||||
*
|
|
||||||
* @author 77
|
|
||||||
* @date 2024-03-04
|
|
||||||
*/
|
|
||||||
public interface IDynamicImageService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态图片
|
|
||||||
*/
|
|
||||||
DynamicImageVo queryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态图片列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<DynamicImageVo> queryPageList(DynamicImageBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态图片列表
|
|
||||||
*/
|
|
||||||
List<DynamicImageVo> queryList(DynamicImageBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增动态图片
|
|
||||||
*/
|
|
||||||
Boolean insertByBo(DynamicImageBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改动态图片
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(DynamicImageBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除动态图片信息
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package com.ruoyi.xq.service;
|
|
||||||
|
|
||||||
import com.ruoyi.xq.domain.UserExtend;
|
|
||||||
import com.ruoyi.xq.domain.vo.UserExtendVo;
|
|
||||||
import com.ruoyi.xq.domain.bo.UserExtendBo;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户邀请Service接口
|
|
||||||
*
|
|
||||||
* @author 77
|
|
||||||
* @date 2024-03-04
|
|
||||||
*/
|
|
||||||
public interface IUserExtendService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户邀请
|
|
||||||
*/
|
|
||||||
UserExtendVo queryById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户邀请列表
|
|
||||||
*/
|
|
||||||
TableDataInfo<UserExtendVo> queryPageList(UserExtendBo bo, PageQuery pageQuery);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户邀请列表
|
|
||||||
*/
|
|
||||||
List<UserExtendVo> queryList(UserExtendBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增用户邀请
|
|
||||||
*/
|
|
||||||
Boolean insertByBo(UserExtendBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改用户邀请
|
|
||||||
*/
|
|
||||||
Boolean updateByBo(UserExtendBo bo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 校验并批量删除用户邀请信息
|
|
||||||
*/
|
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.ruoyi.xq.service;
|
package com.ruoyi.xq.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.xq.domain.User;
|
||||||
import com.ruoyi.xq.domain.UserAuthAudit;
|
import com.ruoyi.xq.domain.UserAuthAudit;
|
||||||
|
import com.ruoyi.xq.enums.user.UserAuthTypeEnum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户认证审核Service接口
|
* 用户认证审核Service接口
|
||||||
@@ -11,4 +13,8 @@ import com.ruoyi.xq.domain.UserAuthAudit;
|
|||||||
*/
|
*/
|
||||||
public interface UserAuthAuditService extends IService<UserAuthAudit> {
|
public interface UserAuthAuditService extends IService<UserAuthAudit> {
|
||||||
|
|
||||||
|
void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark);
|
||||||
|
default void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic) {
|
||||||
|
saveAuthAudit(user,userAuthType,pic, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ import com.ruoyi.xq.domain.UserAuth;
|
|||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
public interface UserAuthService extends IService<UserAuth> {
|
public interface UserAuthService extends IService<UserAuth> {
|
||||||
|
UserAuth getByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.xq.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.xq.domain.UserExtend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户邀请Service接口
|
||||||
|
*
|
||||||
|
* @author 77
|
||||||
|
* @date 2024-03-04
|
||||||
|
*/
|
||||||
|
public interface UserExtendService extends IService<UserExtend> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.ruoyi.xq.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.xq.domain.UserInfoAudit;
|
import com.ruoyi.xq.domain.UserInfoAudit;
|
||||||
|
import com.ruoyi.xq.enums.user.UserInfoAuditTypeEnum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息审核Service接口
|
* 用户信息审核Service接口
|
||||||
@@ -10,4 +11,5 @@ import com.ruoyi.xq.domain.UserInfoAudit;
|
|||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
public interface UserInfoAuditService extends IService<UserInfoAudit> {
|
public interface UserInfoAuditService extends IService<UserInfoAudit> {
|
||||||
|
UserInfoAudit getByUserIdAndType(Long userId, UserInfoAuditTypeEnum auditTypeEnum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,7 @@ import com.ruoyi.xq.domain.UserInfo;
|
|||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
public interface UserInfoService extends IService<UserInfo> {
|
public interface UserInfoService extends IService<UserInfo> {
|
||||||
|
UserInfo getByUsercode(String usercode);
|
||||||
|
|
||||||
|
UserInfo getByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.ruoyi.xq.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.xq.domain.UserPictures;
|
import com.ruoyi.xq.domain.UserPictures;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户相册管理Service接口
|
* 用户相册管理Service接口
|
||||||
*
|
*
|
||||||
@@ -11,4 +13,5 @@ import com.ruoyi.xq.domain.UserPictures;
|
|||||||
*/
|
*/
|
||||||
public interface UserPicturesService extends IService<UserPictures> {
|
public interface UserPicturesService extends IService<UserPictures> {
|
||||||
|
|
||||||
|
List<UserPictures> listByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.xq.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.xq.domain.User;
|
import com.ruoyi.xq.domain.User;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.HomeUserVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户管理Service接口
|
* 用户管理Service接口
|
||||||
@@ -16,4 +17,6 @@ public interface UserService extends IService<User> {
|
|||||||
void resetPassword(Long userId, String password);
|
void resetPassword(Long userId, String password);
|
||||||
|
|
||||||
User getByUsercode(String usercode);
|
User getByUsercode(String usercode);
|
||||||
|
|
||||||
|
HomeUserVo homeUser(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,11 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.xq.domain.bo.DynamicImageBo;
|
|
||||||
import com.ruoyi.xq.domain.vo.DynamicImageVo;
|
|
||||||
import com.ruoyi.xq.domain.DynamicImage;
|
import com.ruoyi.xq.domain.DynamicImage;
|
||||||
import com.ruoyi.xq.mapper.DynamicImageMapper;
|
import com.ruoyi.xq.mapper.DynamicImageMapper;
|
||||||
import com.ruoyi.xq.service.IDynamicImageService;
|
import com.ruoyi.xq.service.DynamicImageService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import java.util.List;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态图片Service业务层处理
|
* 动态图片Service业务层处理
|
||||||
@@ -27,86 +15,6 @@ import java.util.Collection;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class DynamicImageServiceImpl implements IDynamicImageService {
|
public class DynamicImageServiceImpl extends ServiceImpl<DynamicImageMapper,DynamicImage> implements DynamicImageService {
|
||||||
|
|
||||||
private final DynamicImageMapper baseMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态图片
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public DynamicImageVo queryById(Long id){
|
|
||||||
return baseMapper.selectVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态图片列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<DynamicImageVo> queryPageList(DynamicImageBo bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<DynamicImage> lqw = buildQueryWrapper(bo);
|
|
||||||
Page<DynamicImageVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态图片列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<DynamicImageVo> queryList(DynamicImageBo bo) {
|
|
||||||
LambdaQueryWrapper<DynamicImage> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<DynamicImage> buildQueryWrapper(DynamicImageBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<DynamicImage> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.eq(bo.getUserId() != null, DynamicImage::getUserId, bo.getUserId());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getUsercode()), DynamicImage::getUsercode, bo.getUsercode());
|
|
||||||
lqw.eq(bo.getDynamicId() != null, DynamicImage::getDynamicId, bo.getDynamicId());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getUrl()), DynamicImage::getUrl, bo.getUrl());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增动态图片
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertByBo(DynamicImageBo bo) {
|
|
||||||
DynamicImage add = BeanUtil.toBean(bo, DynamicImage.class);
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改动态图片
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(DynamicImageBo bo) {
|
|
||||||
DynamicImage update = BeanUtil.toBean(bo, DynamicImage.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(DynamicImage entity){
|
|
||||||
//TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除动态图片
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,31 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.xq.domain.Dynamic;
|
import com.ruoyi.xq.domain.Dynamic;
|
||||||
|
import com.ruoyi.xq.domain.DynamicImage;
|
||||||
|
import com.ruoyi.xq.domain.User;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.AddDynamicReq;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicListVo;
|
||||||
|
import com.ruoyi.xq.dto.app.dynamic.DynamicQuery;
|
||||||
|
import com.ruoyi.xq.enums.common.AuditEnum;
|
||||||
import com.ruoyi.xq.mapper.DynamicMapper;
|
import com.ruoyi.xq.mapper.DynamicMapper;
|
||||||
|
import com.ruoyi.xq.service.DynamicImageService;
|
||||||
import com.ruoyi.xq.service.DynamicService;
|
import com.ruoyi.xq.service.DynamicService;
|
||||||
|
import com.ruoyi.xq.service.UserService;
|
||||||
|
import com.ruoyi.xq.util.AgeUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态审核Service业务层处理
|
* 动态审核Service业务层处理
|
||||||
@@ -17,4 +37,50 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class DynamicServiceImpl extends ServiceImpl<DynamicMapper,Dynamic> implements DynamicService {
|
public class DynamicServiceImpl extends ServiceImpl<DynamicMapper,Dynamic> implements DynamicService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
@Autowired
|
||||||
|
private DynamicImageService dynamicImageService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void push(AddDynamicReq req) {
|
||||||
|
User user = userService.getById(req.getUserId());
|
||||||
|
Dynamic dynamic = new Dynamic();
|
||||||
|
dynamic.setUserId(user.getId());
|
||||||
|
dynamic.setUsercode(user.getUsercode());
|
||||||
|
dynamic.setContent(req.getContent());
|
||||||
|
dynamic.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||||
|
this.save(dynamic);
|
||||||
|
List<String> imagesList = req.getImageList();
|
||||||
|
for (String image : imagesList) {
|
||||||
|
DynamicImage dynamicImage = new DynamicImage();
|
||||||
|
dynamicImage.setUserId(user.getId());
|
||||||
|
dynamicImage.setUsercode(user.getUsercode());
|
||||||
|
dynamicImage.setDynamicId(dynamic.getId());
|
||||||
|
dynamicImage.setUrl(image);
|
||||||
|
dynamicImageService.save(dynamicImage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<DynamicListVo> pageApp(PageQuery pageQuery, DynamicQuery dynamicQuery) {
|
||||||
|
Page<DynamicListVo> page = baseMapper.pageApp(pageQuery.build(), dynamicQuery);
|
||||||
|
List<DynamicListVo> records = page.getRecords();
|
||||||
|
if(CollectionUtils.isEmpty(records)){
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
List<Long> dynamicIds = records.stream().map(DynamicListVo::getId).collect(Collectors.toList());
|
||||||
|
List<DynamicImage> list = dynamicImageService.list(Wrappers.lambdaQuery(DynamicImage.class).in(DynamicImage::getDynamicId, dynamicIds));
|
||||||
|
Map<Long, List<DynamicImage>> map = list.stream().collect(Collectors.groupingBy(DynamicImage::getDynamicId));
|
||||||
|
for (DynamicListVo record : records) {
|
||||||
|
record.setAge(AgeUtil.getAge(record.getBirthday()));
|
||||||
|
List<DynamicImage> images = map.get(record.getId());
|
||||||
|
if(images == null){
|
||||||
|
images = new ArrayList<>();
|
||||||
|
}
|
||||||
|
record.setImageList(images.stream().map(DynamicImage::getUrl).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
return page;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.xq.domain.User;
|
||||||
import com.ruoyi.xq.domain.UserAuthAudit;
|
import com.ruoyi.xq.domain.UserAuthAudit;
|
||||||
|
import com.ruoyi.xq.enums.common.AuditEnum;
|
||||||
|
import com.ruoyi.xq.enums.user.UserAuthTypeEnum;
|
||||||
import com.ruoyi.xq.mapper.UserAuthAuditMapper;
|
import com.ruoyi.xq.mapper.UserAuthAuditMapper;
|
||||||
import com.ruoyi.xq.service.UserAuthAuditService;
|
import com.ruoyi.xq.service.UserAuthAuditService;
|
||||||
|
import com.ruoyi.xq.service.UserAuthService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,4 +23,15 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class UserAuthAuditServiceImpl extends ServiceImpl<UserAuthAuditMapper,UserAuthAudit> implements UserAuthAuditService {
|
public class UserAuthAuditServiceImpl extends ServiceImpl<UserAuthAuditMapper,UserAuthAudit> implements UserAuthAuditService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAuthAudit(User user, UserAuthTypeEnum userAuthType, String pic, String remark) {
|
||||||
|
UserAuthAudit userAuthAudit = new UserAuthAudit();
|
||||||
|
userAuthAudit.setUserId(user.getId());
|
||||||
|
userAuthAudit.setUsercode(user.getUsercode());
|
||||||
|
userAuthAudit.setAuthType(userAuthType.getCode());
|
||||||
|
userAuthAudit.setAuthPic(pic);
|
||||||
|
userAuthAudit.setAuthRemark(remark);
|
||||||
|
userAuthAudit.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||||
|
this.save(userAuthAudit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.xq.domain.UserAuth;
|
import com.ruoyi.xq.domain.UserAuth;
|
||||||
import com.ruoyi.xq.mapper.UserAuthMapper;
|
import com.ruoyi.xq.mapper.UserAuthMapper;
|
||||||
import com.ruoyi.xq.service.UserAuthService;
|
import com.ruoyi.xq.service.UserAuthService;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,8 +13,12 @@ import org.springframework.stereotype.Service;
|
|||||||
* @author 77
|
* @author 77
|
||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
@Service
|
||||||
public class UserAuthServiceImpl extends ServiceImpl<UserAuthMapper,UserAuth> implements UserAuthService {
|
public class UserAuthServiceImpl extends ServiceImpl<UserAuthMapper,UserAuth> implements UserAuthService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserAuth getByUserId(Long userId) {
|
||||||
|
return this.getOne(Wrappers.lambdaQuery(UserAuth.class)
|
||||||
|
.eq(UserAuth::getUserId, userId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,11 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.xq.domain.bo.UserExtendBo;
|
|
||||||
import com.ruoyi.xq.domain.vo.UserExtendVo;
|
|
||||||
import com.ruoyi.xq.domain.UserExtend;
|
import com.ruoyi.xq.domain.UserExtend;
|
||||||
import com.ruoyi.xq.mapper.UserExtendMapper;
|
import com.ruoyi.xq.mapper.UserExtendMapper;
|
||||||
import com.ruoyi.xq.service.IUserExtendService;
|
import com.ruoyi.xq.service.UserExtendService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import java.util.List;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户邀请Service业务层处理
|
* 用户邀请Service业务层处理
|
||||||
@@ -27,90 +15,6 @@ import java.util.Collection;
|
|||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class UserExtendServiceImpl implements IUserExtendService {
|
public class UserExtendServiceImpl extends ServiceImpl<UserExtendMapper,UserExtend> implements UserExtendService {
|
||||||
|
|
||||||
private final UserExtendMapper baseMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户邀请
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public UserExtendVo queryById(Long id){
|
|
||||||
return baseMapper.selectVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户邀请列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<UserExtendVo> queryPageList(UserExtendBo bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<UserExtend> lqw = buildQueryWrapper(bo);
|
|
||||||
Page<UserExtendVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户邀请列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<UserExtendVo> queryList(UserExtendBo bo) {
|
|
||||||
LambdaQueryWrapper<UserExtend> lqw = buildQueryWrapper(bo);
|
|
||||||
return baseMapper.selectVoList(lqw);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<UserExtend> buildQueryWrapper(UserExtendBo bo) {
|
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<UserExtend> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.eq(bo.getUserId() != null, UserExtend::getUserId, bo.getUserId());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getUsercode()), UserExtend::getUsercode, bo.getUsercode());
|
|
||||||
lqw.eq(bo.getIncomeCoin() != null, UserExtend::getIncomeCoin, bo.getIncomeCoin());
|
|
||||||
lqw.eq(bo.getInviteId() != null, UserExtend::getInviteId, bo.getInviteId());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getInviteCode()), UserExtend::getInviteCode, bo.getInviteCode());
|
|
||||||
lqw.eq(bo.getConsumeTotal() != null, UserExtend::getConsumeTotal, bo.getConsumeTotal());
|
|
||||||
lqw.eq(bo.getWithdrawTotal() != null, UserExtend::getWithdrawTotal, bo.getWithdrawTotal());
|
|
||||||
lqw.eq(bo.getCashbackTotal() != null, UserExtend::getCashbackTotal, bo.getCashbackTotal());
|
|
||||||
return lqw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增用户邀请
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean insertByBo(UserExtendBo bo) {
|
|
||||||
UserExtend add = BeanUtil.toBean(bo, UserExtend.class);
|
|
||||||
validEntityBeforeSave(add);
|
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
|
||||||
if (flag) {
|
|
||||||
bo.setId(add.getId());
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改用户邀请
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean updateByBo(UserExtendBo bo) {
|
|
||||||
UserExtend update = BeanUtil.toBean(bo, UserExtend.class);
|
|
||||||
validEntityBeforeSave(update);
|
|
||||||
return baseMapper.updateById(update) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存前的数据校验
|
|
||||||
*/
|
|
||||||
private void validEntityBeforeSave(UserExtend entity){
|
|
||||||
//TODO 做一些数据校验,如唯一约束
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除用户邀请
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
||||||
if(isValid){
|
|
||||||
//TODO 做一些业务上的校验,判断是否需要校验
|
|
||||||
}
|
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.xq.domain.UserInfoAudit;
|
import com.ruoyi.xq.domain.UserInfoAudit;
|
||||||
|
import com.ruoyi.xq.enums.common.AuditEnum;
|
||||||
|
import com.ruoyi.xq.enums.user.UserInfoAuditTypeEnum;
|
||||||
import com.ruoyi.xq.mapper.UserInfoAuditMapper;
|
import com.ruoyi.xq.mapper.UserInfoAuditMapper;
|
||||||
import com.ruoyi.xq.service.UserInfoAuditService;
|
import com.ruoyi.xq.service.UserInfoAuditService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -17,4 +20,13 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class UserInfoAuditServiceImpl extends ServiceImpl<UserInfoAuditMapper,UserInfoAudit> implements UserInfoAuditService {
|
public class UserInfoAuditServiceImpl extends ServiceImpl<UserInfoAuditMapper,UserInfoAudit> implements UserInfoAuditService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserInfoAudit getByUserIdAndType(Long userId, UserInfoAuditTypeEnum auditTypeEnum){
|
||||||
|
return this.getOne(Wrappers.lambdaQuery(UserInfoAudit.class)
|
||||||
|
.eq(UserInfoAudit::getInfoType, auditTypeEnum.getCode())
|
||||||
|
.eq(UserInfoAudit::getUserId, userId)
|
||||||
|
.eq(UserInfoAudit::getAuditStatus, AuditEnum.AUDITING.getCode())
|
||||||
|
.last("limit 1"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.xq.domain.UserInfo;
|
import com.ruoyi.xq.domain.UserInfo;
|
||||||
import com.ruoyi.xq.mapper.UserInfoMapper;
|
import com.ruoyi.xq.mapper.UserInfoMapper;
|
||||||
@@ -17,4 +18,13 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper,UserInfo> implements UserInfoService {
|
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper,UserInfo> implements UserInfoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserInfo getByUsercode(String usercode) {
|
||||||
|
return this.getOne(Wrappers.lambdaQuery(UserInfo.class).eq(UserInfo::getUsercode, usercode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserInfo getByUserId(Long userId) {
|
||||||
|
return this.getOne(Wrappers.lambdaQuery(UserInfo.class).eq(UserInfo::getUserId, userId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
package com.ruoyi.xq.service.impl;
|
package com.ruoyi.xq.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.xq.domain.UserPictures;
|
import com.ruoyi.xq.domain.UserPictures;
|
||||||
import com.ruoyi.xq.mapper.UserPicturesMapper;
|
import com.ruoyi.xq.mapper.UserPicturesMapper;
|
||||||
import com.ruoyi.xq.service.UserPicturesService;
|
import com.ruoyi.xq.service.UserPicturesService;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户相册管理Service业务层处理
|
* 用户相册管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author 77
|
* @author 77
|
||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
@Service
|
||||||
public class UserPicturesServiceImpl extends ServiceImpl<UserPicturesMapper,UserPictures> implements UserPicturesService {
|
public class UserPicturesServiceImpl extends ServiceImpl<UserPicturesMapper,UserPictures> implements UserPicturesService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserPictures> listByUserId(Long userId) {
|
||||||
|
return this.list(Wrappers.lambdaQuery(UserPictures.class)
|
||||||
|
.eq(UserPictures::getUserId, userId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ import cn.dev33.satoken.secure.BCrypt;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||||
import com.ruoyi.xq.domain.User;
|
import com.ruoyi.xq.domain.User;
|
||||||
|
import com.ruoyi.xq.domain.UserInfo;
|
||||||
|
import com.ruoyi.xq.dto.app.user.vo.HomeUserVo;
|
||||||
import com.ruoyi.xq.mapper.UserMapper;
|
import com.ruoyi.xq.mapper.UserMapper;
|
||||||
|
import com.ruoyi.xq.service.UserInfoService;
|
||||||
import com.ruoyi.xq.service.UserService;
|
import com.ruoyi.xq.service.UserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,10 +21,10 @@ import org.springframework.stereotype.Service;
|
|||||||
* @author 77
|
* @author 77
|
||||||
* @date 2024-03-04
|
* @date 2024-03-04
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Service
|
@Service
|
||||||
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserService {
|
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserService {
|
||||||
|
@Autowired
|
||||||
|
private UserInfoService userInfoService;
|
||||||
@Override
|
@Override
|
||||||
public User getByUsername(String username) {
|
public User getByUsername(String username) {
|
||||||
return this.getOne(Wrappers.lambdaQuery(User.class)
|
return this.getOne(Wrappers.lambdaQuery(User.class)
|
||||||
@@ -42,4 +46,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements Use
|
|||||||
return this.getOne(Wrappers.lambdaQuery(User.class)
|
return this.getOne(Wrappers.lambdaQuery(User.class)
|
||||||
.eq(User::getUsercode,usercode).last("limit 1"));
|
.eq(User::getUsercode,usercode).last("limit 1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HomeUserVo homeUser(Long userId) {
|
||||||
|
User user = this.getById(userId);
|
||||||
|
UserInfo userInfo = userInfoService.getByUserId(userId);
|
||||||
|
HomeUserVo result = new HomeUserVo();
|
||||||
|
BeanConvertUtil.copyProperties(userInfo,result);
|
||||||
|
BeanConvertUtil.copyProperties(user,result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
ruoyi-xq/src/main/java/com/ruoyi/xq/util/AgeUtil.java
Normal file
12
ruoyi-xq/src/main/java/com/ruoyi/xq/util/AgeUtil.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package com.ruoyi.xq.util;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class AgeUtil {
|
||||||
|
public static Integer getAge(LocalDate localDate){
|
||||||
|
if(localDate == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return LocalDate.now().getYear() - localDate.getYear();
|
||||||
|
}
|
||||||
|
}
|
||||||
128
ruoyi-xq/src/main/java/com/ruoyi/xq/util/JsonUtils.java
Normal file
128
ruoyi-xq/src/main/java/com/ruoyi/xq/util/JsonUtils.java
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
//
|
||||||
|
// Source code recreated from a .class file by IntelliJ IDEA
|
||||||
|
// (powered by FernFlower decompiler)
|
||||||
|
//
|
||||||
|
|
||||||
|
package com.ruoyi.xq.util;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
|
import com.fasterxml.jackson.databind.JavaType;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.List;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class JsonUtils {
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(JsonUtils.class);
|
||||||
|
private static final ObjectMapper NON_NULL_MAPPER = new ObjectMapper();
|
||||||
|
private static final ObjectMapper INCLUDE_NULL_MAPPER = new ObjectMapper();
|
||||||
|
|
||||||
|
public JsonUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String toJSONString(Object object) {
|
||||||
|
return toJSONString(NON_NULL_MAPPER, object);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String toJSONStringWithNull(Object object) {
|
||||||
|
return toJSONString(INCLUDE_NULL_MAPPER, object);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String toJSONString(ObjectMapper objectMapper, Object object) {
|
||||||
|
StringWriter out = new StringWriter();
|
||||||
|
JsonGenerator json = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
json = objectMapper.getFactory().createGenerator(out);
|
||||||
|
json.writeObject(object);
|
||||||
|
json.flush();
|
||||||
|
} catch (Exception var12) {
|
||||||
|
throw new IllegalArgumentException(var12);
|
||||||
|
} finally {
|
||||||
|
if (json != null) {
|
||||||
|
try {
|
||||||
|
json.close();
|
||||||
|
} catch (IOException var11) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return out.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> List<T> parseArray(String json, Class<T> clazz) {
|
||||||
|
JavaType javaType = NON_NULL_MAPPER.getTypeFactory().constructParametricType(List.class, new Class[]{clazz});
|
||||||
|
|
||||||
|
try {
|
||||||
|
return (List)NON_NULL_MAPPER.readValue(json, javaType);
|
||||||
|
} catch (IOException var4) {
|
||||||
|
throw new RuntimeException("反序列失败", var4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T parseObject(String json, Class<T> clazz) {
|
||||||
|
JsonParser parser = null;
|
||||||
|
T object = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
parser = NON_NULL_MAPPER.getFactory().createParser(json);
|
||||||
|
object = parser.readValueAs(clazz);
|
||||||
|
} catch (Exception var12) {
|
||||||
|
throw new IllegalArgumentException(var12);
|
||||||
|
} finally {
|
||||||
|
if (parser != null) {
|
||||||
|
try {
|
||||||
|
parser.close();
|
||||||
|
} catch (IOException var11) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T parseObject(String json, TypeReference<T> valueTypeRef) {
|
||||||
|
JsonParser parser = null;
|
||||||
|
T object = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
parser = NON_NULL_MAPPER.getFactory().createParser(json);
|
||||||
|
object = parser.readValueAs(valueTypeRef);
|
||||||
|
} catch (Exception var12) {
|
||||||
|
throw new IllegalArgumentException(var12);
|
||||||
|
} finally {
|
||||||
|
if (parser != null) {
|
||||||
|
try {
|
||||||
|
parser.close();
|
||||||
|
} catch (IOException var11) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
NON_NULL_MAPPER.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true);
|
||||||
|
NON_NULL_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
NON_NULL_MAPPER.setSerializationInclusion(Include.NON_NULL);
|
||||||
|
NON_NULL_MAPPER.registerModule(new JavaTimeModule()).registerModule(new Jdk8Module());
|
||||||
|
INCLUDE_NULL_MAPPER.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true);
|
||||||
|
INCLUDE_NULL_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
INCLUDE_NULL_MAPPER.registerModule(new JavaTimeModule()).registerModule(new Jdk8Module());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -21,6 +21,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="sort" column="sort"/>
|
<result property="sort" column="sort"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="pageApp" resultType="com.ruoyi.xq.dto.app.dynamic.DynamicListVo">
|
||||||
|
select t1.id, t1.content, t1.user_id,t1.create_time,
|
||||||
|
t2.avatar, t2.nickname, t2.birthday, t2.gender, t2.residence_city, t2.education,
|
||||||
|
t2.profession
|
||||||
|
from xq_dynamic t1
|
||||||
|
join xq_user t2 on t1.user_id = t2.id
|
||||||
|
where t1.audit_status = 2 and t2.status = 0
|
||||||
|
<where>
|
||||||
|
<if test="query.gender != null">
|
||||||
|
and t2.gender = #{query.gender}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user