init
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "ali.sms")
|
||||
public class AliSmsProperties {
|
||||
private String accessKeyId = "LTAI5tRf2jUyoYmAC9kw4AMF";
|
||||
private String accessKeySecret = "frvNLpySKxC38eihnWKi3NMFZSume3";
|
||||
private String signName = "武汉康慧创欣科技";
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.xq.constant;
|
||||
|
||||
public class RedisHttpConstant {
|
||||
public static final String REDIS_P = "xq-";
|
||||
public static final String SYSTEM_CONFIG = REDIS_P + "system-config";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.AccountChangeLog;
|
||||
import com.ruoyi.xq.service.AccountChangeLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 账户明细
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/accountChangeLog")
|
||||
public class AccountChangeLogController extends BaseController {
|
||||
|
||||
private final AccountChangeLogService accountChangeLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* 查询账户明细列表
|
||||
*/
|
||||
@SaCheckPermission("xq:accountChangeLog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<AccountChangeLog> list(AccountChangeLog bo, PageQuery pageQuery) {
|
||||
Page<AccountChangeLog> page = accountChangeLogService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账户明细详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:accountChangeLog:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<AccountChangeLog> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(accountChangeLogService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增账户明细
|
||||
*/
|
||||
@SaCheckPermission("xq:accountChangeLog:add")
|
||||
@Log(title = "账户明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody AccountChangeLog bo) {
|
||||
return toAjax(accountChangeLogService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改账户明细
|
||||
*/
|
||||
@SaCheckPermission("xq:accountChangeLog:edit")
|
||||
@Log(title = "账户明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody AccountChangeLog bo) {
|
||||
return toAjax(accountChangeLogService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除账户明细
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:accountChangeLog:remove")
|
||||
@Log(title = "账户明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(accountChangeLogService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.AgreementSetting;
|
||||
import com.ruoyi.xq.service.AgreementSettingService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 协议设置
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/agreementSetting")
|
||||
public class AgreementSettingController extends BaseController {
|
||||
|
||||
private final AgreementSettingService agreementSettingService;
|
||||
|
||||
/**
|
||||
* 查询协议设置列表
|
||||
*/
|
||||
@SaCheckPermission("xq:agreementSetting:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<AgreementSetting> list(AgreementSetting bo, PageQuery pageQuery) {
|
||||
Page<AgreementSetting> page = agreementSettingService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取协议设置详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:agreementSetting:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<AgreementSetting> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(agreementSettingService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增协议设置
|
||||
*/
|
||||
@SaCheckPermission("xq:agreementSetting:add")
|
||||
@Log(title = "协议设置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody AgreementSetting bo) {
|
||||
return toAjax(agreementSettingService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改协议设置
|
||||
*/
|
||||
@SaCheckPermission("xq:agreementSetting:edit")
|
||||
@Log(title = "协议设置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody AgreementSetting bo) {
|
||||
return toAjax(agreementSettingService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除协议设置
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:agreementSetting:remove")
|
||||
@Log(title = "协议设置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(agreementSettingService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.Banner;
|
||||
import com.ruoyi.xq.service.BannerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 轮播图
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/banner")
|
||||
public class BannerController extends BaseController {
|
||||
|
||||
private final BannerService bannerService;
|
||||
|
||||
/**
|
||||
* 查询轮播图列表
|
||||
*/
|
||||
@SaCheckPermission("xq:banner:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<Banner> list(Banner bo, PageQuery pageQuery) {
|
||||
Page<Banner> page = bannerService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取轮播图详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:banner:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<Banner> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(bannerService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增轮播图
|
||||
*/
|
||||
@SaCheckPermission("xq:banner:add")
|
||||
@Log(title = "轮播图", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody Banner bo) {
|
||||
return toAjax(bannerService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改轮播图
|
||||
*/
|
||||
@SaCheckPermission("xq:banner:edit")
|
||||
@Log(title = "轮播图", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody Banner bo) {
|
||||
return toAjax(bannerService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除轮播图
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:banner:remove")
|
||||
@Log(title = "轮播图", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(bannerService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.Dynamic;
|
||||
import com.ruoyi.xq.service.DynamicService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 动态审核
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/dynamic")
|
||||
public class DynamicController extends BaseController {
|
||||
|
||||
private final DynamicService dynamicService;
|
||||
|
||||
/**
|
||||
* 查询动态审核列表
|
||||
*/
|
||||
@SaCheckPermission("xq:dynamic:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<Dynamic> list(Dynamic bo, PageQuery pageQuery) {
|
||||
Page<Dynamic> page = dynamicService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取动态审核详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:dynamic:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<Dynamic> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(dynamicService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增动态审核
|
||||
*/
|
||||
@SaCheckPermission("xq:dynamic:add")
|
||||
@Log(title = "动态审核", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody Dynamic bo) {
|
||||
return toAjax(dynamicService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改动态审核
|
||||
*/
|
||||
@SaCheckPermission("xq:dynamic:edit")
|
||||
@Log(title = "动态审核", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody Dynamic bo) {
|
||||
return toAjax(dynamicService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态审核
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:dynamic:remove")
|
||||
@Log(title = "动态审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(dynamicService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserAuthAudit;
|
||||
import com.ruoyi.xq.service.UserAuthAuditService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户认证审核
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userAuthAudit")
|
||||
public class UserAuthAuditController extends BaseController {
|
||||
|
||||
private final UserAuthAuditService userAuthAuditService;
|
||||
|
||||
/**
|
||||
* 查询用户认证审核列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuthAudit:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserAuthAudit> list(UserAuthAudit bo, PageQuery pageQuery) {
|
||||
Page<UserAuthAudit> page = userAuthAuditService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户认证审核详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuthAudit:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserAuthAudit> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userAuthAuditService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户认证审核
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuthAudit:add")
|
||||
@Log(title = "用户认证审核", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserAuthAudit bo) {
|
||||
return toAjax(userAuthAuditService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户认证审核
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuthAudit:edit")
|
||||
@Log(title = "用户认证审核", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserAuthAudit bo) {
|
||||
return toAjax(userAuthAuditService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户认证审核
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuthAudit:remove")
|
||||
@Log(title = "用户认证审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userAuthAuditService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserAuth;
|
||||
import com.ruoyi.xq.service.UserAuthService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户认证管理
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userAuth")
|
||||
public class UserAuthController extends BaseController {
|
||||
|
||||
private final UserAuthService userAuthService;
|
||||
|
||||
/**
|
||||
* 查询用户认证管理列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuth:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserAuth> list(UserAuth bo, PageQuery pageQuery) {
|
||||
Page<UserAuth> page = userAuthService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户认证管理详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuth:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserAuth> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userAuthService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户认证管理
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuth:add")
|
||||
@Log(title = "用户认证管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserAuth bo) {
|
||||
return toAjax(userAuthService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户认证管理
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuth:edit")
|
||||
@Log(title = "用户认证管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserAuth bo) {
|
||||
return toAjax(userAuthService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户认证管理
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userAuth:remove")
|
||||
@Log(title = "用户认证管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userAuthService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.User;
|
||||
import com.ruoyi.xq.service.UserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/user")
|
||||
public class UserController extends BaseController {
|
||||
|
||||
private final UserService userService;
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*/
|
||||
@SaCheckPermission("xq:user:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<User> list(User bo, PageQuery pageQuery) {
|
||||
Page<User> page = userService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户管理详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:user:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<User> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*/
|
||||
@SaCheckPermission("xq:user:add")
|
||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody User bo) {
|
||||
return toAjax(userService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*/
|
||||
@SaCheckPermission("xq:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody User bo) {
|
||||
return toAjax(userService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户管理
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:user:remove")
|
||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserInfoAudit;
|
||||
import com.ruoyi.xq.service.UserInfoAuditService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户信息审核
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userInfoAudit")
|
||||
public class UserInfoAuditController extends BaseController {
|
||||
|
||||
private final UserInfoAuditService userInfoAuditService;
|
||||
|
||||
/**
|
||||
* 查询用户信息审核列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfoAudit:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserInfoAudit> list(UserInfoAudit bo, PageQuery pageQuery) {
|
||||
Page<UserInfoAudit> page = userInfoAuditService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息审核详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfoAudit:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserInfoAudit> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userInfoAuditService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户信息审核
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfoAudit:add")
|
||||
@Log(title = "用户信息审核", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserInfoAudit bo) {
|
||||
return toAjax(userInfoAuditService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户信息审核
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfoAudit:edit")
|
||||
@Log(title = "用户信息审核", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserInfoAudit bo) {
|
||||
return toAjax(userInfoAuditService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户信息审核
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfoAudit:remove")
|
||||
@Log(title = "用户信息审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userInfoAuditService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserInfo;
|
||||
import com.ruoyi.xq.service.UserInfoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userInfo")
|
||||
public class UserInfoController extends BaseController {
|
||||
|
||||
private final UserInfoService userInfoService;
|
||||
|
||||
/**
|
||||
* 查询用户信息列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserInfo> list(UserInfo bo, PageQuery pageQuery) {
|
||||
Page<UserInfo> page = userInfoService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserInfo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userInfoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfo:add")
|
||||
@Log(title = "用户信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserInfo bo) {
|
||||
return toAjax(userInfoService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfo:edit")
|
||||
@Log(title = "用户信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserInfo bo) {
|
||||
return toAjax(userInfoService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userInfo:remove")
|
||||
@Log(title = "用户信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userInfoService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserLogin;
|
||||
import com.ruoyi.xq.service.UserLoginService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户登陆
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userLogin")
|
||||
public class UserLoginController extends BaseController {
|
||||
|
||||
private final UserLoginService userLoginService;
|
||||
|
||||
/**
|
||||
* 查询用户登陆列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userLogin:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserLogin> list(UserLogin bo, PageQuery pageQuery) {
|
||||
Page<UserLogin> page = userLoginService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户登陆详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userLogin:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserLogin> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userLoginService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户登陆
|
||||
*/
|
||||
@SaCheckPermission("xq:userLogin:add")
|
||||
@Log(title = "用户登陆", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserLogin bo) {
|
||||
return toAjax(userLoginService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户登陆
|
||||
*/
|
||||
@SaCheckPermission("xq:userLogin:edit")
|
||||
@Log(title = "用户登陆", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserLogin bo) {
|
||||
return toAjax(userLoginService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户登陆
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userLogin:remove")
|
||||
@Log(title = "用户登陆", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userLoginService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserPictures;
|
||||
import com.ruoyi.xq.service.UserPicturesService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户相册管理
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userPictures")
|
||||
public class UserPicturesController extends BaseController {
|
||||
|
||||
private final UserPicturesService userPicturesService;
|
||||
|
||||
/**
|
||||
* 查询用户相册管理列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userPictures:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserPictures> list(UserPictures bo, PageQuery pageQuery) {
|
||||
Page<UserPictures> page = userPicturesService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户相册管理详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userPictures:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserPictures> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userPicturesService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户相册管理
|
||||
*/
|
||||
@SaCheckPermission("xq:userPictures:add")
|
||||
@Log(title = "用户相册管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserPictures bo) {
|
||||
return toAjax(userPicturesService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户相册管理
|
||||
*/
|
||||
@SaCheckPermission("xq:userPictures:edit")
|
||||
@Log(title = "用户相册管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserPictures bo) {
|
||||
return toAjax(userPicturesService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户相册管理
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userPictures:remove")
|
||||
@Log(title = "用户相册管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userPicturesService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserVip;
|
||||
import com.ruoyi.xq.service.UserVipService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* VIP用户
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userVip")
|
||||
public class UserVipController extends BaseController {
|
||||
|
||||
private final UserVipService userVipService;
|
||||
|
||||
/**
|
||||
* 查询VIP用户列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userVip:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserVip> list(UserVip bo, PageQuery pageQuery) {
|
||||
Page<UserVip> page = userVipService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取VIP用户详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userVip:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserVip> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userVipService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增VIP用户
|
||||
*/
|
||||
@SaCheckPermission("xq:userVip:add")
|
||||
@Log(title = "VIP用户", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserVip bo) {
|
||||
return toAjax(userVipService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改VIP用户
|
||||
*/
|
||||
@SaCheckPermission("xq:userVip:edit")
|
||||
@Log(title = "VIP用户", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserVip bo) {
|
||||
return toAjax(userVipService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除VIP用户
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userVip:remove")
|
||||
@Log(title = "VIP用户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userVipService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.UserWithdraw;
|
||||
import com.ruoyi.xq.service.UserWithdrawService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户提现审核
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/userWithdraw")
|
||||
public class UserWithdrawController extends BaseController {
|
||||
|
||||
private final UserWithdrawService userWithdrawService;
|
||||
|
||||
/**
|
||||
* 查询用户提现审核列表
|
||||
*/
|
||||
@SaCheckPermission("xq:userWithdraw:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<UserWithdraw> list(UserWithdraw bo, PageQuery pageQuery) {
|
||||
Page<UserWithdraw> page = userWithdrawService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户提现审核详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:userWithdraw:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<UserWithdraw> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(userWithdrawService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户提现审核
|
||||
*/
|
||||
@SaCheckPermission("xq:userWithdraw:add")
|
||||
@Log(title = "用户提现审核", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserWithdraw bo) {
|
||||
return toAjax(userWithdrawService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户提现审核
|
||||
*/
|
||||
@SaCheckPermission("xq:userWithdraw:edit")
|
||||
@Log(title = "用户提现审核", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserWithdraw bo) {
|
||||
return toAjax(userWithdrawService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户提现审核
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:userWithdraw:remove")
|
||||
@Log(title = "用户提现审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(userWithdrawService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.VipOrder;
|
||||
import com.ruoyi.xq.service.VipOrderService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* VIP订单
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/vipOrder")
|
||||
public class VipOrderController extends BaseController {
|
||||
|
||||
private final VipOrderService vipOrderService;
|
||||
|
||||
/**
|
||||
* 查询VIP订单列表
|
||||
*/
|
||||
@SaCheckPermission("xq:vipOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<VipOrder> list(VipOrder bo, PageQuery pageQuery) {
|
||||
Page<VipOrder> page = vipOrderService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取VIP订单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:vipOrder:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<VipOrder> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(vipOrderService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增VIP订单
|
||||
*/
|
||||
@SaCheckPermission("xq:vipOrder:add")
|
||||
@Log(title = "VIP订单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody VipOrder bo) {
|
||||
return toAjax(vipOrderService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改VIP订单
|
||||
*/
|
||||
@SaCheckPermission("xq:vipOrder:edit")
|
||||
@Log(title = "VIP订单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody VipOrder bo) {
|
||||
return toAjax(vipOrderService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除VIP订单
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:vipOrder:remove")
|
||||
@Log(title = "VIP订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(vipOrderService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.VipPrice;
|
||||
import com.ruoyi.xq.service.VipPriceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 会员价格设置
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/vipPrice")
|
||||
public class VipPriceController extends BaseController {
|
||||
|
||||
private final VipPriceService vipPriceService;
|
||||
|
||||
/**
|
||||
* 查询会员价格设置列表
|
||||
*/
|
||||
@SaCheckPermission("xq:vipPrice:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<VipPrice> list(VipPrice bo, PageQuery pageQuery) {
|
||||
Page<VipPrice> page = vipPriceService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员价格设置详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:vipPrice:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<VipPrice> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(vipPriceService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员价格设置
|
||||
*/
|
||||
@SaCheckPermission("xq:vipPrice:add")
|
||||
@Log(title = "会员价格设置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody VipPrice bo) {
|
||||
return toAjax(vipPriceService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员价格设置
|
||||
*/
|
||||
@SaCheckPermission("xq:vipPrice:edit")
|
||||
@Log(title = "会员价格设置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody VipPrice bo) {
|
||||
return toAjax(vipPriceService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员价格设置
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:vipPrice:remove")
|
||||
@Log(title = "会员价格设置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(vipPriceService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.xq.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
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.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.WithdrawSetting;
|
||||
import com.ruoyi.xq.service.WithdrawSettingService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 提现配置
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xq/withdrawSetting")
|
||||
public class WithdrawSettingController extends BaseController {
|
||||
|
||||
private final WithdrawSettingService withdrawSettingService;
|
||||
|
||||
/**
|
||||
* 查询提现配置列表
|
||||
*/
|
||||
@SaCheckPermission("xq:withdrawSetting:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WithdrawSetting> list(WithdrawSetting bo, PageQuery pageQuery) {
|
||||
Page<WithdrawSetting> page = withdrawSettingService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提现配置详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xq:withdrawSetting:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<WithdrawSetting> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(withdrawSettingService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提现配置
|
||||
*/
|
||||
@SaCheckPermission("xq:withdrawSetting:add")
|
||||
@Log(title = "提现配置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WithdrawSetting bo) {
|
||||
return toAjax(withdrawSettingService.save(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提现配置
|
||||
*/
|
||||
@SaCheckPermission("xq:withdrawSetting:edit")
|
||||
@Log(title = "提现配置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WithdrawSetting bo) {
|
||||
return toAjax(withdrawSettingService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提现配置
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xq:withdrawSetting:remove")
|
||||
@Log(title = "提现配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(withdrawSettingService.removeBatchByIds(Arrays.asList(ids)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 账户明细对象 xq_account_change_log
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_account_change_log")
|
||||
public class AccountChangeLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 账户类型 1-余额 2-收益
|
||||
*/
|
||||
private Integer accountType;
|
||||
/**
|
||||
* 目标用户ID
|
||||
*/
|
||||
private Long tarUserId;
|
||||
/**
|
||||
* 目标用户基本信息备份
|
||||
*/
|
||||
private String tarJson;
|
||||
/**
|
||||
* 类别CODE
|
||||
*/
|
||||
private Integer cateId;
|
||||
/**
|
||||
* 变化编号
|
||||
*/
|
||||
private Integer changeType;
|
||||
/**
|
||||
* 变化编号
|
||||
*/
|
||||
private BigDecimal changeValue;
|
||||
/**
|
||||
* 变化值,为正 或者为负
|
||||
*/
|
||||
private Long traceId;
|
||||
/**
|
||||
* 是否为后台用户手动调整
|
||||
*/
|
||||
private Integer isAdmin;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 协议设置对象 xq_agreement_setting
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_agreement_setting")
|
||||
public class AgreementSetting implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户协议
|
||||
*/
|
||||
private String userAgreement;
|
||||
/**
|
||||
* 主播入驻协议
|
||||
*/
|
||||
private String anchorJoinAgreement;
|
||||
/**
|
||||
* 隐私协议
|
||||
*/
|
||||
private String privacyAgreement;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
43
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/Banner.java
Normal file
43
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/Banner.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 轮播图对象 xq_banner
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_banner")
|
||||
public class Banner implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 轮播
|
||||
*/
|
||||
private String banner;
|
||||
/**
|
||||
* 1-启用 0-禁用
|
||||
*/
|
||||
private Integer enableStatus;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
89
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/Dynamic.java
Normal file
89
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/Dynamic.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 动态审核对象 xq_dynamic
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_dynamic")
|
||||
public class Dynamic implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 城市ID
|
||||
*/
|
||||
private Integer cityId;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 是否有附件 0 没有 1 有
|
||||
*/
|
||||
private Integer isAttach;
|
||||
/**
|
||||
* 1-待审核 2-审核成功 3-审核失败
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String auditRemark;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditOpId;
|
||||
/**
|
||||
* 审核人名称
|
||||
*/
|
||||
private String auditOpName;
|
||||
/**
|
||||
* 审核人IP
|
||||
*/
|
||||
private String auditIp;
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
58
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/SmsVerify.java
Normal file
58
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/SmsVerify.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 短信验证码对象 cai_sms_verify
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_sms_verify")
|
||||
public class SmsVerify implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 状态 0 过期,或者删除 1 正常
|
||||
*/
|
||||
private Integer status;
|
||||
private String type;
|
||||
private String typeDesc;
|
||||
/**
|
||||
* 接收号码
|
||||
*/
|
||||
private String receivePhone;
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
private String verifyCode;
|
||||
/**
|
||||
* 发送内容
|
||||
*/
|
||||
private String sendContent;
|
||||
/**
|
||||
* 发送平台
|
||||
*/
|
||||
private String sendInterface;
|
||||
/**
|
||||
* 操作IP
|
||||
*/
|
||||
private String operateIp;
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private LocalDateTime overTime;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
149
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/User.java
Normal file
149
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/User.java
Normal file
@@ -0,0 +1,149 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import org.joda.time.LocalDate;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户管理对象 xq_user
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user")
|
||||
public class User implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 用户类型: 0普通用户 1 内部用户 2 审核人员账号
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 自定义头像 1-自定义头像 0-默认头像
|
||||
*/
|
||||
private Integer avatarState;
|
||||
/**
|
||||
* 性别 0-未知 1-女 2-男
|
||||
*/
|
||||
private Integer gender;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Long age;
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
private LocalDate birthday;
|
||||
/**
|
||||
* 身高
|
||||
*/
|
||||
private Integer height;
|
||||
/**
|
||||
* 体重
|
||||
*/
|
||||
private Integer weight;
|
||||
/**
|
||||
* 体型
|
||||
*/
|
||||
private Integer somatotype;
|
||||
/**
|
||||
* 生肖
|
||||
*/
|
||||
private Integer zodiac;
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
private Integer sign;
|
||||
/**
|
||||
* 居住地
|
||||
*/
|
||||
private String residence;
|
||||
/**
|
||||
* 户籍地
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 居住城市
|
||||
*/
|
||||
private String residenceCity;
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private Integer education;
|
||||
/**
|
||||
* 婚况
|
||||
*/
|
||||
private Integer marriage;
|
||||
/**
|
||||
* 职业
|
||||
*/
|
||||
private Integer profession;
|
||||
/**
|
||||
* 年收入
|
||||
*/
|
||||
private Integer annualIncome;
|
||||
/**
|
||||
* 公司性质
|
||||
*/
|
||||
private Integer companyNature;
|
||||
/**
|
||||
* 为谁征婚
|
||||
*/
|
||||
private Integer forPersonals;
|
||||
/**
|
||||
* 自我描述
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 状态 0-可用 1-不可用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 邀请人
|
||||
*/
|
||||
private Long inviteId;
|
||||
/**
|
||||
* 邀请人Code
|
||||
*/
|
||||
private String inviteCode;
|
||||
/**
|
||||
* im_token
|
||||
*/
|
||||
private String imToken;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
110
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserAuth.java
Normal file
110
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserAuth.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户认证管理对象 xq_user_auth
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_auth")
|
||||
public class UserAuth implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 实名认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer cardNumAuth;
|
||||
/**
|
||||
* 身份证ID
|
||||
*/
|
||||
private String cardNumId;
|
||||
/**
|
||||
* 身份证ID
|
||||
*/
|
||||
private String cardNumName;
|
||||
/**
|
||||
* 手机认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer phoneAuth;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 单身认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer singlePersonAuth;
|
||||
/**
|
||||
* 学历认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer educationAuth;
|
||||
/**
|
||||
* 学历照片
|
||||
*/
|
||||
private String educationPic;
|
||||
/**
|
||||
* 工作认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer jobAuth;
|
||||
/**
|
||||
* 工作认证类型
|
||||
*/
|
||||
private Integer jobAuthType;
|
||||
/**
|
||||
* 工作照片
|
||||
*/
|
||||
private String jobPic;
|
||||
/**
|
||||
* 车辆认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer carAuth;
|
||||
/**
|
||||
* 车辆照片
|
||||
*/
|
||||
private String carPic;
|
||||
/**
|
||||
* 房子认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer houseAuth;
|
||||
/**
|
||||
* 房子照片
|
||||
*/
|
||||
private String housePic;
|
||||
/**
|
||||
* 婚况认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
private Integer marriageAuth;
|
||||
/**
|
||||
* 婚况照片
|
||||
*/
|
||||
private String marriagePic;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户认证审核对象 xq_user_auth_audit
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_auth_audit")
|
||||
public class UserAuthAudit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* single-单身认证 education-学历认证 job-工作认证 car-车辆认证 house-房子认证 marriage-婚况认证
|
||||
*/
|
||||
private String authType;
|
||||
/**
|
||||
* 权限认证说明
|
||||
*/
|
||||
private String authRemark;
|
||||
/**
|
||||
* 权限认证照片
|
||||
*/
|
||||
private String authPic;
|
||||
/**
|
||||
* 其他字段
|
||||
*/
|
||||
private String auitOther;
|
||||
/**
|
||||
* 1-待审核 2-审核成功 3-审核失败
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String auditRemark;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditOpId;
|
||||
/**
|
||||
* 审核人名称
|
||||
*/
|
||||
private String auditOpName;
|
||||
/**
|
||||
* 审核人IP
|
||||
*/
|
||||
private String auditIp;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
28
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserCodeGen.java
Normal file
28
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserCodeGen.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* id对象 cai_user_code_gen
|
||||
*
|
||||
* @author 77
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
@Data
|
||||
@TableName("cai_user_code_gen")
|
||||
public class UserCodeGen implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
}
|
||||
143
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserInfo.java
Normal file
143
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserInfo.java
Normal file
@@ -0,0 +1,143 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户信息对象 xq_user_info
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_info")
|
||||
public class UserInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 住房情况
|
||||
*/
|
||||
private Integer housingStatus;
|
||||
/**
|
||||
* 购车情况
|
||||
*/
|
||||
private Integer carStatus;
|
||||
/**
|
||||
* 是否吸烟
|
||||
*/
|
||||
private Integer smokeStatus;
|
||||
/**
|
||||
* 是否喝酒
|
||||
*/
|
||||
private Integer drinkStatus;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String nation;
|
||||
/**
|
||||
* 有没有小孩
|
||||
*/
|
||||
private Integer childStatus;
|
||||
/**
|
||||
* 家庭背景
|
||||
*/
|
||||
private Integer familyBackground;
|
||||
/**
|
||||
* 家中排行
|
||||
*/
|
||||
private Integer familyRanking;
|
||||
/**
|
||||
* 是否接受异地恋
|
||||
*/
|
||||
private Integer loveAtDistance;
|
||||
/**
|
||||
* 何时结婚
|
||||
*/
|
||||
private Integer whenMarriage;
|
||||
/**
|
||||
* 是否要小孩
|
||||
*/
|
||||
private Integer wantChild;
|
||||
/**
|
||||
* 愿与对方父母同住
|
||||
*/
|
||||
private Integer liveAtParent;
|
||||
/**
|
||||
* 交友目的
|
||||
*/
|
||||
private Integer findTag;
|
||||
/**
|
||||
* 毕业院校
|
||||
*/
|
||||
private String graduateSchool;
|
||||
/**
|
||||
* 兴趣爱好
|
||||
*/
|
||||
private String hobbys;
|
||||
/**
|
||||
* 择偶条件-年龄
|
||||
*/
|
||||
private String filterAge;
|
||||
/**
|
||||
* 择偶条件-身高
|
||||
*/
|
||||
private String filterHeight;
|
||||
/**
|
||||
* 择偶条件-体型
|
||||
*/
|
||||
private String filterSomatotype;
|
||||
/**
|
||||
* 择偶条件-婚况
|
||||
*/
|
||||
private String filterMarriage;
|
||||
/**
|
||||
* 择偶条件-学历
|
||||
*/
|
||||
private Integer filterEducation;
|
||||
/**
|
||||
* 择偶条件-地区
|
||||
*/
|
||||
private String filterResidence;
|
||||
/**
|
||||
* 择偶条件-年收入
|
||||
*/
|
||||
private Integer filterAnnualIncome;
|
||||
/**
|
||||
* 择偶条件-小孩情况
|
||||
*/
|
||||
private Integer filterChildStatus;
|
||||
/**
|
||||
* 择偶条件-住房情况
|
||||
*/
|
||||
private Integer filterHousingStatus;
|
||||
/**
|
||||
* 择偶条件-购车情况
|
||||
*/
|
||||
private Integer filterCarStatus;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户信息审核对象 xq_user_info_audit
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_info_audit")
|
||||
public class UserInfoAudit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 1-头像 1-自我描述
|
||||
*/
|
||||
private Integer infoType;
|
||||
/**
|
||||
* 1-待审核 2-审核成功 3-审核失败
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String auditRemark;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditOpId;
|
||||
/**
|
||||
* 审核人名称
|
||||
*/
|
||||
private String auditOpName;
|
||||
/**
|
||||
* 审核人IP
|
||||
*/
|
||||
private String auditIp;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
59
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserLogin.java
Normal file
59
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserLogin.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户登陆对象 xq_user_login
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_login")
|
||||
public class UserLogin implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
private String lastLoginIp;
|
||||
/**
|
||||
* 最后登陆时间
|
||||
*/
|
||||
private LocalDateTime lastLoginTime;
|
||||
/**
|
||||
* 最后登录位置
|
||||
*/
|
||||
private String lastLocation;
|
||||
/**
|
||||
* 注册IP
|
||||
*/
|
||||
private String regIp;
|
||||
/**
|
||||
* 注册时间
|
||||
*/
|
||||
private LocalDateTime regTime;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
68
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserPictures.java
Normal file
68
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserPictures.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户相册管理对象 xq_user_pictures
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_pictures")
|
||||
public class UserPictures implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
private String picture;
|
||||
/**
|
||||
* 1-待审核 2-审核成功 3-审核失败
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String auditRemark;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditOpId;
|
||||
/**
|
||||
* 审核人名称
|
||||
*/
|
||||
private String auditOpName;
|
||||
/**
|
||||
* 审核人IP
|
||||
*/
|
||||
private String auditIp;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
52
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserVip.java
Normal file
52
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserVip.java
Normal file
@@ -0,0 +1,52 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* VIP用户对象 xq_user_vip
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_vip")
|
||||
public class UserVip implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 1-普通会员 2-黄金会员 3-钻石会员
|
||||
*/
|
||||
private Integer vipType;
|
||||
/**
|
||||
* 会员到期时间
|
||||
*/
|
||||
private LocalDateTime vipTimeout;
|
||||
/**
|
||||
* 1-正常 2-已过期 3-已取消
|
||||
*/
|
||||
private Integer vipStatus;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
97
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserWithdraw.java
Normal file
97
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/UserWithdraw.java
Normal file
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户提现审核对象 xq_user_withdraw
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_user_withdraw")
|
||||
public class UserWithdraw implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* 跟踪ID
|
||||
*/
|
||||
private Long traceId;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 提现金额
|
||||
*/
|
||||
private BigDecimal withdrawMoney;
|
||||
/**
|
||||
* 真实提现金额
|
||||
*/
|
||||
private BigDecimal realWithdrawMoney;
|
||||
/**
|
||||
* 提现手续费金额
|
||||
*/
|
||||
private BigDecimal withdrawFees;
|
||||
/**
|
||||
* 提现手续费
|
||||
*/
|
||||
private BigDecimal withdrawFeesCate;
|
||||
/**
|
||||
* 是否打款
|
||||
*/
|
||||
private Integer pay;
|
||||
/**
|
||||
* 1-待审核 2-审核成功 3-审核失败
|
||||
*/
|
||||
private Integer auditStatus;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String auditRemark;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditOpId;
|
||||
/**
|
||||
* 审核人名称
|
||||
*/
|
||||
private String auditOpName;
|
||||
/**
|
||||
* 审核人IP
|
||||
*/
|
||||
private String auditIp;
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
private Integer deleteFlag;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
93
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/VipOrder.java
Normal file
93
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/VipOrder.java
Normal file
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* VIP订单对象 xq_vip_order
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_vip_order")
|
||||
public class VipOrder implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
/**
|
||||
* VIP-ID
|
||||
*/
|
||||
private Long vipId;
|
||||
/**
|
||||
* 1-普通会员 2-黄金会员 3-钻石会员
|
||||
*/
|
||||
private Integer vipType;
|
||||
/**
|
||||
* 1-月卡 2-季卡 3-年卡
|
||||
*/
|
||||
private Integer vipTime;
|
||||
/**
|
||||
* 会员价格
|
||||
*/
|
||||
private BigDecimal vipPrice;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platformType;
|
||||
/**
|
||||
* 状态 0-待支付 1-已支付 5-已退款 10-无需支付
|
||||
*/
|
||||
private Integer payStatus;
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private LocalDateTime payTime;
|
||||
/**
|
||||
* appId
|
||||
*/
|
||||
private String appid;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String returnContent;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String operateIp;
|
||||
/**
|
||||
* 是否为后台管理新增
|
||||
*/
|
||||
private String admin;
|
||||
/**
|
||||
* 后台操作管理员ID
|
||||
*/
|
||||
private Long adminId;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
49
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/VipPrice.java
Normal file
49
ruoyi-xq/src/main/java/com/ruoyi/xq/domain/VipPrice.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 会员价格设置对象 xq_vip_price
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_vip_price")
|
||||
public class VipPrice implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 1-普通会员 2-黄金会员 3-钻石会员
|
||||
*/
|
||||
private Integer vipType;
|
||||
/**
|
||||
* 1-月卡 2-季卡 3-年卡
|
||||
*/
|
||||
private Integer vipTime;
|
||||
/**
|
||||
* 会员价格
|
||||
*/
|
||||
private BigDecimal vipPrice;
|
||||
/**
|
||||
* 1-启用 0-禁用
|
||||
*/
|
||||
private Integer enableStatus;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ruoyi.xq.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 提现配置对象 xq_withdraw_setting
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("xq_withdraw_setting")
|
||||
public class WithdrawSetting implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 提现金额
|
||||
*/
|
||||
private BigDecimal money;
|
||||
/**
|
||||
* 0=开启 1=关闭
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.xq.dto.app.login;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@Data
|
||||
@Schema(description = "登陆入参模型")
|
||||
public class LoginUser {
|
||||
@Schema(description = "登陆类型")
|
||||
@NotEmpty(message = "1-手机验证码登陆 2-密码登陆")
|
||||
private Integer loginType = 1;
|
||||
@Schema(description = "登陆账号")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
private String username;
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
@Schema(description = "登陆验证码")
|
||||
private String code;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.xq.dto.app.login;
|
||||
|
||||
import com.ruoyi.xq.dto.app.user.CurrentUserInfoVo;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LoginVo {
|
||||
private String token;
|
||||
private CurrentUserInfoVo userInfo;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.xq.dto.app.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@Schema(description = "当前用户模型")
|
||||
public class CurrentUserInfoVo {
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "邀请人ID")
|
||||
private Long inviteId;
|
||||
@Schema(description = "用户类型 0-普通用户 1-内部用户")
|
||||
private Integer type;
|
||||
/**
|
||||
* 用户号/ID号
|
||||
*/
|
||||
@Schema(description = "蜜瓜号")
|
||||
private String usercode;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@Schema(description = "昵称")
|
||||
private String nickname;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Schema(description = "手机号")
|
||||
private String mobile;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
/**
|
||||
* 头像状态,0 系统默认头像,1 用户自定义头像
|
||||
*/
|
||||
@Schema(description = "头像状态 0-默认 1-自定义")
|
||||
private Integer avatarState;
|
||||
/**
|
||||
* 性别 0 未知 1 女 2 男
|
||||
*/
|
||||
@Schema(description = "性别 0-未知 1-女 2-男")
|
||||
private Integer gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Schema(description = "生日")
|
||||
private LocalDate birthday;
|
||||
@Schema(description = "年龄")
|
||||
private Integer age = 18;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Schema(description = "城市ID")
|
||||
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 不可用
|
||||
*/
|
||||
@Schema(description = "可用状态 0-可用 1-封禁")
|
||||
private Integer status;
|
||||
/**
|
||||
* 资料是否完成 0 未完成 1已完成
|
||||
*/
|
||||
@Schema(description = "资料是否完成 0 未完成 1已完成")
|
||||
private Integer finishStatus;
|
||||
|
||||
@Schema(description = "imToken")
|
||||
private String imToken;
|
||||
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
// @Schema(description = "相册")
|
||||
// private List<UserAlbumDTO> userAlbumList;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.xq.dto.app.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "重置密码入参")
|
||||
public class ResetPasswordReq {
|
||||
private String mobile;
|
||||
private String code;
|
||||
private String password;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.xq.dto.common.sms;
|
||||
|
||||
import com.ruoyi.xq.enums.common.CodeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@Data
|
||||
public class SmsCodeReq {
|
||||
|
||||
@NotEmpty(message = "参数异常")
|
||||
private CodeEnum smsType;
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
private String mobile;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.dto.common.sms;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class SystemConfigResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 823337632804304288L;
|
||||
private String key;
|
||||
private String desc;
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.xq.enums.common;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
* <p>created on 2024/3/4 18:09</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum AuditEnum {
|
||||
|
||||
NO(0,"待审核"),
|
||||
AUDITING(1,"审核中"),
|
||||
SUCCESS(2,"审核通过"),
|
||||
FAIL(3,"审核失败"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
AuditEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.xq.enums.common;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum CodeEnum {
|
||||
LOGIN("登陆短信","SMS_294195165"),
|
||||
RESET_PASSWORD("重置密码","SMS_294195165"),
|
||||
;
|
||||
private final String name;
|
||||
private final String aliTemplate;
|
||||
|
||||
CodeEnum(String name, String aliTemplate) {
|
||||
this.name = name;
|
||||
this.aliTemplate = aliTemplate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.ruoyi.xq.enums.common;
|
||||
|
||||
import com.ruoyi.xq.manager.systemconfig.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 系统动态配置枚举
|
||||
* <p>created on 2022/8/18 17:15</p>
|
||||
*
|
||||
* @author ZL
|
||||
*/
|
||||
public enum SystemConfigEnum {
|
||||
RANK_LOVE_DAY_AWARD("138,108,88,58,38,28,28,28,28,28,28", "魅力榜日榜前10名奖励", SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
||||
RANK_LOVE_WEEK_AWARD("888,588,388,288,188,138,138,138,138,138,138,138", "魅力榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
||||
RANK_INVITE_DAY_AWARD("138,108,88,58,38,28,28,28,28,28,28", "邀请榜日榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
||||
RANK_INVITE_WEEK_AWARD("888,588,388,288,188,138,138,138,138,138,138,138", "邀请榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
||||
INVITE_BIND_RATE("1000", "邀请绑定成功率[0-1000]数字越大成功率越高",SystemConfigGroupEnum.BUSINESS, new RangeIntegerSystemConfigCheck(0,1000)),
|
||||
SHARE_URL("https://h5.qx96688.com/index/invite/index", "分享链接",SystemConfigGroupEnum.BUSINESS),
|
||||
ANCHOR_AVATAR_IGNORE_AUDIT("0", "开启主播头像免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
||||
ANCHOR_ALBUM_AVATAR_IGNORE_AUDIT("0", "开启主播相册免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
||||
NO_ANCHOR_AVATAR_IGNORE_AUDIT("0", "开启非主播头像免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
||||
NO_ANCHOR_ALBUM_AVATAR_IGNORE_AUDIT("0", "开启非主播头像免审核",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
||||
REGISTER_AWARD("88", "注册奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||
FAST_PAY_AWARD("300", "首充奖励",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||
GUARD_PRICE("1314", "守护价格",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||
WINDOW_GIFT_THRESHOLD("10", "礼物飘窗阈值",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||
WINDOW_RECHARGE_THRESHOLD("10", "充值飘窗阈值",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||
DEFAULT_ANCHOR_PRICE("200","主播默认价格",SystemConfigGroupEnum.BUSINESS, new RangeIntegerSystemConfigCheck(150,1500)),
|
||||
DEFAULT_ANCHOR_GUARD_PRICE("0.5","主播默认守护提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DEFAULT_ANCHOR_GIFT_PRICE("0.5","主播默认礼物提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DEFAULT_ANCHOR_VIDEO_PRICE("0.5","主播默认视频提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DAY_MAX_DYNAMIC("10", "每日运行发布的最大动态数",SystemConfigGroupEnum.BUSINESS,new NumberSystemConfigCheck()),
|
||||
IM_ANCHOR_INCOME_RATE("0.5", "聊天主播提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DEFAULT_VIDEO_INCOME_RATE("0.07", "默认分销好友视频提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DEFAULT_GIFT_INCOME_RATE("0.07", "默认分销好友礼物提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DEFAULT_GUARD_INCOME_RATE("0.07", "默认分销好友守护提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
DEFAULT_PAY_INCOME_RATE("0.3", "默认分销好友充值提成",SystemConfigGroupEnum.BUSINESS,new RateSystemConfigCheck()),
|
||||
@Deprecated
|
||||
DEFAULT_UNION_GIFT_INCOME_RATE("0.01", "默认工会礼物提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
||||
DEFAULT_UNION_VIDEO_INCOME_RATE("0.01", "默认工会视频提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
||||
DEFAULT_UNION_ONE_INCOME_RATE("0.07", "默认工会一级提成",SystemConfigGroupEnum.BUSINESS, new RateSystemConfigCheck()),
|
||||
TODAY_GREET_MAX("100", "每日主播群打招呼次数",SystemConfigGroupEnum.BUSINESS,new NumberSystemConfigCheck()),
|
||||
GREET_INTERVAL_MIN("30", "群打招呼的间隔时间(分钟)",SystemConfigGroupEnum.BUSINESS, new NumberSystemConfigCheck()),
|
||||
OPEN_ALI_PAY("1", "是否开启支付宝支付",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
||||
OPEN_WX_PAY("1", "是否开启微信支付",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
||||
ALI_PAY_FIRST("1", "支付宝支付显示是否在前面",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
||||
OPEN_WITHDRAW("1", "是否开启提现功能",SystemConfigGroupEnum.BUSINESS,new BooleanSystemConfigCheck()),
|
||||
HOME_RECOMMEND_FOLLOWS_LIMIT("20", "首页随机推荐关注用户数量",SystemConfigGroupEnum.BUSINESS,new NumberSystemConfigCheck()),
|
||||
WITHDRAW_RULE_REMARK("平台50元起提现,最快2小时到账(每天不限次数),22点后提现次日中午10点到账", "提现规则说明",SystemConfigGroupEnum.BUSINESS),
|
||||
SENSITIVE_ENABLE("1", "是否开启手机号脱敏",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
||||
YUNXIN_ONLINE_ENABLE("1", "是否开启云信监控在线状态",SystemConfigGroupEnum.SYSTEM,new BooleanSystemConfigCheck()),
|
||||
SMS_CODE_ADMIN("", "万能验证码",SystemConfigGroupEnum.SYSTEM),
|
||||
PASSWORD_ADMIN("", "公用密码",SystemConfigGroupEnum.SYSTEM),
|
||||
COS_DOMAIN("http://nono-1257812345.cos.ap-shanghai.myqcloud.com/", "文件系统域名前缀",SystemConfigGroupEnum.SYSTEM),
|
||||
SYSTEM_CUSTOMER_SERVICE("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15", "系统客服",SystemConfigGroupEnum.SYSTEM),
|
||||
WS_SOCKET_URL("ws://localhost:8080/ws?token=%s&room_id=%s", "ws通讯地址",SystemConfigGroupEnum.SYSTEM),
|
||||
;
|
||||
|
||||
|
||||
@Getter
|
||||
private final String defaultValue;
|
||||
@Getter
|
||||
private final String desc;
|
||||
@Getter
|
||||
private final SystemConfigGroupEnum group;
|
||||
@Setter
|
||||
@Getter
|
||||
private ISystemConfigCheck check = null;
|
||||
|
||||
SystemConfigEnum(String defaultValue, String desc, SystemConfigGroupEnum group) {
|
||||
this.defaultValue = defaultValue;
|
||||
this.desc = desc;
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
SystemConfigEnum(String defaultValue, String desc, SystemConfigGroupEnum group, ISystemConfigCheck check) {
|
||||
this.defaultValue = defaultValue;
|
||||
this.desc = desc;
|
||||
this.group = group;
|
||||
this.check = check;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.ruoyi.xq.enums.common;
|
||||
|
||||
public enum SystemConfigGroupEnum {
|
||||
SYSTEM,BUSINESS
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 年收入
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserAnnualIncomeEnum {
|
||||
AI_5W_DOWN(1,"5万以下"),
|
||||
AI_5_10W(2,"5-10万"),
|
||||
AI_10_20W(3,"10-20万"),
|
||||
AI_20_30W(4,"20-30万"),
|
||||
AI_30_50W(5,"30-50万"),
|
||||
AI_50_100W(6,"50-100万"),
|
||||
AI_100W_UP(7,"100万以上"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserAnnualIncomeEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 购车情况
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserCarStatusEnum {
|
||||
WGC(1,"未购车"),
|
||||
YGC_JJX(2,"已购车(经济型)"),
|
||||
YGC_ZDX(3,"已购车(中档型)"),
|
||||
YGC_HHX(4,"已购车(豪华型)"),
|
||||
XYSKPZ(5,"需要时可配置"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserCarStatusEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 有没有小孩
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserChildStatusEnum {
|
||||
N(1,"没有"),
|
||||
Y_HWZYQ(2,"有,和我住一起"),
|
||||
Y_YSHWZYQ(3,"有,有时和我住一起"),
|
||||
Y_BHWZYQ(4,"有,不和我住一起"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserChildStatusEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 公司性质
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserCompanyNatureEnum {
|
||||
ZFJG(1,"政府机关"),
|
||||
SYDW(2,"事业单位"),
|
||||
WQQY(3,"外企企业"),
|
||||
SJ500Q(4,"世界500强"),
|
||||
SSGS(5,"上市公司"),
|
||||
GYQY(6,"国有企业"),
|
||||
SYQY(7,"私营企业"),
|
||||
SYGS(8,"自有公司"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserCompanyNatureEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 是否喝酒
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserDrinkStatusEnum {
|
||||
BHJ(1,"不喝酒"),
|
||||
SJXYH(2,"社交需要喝"),
|
||||
XZSXZ(3,"兴致时小酌"),
|
||||
JBLK(4,"酒不离口"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserDrinkStatusEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 学历
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserEducationEnum {
|
||||
ZZ_LOW(1,"中专以下"),
|
||||
ZZ(2,"中专"),
|
||||
DZ(3,"大专"),
|
||||
BK(4,"本科"),
|
||||
SH(5,"硕士"),
|
||||
BS(6,"博士"),
|
||||
BS_MORE(7,"博士后"),
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserEducationEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 家庭背景
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserFamilyBackgroundEnum {
|
||||
GZ(1,"高知"),
|
||||
GG(2,"高干"),
|
||||
JS(3,"经商"),
|
||||
ZCJJ(4,"中产阶级"),
|
||||
XK(5,"小康"),
|
||||
GXJC(6,"工薪阶层"),
|
||||
QT(7,"其他"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserFamilyBackgroundEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 家中排行
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserFamilyRankingEnum {
|
||||
DSZN(1,"独生子女"),
|
||||
LD(2,"老大"),
|
||||
LE(3,"老二"),
|
||||
LS(4,"老三"),
|
||||
LSI(5,"老四"),
|
||||
LW(6,"老五"),
|
||||
QT(7,"其他"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserFamilyRankingEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 交友目的
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserFindTagEnum {
|
||||
JPY(1,"交朋友"),
|
||||
ZPY(2,"找知己"),
|
||||
TNA(3,"谈恋爱"),
|
||||
JH(4,"结婚"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserFindTagEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 为谁征婚
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserForPersonalsEnum {
|
||||
FOR_ME(1,"为自己征婚"),
|
||||
FOR_CHILD(2,"为子女征婚"),
|
||||
FOR_FRIEND(3,"为亲友征婚"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserForPersonalsEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserGenderEnum {
|
||||
NONE(0,"未知"),
|
||||
WOMEN(1,"女"),
|
||||
MAN(2,"男"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserGenderEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 住房情况
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserHousingStatusEnum {
|
||||
ZWGF(1,"暂未购房"),
|
||||
YGF_YDK(2,"已购房(有贷款)"),
|
||||
YGF_WDK(3,"已购房(无贷款)"),
|
||||
YFMTZ(4,"与父母同住"),
|
||||
WFXWDFJJ(5,"无房希望对方解决"),
|
||||
WFXWSFJJ(6,"无房希望双方解决"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserHousingStatusEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 愿与对方父母同住
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserLiveAtParentEnum {
|
||||
YY(1,"愿意"),
|
||||
BYY(2,"不愿意"),
|
||||
SQKED(3,"视情况而定"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserLiveAtParentEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 是否接受异地恋
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
*
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserLoveAtDistanceEnum {
|
||||
JS(1,"接受"),
|
||||
BJS(2,"不接受"),
|
||||
KQK(3,"看情况"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserLoveAtDistanceEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 婚况
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserMarriageEnum {
|
||||
WH(1,"未婚"),
|
||||
LY(2,"离异"),
|
||||
SO(3,"丧偶"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserMarriageEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserNationEnum {
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserNationEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 职业
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserProfessionEnum {
|
||||
YDY("YDY","运动员"),
|
||||
JS("JS","教师"),
|
||||
JSHOU("JSHOU","教授"),
|
||||
XS("XS","学生"),
|
||||
DSZ("DSZ","董事长"),
|
||||
ZJL("ZJL","总经理"),
|
||||
FZZJ("FZZJ","副总/总监"),
|
||||
BMJL("BMJL","部门经理"),
|
||||
ZCGL("ZCGL","中层管理"),
|
||||
QYJ("QYJ","企业家"),
|
||||
GTLB("GTLB","个体老板"),
|
||||
GB("GB","干部"),
|
||||
GWY("GWY","公务员"),
|
||||
LS("LS","律师"),
|
||||
YS("YS","医生"),
|
||||
HS("HS","护士"),
|
||||
ZJXZ("ZJXZ","专家学者"),
|
||||
GCS("GCS","工程师"),
|
||||
SJS("SJS","设计师"),
|
||||
YSJ("YSJ","艺术家"),
|
||||
WY("WY","文员"),
|
||||
ZB("ZB","主播"),
|
||||
KJ("KJ","会计"),
|
||||
JSY("JSY","技术员"),
|
||||
FWY("FWY","服务员"),
|
||||
PTGR("PTGR","普通工人"),
|
||||
ZYZY("ZYZY","自由职业"),
|
||||
MRY("MRY","美容业"),
|
||||
PXS("PXS","培训师"),
|
||||
MTGZZ("MTGZZ","媒体工作者"),
|
||||
SYS("SYS","摄影师"),
|
||||
ZXS("ZXS","咨询师"),
|
||||
YH("YH","银行"),
|
||||
BX("BX","保险"),
|
||||
FCXS("FCXS","房产销售"),
|
||||
JR("JR","军人"),
|
||||
XFY("XFY","消防员"),
|
||||
JC("JC","警察"),
|
||||
GQZY("GQZY","国企职员"),
|
||||
SJ("SJ","司机"),
|
||||
ZYZ("ZYZ","种养殖"),
|
||||
XIAOSHOU("XIAOSHOU","销售"),
|
||||
JP("JP","教培老师"),
|
||||
JZSG("JZSG","建筑施工"),
|
||||
FJAB("FJAB","辅警安保"),
|
||||
XXY("XXY","程序员"),
|
||||
HQZC("HQZC","婚庆主持"),
|
||||
JGFZR("JGFZR","机构负责人"),
|
||||
YJ("YJ","医技"),
|
||||
XMGL("XMGL","项目管理"),
|
||||
DZSW("DZSW","电子商务"),
|
||||
DHZB("DHZB","带货主播"),
|
||||
JDY("JDY","鉴定员"),
|
||||
BJ("BJ","编辑"),
|
||||
JZ("JZ","记者"),
|
||||
WL("WL","物流"),
|
||||
ZXG("ZXG","装修工"),
|
||||
GCZG("GCZG","工程主管"),
|
||||
JRTZ("JRTZ","金融投资"),
|
||||
KF("KF","客服"),
|
||||
KC("KC","空乘"),
|
||||
CW("CW","财务"),
|
||||
FY("FY","翻译"),
|
||||
SYDW("SYDW","事业单位"),
|
||||
ZS("ZS","招商"),
|
||||
CS("CS","厨师"),
|
||||
YOUJIAO("YOUJIAO","幼教"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final String name;
|
||||
private final String text;
|
||||
|
||||
UserProfessionEnum(String name, String text) {
|
||||
this.name = name;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 星座
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserSignEnum {
|
||||
ARIES(1,"白羊座"),
|
||||
TAURUS(2,"金牛座"),
|
||||
GEMINI(3,"双子座"),
|
||||
CANCER(4,"巨蟹座"),
|
||||
LEO(5,"狮子座"),
|
||||
VIRGO(6,"处女座"),
|
||||
LIBRA(7,"天秤座"),
|
||||
SCORPIO(8,"天蝎座"),
|
||||
SAGITTARIUS(9,"射手座"),
|
||||
CAPRICORNUS(10,"摩羯座"),
|
||||
AQUARIUS(11,"水瓶座"),
|
||||
PISCES(12,"双鱼座"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserSignEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 是否吸烟
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserSmokeStatusEnum {
|
||||
BX_FG(1,"不吸,很反感"),
|
||||
BX_BFG(1,"不吸烟,但不反感"),
|
||||
SJOEXY(1,"社交偶尔吸烟"),
|
||||
YBLS(1,"烟不离手"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserSmokeStatusEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 体型
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserSomatotypeEnum {
|
||||
S(1,"瘦"),
|
||||
JS(2,"较瘦"),
|
||||
XC(3,"匀称"),
|
||||
MT(4,"苗条"),
|
||||
GT(5,"高挑"),
|
||||
FM(6,"丰满"),
|
||||
JZ(7,"健壮"),
|
||||
KW(8,"魁梧"),
|
||||
P(9,"胖"),
|
||||
JP(10,"较胖"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserSomatotypeEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 是否要小孩
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserWantChildEnum {
|
||||
YY(1,"愿意"),
|
||||
BYY(2,"不愿意"),
|
||||
SQKED(3,"视情况而定"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserWantChildEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 何时结婚
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserWhenMarriageEnum {
|
||||
JSSH(1,"及时闪婚"),
|
||||
YNYN(2,"一年以内"),
|
||||
LNYN(3,"两年以内"),
|
||||
SNYN(4,"三年以内"),
|
||||
SJCSJJH(5,"时机成熟就结婚"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserWhenMarriageEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.xq.enums.userauth;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 生肖
|
||||
* <p>created on 2024/2/26 16:50</p>
|
||||
* @author duet
|
||||
*/
|
||||
@Getter
|
||||
public enum UserZodiacEnum {
|
||||
RAT(1,"鼠"),
|
||||
OX(2,"牛"),
|
||||
TIGER(3,"虎"),
|
||||
RABBIT(4,"兔"),
|
||||
DRAGON(5,"龙"),
|
||||
SNAKE(6,"蛇"),
|
||||
HORSE(7,"马"),
|
||||
GOAT(8,"羊"),
|
||||
MONKEY(9,"猴"),
|
||||
ROOSTER(10,"鸡"),
|
||||
DOG(11,"狗"),
|
||||
PIG(12,"猪"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
UserZodiacEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.xq.executor;
|
||||
|
||||
import com.alibaba.ttl.threadpool.TtlExecutors;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
|
||||
import java.util.concurrent.*;
|
||||
|
||||
/**
|
||||
* 线程变量定义
|
||||
* <p>created on 2023/3/3 11:16</p>
|
||||
* @author ZL
|
||||
*/
|
||||
public class ExecutorConstant {
|
||||
|
||||
private final static int CPU_NUM = Runtime.getRuntime().availableProcessors();
|
||||
|
||||
public static Executor SYNC_EXECUTOR;
|
||||
|
||||
public static Executor COMMON_EXECUTOR;
|
||||
public static Executor ROOM_EXECUTOR;
|
||||
|
||||
static {
|
||||
ThreadPoolExecutor syncExecutor = initExecutor(CPU_NUM,
|
||||
CPU_NUM << 2,
|
||||
5,
|
||||
TimeUnit.SECONDS,
|
||||
new SynchronousQueue<>(),
|
||||
"syncThreadPool-%d");
|
||||
SYNC_EXECUTOR = TtlExecutors.getTtlExecutor(syncExecutor);
|
||||
|
||||
ThreadPoolExecutor commonExecutor = new ThreadPoolExecutor(CPU_NUM,
|
||||
CPU_NUM << 2,
|
||||
5,
|
||||
TimeUnit.SECONDS,
|
||||
new ArrayBlockingQueue<>(50),
|
||||
init("commonThreadPool-%d"),
|
||||
new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
COMMON_EXECUTOR = TtlExecutors.getTtlExecutor(commonExecutor);
|
||||
|
||||
ThreadPoolExecutor roomExecutor = new ThreadPoolExecutor(CPU_NUM,
|
||||
CPU_NUM << 2,
|
||||
5,
|
||||
TimeUnit.SECONDS,
|
||||
new ArrayBlockingQueue<>(5),
|
||||
init("roomThreadPoll-%d"),
|
||||
new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
ROOM_EXECUTOR = TtlExecutors.getTtlExecutor(roomExecutor);
|
||||
|
||||
}
|
||||
|
||||
private static ThreadFactory init(String nameFormat){
|
||||
return new ThreadFactoryBuilder().setNameFormat(nameFormat).build();
|
||||
}
|
||||
|
||||
private static ThreadPoolExecutor initExecutor(int corePoolSize, int maxPoolSize, int keepAliveTime, TimeUnit timeUnit,
|
||||
BlockingQueue<Runnable> workQueue, String nameFormat){
|
||||
return new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveTime, timeUnit, workQueue,
|
||||
init(nameFormat));
|
||||
}
|
||||
}
|
||||
35
ruoyi-xq/src/main/java/com/ruoyi/xq/job/Clear2HoursJob.java
Normal file
35
ruoyi-xq/src/main/java/com/ruoyi/xq/job/Clear2HoursJob.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.xq.job;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class Clear2HoursJob {
|
||||
|
||||
/* @Autowired
|
||||
private DynamicService dynamicService;
|
||||
@Autowired
|
||||
private UserChatRecordService userChatRecordService;
|
||||
|
||||
|
||||
// 每隔小时执行一次
|
||||
// @Scheduled(cron = "0 0 0/2 * * ? *")
|
||||
public void clearRun() {
|
||||
try {
|
||||
log.info("定时删除动态== 开始");
|
||||
dynamicService.clearDynamic(12);
|
||||
log.info("定时删除动态== 结束");
|
||||
}catch (Exception e){
|
||||
log.error("定时删除动态== 异常",e);
|
||||
}
|
||||
try {
|
||||
log.info("定时删除聊天记录== 开始");
|
||||
userChatRecordService.clearChatRecord(24);
|
||||
log.info("定时删除聊天记录== 结束");
|
||||
}catch (Exception e){
|
||||
log.error("定时删除聊天记录== 异常",e);
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
29
ruoyi-xq/src/main/java/com/ruoyi/xq/job/ClearDaysJob.java
Normal file
29
ruoyi-xq/src/main/java/com/ruoyi/xq/job/ClearDaysJob.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.xq.job;
|
||||
|
||||
import com.ruoyi.xq.service.SmsVerifyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ClearDaysJob {
|
||||
|
||||
@Autowired
|
||||
private SmsVerifyService smsVerifyService;
|
||||
|
||||
|
||||
// 凌晨8点执行
|
||||
@Scheduled(cron = "0 0 8 * * ? ")
|
||||
public void clearRun() {
|
||||
try {
|
||||
log.info("定时删除短信记录== 开始");
|
||||
smsVerifyService.clearSmsVerify(60);
|
||||
log.info("定时删除短信记录== 结束");
|
||||
}catch (Exception e){
|
||||
log.error("定时删除短信记录== 异常",e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
32
ruoyi-xq/src/main/java/com/ruoyi/xq/job/ForbidJob.java
Normal file
32
ruoyi-xq/src/main/java/com/ruoyi/xq/job/ForbidJob.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.xq.job;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ForbidJob {
|
||||
|
||||
/*@Autowired
|
||||
private UserForbidManager userForbidManager;
|
||||
@Autowired
|
||||
private SysPushService sysPushService;
|
||||
|
||||
*//**
|
||||
* 每12小时执行一次
|
||||
*//*
|
||||
@Scheduled(cron = "0 0 11,23 * * ? ")
|
||||
public void checkForbid(){
|
||||
try {
|
||||
userForbidManager.checkAll();
|
||||
}catch (Exception e){
|
||||
log.error("黑名单失效检测失败!",e);
|
||||
}
|
||||
try {
|
||||
sysPushService.checkAll();
|
||||
}catch (Exception e){
|
||||
log.error("系统推送定时任务检测失败!",e);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.xq.job;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class IncomeStatisticsJob {
|
||||
/*@Autowired
|
||||
private DayIncomeStatisticsService dayIncomeStatisticsService;
|
||||
// @Scheduled(cron = "0 0/6 * * * ?")
|
||||
public void persistentDb() {
|
||||
try {
|
||||
dayIncomeStatisticsService.refreshByDate(LocalDate.now());
|
||||
}catch (Exception e){
|
||||
log.error("更新每日收益统计失败!",e);
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
144
ruoyi-xq/src/main/java/com/ruoyi/xq/kit/AliSmsKit.java
Normal file
144
ruoyi-xq/src/main/java/com/ruoyi/xq/kit/AliSmsKit.java
Normal file
@@ -0,0 +1,144 @@
|
||||
package com.ruoyi.xq.kit;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.CommonRequest;
|
||||
import com.aliyuncs.CommonResponse;
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.http.MethodType;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.ruoyi.xq.config.AliSmsProperties;
|
||||
import com.ruoyi.xq.enums.common.CodeEnum;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.util.Asserts;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class AliSmsKit {
|
||||
@Autowired
|
||||
@Setter
|
||||
private AliSmsProperties config;
|
||||
private IClientProfile profile;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
profile = DefaultProfile.getProfile("cn-hangzhou", config.getAccessKeyId(), config.getAccessKeySecret());
|
||||
}
|
||||
|
||||
private boolean batchSendMessage(List<String> phone,String messageTemplate){
|
||||
Asserts.notBlank(messageTemplate, "短信模板不能为空");
|
||||
IAcsClient client = new DefaultAcsClient(profile);
|
||||
CommonRequest request = new CommonRequest();
|
||||
request.setSysMethod(MethodType.POST);
|
||||
request.setSysDomain("dysmsapi.aliyuncs.com");
|
||||
request.setSysVersion("2017-05-25");
|
||||
request.setSysAction("SendBatchSms");
|
||||
List<String> signName = phone.stream().map(i -> config.getSignName()).collect(Collectors.toList());
|
||||
request.putQueryParameter("TemplateCode", messageTemplate);
|
||||
request.putQueryParameter("SignNameJson", JSON.toJSONString(signName));
|
||||
request.putQueryParameter("PhoneNumberJson", JSON.toJSONString(phone));
|
||||
try {
|
||||
CommonResponse response = client.getCommonResponse(request);
|
||||
String data = response.getData();
|
||||
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||
if(jsonObject.get("Code") == null || !"OK".equals(jsonObject.get("Code"))){
|
||||
log.error("短信发送失败 response={}", jsonObject.toJSONString());
|
||||
return false;
|
||||
}
|
||||
} catch (ClientException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
throw new RuntimeException("短信发送失败!");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean sendMessage(String phone, String messageTemplate, String messageCode) {
|
||||
Asserts.notBlank(messageTemplate, "短信模板不能为空");
|
||||
IAcsClient client = new DefaultAcsClient(profile);
|
||||
CommonRequest request = new CommonRequest();
|
||||
request.setSysMethod(MethodType.POST);
|
||||
request.setSysDomain("dysmsapi.aliyuncs.com");
|
||||
request.setSysVersion("2017-05-25");
|
||||
request.setSysAction("SendSms");
|
||||
request.putQueryParameter("SignName", config.getSignName());
|
||||
request.putQueryParameter("RegionId", "cn-hangzhou");
|
||||
request.putQueryParameter("PhoneNumbers", phone);
|
||||
request.putQueryParameter("TemplateCode", messageTemplate);
|
||||
if (StringUtils.isNoneBlank(messageCode)) {
|
||||
request.putQueryParameter("TemplateParam", "{\"code\":\"" + messageCode + "\"}");
|
||||
}
|
||||
CommonResponse response = null;
|
||||
try {
|
||||
response = client.getCommonResponse(request);
|
||||
String data = response.getData();
|
||||
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||
if(jsonObject.get("Code") == null || !"OK".equals(jsonObject.get("Code"))){
|
||||
log.error("短信发送失败 response={}", jsonObject.toJSONString());
|
||||
return false;
|
||||
}
|
||||
} catch (ClientException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
throw new RuntimeException("短信发送失败!");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public boolean sendMessage(String phone, String messageTemplate, String messageCode, boolean isAsy) {
|
||||
if (isAsy) {
|
||||
new Thread(() -> {
|
||||
sendMessage(phone, messageTemplate, messageCode);
|
||||
}).start();
|
||||
return true;
|
||||
} else {
|
||||
return sendMessage(phone, messageTemplate, messageCode);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean batchSendMessagePublic(List<String> phone,String messageTemplate){
|
||||
if(CollectionUtils.isEmpty(phone)){
|
||||
return false;
|
||||
}
|
||||
List<List<String>> list = Lists.partition(phone, 100);
|
||||
for (List<String> phoneList : list) {
|
||||
this.batchSendMessage(phoneList,messageTemplate);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步发送消息
|
||||
* @param phone
|
||||
* @param messageTemplate
|
||||
* @return
|
||||
*/
|
||||
public boolean sendMessageAsync(String phone, String messageTemplate) {
|
||||
return sendMessage(phone,messageTemplate,null,true);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
AliSmsKit messageSenderUtil = new AliSmsKit();
|
||||
AliSmsProperties config = new AliSmsProperties();
|
||||
messageSenderUtil.setConfig(config);
|
||||
messageSenderUtil.init();
|
||||
messageSenderUtil.batchSendMessagePublic(Arrays.asList("15302786929"), CodeEnum.LOGIN.getAliTemplate());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
48
ruoyi-xq/src/main/java/com/ruoyi/xq/lock/LockKey.java
Normal file
48
ruoyi-xq/src/main/java/com/ruoyi/xq/lock/LockKey.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.xq.lock;
|
||||
|
||||
|
||||
import com.ruoyi.xq.constant.RedisHttpConstant;
|
||||
|
||||
public class LockKey {
|
||||
|
||||
public static final String LOCK_REGISTER_REDIS = RedisHttpConstant.REDIS_P + "lock:register:%s";
|
||||
public static final String LOCK_DEAL_INVITE_REDIS = RedisHttpConstant.REDIS_P + "lock:dealInvite:%s";
|
||||
public static final String LOCK_ADD_USER_GREET_REDIS = RedisHttpConstant.REDIS_P + "lock:addUserGreet:%s";
|
||||
public static final String LOCK_SEND_GREET_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGreet:%s";
|
||||
public static final String LOCK_SEND_GUARD_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGuard:%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_ONLINE_LOGIN_NOTICE_REDIS = RedisHttpConstant.REDIS_P + "lockHand:loginFansNotice:%s";
|
||||
|
||||
public static String getRegisterLockKey(String mobile){
|
||||
return String.format(LOCK_REGISTER_REDIS,mobile);
|
||||
}
|
||||
|
||||
public static String getDealInviteLockKey(Long userId){
|
||||
return String.format(LOCK_DEAL_INVITE_REDIS,userId);
|
||||
}
|
||||
|
||||
public static String getAddUserGreetLock(Long userId){
|
||||
return String.format(LOCK_ADD_USER_GREET_REDIS,userId);
|
||||
}
|
||||
|
||||
public static String getSendGreetLock(Long userId){
|
||||
return String.format(LOCK_SEND_GREET_REDIS,userId);
|
||||
}
|
||||
|
||||
public static String getSendGuardLock(Long userId){
|
||||
return String.format(LOCK_SEND_GUARD_REDIS,userId);
|
||||
}
|
||||
|
||||
public static String getVideoSettleLock(Long roomId){
|
||||
return String.format(LOCK_VIDEO_SETTLE_REDIS,roomId);
|
||||
}
|
||||
|
||||
public static String getSendGiftLock(Long userId){
|
||||
return String.format(LOCK_SEND_GIFT_REDIS,userId);
|
||||
}
|
||||
|
||||
public static String getLoginNoticeFansLock(Long userId){
|
||||
return String.format(LOCK_ONLINE_LOGIN_NOTICE_REDIS,userId);
|
||||
}
|
||||
}
|
||||
267
ruoyi-xq/src/main/java/com/ruoyi/xq/manager/CaiLoginManager.java
Normal file
267
ruoyi-xq/src/main/java/com/ruoyi/xq/manager/CaiLoginManager.java
Normal file
@@ -0,0 +1,267 @@
|
||||
package com.ruoyi.xq.manager;
|
||||
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.secure.BCrypt;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.enums.UserType;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.system.service.SysLoginService;
|
||||
import com.ruoyi.xq.domain.User;
|
||||
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.CodeEnum;
|
||||
import com.ruoyi.xq.enums.common.SystemConfigEnum;
|
||||
import com.ruoyi.xq.enums.userauth.UserGenderEnum;
|
||||
import com.ruoyi.xq.executor.ExecutorConstant;
|
||||
import com.ruoyi.xq.lock.LockKey;
|
||||
import com.ruoyi.xq.service.*;
|
||||
import com.ruoyi.yunxin.client.ImUserClient;
|
||||
import com.ruoyi.yunxin.req.CreateUserReq;
|
||||
import com.ruoyi.yunxin.req.UpdateTokenReq;
|
||||
import com.ruoyi.yunxin.resp.YxCommonR;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class CaiLoginManager {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@Autowired
|
||||
private SysLoginService sysLoginService;
|
||||
@Autowired
|
||||
private UserLoginService userLoginService;
|
||||
@Autowired
|
||||
private UserAuthService userAuthService;
|
||||
@Autowired
|
||||
private UserCodeGenService userCodeGenService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
@Autowired
|
||||
private SystemConfigManager systemConfigManager;
|
||||
@Autowired
|
||||
private RedissonClient redissonClient;
|
||||
@Resource
|
||||
private ImUserClient imUserClient;
|
||||
@Autowired
|
||||
private SmsVerifyService smsVerifyService;
|
||||
|
||||
public String login(String username,String password){
|
||||
User user = userService.getByUsername(username);
|
||||
if(user == null){
|
||||
throw new ServiceException("用户不存在或密码错误");
|
||||
}
|
||||
/*String imei = ServletUtils.getImei();
|
||||
UserForbidManager.CheckForbid forbid = userForbidManager.checkForbid(user.getId(), user.getUsercode(), imei, ServletUtils.getClientIP());
|
||||
if(forbid != null && forbid.isForbid()){
|
||||
throw new ServiceException(forbid.getMessage());
|
||||
}*/
|
||||
if(user.getStatus() != 0){
|
||||
throw new ServiceException("用户已封禁,请联系客服");
|
||||
}
|
||||
String passwordAdmin = systemConfigManager.getSystemConfig(SystemConfigEnum.PASSWORD_ADMIN);
|
||||
if(StringUtils.isNotBlank(passwordAdmin) && passwordAdmin.equals(password)){
|
||||
return login(user);
|
||||
}
|
||||
if(!BCrypt.checkpw(password, user.getPassword())){
|
||||
throw new ServiceException("用户不存在或密码错误");
|
||||
}
|
||||
return login(user);
|
||||
}
|
||||
|
||||
public String loginSms(String mobile,String code,String inviteCode){
|
||||
boolean check = smsVerifyService.check(CodeEnum.LOGIN, mobile, code);
|
||||
if(!check){
|
||||
throw new ServiceException("验证码错误");
|
||||
}
|
||||
User user = userService.getByUsername(mobile);
|
||||
if(user == null){
|
||||
user = this.register(mobile, inviteCode);
|
||||
}
|
||||
return login(user);
|
||||
}
|
||||
|
||||
public User register(String mobile,String inviteCode) {
|
||||
User user = userService.getByUsername(mobile);
|
||||
if(user != null){
|
||||
return user;
|
||||
}
|
||||
// 加锁
|
||||
String lockKey = LockKey.getRegisterLockKey(mobile);
|
||||
RLock lock = redissonClient.getLock(lockKey);
|
||||
if(lock.isLocked()){
|
||||
throw new ServiceException("您点击太快了");
|
||||
}
|
||||
lock.lock();
|
||||
try {
|
||||
CaiLoginManager bean = SpringUtil.getBean(CaiLoginManager.class);
|
||||
user = bean.registerUser(mobile,inviteCode);
|
||||
}finally {
|
||||
lock.unlock();
|
||||
}
|
||||
if(user.getInviteId() != null){
|
||||
User finalUser = user;
|
||||
ExecutorConstant.COMMON_EXECUTOR.execute(() -> dealInviteId(finalUser));
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void dealInviteId(User user){
|
||||
String inviteCode = user.getInviteCode();
|
||||
if(StringUtils.isEmpty(inviteCode)){
|
||||
return;
|
||||
}
|
||||
User inviteUser = userService.getByUsercode(inviteCode);
|
||||
if(inviteUser == null){
|
||||
return;
|
||||
}
|
||||
String key = LockKey.getDealInviteLockKey(user.getId());
|
||||
RLock lock = redissonClient.getLock(key);
|
||||
if(lock.isLocked()){
|
||||
log.warn("点击太快了,等一等,dealInviteId");
|
||||
return;
|
||||
}
|
||||
lock.lock(5,TimeUnit.SECONDS);
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
public void logout() {
|
||||
try {
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
sysLoginService.recordLogininfor(loginUser.getUsername(), loginUser.getUserType(), Constants.LOGOUT, MessageUtils.message("user.logout.success"));
|
||||
} catch (NotLoginException ignored) {
|
||||
} finally {
|
||||
try {
|
||||
StpUtil.logout();
|
||||
} catch (NotLoginException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String login(User user){
|
||||
LoginUser loginUser = new LoginUser();
|
||||
loginUser.setDeptId(null);
|
||||
loginUser.setDeptName(null);
|
||||
loginUser.setMenuPermission(Collections.emptySet());
|
||||
loginUser.setRolePermission(Collections.emptySet());
|
||||
loginUser.setUsername(user.getMobile());
|
||||
loginUser.setRoles(Collections.emptyList());
|
||||
loginUser.setRoleId(null);
|
||||
loginUser.setUserId(user.getId());
|
||||
loginUser.setUserType(UserType.APP_USER.getUserType());
|
||||
LoginHelper.login(loginUser);
|
||||
sysLoginService.recordLogininfor(loginUser.getUsername(), UserType.APP_USER.getUserType(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
|
||||
return StpUtil.getTokenValue();
|
||||
}
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public User registerUser(String mobile,String inviteCode){
|
||||
String usercode = userCodeGenService.getCodeGen();
|
||||
User add = new User();
|
||||
add.setUsercode(usercode);
|
||||
add.setNickname("用户"+usercode);
|
||||
add.setType(0);
|
||||
add.setPassword(BCrypt.hashpw(usercode+"用户手动滑稽安康黄鼠狼"));
|
||||
add.setMobile(mobile);
|
||||
add.setGender(UserGenderEnum.NONE.getCode());
|
||||
add.setInviteCode(inviteCode);
|
||||
add.setImToken(IdUtil.simpleUUID());
|
||||
userService.save(add);
|
||||
CreateUserReq req = new CreateUserReq();
|
||||
req.setAccid(add.getId()+"");
|
||||
req.setToken(add.getImToken());
|
||||
req.setName(add.getNickname());
|
||||
YxCommonR r = imUserClient.createUser(req);
|
||||
if(!r.isSuccess()){
|
||||
if(r.getCode() == 414){
|
||||
UpdateTokenReq req1 = new UpdateTokenReq();
|
||||
req1.setAccid(add.getId()+"");
|
||||
req1.setToken(add.getImToken());
|
||||
YxCommonR commonR = imUserClient.updateToken(req1);
|
||||
if(!commonR.isSuccess()){
|
||||
log.error("刷新云token失败,{}", JSON.toJSONString(commonR));
|
||||
throw new ServiceException("注册失败,云信异常");
|
||||
}
|
||||
}else{
|
||||
log.error("创建云信账号失败,{}", JSON.toJSONString(r));
|
||||
throw new ServiceException("注册失败,云信异常");
|
||||
}
|
||||
}
|
||||
String clientIP = ServletUtils.getClientIP();
|
||||
UserLogin userLogin = new UserLogin();
|
||||
userLogin.setUserId(add.getId());
|
||||
userLogin.setUsercode(usercode);
|
||||
userLogin.setLastLoginIp(clientIP);
|
||||
userLogin.setLastLoginTime(LocalDateTime.now());
|
||||
userLogin.setRegIp(clientIP);
|
||||
userLogin.setRegTime(LocalDateTime.now());
|
||||
userLoginService.save(userLogin);
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setUsercode(usercode);
|
||||
userInfo.setUserId(add.getId());
|
||||
userInfoService.save(userInfo);
|
||||
UserAuth userAuth = new UserAuth();
|
||||
userAuth.setUsercode(usercode);
|
||||
userAuth.setUserId(add.getId());
|
||||
userAuth.setPhoneAuth(AuditEnum.SUCCESS.getCode());
|
||||
userAuthService.save(userAuth);
|
||||
return add;
|
||||
}
|
||||
|
||||
public void resetPassword(String mobile,String code,String password) {
|
||||
User user = userService.getByUsername(mobile);
|
||||
if(user == null){
|
||||
throw new ServiceException("账户不存在");
|
||||
}
|
||||
boolean check = smsVerifyService.check(CodeEnum.RESET_PASSWORD, mobile, code);
|
||||
if(!check){
|
||||
throw new ServiceException("验证码错误");
|
||||
}
|
||||
userService.resetPassword(user.getId(),password);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.xq.manager;
|
||||
|
||||
import com.ruoyi.xq.dto.app.user.CurrentUserInfoVo;
|
||||
import lombok.Data;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class CurrentUserManager {
|
||||
public CurrentUserInfoVo currentInfo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.ruoyi.xq.manager;
|
||||
|
||||
import com.ruoyi.common.core.service.SensitiveService;
|
||||
import com.ruoyi.xq.constant.RedisHttpConstant;
|
||||
import com.ruoyi.xq.enums.common.SystemConfigEnum;
|
||||
import com.ruoyi.xq.manager.systemconfig.SystemCheckResp;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.HashOperations;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 主要用于动态配置管理
|
||||
* <p>created on 2022/8/18 17:21</p>
|
||||
* @author ZL
|
||||
*/
|
||||
@Component
|
||||
public class SystemConfigManager {
|
||||
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private SensitiveService sensitiveService;
|
||||
|
||||
@Value("${spring.profiles.active:'dev'}")
|
||||
private String active;
|
||||
private final static String DEV_ACTIVE = "dev";
|
||||
|
||||
@PostConstruct
|
||||
public void initSensitive(){
|
||||
boolean config = getSystemConfigOfBool(SystemConfigEnum.SENSITIVE_ENABLE);
|
||||
sensitiveService.setSensitive(config);
|
||||
}
|
||||
|
||||
|
||||
public String getWebSocketUrl(){
|
||||
if(DEV_ACTIVE.equals(active)){
|
||||
return SystemConfigEnum.WS_SOCKET_URL.getDefaultValue();
|
||||
}
|
||||
return getSystemConfig(SystemConfigEnum.WS_SOCKET_URL);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置信息返回boolean
|
||||
* @param systemConfig
|
||||
* @return
|
||||
*/
|
||||
public boolean getSystemConfigOfBool(SystemConfigEnum systemConfig){
|
||||
String value = getSystemConfig(systemConfig);
|
||||
return "1".equals(value);
|
||||
}
|
||||
|
||||
public BigDecimal getSystemConfigOfBigDecimal(SystemConfigEnum systemConfig){
|
||||
String value = getSystemConfig(systemConfig);
|
||||
return new BigDecimal(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置信息返回Integer
|
||||
* @param systemConfig
|
||||
* @return
|
||||
*/
|
||||
public Integer getSystemConfigOfInt(SystemConfigEnum systemConfig){
|
||||
String value = getSystemConfig(systemConfig);
|
||||
return Integer.valueOf(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取配置信息返回Integer
|
||||
* @param systemConfig
|
||||
* @return
|
||||
*/
|
||||
public Long getSystemConfigOfLong(SystemConfigEnum systemConfig){
|
||||
String value = getSystemConfig(systemConfig);
|
||||
return Long.valueOf(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置信息
|
||||
* @param systemConfig
|
||||
* @return
|
||||
*/
|
||||
public String getSystemConfig(SystemConfigEnum systemConfig){
|
||||
String value = (String) redisTemplate.opsForHash().get(RedisHttpConstant.SYSTEM_CONFIG, systemConfig.name());
|
||||
if(StringUtils.isBlank(value)){
|
||||
return systemConfig.getDefaultValue();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getSystemConfigOfList(SystemConfigEnum systemConfig){
|
||||
String value = getSystemConfig(systemConfig);
|
||||
if(StringUtils.isBlank(value)){
|
||||
value = systemConfig.getDefaultValue();
|
||||
}
|
||||
return Stream.of(value.split(",")).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public Set<Long> getSystemConfigOfLongSet(SystemConfigEnum systemConfig){
|
||||
String value = getSystemConfig(systemConfig);
|
||||
if(StringUtils.isBlank(value)){
|
||||
value = systemConfig.getDefaultValue();
|
||||
}
|
||||
return Stream.of(value.split(",")).map(Long::valueOf).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有配置
|
||||
* @return
|
||||
*/
|
||||
public Map<String,String> getAllSystemConfig(){
|
||||
HashOperations<String, String, String> stringObjectObjectHashOperations = redisTemplate.opsForHash();
|
||||
return stringObjectObjectHashOperations.entries(RedisHttpConstant.SYSTEM_CONFIG);
|
||||
}
|
||||
|
||||
|
||||
public SystemCheckResp setSystemConfig(SystemConfigEnum systemConfig, String value){
|
||||
if(systemConfig.getCheck() != null){
|
||||
SystemCheckResp check = systemConfig.getCheck().check(value);
|
||||
if(!check.isSuccess()){
|
||||
return check;
|
||||
}
|
||||
}
|
||||
this.set(systemConfig.name(),value);
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
|
||||
public void set(String key, String value) {
|
||||
if(key.equals(SystemConfigEnum.SENSITIVE_ENABLE.getKey())){
|
||||
sensitiveService.setSensitive(value.equals("1"));
|
||||
}
|
||||
redisTemplate.opsForHash().put(RedisHttpConstant.SYSTEM_CONFIG, key,value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
public class BooleanSystemConfigCheck implements ISystemConfigCheck {
|
||||
@Override
|
||||
public SystemCheckResp check(String value) {
|
||||
if(value == null){
|
||||
return SystemCheckResp.fail("该配置必填");
|
||||
}
|
||||
if(!value.equals("1") && !value.equals("0")){
|
||||
return SystemCheckResp.fail("请填写1或者0【1表示确定,0表示否定】");
|
||||
}
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
public interface ISystemConfigCheck {
|
||||
|
||||
SystemCheckResp check(String value);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
public class NumberListSystemConfigCheck implements ISystemConfigCheck {
|
||||
private Integer minSize;
|
||||
|
||||
public NumberListSystemConfigCheck(Integer minSize) {
|
||||
this.minSize = minSize;
|
||||
}
|
||||
|
||||
public NumberListSystemConfigCheck() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemCheckResp check(String value) {
|
||||
if(StringUtils.isEmpty(value)){
|
||||
return SystemCheckResp.fail("该配置必填");
|
||||
}
|
||||
String errMessage = String.format("请填写逗号分割的数字,且需要不低于%s个", minSize);
|
||||
List<Long> longList = SystemConfigCheckUtil.getArrayListOfLong(value);
|
||||
if(longList == null){
|
||||
return SystemCheckResp.fail(errMessage);
|
||||
}
|
||||
if(longList.size() < minSize){
|
||||
return SystemCheckResp.fail(errMessage);
|
||||
}
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
public class NumberSystemConfigCheck implements ISystemConfigCheck{
|
||||
@Override
|
||||
public SystemCheckResp check(String value) {
|
||||
if(StringUtils.isEmpty(value)){
|
||||
return SystemCheckResp.fail("该配置必填");
|
||||
}
|
||||
boolean b = NumberUtil.isLong(value);
|
||||
if(!b){
|
||||
return SystemCheckResp.fail("请填写正确的整数");
|
||||
}
|
||||
Long of = Long.valueOf(value);
|
||||
if(of < 0){
|
||||
return SystemCheckResp.fail("请填写整数,不要填负数");
|
||||
}
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class RangeIntegerSystemConfigCheck implements ISystemConfigCheck {
|
||||
|
||||
private final Integer minNum;
|
||||
private final Integer maxNum;
|
||||
public RangeIntegerSystemConfigCheck(Integer minNum,Integer maxNum) {
|
||||
this.minNum = minNum;
|
||||
this.maxNum = maxNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemCheckResp check(String value) {
|
||||
if(StringUtils.isEmpty(value)){
|
||||
return SystemCheckResp.fail("该配置必填");
|
||||
}
|
||||
String errorNum = String.format("请填写正确的整数,范围[%s,%s]", minNum, maxNum);
|
||||
boolean b = NumberUtil.isLong(value);
|
||||
if(!b){
|
||||
return SystemCheckResp.fail(errorNum);
|
||||
}
|
||||
int of = Integer.parseInt(value);
|
||||
if(of < minNum || of > maxNum){
|
||||
return SystemCheckResp.fail(errorNum);
|
||||
}
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class RateSystemConfigCheck implements ISystemConfigCheck {
|
||||
@Override
|
||||
public SystemCheckResp check(String value) {
|
||||
if(StringUtils.isEmpty(value)){
|
||||
return SystemCheckResp.fail("该配置必填");
|
||||
}
|
||||
boolean b = NumberUtil.isDouble(value);
|
||||
if(!b){
|
||||
return SystemCheckResp.fail("请填写[0-1)之间的数字,两位小数点");
|
||||
}
|
||||
BigDecimal bigDecimal = new BigDecimal(value);
|
||||
boolean in = NumberUtil.isIn(bigDecimal, BigDecimal.ZERO, BigDecimal.ONE);
|
||||
if(!in){
|
||||
return SystemCheckResp.fail("请填写[0-1)之间的数字,两位小数点");
|
||||
}
|
||||
if(bigDecimal.scale() > 2){
|
||||
return SystemCheckResp.fail("小数点位数只能配置两位");
|
||||
}
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SystemCheckResp {
|
||||
private boolean success;
|
||||
private String message;
|
||||
|
||||
public static SystemCheckResp ok(){
|
||||
SystemCheckResp resp = new SystemCheckResp();
|
||||
resp.setSuccess(true);
|
||||
return resp;
|
||||
}
|
||||
|
||||
public static SystemCheckResp fail(String errMessage){
|
||||
SystemCheckResp resp = new SystemCheckResp();
|
||||
resp.setSuccess(false);
|
||||
resp.setMessage(errMessage);
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.xq.manager.systemconfig;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SystemConfigCheckUtil {
|
||||
|
||||
public static List<Long> getArrayListOfLong(String value){
|
||||
try {
|
||||
String[] split = value.split(",");
|
||||
List<Long> res = new ArrayList<>();
|
||||
for (String s : split) {
|
||||
res.add(Long.valueOf(s));
|
||||
}
|
||||
return res;
|
||||
}catch (Exception e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean checkArrayListLong(String value, int limit){
|
||||
try {
|
||||
String[] split = value.split(",");
|
||||
for (String s : split) {
|
||||
Long.valueOf(s);
|
||||
}
|
||||
return split.length > limit;
|
||||
}catch (Exception e){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.AccountChangeLog;
|
||||
|
||||
/**
|
||||
* 账户明细Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface AccountChangeLogMapper extends BaseMapper<AccountChangeLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.AgreementSetting;
|
||||
|
||||
/**
|
||||
* 协议设置Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface AgreementSettingMapper extends BaseMapper<AgreementSetting> {
|
||||
|
||||
}
|
||||
14
ruoyi-xq/src/main/java/com/ruoyi/xq/mapper/BannerMapper.java
Normal file
14
ruoyi-xq/src/main/java/com/ruoyi/xq/mapper/BannerMapper.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.Banner;
|
||||
|
||||
/**
|
||||
* 轮播图Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface BannerMapper extends BaseMapper<Banner> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.Dynamic;
|
||||
|
||||
/**
|
||||
* 动态审核Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface DynamicMapper extends BaseMapper<Dynamic> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.SmsVerify;
|
||||
|
||||
/**
|
||||
* 短信验证码Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public interface SmsVerifyMapper extends BaseMapper<SmsVerify> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserAuthAudit;
|
||||
|
||||
/**
|
||||
* 用户认证审核Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserAuthAuditMapper extends BaseMapper<UserAuthAudit> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserAuth;
|
||||
|
||||
/**
|
||||
* 用户认证管理Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserAuthMapper extends BaseMapper<UserAuth> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserCodeGen;
|
||||
|
||||
/**
|
||||
* idMapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
public interface UserCodeGenMapper extends BaseMapper<UserCodeGen> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserInfoAudit;
|
||||
|
||||
/**
|
||||
* 用户信息审核Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserInfoAuditMapper extends BaseMapper<UserInfoAudit> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserInfo;
|
||||
|
||||
/**
|
||||
* 用户信息Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserInfoMapper extends BaseMapper<UserInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserLogin;
|
||||
|
||||
/**
|
||||
* 用户登陆Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserLoginMapper extends BaseMapper<UserLogin> {
|
||||
|
||||
}
|
||||
14
ruoyi-xq/src/main/java/com/ruoyi/xq/mapper/UserMapper.java
Normal file
14
ruoyi-xq/src/main/java/com/ruoyi/xq/mapper/UserMapper.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.User;
|
||||
|
||||
/**
|
||||
* 用户管理Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xq.domain.UserPictures;
|
||||
|
||||
/**
|
||||
* 用户相册管理Mapper接口
|
||||
*
|
||||
* @author 77
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface UserPicturesMapper extends BaseMapper<UserPictures> {
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user