提交
This commit is contained in:
28
ruoyi-main/ruoyi-custom/pom.xml
Normal file
28
ruoyi-main/ruoyi-custom/pom.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-main</artifactId>
|
||||
<version>3.7.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ruoyi-custom</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>5.2.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 自定义一个注解 凡是标注这个注解的都需要验证身份Token
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface UserLoginToken {
|
||||
boolean required() default true;
|
||||
|
||||
/**
|
||||
* 拥有这个角色的用户,有权限访问该接口,默认为空不限制 值为 Token 类中 用户token前缀
|
||||
* @return
|
||||
*/
|
||||
String[] userTokenPre() default {};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.aspect;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* 多数据源处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Aspect
|
||||
@Order(1)
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ApiOperationAspect
|
||||
{
|
||||
protected Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Pointcut("@annotation(io.swagger.annotations.ApiOperation)")
|
||||
public void dsPointCut()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Around("dsPointCut()")
|
||||
public Object around(ProceedingJoinPoint point) throws Throwable
|
||||
{
|
||||
//开始时间
|
||||
long start = System.currentTimeMillis();
|
||||
Object result = point.proceed();
|
||||
|
||||
MethodSignature methodSignature = (MethodSignature) point.getSignature();
|
||||
Method method = methodSignature.getMethod();
|
||||
ApiOperation annotation = method.getAnnotation(ApiOperation.class);
|
||||
|
||||
logger.info("执行方法 method: {}【{}】 耗时:{} 毫秒" , method.getName(), annotation.value(), System.currentTimeMillis() - start);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
97
ruoyi-main/ruoyi-custom/src/main/java/com/ruoyi/cache/RedisOperation.java
vendored
Normal file
97
ruoyi-main/ruoyi-custom/src/main/java/com/ruoyi/cache/RedisOperation.java
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.cache;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 基于 Redisson的 redis操作,包含lock和自增,基于stream的mq <br>
|
||||
* 要求:redis 5.0+ ,springBoot 2.3+
|
||||
*
|
||||
* @author springrain
|
||||
*/
|
||||
|
||||
@Component("redisOperation")
|
||||
public class RedisOperation {
|
||||
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
|
||||
@Resource
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
|
||||
/**
|
||||
* 根据Key 和超时时间加锁
|
||||
*
|
||||
* @param key 锁的key
|
||||
* @param expireMilli 超时时间毫秒数
|
||||
* @return
|
||||
*/
|
||||
public boolean lock(String key, long expireMilli) {
|
||||
if (StringUtils.isBlank(key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
Boolean lock = redisTemplate.opsForValue().setIfAbsent(key, System.currentTimeMillis() + expireMilli, expireMilli, TimeUnit.MILLISECONDS);
|
||||
return lock;
|
||||
} catch (Exception e) {
|
||||
logger.error("locking error", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据Key解锁
|
||||
*
|
||||
* @param key 锁的key
|
||||
*/
|
||||
public boolean unlock(String key) {
|
||||
|
||||
if (StringUtils.isBlank(key)) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
redisTemplate.delete(key);
|
||||
return true;
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error("unlock error", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 原子自增
|
||||
*
|
||||
* @param name 自增的名称
|
||||
* @return
|
||||
*/
|
||||
public Long getAtomicLong(String name) {
|
||||
Long increment = redisTemplate.opsForValue().increment(name);
|
||||
return increment;
|
||||
}
|
||||
|
||||
/**
|
||||
* 原子自增
|
||||
*
|
||||
* @param name 自增的名称
|
||||
* @param initValue 自增的初始值
|
||||
* @return
|
||||
*/
|
||||
public Long getAtomicLong(String name, Long initValue) {
|
||||
Long increment = redisTemplate.opsForValue().increment(name, initValue);
|
||||
return increment;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.code;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
* @author liwenlong
|
||||
* @date 2023/2/11 15:36
|
||||
*/
|
||||
public class BuiltDictConstant {
|
||||
|
||||
/**
|
||||
* 支付失效时间
|
||||
*/
|
||||
public static final String 支付失效时间 = "PAY_INVALID_TIME";
|
||||
|
||||
public static final String 是否直接分佣 = "IS_DIRECT";
|
||||
|
||||
|
||||
public static final String 取消订单时间 = "CANCEL_ORDER";
|
||||
|
||||
public static final String 短信验证码间隔时间 = "RESEND_SMS_CODE_TIME";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
package com.ruoyi.code;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
* @author liwenlong
|
||||
* @date 2023/2/11 15:36
|
||||
*/
|
||||
public class DictConstant {
|
||||
|
||||
/**
|
||||
* 默认头像
|
||||
*/
|
||||
public static final String 默认头像 = "DEFAULT_AVATAR";
|
||||
|
||||
|
||||
/**
|
||||
* 设计师默认昵称前缀
|
||||
*/
|
||||
public static final String SJS_name_pre = "SJS_name_pre";
|
||||
|
||||
|
||||
/**
|
||||
* 表现师默认昵称前缀
|
||||
*/
|
||||
public static final String BXS_name_pre = "BXS_name_pre";
|
||||
|
||||
/**
|
||||
* 平台头像
|
||||
*/
|
||||
public static final String 官方头像 = "PLATFORM_AVATAR";
|
||||
|
||||
/**
|
||||
* 提现手续费
|
||||
*/
|
||||
public static final String 提现手续费 = "WITHDRAWAL_COMM";
|
||||
|
||||
/**
|
||||
* 推广员提现手续费
|
||||
*/
|
||||
public static final String 推广员提现手续费 = "SALE_WITHDRAWAL_COMM";
|
||||
|
||||
/**
|
||||
* 提现日期
|
||||
*/
|
||||
public static final String 提现日期 = "WITHDRAWAL_DATE";
|
||||
|
||||
/**
|
||||
* 论坛审核
|
||||
*/
|
||||
public static final String 帖子审核 = "POST_IS_PROCESS";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 质量评分占比
|
||||
*/
|
||||
public static final String 质量评分占比 = "quality_ratio";
|
||||
|
||||
|
||||
/**
|
||||
* 效率评分占比
|
||||
*/
|
||||
public static final String 效率评分占比 = "efficiency_ratio";
|
||||
|
||||
|
||||
/**
|
||||
* 服务评分占比
|
||||
*/
|
||||
public static final String 服务评分占比 = "service_ratio";
|
||||
|
||||
/**
|
||||
* 平台设置比例系数
|
||||
*/
|
||||
public static final String 平台设置比例系数 = "scale";
|
||||
|
||||
/**
|
||||
* 技术擅长领域
|
||||
*/
|
||||
public static final String 技术擅长领域 = "speciality_area";
|
||||
|
||||
|
||||
/**
|
||||
* 技术列表排序权重
|
||||
*/
|
||||
public static final String 技术列表排序权重 = "technology_sort";
|
||||
|
||||
|
||||
/**
|
||||
* 技术列表排序权重
|
||||
*/
|
||||
public static class TechnologySort {
|
||||
/**
|
||||
* 技术擅长领域
|
||||
*/
|
||||
public static final String 在线时长 = "online_duration";
|
||||
|
||||
/**
|
||||
* 技术擅长领域
|
||||
*/
|
||||
public static final String 订单数量 = "order_number";
|
||||
|
||||
/**
|
||||
* 技术擅长领域
|
||||
*/
|
||||
public static final String 订单金额 = "order_amount";
|
||||
/**
|
||||
* 技术擅长领域
|
||||
*/
|
||||
public static final String 好评率 = "good_rate";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 普通认证缴纳金额
|
||||
*/
|
||||
public static final String 普通认证缴纳金额 = "AUTH_AMOUNT";
|
||||
|
||||
|
||||
/**
|
||||
*酷家乐认证缴纳金额
|
||||
*/
|
||||
public static final String 酷家乐认证缴纳金额 = "KUJIALE_AUTH_AMOUNT";
|
||||
|
||||
/**
|
||||
* 高端认证缴纳金额
|
||||
*/
|
||||
public static final String 高端认证缴纳金额 = "HIGHEND_AUTH_AMOUNT";
|
||||
|
||||
|
||||
/**
|
||||
* 注册赠送抵用金
|
||||
*/
|
||||
public static final String 注册赠送抵用金 = "register_send_balance";
|
||||
|
||||
|
||||
/**
|
||||
* 注册赠送抵用金
|
||||
*/
|
||||
public static final String 注册赠送积分 = "register_send_integral";
|
||||
|
||||
/**
|
||||
* 订单相关
|
||||
*/
|
||||
public static class OrderDict {
|
||||
/**
|
||||
* 首款支付占比
|
||||
*/
|
||||
public static final String 首款支付占比 = "frist_pay_ratio";
|
||||
|
||||
/**
|
||||
* 累计服务金额基数
|
||||
*/
|
||||
public static final String 累计服务金额基数 = "order_amount_base";
|
||||
|
||||
/**
|
||||
* 当月服务单数基数
|
||||
*/
|
||||
public static final String 当月服务单数基数 = "order_month_num_base";
|
||||
|
||||
/**
|
||||
* 累计服务单数基数
|
||||
*/
|
||||
public static final String 累计服务单数基数 = "order_num_base";
|
||||
|
||||
|
||||
/**
|
||||
* 赠送金额支付占比
|
||||
*/
|
||||
public static final String 赠送金额支付占比 = "send_price_pay_ratio";
|
||||
|
||||
/**
|
||||
* 邀请用户下单获取积分与消费额的比例
|
||||
*/
|
||||
public static final String 邀请用户下单获取积分与消费额的比例 = "integral_ratio";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 推广员分佣比例
|
||||
*/
|
||||
public static final String 推广师分佣比例 = "commission_ratio";
|
||||
|
||||
/**
|
||||
* 表现师分佣比例
|
||||
*/
|
||||
public static final String 表现师分佣比例 = "store_Commission_Ratio";
|
||||
|
||||
/**
|
||||
* 点赞好评基础量
|
||||
*/
|
||||
public static final String 点赞好评基础量 = "like_good_base_num";
|
||||
|
||||
|
||||
/**
|
||||
* 作品最大数量
|
||||
*/
|
||||
public static final String 作品最大数量 = "works_max_num";
|
||||
|
||||
|
||||
/**
|
||||
* 订单取消时间(单位:分钟)
|
||||
*/
|
||||
public static final String 订单自动取消时间 = "auto_order_cancel_time";
|
||||
|
||||
/**
|
||||
* 订单自动确认几天前发送消息(单位:天)
|
||||
*/
|
||||
public static final String 订单自动确认前发送消息 = "auto_order_cancel_time";
|
||||
|
||||
|
||||
/**
|
||||
* 绑定账户协议图片
|
||||
*/
|
||||
public static final String 表现师绑定账户协议图片 = "BIND_AGREEMENT";
|
||||
|
||||
/**
|
||||
* 绑定账户协议图片
|
||||
*/
|
||||
public static final String 推荐官绑定账户协议图片 = "BIND_AGREEMENT_SALE";
|
||||
/**
|
||||
* 充值赠送金额比例
|
||||
*/
|
||||
public static final String 充值赠送金额比例 = "give_amount";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商城订单相关
|
||||
*/
|
||||
public static class MallOrderDict {
|
||||
public static final String 售后天数 = "AFTER_SALES_DAYS";
|
||||
|
||||
public static final String 平台发货后X天自动确认收货 = "confirm_days";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,303 @@
|
||||
package com.ruoyi.code;
|
||||
|
||||
|
||||
public class PublicCommon {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除标识
|
||||
*/
|
||||
public static final Integer 启用 = 1;
|
||||
public static final Integer 删除 = 2;
|
||||
public static final Integer 禁用 = 3;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
public static final Integer 待审核 = 1;
|
||||
public static final Integer 审核通过 = 2;
|
||||
public static final Integer 审核失败 = 3;
|
||||
|
||||
|
||||
/**
|
||||
* 是否在线
|
||||
*/
|
||||
public static final Integer 在线 = 1;
|
||||
public static final Integer 离线 = 2;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
public static final Integer 设计师 = 1;
|
||||
public static final Integer 表现师 = 2;
|
||||
public static final Integer 销售 = 3;
|
||||
public static final Integer 企业 = 4;
|
||||
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
*/
|
||||
public static final Integer 非默认 = 1;
|
||||
public static final Integer 默认 = 2;
|
||||
|
||||
|
||||
/**
|
||||
* 互动消息类型
|
||||
*/
|
||||
public static class InteractionMessage {
|
||||
/**
|
||||
* 互动消息类型
|
||||
*/
|
||||
public static final Integer 点赞 = 1;
|
||||
public static final Integer 评论 = 2;
|
||||
public static final Integer 关注 = 3;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 表现师接单
|
||||
*/
|
||||
public static class OrderReceiving {
|
||||
/**
|
||||
* 接单状态
|
||||
*/
|
||||
public static final Integer 等待接单 = 1;
|
||||
public static final Integer 接单成功 = 2;
|
||||
|
||||
public static final Integer 接单失败 = 3;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 申诉
|
||||
*/
|
||||
public static class Appeal {
|
||||
/**
|
||||
* 申诉状态
|
||||
*/
|
||||
public static final Integer 无申诉 = 1;
|
||||
public static final Integer 申诉中 = 2;
|
||||
public static final Integer 申诉完成 = 3;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 调价
|
||||
*/
|
||||
public static class OrderChange {
|
||||
/**
|
||||
* 调价状态1 待确认 2 已确认
|
||||
*/
|
||||
public static final Integer 待确认 = 1;
|
||||
public static final Integer 已确认 = 2;
|
||||
public static final Integer 拒绝 = 3;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 延期
|
||||
*/
|
||||
public static class Extension {
|
||||
/**
|
||||
* 延期状态1 待确认 2 已确认
|
||||
*/
|
||||
public static final Integer 取消 = -1;
|
||||
public static final Integer 待确认 = 1;
|
||||
public static final Integer 已确认 = 2;
|
||||
public static final Integer 拒绝 = 3;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
public static class Message {
|
||||
/**
|
||||
* 消息是否清空
|
||||
*/
|
||||
public static final Integer 未清空 = 1;
|
||||
public static final Integer 清空 = 2;
|
||||
|
||||
|
||||
/**
|
||||
* 是否已读
|
||||
*/
|
||||
public static final Integer 未读 = 1;
|
||||
public static final Integer 已读 = 2;
|
||||
|
||||
/**
|
||||
* 系统消息是否发布
|
||||
*/
|
||||
public static final Integer 未发布 = 1;
|
||||
public static final Integer 发布 = 2;
|
||||
|
||||
/**
|
||||
* 推送是否关闭
|
||||
*/
|
||||
public static final Integer 未关闭 = 1;
|
||||
public static final Integer 关闭 = 2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 帖子
|
||||
*/
|
||||
public static class Post {
|
||||
public static final Integer 分享数 = 1;
|
||||
public static final Integer 点赞数 = 2;
|
||||
public static final Integer 评论数 = 3;
|
||||
public static final Integer 收藏数 = 4;
|
||||
public static final Integer 浏览数 = 5;
|
||||
}
|
||||
|
||||
/**
|
||||
* 帖子评论
|
||||
*/
|
||||
public static class PostComment {
|
||||
|
||||
public static final Integer 点赞数 = 1;
|
||||
public static final Integer 评论数 = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核相关
|
||||
*/
|
||||
public static class Process{
|
||||
/**
|
||||
* 是否审核
|
||||
*/
|
||||
public static final String 不用审核 = "1";
|
||||
public static final String 需要审核 = "2";
|
||||
|
||||
/**
|
||||
* 是否是当前审批流程
|
||||
*/
|
||||
public static final Integer 不是 = 1;
|
||||
public static final Integer 是 = 2;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 审核流程记录表中 is_end 字段 审批人类型
|
||||
*/
|
||||
public static final Integer 发起人 = 0;
|
||||
public static final Integer 中间审批人 = 1;
|
||||
public static final Integer 最终审核人 = 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
*/
|
||||
public static class Coupon {
|
||||
|
||||
/**
|
||||
* 1指定时间范围内有效;2 领取n天有效,3 不限时
|
||||
*/
|
||||
public static final Integer 指定时间 = 1;
|
||||
public static final Integer 领取几天有效= 2;
|
||||
public static final Integer 不限时 = 3;
|
||||
|
||||
|
||||
/**
|
||||
* 是否使用优惠券
|
||||
*/
|
||||
public static final Integer 未使用 = 1;
|
||||
public static final Integer 使用= 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
public static class Goods {
|
||||
|
||||
/**
|
||||
* 规格类型
|
||||
*/
|
||||
public static final Integer 单规格 = 1;
|
||||
public static final Integer 多规格= 2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 支付
|
||||
*/
|
||||
public static class Pay {
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
public static final Integer 未支付 = 1;
|
||||
public static final Integer 已支付 = 2;
|
||||
|
||||
public static final Integer 支付失败 = 3;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 钱包
|
||||
*/
|
||||
public static class Wallet {
|
||||
|
||||
/**
|
||||
* 资金可提现状态
|
||||
*/
|
||||
public static final Integer 可提现=1;
|
||||
public static final Integer 不可提现=2;
|
||||
public static final Integer 到账取消=3;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 保证金金额来源类型
|
||||
*/
|
||||
public static class BondWith {
|
||||
|
||||
/**
|
||||
* 保证金金额来源类型
|
||||
*/
|
||||
public static final Integer 缴纳=1;
|
||||
public static final Integer 提现=2;
|
||||
public static final Integer 提现返还=3;
|
||||
public static final Integer 平台扣除=4;
|
||||
public static final Integer 平台赠与=5;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 售后
|
||||
*/
|
||||
public static class Refund {
|
||||
|
||||
/**
|
||||
* 售后类型
|
||||
*/
|
||||
public static final Integer 退款=1;
|
||||
public static final Integer 退款退货=2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
public static class Order {
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
public static final Integer 订单=1;
|
||||
|
||||
public static final Integer 商城订单=2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.code;
|
||||
|
||||
/**
|
||||
* 推送类型
|
||||
* @author liwenlong
|
||||
* @date 2023/2/11 15:36
|
||||
*/
|
||||
public class PushConstant {
|
||||
|
||||
|
||||
/**
|
||||
* 系统消息
|
||||
*/
|
||||
public static final Integer 系统消息 = 1;
|
||||
|
||||
/**
|
||||
* 商城订单消息
|
||||
*/
|
||||
public static final Integer 商城订单消息 = 2;
|
||||
|
||||
/**
|
||||
* 互动消息
|
||||
*/
|
||||
public static final Integer 互动消息 = 3;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.code;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/2/11 15:42
|
||||
*/
|
||||
|
||||
public class Token {
|
||||
|
||||
/**
|
||||
* token 过期时间
|
||||
*/
|
||||
public static long EXPIRE_SECOND = 7;
|
||||
|
||||
/**
|
||||
* redis里存储token信息
|
||||
*/
|
||||
public static final String TOKEN_MAP = "TOKEN_MAP";
|
||||
|
||||
/**
|
||||
* 用户 token 前缀
|
||||
*/
|
||||
public static final String customer = "customer_";
|
||||
|
||||
/**
|
||||
* 表现师 token 前缀
|
||||
*/
|
||||
public static final String store = "store_";
|
||||
|
||||
/**
|
||||
* 销售 token 前缀
|
||||
*/
|
||||
public static final String sale = "sale_";
|
||||
|
||||
/**
|
||||
* 企业 token 前缀
|
||||
*/
|
||||
public static final String enterprise = "enterprise_";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
//package com.ruoyi.config;
|
||||
//
|
||||
//import com.ruoyi.interceptor.LoginInterceptor;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.web.servlet.HandlerInterceptor;
|
||||
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
//
|
||||
//@Configuration
|
||||
//public class APPWebMvcConfig implements WebMvcConfigurer {
|
||||
//
|
||||
// /**
|
||||
// * 解决拦截器添加注解
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// public HandlerInterceptor getLoginInterceptor() {
|
||||
// return new LoginInterceptor();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void addInterceptors(InterceptorRegistry registry) {
|
||||
// registry.addInterceptor(getLoginInterceptor())
|
||||
// .addPathPatterns("/api/**")
|
||||
// .excludePathPatterns("/static/login.html");
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
Copyright [2020] [https://www.stylefeng.cn]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
|
||||
1.请不要删除和修改根目录下的LICENSE文件。
|
||||
2.请不要删除和修改Guns源码头部的版权声明。
|
||||
3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns-separation
|
||||
5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns-separation
|
||||
6.若您的项目无法满足以上几点,可申请商业授权,获取Guns商业授权许可,请在官网购买授权,地址为 https://www.stylefeng.cn
|
||||
*/
|
||||
package com.ruoyi.config;
|
||||
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.ruoyi.interceptor.LoginInterceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* web配置
|
||||
*
|
||||
* @author stylefeng
|
||||
* @date 2020/4/11 10:23
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
@Import({cn.hutool.extra.spring.SpringUtil.class})
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
/**
|
||||
* 解决拦截器添加注解
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public HandlerInterceptor getLoginInterceptor() {
|
||||
return new LoginInterceptor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(getLoginInterceptor())
|
||||
.addPathPatterns("/api/**")
|
||||
.excludePathPatterns("/static/login.html");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* json自定义序列化工具,long转string
|
||||
*
|
||||
* @author stylefeng
|
||||
* @date 2020/5/28 14:48
|
||||
*/
|
||||
@Bean
|
||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||
return jacksonObjectMapperBuilder ->
|
||||
jacksonObjectMapperBuilder
|
||||
.serializerByType(Long.class, ToStringSerializer.instance)
|
||||
.serializerByType(Long.TYPE, ToStringSerializer.instance);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.frequency.agreement.entity.Agreement;
|
||||
import com.ruoyi.frequency.agreement.service.AgreementService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 协议
|
||||
*
|
||||
* @author a
|
||||
* @date 2023/8/18 15:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/agreement")
|
||||
@Api(tags = "协议")
|
||||
public class ApiAgreementController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private AgreementService agreementService;
|
||||
|
||||
@PostMapping("/getAgreement/{code}")
|
||||
@ApiOperation(value = "获取协议", notes = "获取协议")
|
||||
public ResponseData<Agreement> getAgreement(@PathVariable String code) {
|
||||
Agreement agreement = agreementService.getOne(new QueryWrapper<Agreement>().lambda()
|
||||
.eq(Agreement::getCode, code)
|
||||
.orderByDesc(BaseEntity::getCreateTime).last("limit 1"));
|
||||
return ResponseData.success(agreement);
|
||||
}
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/getAgreementList/{codes}", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "获取协议多个")
|
||||
public ResponseData<List<SysDictData>> getAgreementList(@PathVariable String[] codes) {
|
||||
List<Agreement> list = agreementService.list(new QueryWrapper<Agreement>().lambda()
|
||||
.in(Agreement::getCode, codes)
|
||||
.orderByDesc(BaseEntity::getCreateTime));
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/agreementRichText/{code}")
|
||||
@ApiOperation(value = "获取协议富文本", notes = "获取协议富文本")
|
||||
public String agreementRichText(@PathVariable String code) {
|
||||
Agreement agreement = agreementService.getOne(new QueryWrapper<Agreement>().lambda()
|
||||
.eq(Agreement::getCode, code)
|
||||
.orderByDesc(BaseEntity::getCreateTime).last("limit 1"));
|
||||
return agreement == null? null : agreement.getContent();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.AppMessageReadOrDeleteReq;
|
||||
import com.ruoyi.controller.req.MessageReadOrDeleteReq;
|
||||
import com.ruoyi.frequency.appmessage.entity.AppMessage;
|
||||
import com.ruoyi.frequency.appmessage.service.AppMessageService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
||||
/**
|
||||
* 消息中心
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/message")
|
||||
@Api(tags = "消息中心")
|
||||
public class ApiAppMessageController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private AppMessageService appMessageService;
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/messagePage")
|
||||
@ApiOperation(value = "系统消息列表" , notes = "系统消息列表")
|
||||
public ResponseData<PageResult<Page<AppMessage>>> messagePage(@RequestBody @Valid PageBasic req) {
|
||||
return this.appMessageService.messagePage(getUserVo(),req);
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/messageDetail")
|
||||
@ApiOperation(value = "系统消息详情" , notes = "系统消息详情")
|
||||
public ResponseData<AppMessage> messageDetail(@RequestBody @Valid BodyIdReq req) {
|
||||
return this.appMessageService.messageDetail(req.getId(),getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/appMessageReadOrDelete")
|
||||
@ApiOperation(value = "系统消息列表_已读,删除消息" , notes = "系统消息列表_已读,删除消息")
|
||||
public ResponseData appMessageReadOrDelete(@RequestBody @Valid MessageReadOrDeleteReq req) {
|
||||
return appMessageService.appMessageReadOrDelete(req, getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.frequency.appversion.service.AppVersionService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 版本更新
|
||||
*
|
||||
* @author a
|
||||
* @date 2023/8/18 15:28
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequestMapping("/api/appVersion")
|
||||
@Api(tags = "版本更新")
|
||||
public class ApiAppVersionController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private AppVersionService appVersionService;
|
||||
|
||||
@PostMapping("/isUpgrade/{appType}")
|
||||
@ApiOperation(value = "版本更新", notes = "版本更新")
|
||||
public ResponseData isUpgrade(@PathVariable Integer appType) {
|
||||
return appVersionService.isUpgrade(appType);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.banner.entity.Banner;
|
||||
import com.ruoyi.frequency.banner.service.BannerService;
|
||||
import com.ruoyi.frequency.customer.service.UserService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 轮播图
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/banner")
|
||||
@Api(tags = "轮播图")
|
||||
public class ApiBannerController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BannerService bannerService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@PostMapping("/bannerList")
|
||||
@ApiOperation(value = "轮播图", notes = "轮播图")
|
||||
public ResponseData<List<Banner>> bannerList(@RequestBody(required = false) Integer position) {
|
||||
|
||||
List<Banner> banners = bannerService.list(new QueryWrapper<Banner>().lambda()
|
||||
.eq(Banner::getDelFlag, PublicCommon.启用)
|
||||
.eq(ObjectUtil.isNotEmpty(position), Banner::getPosition, position)
|
||||
.orderByAsc(Banner::getSort)
|
||||
);
|
||||
|
||||
if (!banners.isEmpty()){
|
||||
Set<UserVo> userVoSet = banners.stream().filter(s->s.getType() == 4 || s.getType() == 5)
|
||||
.map(s -> new UserVo(s.getType() == 4? UserEnums.customer.getCode():UserEnums.store.getCode(), Long.valueOf(s.getContent())))
|
||||
.collect(Collectors.toSet());
|
||||
//查询用户信息
|
||||
Map<UserVo, UserInfo> userMap = userService.selectUserInfoMap(userVoSet,null);
|
||||
|
||||
banners.stream().forEach(s ->{
|
||||
if (s.getType() == 4 || s.getType() == 5) {
|
||||
s.setUserInfo(userMap.get(new UserVo(s.getType() == 4 ? UserEnums.customer.getCode() : UserEnums.store.getCode(), Long.valueOf(s.getContent()))));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return ResponseData.success(banners);
|
||||
}
|
||||
|
||||
@PostMapping("/detail")
|
||||
@ApiOperation(value = "轮播图详情", notes = "轮播图详情")
|
||||
public ResponseData<Banner> detail(@Valid @NotNull(message = "id不能为空") @RequestBody BodyIdReq req) {
|
||||
return ResponseData.success(this.bannerService.getById(req.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.BlockPageReq;
|
||||
import com.ruoyi.controller.req.BlockUserReq;
|
||||
import com.ruoyi.controller.resp.BlockPageResp;
|
||||
import com.ruoyi.frequency.block.service.BlockService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 拉黑用户
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/block")
|
||||
@Api(tags = "拉黑用户")
|
||||
public class ApiBlockController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private BlockService blockService;
|
||||
|
||||
/**
|
||||
* 拉黑
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/blockUser")
|
||||
@UserLoginToken
|
||||
public ResponseData blockUser(@Valid @RequestBody BlockUserReq req) {
|
||||
return blockService.blockUser(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉黑(只用于拉黑)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/blockUserVersion2")
|
||||
@UserLoginToken
|
||||
public ResponseData blockUserVersion2(@Valid @RequestBody BlockUserReq req) {
|
||||
return blockService.blockUserVersion2(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消拉黑(只用于取消拉黑)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/cancelBlockUserVersion2")
|
||||
@UserLoginToken
|
||||
public ResponseData cancelBlockUserVersion2(@Valid @RequestBody BlockUserReq req) {
|
||||
return blockService.cancelBlockUserVersion2(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉黑列表
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/blockPage")
|
||||
public ResponseData<PageResult<BlockPageResp>> blockPage(@RequestBody BlockPageReq req) {
|
||||
return blockService.blockPage(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉黑列表(别人查看)
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/otherBlockPage")
|
||||
public ResponseData<PageResult<BlockPageResp>> otherBlockPage(@RequestBody BlockPageReq req) {
|
||||
return blockService.otherBlockPage(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.exception.enums.CoreExceptionEnum;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.controller.resp.UserResultInfo;
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.customer.service.UserService;
|
||||
import com.ruoyi.frequency.enterprise.service.EnterpriseService;
|
||||
import com.ruoyi.frequency.sale.entity.Sale;
|
||||
import com.ruoyi.frequency.sale.service.SaleService;
|
||||
import com.ruoyi.frequency.store.entity.Store;
|
||||
import com.ruoyi.frequency.store.service.StoreService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.LoginUtil;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 登入相关
|
||||
*
|
||||
* @author liwenlong
|
||||
*/
|
||||
@Slf4j
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
@Api(tags = "登入相关")
|
||||
public class ApiCLoginController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private LoginUtil loginUtil;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
@Autowired
|
||||
private SaleService saleService;
|
||||
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/register")
|
||||
@ApiOperation(value = "注册")
|
||||
public ResponseData register(@Valid @RequestBody RegisterUserReq req) {
|
||||
return loginUtil.register(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 忘记密码
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/forgetPwd", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "忘记密码")
|
||||
public ResponseData forgetPwd(@RequestBody @Valid UserForgetPwdLoginReq req) {
|
||||
return loginUtil.forgetPwd(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/editPwd", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "修改密码")
|
||||
public ResponseData editPwd(@RequestBody UserEditPwdLoginReq req) {
|
||||
return loginUtil.editPwd(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 忘记支付密码
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/forgetPayPwd", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "忘记支付密码")
|
||||
public ResponseData forgetPayPwd(@RequestBody @Valid UserForgetPwdLoginReq req) {
|
||||
return loginUtil.forgetPayPwd(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验支付密码
|
||||
*
|
||||
* @param pwd
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/checkPayPwd", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "校验支付密码")
|
||||
public ResponseData checkPayPwd(@NotEmpty(message = "密码不能为空") @RequestBody String pwd) {
|
||||
return loginUtil.checkPayPwd(pwd, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改支付密码
|
||||
*
|
||||
* @param pwd
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/editPayPwd", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "修改支付密码")
|
||||
public ResponseData editPayPwd(@NotEmpty(message = "密码不能为空") @RequestBody String pwd) {
|
||||
return loginUtil.editPayPwd(pwd, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@PostMapping("/logout")
|
||||
@ApiOperation(value = "退出")
|
||||
public ResponseData logout() {
|
||||
return loginUtil.logout(getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 注销
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/cancellation")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "注销")
|
||||
public ResponseData cancellation() {
|
||||
UserVo userVo = getUserVo();
|
||||
//判断是否可以注销
|
||||
if (UserEnums.customer.getCode().equals(userVo.getUserType())) {
|
||||
customerService.canCancellation(userVo.getUserId());
|
||||
} else if (UserEnums.store.getCode().equals(userVo.getUserType())) {
|
||||
storeService.canCancellation(userVo.getUserId());
|
||||
}
|
||||
|
||||
return loginUtil.cancellation(userVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验旧手机号
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/checkOldMobile", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "校验旧手机号")
|
||||
@UserLoginToken
|
||||
public ResponseData checkOldMobile(@RequestBody @Valid CheckOldMobileReq req) {
|
||||
return loginUtil.checkOldMobile(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 换绑手机号
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/changeBindingMobile", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "换绑手机号")
|
||||
@UserLoginToken
|
||||
public ResponseData changeBindingMobile(@RequestBody @Valid ChangeBindingMobileReq req) {
|
||||
return loginUtil.changeBindingMobile(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 对方
|
||||
*
|
||||
* @param otherUserVo
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/userRelationship", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "获取两个用户之间的关系")
|
||||
@UserLoginToken
|
||||
public ResponseData userRelationship(@RequestBody @Valid UserVo otherUserVo) {
|
||||
return userService.userRelationship(otherUserVo, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/editInfo", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "修改用户信息")
|
||||
public ResponseData editInfo(@RequestBody UserEditReqVo req) {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
//用户类型 1设计师 2表现师 3销售(推广员)
|
||||
|
||||
if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.设计师)) {
|
||||
return customerService.editInfo(req, userVo);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.表现师)) {
|
||||
return storeService.editInfo(req, userVo);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.销售)) {
|
||||
return saleService.editInfo(req, userVo);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.企业)) {
|
||||
return enterpriseService.editInfo(req, userVo);
|
||||
}
|
||||
return ResponseData.error(CoreExceptionEnum.ERROR_PARAM);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 个人信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@PostMapping("/info")
|
||||
@ApiOperation(value = "个人信息", notes = "个人信息")
|
||||
public ResponseData info() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
Map<UserVo, UserInfo> userVoUserInfoMap = userService.selectUserInfoMap(CollectionUtil.newHashSet(userVo), userVo);
|
||||
|
||||
//用户类型 1设计师 2表现师 3销售(推广员)
|
||||
if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.设计师)) {
|
||||
UserResultInfo userResultInfo = (UserResultInfo) customerService.info(userVo).getData();
|
||||
userResultInfo.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(userResultInfo);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.表现师)) {
|
||||
Store store = (Store) storeService.info(userVo).getData();
|
||||
store.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(store);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.销售)) {
|
||||
Sale sale = (Sale) saleService.info(userVo).getData();
|
||||
sale.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(sale);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.企业)) {
|
||||
Store one = storeService.getOne(new QueryWrapper<Store>().lambda().eq(Store::getBindEnterpriseId, userVo.getUserId()));
|
||||
|
||||
if (one == null) {
|
||||
return ResponseData.error(700, "token过期");
|
||||
}
|
||||
Store store = (Store) storeService.info(new UserVo(UserEnums.store.getCode(), one.getId())).getData();
|
||||
store.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(store);
|
||||
}
|
||||
|
||||
return ResponseData.error(CoreExceptionEnum.ERROR_PARAM);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private EnterpriseService enterpriseService;
|
||||
|
||||
/**
|
||||
* 查看他人信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/otherInfo")
|
||||
@ApiOperation(value = "查看他人信息", notes = "查看他人信息")
|
||||
public ResponseData otherInfo(@RequestBody UserVo userVo) {
|
||||
|
||||
UserVo userVo1 = getUserVo();
|
||||
Map<UserVo, UserInfo> userVoUserInfoMap = userService.selectUserInfoMap(CollectionUtil.newHashSet(userVo), userVo1);
|
||||
//用户类型 1设计师 2表现师 3销售(推广员)
|
||||
if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.设计师)) {
|
||||
UserResultInfo userResultInfo = (UserResultInfo) customerService.info(userVo).getData();
|
||||
userResultInfo.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(userResultInfo);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.表现师)) {
|
||||
Store store = (Store) storeService.info(userVo).getData();
|
||||
store.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(store);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.销售)) {
|
||||
Sale sale = (Sale) saleService.info(userVo).getData();
|
||||
sale.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(sale);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.企业)) {
|
||||
Store one = storeService.getOne(new QueryWrapper<Store>().lambda().eq(Store::getBindEnterpriseId, userVo.getUserId()));
|
||||
Store store = new Store();
|
||||
if (one != null) {
|
||||
store = (Store) storeService.info(new UserVo(UserEnums.store.getCode(), one.getId())).getData();
|
||||
} else {
|
||||
store.setEnterprise(enterpriseService.getById(userVo.getUserId()));
|
||||
}
|
||||
|
||||
store.setUserInfo(userVoUserInfoMap.get(userVo));
|
||||
return ResponseData.success(store);
|
||||
}
|
||||
|
||||
return ResponseData.error(CoreExceptionEnum.ERROR_PARAM);
|
||||
}
|
||||
|
||||
@Value("${wxpay.appid}")
|
||||
private String appId;
|
||||
|
||||
@Value("${wxpay.app-secret}")
|
||||
private String appSecret;
|
||||
|
||||
/**
|
||||
* 获取wxopenId
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getWxOpenId")
|
||||
@ApiOperation(value = "获取wxopenId", notes = "获取wxopenId")
|
||||
public ResponseData getWxOpenId(@RequestBody String code) {
|
||||
//2.判断是否授权成功
|
||||
if (StrUtil.isBlank(code)) {
|
||||
log.info("-----------no shou quan!-------------------");
|
||||
return ResponseData.error("授权失败");
|
||||
}
|
||||
|
||||
//4.获取access_token,以及通过token获取openid
|
||||
String url = "https://api.weixin.qq.com/sns/oauth2/access_token" +
|
||||
"?appid=" + appId +
|
||||
"&secret=" + appSecret +
|
||||
"&code=" + code +
|
||||
"&grant_type=authorization_code";
|
||||
String result = HttpUtil.get(url);
|
||||
log.info("请求获取的access_token值是:" + result);
|
||||
JSONObject resultObject = JSONObject.parseObject(result);
|
||||
System.out.println("-----" + JSONObject.toJSONString(resultObject));
|
||||
//获取openid
|
||||
String unionid = (String) resultObject.get("unionid");
|
||||
return ResponseData.success(unionid);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getAppletOpenId/{type}")
|
||||
@ApiOperation(value = "获取小程序openId", notes = "获取小程序openId")
|
||||
public ResponseData getAppletOpenId(@PathVariable("type") String type, @RequestBody String code) {
|
||||
if (code == null) {
|
||||
return ResponseData.error("暂未授权!");
|
||||
}
|
||||
|
||||
String appid = "";
|
||||
|
||||
String secret = "";
|
||||
|
||||
//type : DD_drawing DD画图, DD_co_creation DD共创
|
||||
if (ObjectUtil.equal(type, "DD_drawing")) {
|
||||
appid = DD_drawingAppId;
|
||||
|
||||
secret = DD_drawingSecret;
|
||||
} else {
|
||||
appid = DD_co_creationAppId;
|
||||
|
||||
secret = DD_co_creationSecret;
|
||||
}
|
||||
|
||||
//1.通过code获取openId
|
||||
String str = "https://api.weixin.qq.com/sns/jscode2session?appid=" +
|
||||
appid +
|
||||
"&secret=" +
|
||||
secret +
|
||||
"&js_code=" +
|
||||
code +
|
||||
"&grant_type=authorization_code";
|
||||
String result = HttpUtil.get(str);
|
||||
|
||||
//判断是否获取成功
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
return ResponseData.error("获取参数错误");
|
||||
}
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
//System.out.println("-----" + JSONObject.toJSONString(jsonObject));
|
||||
//String unionid = (String) jsonObject.get("unionid");
|
||||
return ResponseData.success(jsonObject);
|
||||
}
|
||||
|
||||
@PostMapping("/getAppletMobile/{type}")
|
||||
@ApiOperation(value = "获取小程序手机号", notes = "获取小程序手机号")
|
||||
public ResponseData getAppletMobile(@PathVariable("type") String type, @RequestBody String code) {
|
||||
if (code == null) {
|
||||
return ResponseData.error("暂未授权!");
|
||||
}
|
||||
|
||||
//1.通过code获取手机号
|
||||
String str = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=" + getToken(type);
|
||||
Map<String, Object> bodyMap = new HashMap<>();
|
||||
bodyMap.put("code", code);
|
||||
String result = HttpUtil.createPost(str).body(JSONObject.toJSONString(bodyMap)).execute().body();
|
||||
|
||||
System.out.println(result);
|
||||
//判断是否获取成功
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
return ResponseData.error("获取参数错误");
|
||||
}
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
Map map = (Map) jsonObject.get("phone_info");
|
||||
return ResponseData.success(map);
|
||||
}
|
||||
|
||||
|
||||
//https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=ACCESS_TOKEN
|
||||
|
||||
@Value("${DD_drawing.appid}")
|
||||
private String DD_drawingAppId;
|
||||
|
||||
@Value("${DD_drawing.secret}")
|
||||
private String DD_drawingSecret;
|
||||
|
||||
@Value("${DD_co_creation.appid}")
|
||||
private String DD_co_creationAppId;
|
||||
|
||||
@Value("${DD_co_creation.secret}")
|
||||
private String DD_co_creationSecret;
|
||||
|
||||
/**
|
||||
* 获取access_token
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getToken(String type) {
|
||||
|
||||
String appid = "";
|
||||
|
||||
String secret = "";
|
||||
|
||||
//type : DD_drawing DD画图, DD_co_creation DD共创
|
||||
if (ObjectUtil.equal(type, "DD_drawing")) {
|
||||
appid = DD_drawingAppId;
|
||||
|
||||
secret = DD_drawingSecret;
|
||||
} else {
|
||||
appid = DD_co_creationAppId;
|
||||
|
||||
secret = DD_co_creationSecret;
|
||||
}
|
||||
|
||||
String url = "https://api.weixin.qq.com/cgi-bin/token" + "?grant_type=" + "client_credential" + "&appid=" + appid + "&secret=" + secret;
|
||||
String result = HttpRequest.get(url).execute().body();
|
||||
System.err.println(result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
//服务断了status会有值
|
||||
Integer errcode = (Integer) jsonObject.get("errcode");
|
||||
if (errcode == null) {
|
||||
String access_token = (String) jsonObject.get("access_token");
|
||||
return access_token;
|
||||
} else {
|
||||
log.info("获取access_token失败:{}", jsonObject.toJSONString());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//Map<String, Object> map = new HashMap<>();
|
||||
//map.put("code", "554547887");
|
||||
//System.out.println(JSONObject.toJSONString(map));
|
||||
|
||||
String url = "https://api.weixin.qq.com/cgi-bin/token" + "?grant_type=" + "client_credential" + "&appid=" + "wxed96e8fe10ea8992" + "&secret=" + "5a1da24f97e49aa5762897045dd593b6";
|
||||
String result = HttpRequest.get(url).execute().body();
|
||||
System.err.println(result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
//服务断了status会有值
|
||||
Integer errcode = (Integer) jsonObject.get("errcode");
|
||||
if (errcode == null) {
|
||||
String access_token = (String) jsonObject.get("access_token");
|
||||
System.out.printf(access_token);
|
||||
} else {
|
||||
log.info("获取access_token失败:{}", jsonObject.toJSONString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.controller.req.WorksPageReq;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 字典值查询
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/dict")
|
||||
@Api(tags = "字典值查询")
|
||||
public class ApiDictController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService iSysDictDataService;
|
||||
|
||||
/**
|
||||
* 字典表详情
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/fineOne", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "字典表详情")
|
||||
public ResponseData<SysDictData> fineOne(@RequestParam("code") @Valid @NotBlank(message = "code值不能为空") String code) {
|
||||
|
||||
SysDictData sysDictData = new SysDictData();
|
||||
sysDictData.setCode(code);
|
||||
sysDictData.setStatus("0");
|
||||
List<SysDictData> list = iSysDictDataService.selectDictDataList(sysDictData);
|
||||
return ResponseData.success(list.isEmpty()?null:list.get(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典表下级
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/fineList", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "字典表下级")
|
||||
public ResponseData<List<SysDictData>> fineList(@RequestParam("code") @Valid @NotBlank(message = "code值不能为空") String code) {
|
||||
SysDictData sysDictData = new SysDictData();
|
||||
sysDictData.setDictType(code);
|
||||
sysDictData.setStatus("0");
|
||||
List<SysDictData> list = iSysDictDataService.selectDictDataList(sysDictData);
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.controller.req.MonthReq;
|
||||
import com.ruoyi.frequency.agreement.entity.Agreement;
|
||||
import com.ruoyi.frequency.agreement.service.AgreementService;
|
||||
import com.ruoyi.frequency.illegaldeductionrecord.entity.IllegalDeductionRecord;
|
||||
import com.ruoyi.frequency.illegaldeductionrecord.service.IllegalDeductionRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 扣款
|
||||
*
|
||||
* @author a
|
||||
* @date 2023/8/18 15:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/illegalDeductionRecord")
|
||||
@Api(tags = "扣款")
|
||||
public class ApiIllegalDeductionRecordController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private IllegalDeductionRecordService illegalDeductionRecordService;
|
||||
|
||||
@PostMapping("/getPage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "扣款列表", notes = "扣款列表")
|
||||
public ResponseData getPage(@RequestBody MonthReq req) {
|
||||
return ResponseData.success(illegalDeductionRecordService.getPage(req,getUserVo()));
|
||||
}
|
||||
|
||||
@PostMapping("/detail")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "扣款详情", notes = "扣款详情")
|
||||
public ResponseData<IllegalDeductionRecord> detail(@RequestBody BodyIdReq req) {
|
||||
return ResponseData.success(illegalDeductionRecordService.detail(req,getUserVo()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.resp.IntegralPageResp;
|
||||
import com.ruoyi.frequency.integralrecord.service.IntegralRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* 积分
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/integral")
|
||||
@Api(tags = "积分")
|
||||
public class ApiIntegralController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private IntegralRecordService integralRecordService;
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/integralPage", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "积分明细")
|
||||
public ResponseData<PageResult<IntegralPageResp>> integralPage(@RequestBody PageBasic req) {
|
||||
return integralRecordService.integralPage(req, getUserVo());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.exception.enums.CoreExceptionEnum;
|
||||
import com.ruoyi.controller.req.LoginReqVo;
|
||||
import com.ruoyi.enums.LoginEnums;
|
||||
import com.ruoyi.enums.sms.SmsEnums;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.utils.JudgeLogicUtil;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.StatusLine;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import java.io.IOException;
|
||||
import java.security.KeyFactory;
|
||||
import java.security.PrivateKey;
|
||||
import java.security.spec.PKCS8EncodedKeySpec;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* 登陆类
|
||||
* @author liwenlong
|
||||
*/
|
||||
@Slf4j
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
@Api(tags = "登录类")
|
||||
public class ApiLoginController {
|
||||
|
||||
|
||||
@Value("${decryptPhone.url}")
|
||||
private String url;
|
||||
|
||||
@Value("${decryptPhone.app_key}")
|
||||
private String app_key;
|
||||
|
||||
@Value("${decryptPhone.master_Key}")
|
||||
private String master_Key;
|
||||
|
||||
@Value("${decryptPhone.private_key}")
|
||||
private String private_key;
|
||||
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private JudgeLogicUtil judgeLogicUtil;
|
||||
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
|
||||
/**
|
||||
* 登陆
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public ResponseData login(@RequestBody LoginReqVo loginReqVo) {
|
||||
|
||||
//登录方式 1 验证码 2 密码 3 一键登录 4 微信登录 5 小程序登录 6 苹果登录
|
||||
switch (LoginEnums.getLoginEnums(loginReqVo.getType())) {
|
||||
case code_login:
|
||||
return codeLogin(loginReqVo);
|
||||
case pwd_login:
|
||||
return pwdLogin(loginReqVo);
|
||||
case one_click_login:
|
||||
return oneClickLogin(loginReqVo);
|
||||
case wechat_login:
|
||||
return wxChatOpenidLogin(loginReqVo);
|
||||
case applet_login:
|
||||
return wechatAppletOpenid(loginReqVo);
|
||||
case apple_login:
|
||||
return appleOpenidLogin(loginReqVo);
|
||||
default:
|
||||
return ResponseData.error(CoreExceptionEnum.ERROR_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证码登入
|
||||
*
|
||||
* @param loginReqVo
|
||||
* @return
|
||||
*/
|
||||
private ResponseData codeLogin(LoginReqVo loginReqVo) {
|
||||
|
||||
//验证码——验证
|
||||
businessUtil.checkCode(loginReqVo.getCode(), SmsEnums.LOGIN, loginReqVo.getAreaCode(),loginReqVo.getAccount(), loginReqVo.getUserType());
|
||||
|
||||
//验证登入账号
|
||||
Long userId = judgeLogicUtil.checkLoginUser(loginReqVo);
|
||||
|
||||
return businessUtil.getToken(userId, loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*
|
||||
* @param loginReqVo
|
||||
* @return
|
||||
*/
|
||||
private ResponseData pwdLogin(LoginReqVo loginReqVo) {
|
||||
//验证登入账号
|
||||
Long userId = judgeLogicUtil.checkLoginUser(loginReqVo);
|
||||
|
||||
//验证密码
|
||||
if (!businessUtil.loginPwdTrue(new UserVo(loginReqVo.getUserType(),userId), loginReqVo.getPassword())) {
|
||||
return ResponseData.error(CoreExceptionEnum.PWD_ERROR);
|
||||
}
|
||||
return businessUtil.getToken(userId, loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 一键登入
|
||||
*
|
||||
* @param loginReqVo
|
||||
* @return
|
||||
*/
|
||||
private ResponseData oneClickLogin(LoginReqVo loginReqVo) {
|
||||
|
||||
// 获取并解密手机号
|
||||
String phone = decryptPhone(loginReqVo.getLoginToken());
|
||||
loginReqVo.setMobile(phone);
|
||||
|
||||
//验证登入账号
|
||||
Long userId = judgeLogicUtil.checkLoginUser(loginReqVo);
|
||||
|
||||
return businessUtil.getToken(userId, loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信登入
|
||||
*
|
||||
* @param loginReqVo
|
||||
* @return
|
||||
*/
|
||||
private ResponseData wxChatOpenidLogin(LoginReqVo loginReqVo) {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(loginReqVo.getCode())) {
|
||||
//验证码——验证
|
||||
businessUtil.checkCode(loginReqVo.getCode(), SmsEnums.WX_LOGIN_BIND, loginReqVo.getAreaCode(),loginReqVo.getMobile(), loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
//验证登入账号,
|
||||
Long userId = judgeLogicUtil.checkLoginUser(loginReqVo);
|
||||
|
||||
return businessUtil.getToken(userId, loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序登入
|
||||
*
|
||||
* @param loginReqVo
|
||||
* @return
|
||||
*/
|
||||
private ResponseData wechatAppletOpenid(LoginReqVo loginReqVo) {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(loginReqVo.getAccount())) {
|
||||
//验证码——验证
|
||||
businessUtil.checkCode(loginReqVo.getCode(), SmsEnums.WX_APPLET_LOGIN_BIND, loginReqVo.getAreaCode(),loginReqVo.getMobile(), loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
//验证登入账号,
|
||||
Long userId = judgeLogicUtil.checkLoginUser(loginReqVo);
|
||||
|
||||
return businessUtil.getToken(userId, loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 苹果登入
|
||||
*
|
||||
* @param loginReqVo
|
||||
* @return
|
||||
*/
|
||||
private ResponseData appleOpenidLogin(LoginReqVo loginReqVo) {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(loginReqVo.getAccount())) {
|
||||
//验证码——验证
|
||||
businessUtil.checkCode(loginReqVo.getCode(), SmsEnums.LOGIN, loginReqVo.getAreaCode(),loginReqVo.getMobile(), loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
//验证登入账号,
|
||||
Long userId = judgeLogicUtil.checkLoginUser(loginReqVo);
|
||||
|
||||
|
||||
|
||||
return businessUtil.getToken(userId, loginReqVo.getUserType());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取并解密手机号
|
||||
*
|
||||
* @param loginToken
|
||||
* @return
|
||||
*/
|
||||
private String decryptPhone(String loginToken) {
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("loginToken", loginToken);
|
||||
JSONObject jsonObject1 = JSONObject.parseObject((doPostForJpush(jsonObject.toString())));
|
||||
System.out.println("code==" + jsonObject1.getInteger("code"));
|
||||
System.out.println("phone==" + jsonObject1.getString("phone"));
|
||||
if (8000 == jsonObject1.getInteger("code")) {
|
||||
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(private_key));
|
||||
PrivateKey privateKey = KeyFactory.getInstance("RSA").generatePrivate(keySpec);
|
||||
Cipher cipher = Cipher.getInstance("RSA");
|
||||
cipher.init(Cipher.DECRYPT_MODE, privateKey);
|
||||
byte[] b = Base64.getDecoder().decode(jsonObject1.getString("phone"));
|
||||
System.out.println("解密后phone==" + new String(cipher.doFinal(b)));
|
||||
return new String(cipher.doFinal(b));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private String doPostForJpush(String JSONBody) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.setHeader("Authorization", "Basic " + new String(Base64.getEncoder().encode((app_key + ":" + master_Key).getBytes())));
|
||||
StringEntity entity = new StringEntity(JSONBody, "UTF-8");
|
||||
entity.setContentType("application/json");
|
||||
httpPost.setEntity(entity);
|
||||
CloseableHttpResponse response = null;
|
||||
try {
|
||||
response = httpClient.execute(httpPost);
|
||||
StatusLine status = response.getStatusLine();
|
||||
int state = status.getStatusCode();
|
||||
if (state == HttpStatus.SC_OK) {
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
String jsonString = EntityUtils.toString(responseEntity, "UTF-8");
|
||||
return jsonString;
|
||||
} else {
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
String jsonString = EntityUtils.toString(responseEntity);
|
||||
System.out.println(jsonString);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.cos.auth.COSSigner;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.tencent.cloud.CosStsClient;
|
||||
import com.tencent.cloud.Policy;
|
||||
import com.tencent.cloud.Response;
|
||||
import com.tencent.cloud.Statement;
|
||||
import com.tencent.cloud.cos.util.Jackson;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* @Author OCS
|
||||
* @Date 2022/2/8 16:40
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/api/cos")
|
||||
@Api(tags = "OCS")
|
||||
public class ApiOcsController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService iSysDictDataService;
|
||||
|
||||
// 根据 github 提供的 maven 集成方法导入 java sts sdk,使用 3.1.1 及更高版本
|
||||
public static void main(String[] args) {
|
||||
TreeMap<String, Object> config = new TreeMap<String, Object>();
|
||||
try {
|
||||
//这里的 SecretId 和 SecretKey 代表了用于申请临时密钥的永久身份(主账号、子账号等),子账号需要具有操作存储桶的权限。
|
||||
String secretKey = "VXZWQPYaedvMC6vovAU3gJ1ogXXdvO1n";
|
||||
String secretId = "AKIDSBQuX5mAZvHa2jNwSzWE0lNvNuMjA9gC";
|
||||
|
||||
String region = "ap-shanghai";
|
||||
String bucket = "ddht-1324395003";
|
||||
// 替换为您的云 api 密钥 SecretId
|
||||
config.put("secretId", secretId);
|
||||
// 替换为您的云 api 密钥 SecretKey
|
||||
config.put("secretKey", secretKey);
|
||||
|
||||
// 初始化 policy
|
||||
Policy policy = new Policy();
|
||||
|
||||
// 设置域名:
|
||||
// 如果您使用了腾讯云 cvm,可以设置内部域名
|
||||
//config.put("host", "sts.internal.tencentcloudapi.com");
|
||||
|
||||
// 临时密钥有效时长,单位是秒,默认 1800 秒,目前主账号最长 2 小时(即 7200 秒),子账号最长 36 小时(即 129600)秒
|
||||
config.put("durationSeconds", 1800);
|
||||
// 换成您的 bucket
|
||||
config.put("bucket", bucket);
|
||||
// 换成 bucket 所在地区
|
||||
config.put("region", region);
|
||||
|
||||
// 开始构建一条 statement
|
||||
Statement statement = new Statement();
|
||||
// 声明设置的结果是允许操作
|
||||
statement.setEffect("allow");
|
||||
/**
|
||||
* 密钥的权限列表。必须在这里指定本次临时密钥所需要的权限。
|
||||
* 权限列表请参见 https://cloud.tencent.com/document/product/436/31923
|
||||
* 规则为 {project}:{interfaceName}
|
||||
* project : 产品缩写 cos相关授权为值为cos,数据万象(数据处理)相关授权值为ci
|
||||
* 授权所有接口用*表示,例如 cos:*,ci:*
|
||||
* 添加一批操作权限 :
|
||||
*/
|
||||
statement.addActions(new String[]{
|
||||
"cos:PutObject",
|
||||
// 表单上传、小程序上传
|
||||
"cos:PostObject",
|
||||
// 分块上传
|
||||
"cos:InitiateMultipartUpload",
|
||||
"cos:ListMultipartUploads",
|
||||
"cos:ListParts",
|
||||
"cos:UploadPart",
|
||||
"cos:CompleteMultipartUpload",
|
||||
// 处理相关接口一般为数据万象产品 权限中以ci开头
|
||||
// 创建媒体处理任务
|
||||
"ci:CreateMediaJobs",
|
||||
// 文件压缩
|
||||
"ci:CreateFileProcessJobs"
|
||||
});
|
||||
|
||||
/**
|
||||
* 这里改成允许的路径前缀,可以根据自己网站的用户登录态判断允许上传的具体路径
|
||||
* 资源表达式规则分对象存储(cos)和数据万象(ci)两种
|
||||
* 数据处理、审核相关接口需要授予ci资源权限
|
||||
* cos : qcs::cos:{region}:uid/{appid}:{bucket}/{path}
|
||||
* ci : qcs::ci:{region}:uid/{appid}:bucket/{bucket}/{path}
|
||||
* 列举几种典型的{path}授权场景:
|
||||
* 1、允许访问所有对象:"*"
|
||||
* 2、允许访问指定的对象:"a/a1.txt", "b/b1.txt"
|
||||
* 3、允许访问指定前缀的对象:"a*", "a/*", "b/*"
|
||||
* 如果填写了“*”,将允许用户访问所有资源;除非业务需要,否则请按照最小权限原则授予用户相应的访问权限范围。
|
||||
*
|
||||
* 示例:授权examplebucket-1250000000 bucket目录下的所有资源给cos和ci 授权两条Resource
|
||||
*/
|
||||
statement.addResources(new String[]{
|
||||
"qcs::cos:" + region + ":uid/" + bucket.split("-")[1] + ":" + bucket + "/*",
|
||||
"qcs::ci:" + region + ":uid/" + bucket.split("-")[1] + ":bucket/" + bucket + "/*"});
|
||||
|
||||
// String secretKey = "VXZWQPYaedvMC6vovAU3gJ1ogXXdvO1n";
|
||||
// String secretId = "AKIDSBQuX5mAZvHa2jNwSzWE0lNvNuMjA9gC";
|
||||
//
|
||||
// String region = "ap-shanghai";
|
||||
// String bucket = "ddht-1324395003";
|
||||
statement.addResources(new String[]{
|
||||
"qcs::cos:ap-shanghai:uid/1324395003:ddht-1324395003/*",
|
||||
"qcs::ci:ap-shanghai:uid/1324395003:bucket/ddht-1324395003/*"});
|
||||
|
||||
// 把一条 statement 添加到 policy
|
||||
// 可以添加多条
|
||||
policy.addStatement(statement);
|
||||
// 将 Policy 示例转化成 String,可以使用任何 json 转化方式,这里是本 SDK 自带的推荐方式
|
||||
config.put("policy", Jackson.toJsonPrettyString(policy));
|
||||
|
||||
Response response = CosStsClient.getCredential(config);
|
||||
System.out.println(response.credentials.tmpSecretId);
|
||||
System.out.println(response.credentials.tmpSecretKey);
|
||||
System.out.println(response.credentials.sessionToken);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new IllegalArgumentException("no valid secret !");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 根据 github 提供的 maven 集成方法导入 java sts sdk,使用 3.1.1 及更高版本
|
||||
@PostMapping("/signNew")
|
||||
public ResponseData signNew() {
|
||||
|
||||
TreeMap<String, Object> config = new TreeMap<String, Object>();
|
||||
try {
|
||||
|
||||
String secretKey = "VXZWQPYaedvMC6vovAU3gJ1ogXXdvO1n";
|
||||
String secretId = "AKIDSBQuX5mAZvHa2jNwSzWE0lNvNuMjA9gC";
|
||||
|
||||
String region = "ap-shanghai";
|
||||
String bucket = "ddht-1324395003";
|
||||
|
||||
SysDictData sysDictData = new SysDictData();
|
||||
sysDictData.setDictType("storing_param");
|
||||
List<SysDictData> list = iSysDictDataService.selectDictDataList(sysDictData);
|
||||
for (SysDictData data : list) {
|
||||
if ("Region".equals(data.getCode())) {
|
||||
region = data.getDictValue();
|
||||
}
|
||||
if ("Bucket".equals(data.getCode())) {
|
||||
bucket = data.getDictValue();
|
||||
}
|
||||
if ("SecretKey".equals(data.getCode())) {
|
||||
secretKey = data.getDictValue();
|
||||
}
|
||||
if ("SecretId".equals(data.getCode())) {
|
||||
secretId = data.getDictValue();
|
||||
}
|
||||
}
|
||||
// 替换为您的云 api 密钥 SecretId
|
||||
config.put("secretId", secretId);
|
||||
// 替换为您的云 api 密钥 SecretKey
|
||||
config.put("secretKey", secretKey);
|
||||
|
||||
// 初始化 policy
|
||||
Policy policy = new Policy();
|
||||
|
||||
// 设置域名:
|
||||
// 如果您使用了腾讯云 cvm,可以设置内部域名
|
||||
//config.put("host", "sts.internal.tencentcloudapi.com");
|
||||
|
||||
// 临时密钥有效时长,单位是秒,默认 1800 秒,目前主账号最长 2 小时(即 7200 秒),子账号最长 36 小时(即 129600)秒
|
||||
config.put("durationSeconds", 1800);
|
||||
// 换成您的 bucket
|
||||
config.put("bucket", bucket);
|
||||
// 换成 bucket 所在地区
|
||||
config.put("region", region);
|
||||
|
||||
// 开始构建一条 statement
|
||||
Statement statement = new Statement();
|
||||
// 声明设置的结果是允许操作
|
||||
statement.setEffect("allow");
|
||||
/**
|
||||
* 密钥的权限列表。必须在这里指定本次临时密钥所需要的权限。
|
||||
* 权限列表请参见 https://cloud.tencent.com/document/product/436/31923
|
||||
* 规则为 {project}:{interfaceName}
|
||||
* project : 产品缩写 cos相关授权为值为cos,数据万象(数据处理)相关授权值为ci
|
||||
* 授权所有接口用*表示,例如 cos:*,ci:*
|
||||
* 添加一批操作权限 :
|
||||
*/
|
||||
statement.addActions(new String[]{
|
||||
"cos:PutObject",
|
||||
// 表单上传、小程序上传
|
||||
"cos:PostObject",
|
||||
// 分块上传
|
||||
"cos:InitiateMultipartUpload",
|
||||
"cos:ListMultipartUploads",
|
||||
"cos:ListParts",
|
||||
"cos:UploadPart",
|
||||
"cos:CompleteMultipartUpload",
|
||||
// 处理相关接口一般为数据万象产品 权限中以ci开头
|
||||
// 创建媒体处理任务
|
||||
"ci:CreateMediaJobs",
|
||||
// 文件压缩
|
||||
"ci:CreateFileProcessJobs"
|
||||
});
|
||||
|
||||
/**
|
||||
* 这里改成允许的路径前缀,可以根据自己网站的用户登录态判断允许上传的具体路径
|
||||
* 资源表达式规则分对象存储(cos)和数据万象(ci)两种
|
||||
* 数据处理、审核相关接口需要授予ci资源权限
|
||||
* cos : qcs::cos:{region}:uid/{appid}:{bucket}/{path}
|
||||
* ci : qcs::ci:{region}:uid/{appid}:bucket/{bucket}/{path}
|
||||
* 列举几种典型的{path}授权场景:
|
||||
* 1、允许访问所有对象:"*"
|
||||
* 2、允许访问指定的对象:"a/a1.txt", "b/b1.txt"
|
||||
* 3、允许访问指定前缀的对象:"a*", "a/*", "b/*"
|
||||
* 如果填写了“*”,将允许用户访问所有资源;除非业务需要,否则请按照最小权限原则授予用户相应的访问权限范围。
|
||||
*
|
||||
* 示例:授权examplebucket-1250000000 bucket目录下的所有资源给cos和ci 授权两条Resource
|
||||
*/
|
||||
statement.addResources(new String[]{
|
||||
"qcs::cos:" + region + ":uid/" + bucket.split("-")[1] + ":" + bucket + "/*",
|
||||
"qcs::ci:" + region + ":uid/" + bucket.split("-")[1] + ":bucket/" + bucket + "/*"});
|
||||
|
||||
// 把一条 statement 添加到 policy
|
||||
// 可以添加多条
|
||||
policy.addStatement(statement);
|
||||
// 将 Policy 示例转化成 String,可以使用任何 json 转化方式,这里是本 SDK 自带的推荐方式
|
||||
config.put("policy", Jackson.toJsonPrettyString(policy));
|
||||
|
||||
Response response = CosStsClient.getCredential(config);
|
||||
System.out.println(response.credentials.tmpSecretId);
|
||||
System.out.println(response.credentials.tmpSecretKey);
|
||||
System.out.println(response.credentials.sessionToken);
|
||||
return ResponseData.success(response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new IllegalArgumentException("no valid secret !");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/sign")
|
||||
public ResponseData sign(@RequestParam(value = "name") @NotBlank(message = "文件名称不能为空") String name) {
|
||||
|
||||
String region = "ap-shanghai";
|
||||
String bucket = "ddht-1324395003";
|
||||
String secretKey = "VXZWQPYaedvMC6vovAU3gJ1ogXXdvO1n";
|
||||
String secretId = "AKIDSBQuX5mAZvHa2jNwSzWE0lNvNuMjA9gC";
|
||||
|
||||
SysDictData sysDictData = new SysDictData();
|
||||
sysDictData.setDictType("storing_param");
|
||||
List<SysDictData> list = iSysDictDataService.selectDictDataList(sysDictData);
|
||||
for (SysDictData data : list) {
|
||||
if ("Region".equals(data.getCode())) {
|
||||
region = data.getDictValue();
|
||||
}
|
||||
if ("Bucket".equals(data.getCode())) {
|
||||
bucket = data.getDictValue();
|
||||
}
|
||||
if ("SecretKey".equals(data.getCode())) {
|
||||
secretKey = data.getDictValue();
|
||||
}
|
||||
if ("SecretId".equals(data.getCode())) {
|
||||
secretId = data.getDictValue();
|
||||
}
|
||||
}
|
||||
|
||||
long startTimestamp = System.currentTimeMillis() / 1000;
|
||||
long endTimestamp = startTimestamp + 30 * 60;
|
||||
String endTimestampStr = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").
|
||||
format(endTimestamp * 1000);
|
||||
String keyTime = startTimestamp + ";" + endTimestamp;
|
||||
String boundary = "----WebKitFormBoundaryZBPbaoYE2gqeB21N";
|
||||
// 设置表单的body字段值
|
||||
Map<String, String> formFields = new HashMap<>();
|
||||
formFields.put("q-sign-algorithm", "sha1");
|
||||
formFields.put("key", name);
|
||||
formFields.put("q-ak", secretId);
|
||||
formFields.put("q-key-time", keyTime);
|
||||
// 构造policy,参考文档: https://cloud.tencent.com/document/product/436/14690
|
||||
String policy = "{\n" +
|
||||
" \"expiration\": \"" + endTimestampStr + "\",\n" +
|
||||
" \"conditions\": [\n" +
|
||||
" { \"bucket\": \"" + bucket + "\" },\n" +
|
||||
" { \"q-sign-algorithm\": \"sha1\" },\n" +
|
||||
" { \"q-ak\": \"" + secretId + "\" },\n" +
|
||||
" { \"q-sign-time\":\"" + keyTime + "\" }\n" +
|
||||
" ]\n" +
|
||||
"}";
|
||||
// policy需要base64后算放入表单中
|
||||
String encodedPolicy = new String(Base64.encodeBase64(policy.getBytes()));
|
||||
// 设置policy
|
||||
formFields.put("policy", encodedPolicy);
|
||||
// 根据编码后的policy和secretKey计算签名
|
||||
COSSigner cosSigner = new COSSigner();
|
||||
String signature = cosSigner.buildPostObjectSignature(secretKey,
|
||||
keyTime, policy);
|
||||
// 设置签名
|
||||
formFields.put("q-signature", signature);
|
||||
String urlStr = "https://" + bucket + ".cos." + region + ".myqcloud.com";
|
||||
formFields.put("host", urlStr);
|
||||
formFields.put("bucket", bucket);
|
||||
formFields.put("region", region);
|
||||
formFields.put("secretId", secretId);
|
||||
formFields.put("secretKey", secretKey);
|
||||
return ResponseData.success(formFields);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.resp.RefereeUserPageResp;
|
||||
import com.ruoyi.frequency.refereeuser.service.RefereeUserService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 邀请用户
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/refereeUser")
|
||||
@Api(tags = "邀请用户")
|
||||
public class ApiRefereeUserController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private RefereeUserService refereeUserService;
|
||||
|
||||
@PostMapping("/refereeUserPage")
|
||||
@ApiOperation(value = "邀请用户列表", notes = "邀请用户列表")
|
||||
public ResponseData<PageResult<Page<RefereeUserPageResp>>> refereeUserPage(@RequestBody PageBasic req) {
|
||||
return refereeUserService.refereeUserPage(req, getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.ReportReq;
|
||||
import com.ruoyi.frequency.report.service.ReportService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 举报用户相关
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/postReport")
|
||||
@Api(tags = "举报用户相关")
|
||||
public class ApiReportController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private ReportService reportService;
|
||||
|
||||
@PostMapping("/report")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "举报", notes = "举报")
|
||||
public ResponseData report(@RequestBody ReportReq req) {
|
||||
return reportService.report(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.ShieldPageReq;
|
||||
import com.ruoyi.controller.req.ShieldUserReq;
|
||||
import com.ruoyi.frequency.shield.service.ShieldService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 屏蔽用户
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/shield")
|
||||
@Api(tags = "屏蔽用户")
|
||||
public class ApiShieldController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private ShieldService shieldService;
|
||||
|
||||
/**
|
||||
* 屏蔽
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/shieldUser")
|
||||
@UserLoginToken
|
||||
public ResponseData shieldUser(@Valid @RequestBody ShieldUserReq req) {
|
||||
return shieldService.shieldUser(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 屏蔽
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/shieldUserVersion2")
|
||||
@UserLoginToken
|
||||
public ResponseData shieldUserVersion2(@Valid @RequestBody ShieldUserReq req) {
|
||||
return shieldService.shieldUserVersion2(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消屏蔽
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/cancelShieldUserVersion2")
|
||||
@UserLoginToken
|
||||
public ResponseData cancelShieldUserVersion2(@Valid @RequestBody ShieldUserReq req) {
|
||||
return shieldService.cancelShieldUserVersion2(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 屏蔽列表
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/shieldPage")
|
||||
public ResponseData shieldPage(@RequestBody ShieldPageReq req) {
|
||||
return shieldService.shieldPage(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 屏蔽列表(别人查看)
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/otherShieldPage")
|
||||
public ResponseData otherShieldPage(@RequestBody ShieldPageReq req) {
|
||||
return shieldService.otherShieldPage(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.utils.wx.wecom.AesException;
|
||||
import com.ruoyi.utils.wx.wecom.ConstantUtil;
|
||||
import com.ruoyi.utils.wx.wecom.WXBizMsgCrypt;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
@Api(tags = "企业微信")
|
||||
@Slf4j
|
||||
public class ApiWeComController extends RyController {
|
||||
|
||||
public static void main(String[] args) {
|
||||
sendMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取access_token
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getToken() {
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken" + "?corpid=" + "ww45fb4d72c735ee1d" + "&corpsecret=" + "5x3F-AHQMO9VwpXH9_lOUX8887sqb1fUx0-5goN6U_Y";
|
||||
String result = HttpRequest.get(url).execute().body();
|
||||
System.err.println(result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
//服务断了status会有值
|
||||
Integer errcode = (Integer) jsonObject.get("errcode");
|
||||
if (errcode == 0) {
|
||||
String access_token = (String) jsonObject.get("access_token");
|
||||
return access_token;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
*/
|
||||
public static void sendMessage() {
|
||||
// Map map = new HashMap();
|
||||
// map.put("touser", "liwenlong");
|
||||
// map.put("toparty", "@all");
|
||||
// map.put("totag", "@all");
|
||||
// map.put("msgtype", "text");
|
||||
// map.put("agentid", "1000003");
|
||||
// Map map1 = new HashMap();
|
||||
// map1.put("content", "测试消息同步肯定接口接口的肌肤的接口的加快进度看即可当借款方的接口接口对接付款即可 肯德基咖啡机 就连接口对接发空间打开健康的风景\n软云");
|
||||
// map.put("text", map1);
|
||||
// String s = JSONObject.toJSONString(map);
|
||||
// String result = HttpRequest.post("https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" + getToken()+"&debug=1")
|
||||
// .header("Content-Type", "application/json;charset=utf-8")
|
||||
// .body(s).execute().body();
|
||||
// System.err.println(result);
|
||||
// JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
// Integer errcode = (Integer) jsonObject.get("errcode");
|
||||
// if (errcode == 0) {
|
||||
// System.out.println("消息发送成功");
|
||||
// }
|
||||
|
||||
// //根据手机号获取userid
|
||||
Map map = new HashMap();
|
||||
map.put("mobile", "15855540307");
|
||||
String body = HttpRequest.post("https://qyapi.weixin.qq.com/cgi-bin/user/getuserid?access_token=" + getToken() + "&debug=1")
|
||||
.header("Content-Type", "application/json;charset=utf-8")
|
||||
.body(JSONObject.toJSONString(map)).execute().body();
|
||||
System.out.println(body);
|
||||
|
||||
// //根据邮箱获取userid
|
||||
// Map map = new HashMap();
|
||||
// map.put("email", "3350632748@qq.com");
|
||||
// map.put("email_type", 1);
|
||||
// String body = HttpRequest.post("https://qyapi.weixin.qq.com/cgi-bin/user/get_userid_by_email?access_token=" + getToken() + "&debug=1")
|
||||
// .header("Content-Type", "application/json;charset=utf-8")
|
||||
// .body(JSONObject.toJSONString(map)).execute().body();
|
||||
// System.out.println(body);
|
||||
|
||||
|
||||
// //获取用户列表
|
||||
// Map map = new HashMap();
|
||||
// map.put("cursor", "");
|
||||
// map.put("limit", 10000);
|
||||
// String body = HttpRequest.post("https://qyapi.weixin.qq.com/cgi-bin/user/list_id?access_token=" + getToken() + "&debug=1")
|
||||
// .header("Content-Type", "application/json;charset=utf-8")
|
||||
// .body(JSONObject.toJSONString(map)).execute().body();
|
||||
// System.out.println(body);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/weCom")
|
||||
@ApiOperation(value = "企业微信回调地址", notes = "企业微信回调地址")
|
||||
public Object weCom(HttpServletRequest request, @RequestBody(required = false) String body) {
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
String jsonstring = JSONObject.toJSONString(parameterMap);
|
||||
log.info("企业微信回调参数:{}, 解析参数:{}", jsonstring, body);
|
||||
if (body == null) {
|
||||
return verificationUrl(request);
|
||||
}
|
||||
Map<String, String> resultMap = getRequestParameter(request, body);
|
||||
System.out.println(resultMap);
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
||||
public Object verificationUrl(HttpServletRequest request) {
|
||||
String signature = request.getParameter("msg_signature");
|
||||
String timestamp = request.getParameter("timestamp");
|
||||
String nonce = request.getParameter("nonce");
|
||||
String echostr = request.getParameter("echostr");
|
||||
// 验证完整性
|
||||
log.info("=========验证URL有效性开始=========");
|
||||
String sEchostr; //需要返回的明文
|
||||
try {
|
||||
WXBizMsgCrypt wxcpt = new WXBizMsgCrypt("token", "aeskey", "id");
|
||||
log.info("企业微信加密签名:{},时间戳:{},随机数:{},加密的字符串:{}", signature, timestamp, nonce, echostr);
|
||||
sEchostr = wxcpt.VerifyURL(signature, timestamp, nonce, echostr);
|
||||
log.info("给企业微信返回的明文,{}", sEchostr);
|
||||
log.info("=========验证URL有效性结束=========");
|
||||
return sEchostr;
|
||||
} catch (AesException e) {
|
||||
log.error("验证URL失败,错误原因请査看异常:{}", e.getCode());
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String> getRequestParameter(HttpServletRequest request, String body) {
|
||||
log.info("=========参数解析开始=====");
|
||||
Map<String, String> resultMap = new HashMap<>(16);
|
||||
try {
|
||||
WXBizMsgCrypt wxcpt = new WXBizMsgCrypt("token", "aesKey", "id");
|
||||
String msgSignature = request.getParameter("msg_signature");
|
||||
String timestamp = request.getParameter("timestamp");
|
||||
String nonce = request.getParameter("nonce");
|
||||
log.info("企业微信加密签名:{},时间戳:{},随机数:{}", msgSignature, timestamp, nonce);
|
||||
String sMsg = wxcpt.DecryptMsg(msgSignature, timestamp, nonce, body);
|
||||
ConstantUtil.parseXmlToMap(sMsg, resultMap);
|
||||
log.info("decrypt密文转为map结果为{}", resultMap);
|
||||
log.info("=========参数解析结束=========");
|
||||
} catch (AesException e) {
|
||||
log.error("密文参数解析失败,错误原因请査看异常:{}", e.getMessage());
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.utils.captcha.ImgVerifyCode;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 图形验证码
|
||||
* @author funcong
|
||||
* @create 2021/5/4
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/captcha")
|
||||
@Api(tags = "图形验证码")
|
||||
public class AppCaptchaController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
/**
|
||||
* 获取图形验证码
|
||||
* @param response
|
||||
* @param key
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/captcha", method = RequestMethod.POST)
|
||||
public void appCaptcha(HttpServletResponse response,
|
||||
@RequestParam("key") @NotNull(message = "key不能为空") String key) throws Exception {
|
||||
ImgVerifyCode ivc = new ImgVerifyCode(); //使用验证码类,生成验证码类对象
|
||||
BufferedImage image = ivc.getImage(); //获取验证码
|
||||
ivc.output(image, response.getOutputStream());//将验证码图片响应给客户端
|
||||
redisTemplate.opsForValue().set(key, ivc.getText(), 3, TimeUnit.MINUTES);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2020/9/17 10:32
|
||||
*/
|
||||
@Data
|
||||
public class AddUserWithdrawalWayReq {
|
||||
|
||||
|
||||
/**
|
||||
* 平台提现方式Id
|
||||
*/
|
||||
@NotNull(message = "平台提现方式不可为空")
|
||||
private Long pfWayId;
|
||||
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@NotBlank(message = "联系人不可为空")
|
||||
private String linkman;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@NotBlank(message = "联系方式不可为空")
|
||||
private String contactWay;
|
||||
|
||||
/**
|
||||
* 提现账户
|
||||
*/
|
||||
@NotBlank(message = "提现账户不可为空")
|
||||
private String cashAccount;
|
||||
|
||||
/**
|
||||
* 是否默认1:非默认 2:默认,
|
||||
*/
|
||||
@NotNull(message = "请确认是否为默认选中")
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 区号
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
|
||||
/**
|
||||
* 开户支行
|
||||
*/
|
||||
private String accountOpeningSubBranch;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class AddressInsertReq {
|
||||
|
||||
/**
|
||||
* 收货人姓名
|
||||
*/
|
||||
@NotBlank(message = "收货人姓名不能为空")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 收货人联系方式
|
||||
*/
|
||||
@NotBlank(message = "收货人联系方式不能为空")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 省份名称
|
||||
*/
|
||||
@NotBlank(message = "省份不能为空")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市名称
|
||||
*/
|
||||
@NotBlank(message = "城市不能为空")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
@NotBlank(message = "区域不能为空")
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
|
||||
/**
|
||||
* 是否默认 1不是 2 默认
|
||||
*/
|
||||
@NotNull(message = "是否默认不能为空")
|
||||
private Integer isDefault;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class AddressUpdateReq {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 收货人姓名
|
||||
*/
|
||||
@NotBlank(message = "收货人姓名不能为空")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 收货人联系方式
|
||||
*/
|
||||
@NotBlank(message = "收货人联系方式不能为空")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 省份名称
|
||||
*/
|
||||
@NotBlank(message = "省份不能为空")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市名称
|
||||
*/
|
||||
@NotBlank(message = "城市不能为空")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
@NotBlank(message = "区域不能为空")
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
*/
|
||||
@NotNull(message = "是否默认不能为空")
|
||||
private Integer isDefault;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/4/11 10:07
|
||||
*/
|
||||
@Data
|
||||
public class AppMessageReadOrDeleteReq {
|
||||
|
||||
@NotNull(message = "类型不能为空")
|
||||
@ApiModelProperty(value = "1 标记已读 2 删除消息")
|
||||
private Integer type;
|
||||
|
||||
@NotNull(message = "系统消息id不能为空")
|
||||
@ApiModelProperty(value = "系统消息id 集合 为空删除全部")
|
||||
private List<Long> ids;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BankCardAddReq {
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String openingBranch;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String fullName;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("是否默认1否;2 是 目前不用")
|
||||
private Long isDefault;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BankCardEditReq {
|
||||
|
||||
@ApiModelProperty("租户号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String openingBranch;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String fullName;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("是否默认1否;2 是 目前不用")
|
||||
private Long isDefault;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BankCardPageReq extends PageBasic {
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/4/3 9:02
|
||||
*/
|
||||
@Data
|
||||
public class BlockPageReq extends PageBasic {
|
||||
|
||||
|
||||
/**
|
||||
* 1 用户 2 商家
|
||||
*/
|
||||
private Integer otherUserType;
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long otherUserId;
|
||||
|
||||
@ApiModelProperty("关键字")
|
||||
private String keyword;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/14 9:19
|
||||
*/
|
||||
@Data
|
||||
public class BlockUserReq {
|
||||
|
||||
/**
|
||||
* 拉黑用户类型
|
||||
*/
|
||||
@NotNull(message = "拉黑用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 拉黑用户id
|
||||
*/
|
||||
@NotNull(message = "拉黑用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CanReceivePageReq extends PageBasic {
|
||||
|
||||
|
||||
private Integer type;//优惠券状态类型 1 待领取 2 已领取
|
||||
|
||||
private Integer couponType;//优惠券类型 1 平台 2 商家
|
||||
|
||||
private Long storeId;//商家id
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/1/10 14:59
|
||||
*/
|
||||
@Data
|
||||
public class CertiApplyReq {
|
||||
|
||||
private Integer type;// 1代理认证 2 企业代理认证
|
||||
|
||||
|
||||
/**
|
||||
* 代理认证
|
||||
*/
|
||||
private String name;//真实姓名
|
||||
|
||||
private String idcardNo;//身份证号
|
||||
|
||||
private String mobile;//手机号码
|
||||
|
||||
private String idFront;//身份证正面
|
||||
|
||||
private String idBack;//身份证反面
|
||||
|
||||
private Date hrBeginTime;//从事HR时间
|
||||
|
||||
private String goodIndustry;//擅长行业
|
||||
|
||||
private String address;//所在地
|
||||
|
||||
|
||||
/**
|
||||
* 企业代理认证
|
||||
*/
|
||||
private String enterpriseName;//企业名称
|
||||
|
||||
private String linkname;//联系人
|
||||
|
||||
private String linkMobile;//电话
|
||||
|
||||
private String businessLicense;//营业执照
|
||||
|
||||
private String incumbencyCertificate;//在职证明
|
||||
|
||||
private String certificationContract;//认证合同
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
*/
|
||||
@Data
|
||||
public class ChangeBindingMobileReq {
|
||||
|
||||
@NotEmpty(message = "旧手机号不能为空")
|
||||
private String oldMobile; //旧手机号
|
||||
|
||||
|
||||
private String areaCode = "+86";
|
||||
@NotEmpty(message = "新手机号不能为空")
|
||||
private String newMobile;//新手机号
|
||||
|
||||
@NotEmpty(message = "验证码不能为空")
|
||||
private String newCode;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
*/
|
||||
@Data
|
||||
public class CheckOldMobileReq {
|
||||
|
||||
|
||||
private String areaCode = "+86";
|
||||
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
private String oldMobile;//旧手机号
|
||||
|
||||
@NotEmpty(message = "验证码不能为空")
|
||||
private String oldCode;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/16 14:10
|
||||
*/
|
||||
@Data
|
||||
public class CollectObjectReq {
|
||||
|
||||
@ApiModelProperty("收藏类型 1作品 2 动态 3资讯 4新闻")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("收藏对象id")
|
||||
private Long objectId;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/16 14:09
|
||||
*/
|
||||
@Data
|
||||
public class CollectPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("收藏类型 1作品 2 动态")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("分类id")
|
||||
private Long typeId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "用户类型 1 用户 对应枚举 UserEnums")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("排序方式 1 最新 2 点赞最多 3 评论最多")
|
||||
private Integer orderSort;
|
||||
|
||||
@ApiModelProperty(value = "作品绑定的分类ids")
|
||||
private List<Long> typeIds;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽的帖子")
|
||||
private List<Long> shieldPostIdList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽的作品")
|
||||
private List<Long> shieldWorksIdList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/20 17:11
|
||||
*/
|
||||
@Data
|
||||
public class CustomerPageReq extends PageBasic {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "1粉丝")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DialoguePageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("评论id")
|
||||
private Long commentId;
|
||||
|
||||
@ApiModelProperty("上级评论id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("排序 1时间 2热度")
|
||||
private Integer sortType;
|
||||
|
||||
@ApiModelProperty(value = "1升序 2 降序")
|
||||
private Integer isAsc;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2020/9/17 10:32
|
||||
*/
|
||||
@Data
|
||||
public class EditUserWithdrawalWayReq {
|
||||
@NotNull(message = "用户提现方式不可为空")
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "平台提现方式不可为空")
|
||||
private Long pfWayId;
|
||||
|
||||
@NotBlank(message = "联系人不可为空")
|
||||
private String linkman;
|
||||
|
||||
@NotBlank(message = "联系方式不可为空")
|
||||
private String contactWay;
|
||||
|
||||
@NotBlank(message = "提现账户不可为空")
|
||||
private String cashAccount;
|
||||
/**
|
||||
* 是否默认2:默认,1:非默认
|
||||
*/
|
||||
@NotNull(message = "请确认是否为默认选中")
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 开户支行
|
||||
*/
|
||||
@NotNull(message = "开户支行不可为空")
|
||||
private String accountOpeningSubBranch;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/14 9:19
|
||||
*/
|
||||
@Data
|
||||
public class EvaluatePageReq extends PageBasic {
|
||||
private Integer hasImage;//1有图 2 无图
|
||||
|
||||
private Integer objectType;//查询主体类型 1 商家 2 商品
|
||||
|
||||
private Long objectId;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
* @Date 2022/1/14 9:19
|
||||
*/
|
||||
@Data
|
||||
public class FollowUserReq {
|
||||
|
||||
|
||||
/**
|
||||
* 关注用户类型
|
||||
*/
|
||||
@NotNull(message = "关注用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 关注用户id
|
||||
*/
|
||||
@NotNull(message = "关注用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/15 14:02
|
||||
*/
|
||||
@Data
|
||||
public class FollowerPageByOther extends PageBasic {
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("排序类型 1最新发布广场 2")
|
||||
private Integer sortType;
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/8 17:08
|
||||
*/
|
||||
@Data
|
||||
public class IllegalDeductionPageReq extends PageBasic {
|
||||
|
||||
private Integer type;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class LoginReqVo {
|
||||
|
||||
/**
|
||||
* 登录方式 1 验证码 2 密码 3 一键登录 4 微信登录 5 小程序登录 6 苹果登录
|
||||
*/
|
||||
@NotNull(message = "登入方式不能为空")
|
||||
private Integer type;
|
||||
|
||||
|
||||
/**
|
||||
* 用户类型 1设计师 2表现师 3销售(推广员)
|
||||
*/
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
*账号
|
||||
*/
|
||||
private String account;
|
||||
|
||||
|
||||
/**
|
||||
* 区号(选填 默认 +86)
|
||||
*/
|
||||
private String areaCode = "+86";
|
||||
|
||||
/**
|
||||
*手机号(选填 账号与手机号一致时,不用传)
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 密码登录
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 一键登录时手机号加密字符串
|
||||
*/
|
||||
private String loginToken;
|
||||
|
||||
private String clientId; //个推
|
||||
|
||||
private String invitationCode;//邀请码
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/4/11 10:08
|
||||
*/
|
||||
@Data
|
||||
public class MessageReadOrDeleteReq {
|
||||
|
||||
/**
|
||||
* 1 标记已读 2 删除消息
|
||||
*/
|
||||
@NotNull(message = "类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 消息id 集合 为空删除全部
|
||||
*/
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
private Integer orderType;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/18 18:21
|
||||
*/
|
||||
@Data
|
||||
public class MonthReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date endTime;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/14 9:17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PageVO {
|
||||
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
private Integer pageSize;
|
||||
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
private Integer pageNo;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2022/8/5 13:38
|
||||
*/
|
||||
@Data
|
||||
public class RechargeBondReq {
|
||||
|
||||
private Integer payType;
|
||||
|
||||
private BigDecimal price;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author liuyao
|
||||
*/
|
||||
@Data
|
||||
public class RechargeCoinReq {
|
||||
|
||||
@NotBlank(message = "充值金额不能为空")
|
||||
private String rechargeId;
|
||||
|
||||
/**
|
||||
* 支付方式 1 支付宝 2 微信 3 苹果
|
||||
*/
|
||||
@NotNull(message = "支付方式不能为空")
|
||||
private Integer payType;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class RechargeOrderReq {
|
||||
|
||||
|
||||
/**
|
||||
* @see com.ruoyi.pay.enums.PayEnums
|
||||
*/
|
||||
@ApiModelProperty(value = "支付类型")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty(value = "充值包id")
|
||||
private Long rechargeCoinId;
|
||||
|
||||
@ApiModelProperty(value = "充值金额(自定义)")
|
||||
private BigDecimal amount;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class RegisterUserReq {
|
||||
|
||||
|
||||
/**
|
||||
* 用户类型 1设计师 2表现师 3销售(推广员)
|
||||
*/
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
@NotBlank(message = "账号不能为空")
|
||||
private String account;
|
||||
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空")
|
||||
private String pwd;
|
||||
|
||||
|
||||
/**
|
||||
* 手机id
|
||||
*/
|
||||
private String clientId;
|
||||
|
||||
|
||||
/**
|
||||
* 区号
|
||||
*/
|
||||
private String areaCode = "+86";
|
||||
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 邀请码
|
||||
*/
|
||||
private String invitationCode;
|
||||
|
||||
/**
|
||||
* 邀请码来源 1 设计师 2表现师 3 销售
|
||||
*/
|
||||
private Integer inviteSource;
|
||||
|
||||
public RegisterUserReq(){
|
||||
}
|
||||
|
||||
public RegisterUserReq(LoginReqVo req){
|
||||
this.userType = req.getUserType();
|
||||
this.areaCode = req.getAreaCode();
|
||||
this.mobile = req.getMobile();
|
||||
this.clientId = req.getClientId();
|
||||
this.account = req.getAccount();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/17 14:30
|
||||
*/
|
||||
@Data
|
||||
public class ReportReq {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "用户类型 1 用户 对应枚举 UserEnums")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "举报原因")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String images;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/20 9:33
|
||||
*/
|
||||
@Data
|
||||
public class SaleDetailPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date endTime;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/19 10:06
|
||||
*/
|
||||
@Data
|
||||
public class SaleUserPageReq extends PageBasic {
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/4/3 9:36
|
||||
*/
|
||||
@Data
|
||||
public class ShieldPageReq extends PageBasic {
|
||||
|
||||
/**
|
||||
* 1 用户 2 商家
|
||||
*/
|
||||
private Integer otherUserType;
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long otherUserId;
|
||||
|
||||
@ApiModelProperty("关键字")
|
||||
private String keyword;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/4/3 9:34
|
||||
*/
|
||||
@Data
|
||||
public class ShieldUserReq {
|
||||
|
||||
/**
|
||||
* 屏蔽用户类型
|
||||
*/
|
||||
@NotNull(message = "屏蔽用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 屏蔽用户id
|
||||
*/
|
||||
@NotNull(message = "屏蔽用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/17 18:27
|
||||
*/
|
||||
@Data
|
||||
public class StorePageReq extends PageBasic {
|
||||
|
||||
|
||||
@ApiModelProperty("类型 1推荐榜(默认) 2订单数量榜 3金额榜 4好评榜")
|
||||
private Integer type = 1;
|
||||
|
||||
@ApiModelProperty("是否是企业: 1不是 2是")
|
||||
private Integer isWorkingDrawing = 1;
|
||||
|
||||
@ApiModelProperty("类型 1施工图 2景观 3 设计")
|
||||
private Integer enterpriseType;
|
||||
|
||||
@ApiModelProperty("擅长领域")
|
||||
private String specialityArea ;
|
||||
|
||||
@ApiModelProperty("是否高端认证:1:普通技术 2高端技术")
|
||||
private Integer ifHighend;
|
||||
|
||||
@ApiModelProperty("在线状态;1:在线,2离线")
|
||||
private Integer onlineStatus;
|
||||
|
||||
@ApiModelProperty("所属区域")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty("从业年限范围")
|
||||
private String yearRange;
|
||||
|
||||
@ApiModelProperty("从业年限范围")
|
||||
private Integer minYear;
|
||||
|
||||
@ApiModelProperty("从业年限范围")
|
||||
private Integer maxYear;
|
||||
|
||||
|
||||
@ApiModelProperty("type=1 时 按照字典配置权重进行先后排序sql")
|
||||
private String sortSql;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty("用户ids")
|
||||
@TableField(exist = false)
|
||||
private List<Long> userIds;
|
||||
|
||||
@ApiModelProperty("工种")
|
||||
private String branchWork;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2020/9/16 11:16
|
||||
*/
|
||||
@Data
|
||||
public class UserEditPwdLoginReq {
|
||||
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;//用户类型 1 用户 2 代理商 3 企业
|
||||
|
||||
@NotBlank(message = "密码不可为空")
|
||||
private String pwd;
|
||||
|
||||
private String oldPwd;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/1/6 10:15
|
||||
*/
|
||||
@Data
|
||||
public class UserEditReqVo {
|
||||
|
||||
private String nickname;//编号
|
||||
|
||||
private String avatar;//头像
|
||||
|
||||
private String name;//昵称
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String sex;
|
||||
|
||||
|
||||
private String enterDate;//入行时间
|
||||
|
||||
|
||||
private String workYear;//从业年限
|
||||
|
||||
private String area;//所属区域
|
||||
|
||||
|
||||
private String mobile;//手机号
|
||||
|
||||
private String signature;//个签
|
||||
|
||||
|
||||
|
||||
private Date workTime;//参加工作时间
|
||||
|
||||
private Date birthday;//出生年月
|
||||
|
||||
private String education;//学历
|
||||
|
||||
private Integer closeMessage; //推送是否关闭 1 关闭 2 不关闭
|
||||
|
||||
|
||||
@ApiModelProperty(value = "背景图")
|
||||
private String backgroundImage;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "曾经任职公司")
|
||||
private String onceWorkCompanys;
|
||||
|
||||
|
||||
@ApiModelProperty("擅长领域")
|
||||
private String specialityArea;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2020/9/16 11:16
|
||||
*/
|
||||
@Data
|
||||
public class UserForgetPwdLoginReq {
|
||||
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;//用户类型 1 用户 2 商家
|
||||
|
||||
private String areaCode = "+86";
|
||||
|
||||
@NotBlank(message = "手机号不可为空")
|
||||
private String mobile;
|
||||
@NotBlank(message = "密码不可为空")
|
||||
private String pwd;
|
||||
@NotBlank(message = "验证码不可为空")
|
||||
private String code;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/18 18:21
|
||||
*/
|
||||
@Data
|
||||
public class WalletPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty(value = "类型 1收入 2支出 3充值 4 抵扣金")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date endTime;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2020/9/17 10:32
|
||||
*/
|
||||
@Data
|
||||
public class WithApplyReq {
|
||||
|
||||
|
||||
@NotNull(message = "提现金额不可为空")
|
||||
@ApiModelProperty(value = "提现金额", required = true)
|
||||
private BigDecimal amount;
|
||||
|
||||
// @NotNull(message = "提现方式不可为空")
|
||||
// @ApiModelProperty(value = "提现方式", required = true)
|
||||
private Long userWWayId;
|
||||
|
||||
@ApiModelProperty(value = "提现密码")
|
||||
private String payPwd;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("用户银行卡id")
|
||||
private Long bankCardId;
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String subbranch;
|
||||
|
||||
@ApiModelProperty("银行卡")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String fullName;
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
private Integer userType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class WithdrawalRecordPageReq {
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date endTime;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorksPageReq {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 作品分类id
|
||||
*/
|
||||
private Long postClassifyId;
|
||||
|
||||
/**
|
||||
* 关键字搜索 (技术称呼 - 技术的名称, 作品名称 , 论坛标题)
|
||||
*/
|
||||
private String keyword;
|
||||
|
||||
/**
|
||||
* 表现师id
|
||||
*/
|
||||
private Long storeId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BankCardDetailResp {
|
||||
|
||||
@ApiModelProperty("租户号")
|
||||
private Long id;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("删除状态 1 正常 2 删除 3 禁用")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String openingBranch;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String fullName;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("是否默认1否;2 是 目前不用")
|
||||
private Long isDefault;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.CreateTime;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BankCardPageResp {
|
||||
|
||||
@ApiModelProperty("租户号")
|
||||
private Long id;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("删除状态 1 正常 2 删除 3 禁用")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String openingBranch;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String fullName;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("是否默认1否;2 是 目前不用")
|
||||
private Long isDefault;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/4/3 9:16
|
||||
*/
|
||||
@Data
|
||||
public class BlockPageResp {
|
||||
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 被拉黑用户id
|
||||
*/
|
||||
private Long blockUserId;
|
||||
/**
|
||||
* 被拉黑用户类型 1 用户 2 商家
|
||||
*/
|
||||
private Integer blockUserType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 拉黑用户昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 拉黑用户头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 是否拉黑 1 没有 2 拉黑
|
||||
*/
|
||||
private Integer isBlock;
|
||||
|
||||
private UserInfo userInfo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/15 15:03
|
||||
*/
|
||||
@Data
|
||||
public class CanReceivePageVO {
|
||||
private Long couponId;//平台优惠券id
|
||||
private Long customerCouponId;//用户优惠券id
|
||||
private String title;//优惠券名称
|
||||
private Date beginTime;
|
||||
private Date endTime;
|
||||
private Integer hasReceive;//是否已经领取 1 领取了 2 没有
|
||||
private Integer canReceiveTimes;//还可以领取几次
|
||||
private Integer type;//优惠券类型 1 满减 2 打折,3 直减和4 直接打折【不需要满足什么条件】
|
||||
private BigDecimal fullPrice;//满xx
|
||||
private BigDecimal minusPrice;//减xx
|
||||
private BigDecimal ratio;
|
||||
private Integer timeType;
|
||||
private Integer days;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/29 20:01
|
||||
*/
|
||||
@Data
|
||||
public class CommentNum {
|
||||
|
||||
private Long linkId;
|
||||
|
||||
private Long postId;
|
||||
|
||||
private Long worksId;
|
||||
|
||||
private Long voteId;
|
||||
|
||||
private Integer commentNum;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class CommentResp {
|
||||
|
||||
|
||||
/**
|
||||
* 评论id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 上级评论id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
private Integer likeNum;
|
||||
|
||||
/**
|
||||
* 评论数
|
||||
*/
|
||||
private Integer commentNum;
|
||||
|
||||
/**
|
||||
* 是否点赞1没有 2点赞
|
||||
*/
|
||||
private Integer isLike;
|
||||
|
||||
/**
|
||||
* 评论人昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 评论人用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
|
||||
/**
|
||||
* 评论人用户类型 1 设计师 2 表现师
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 评论人头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 上级评论用户id
|
||||
*/
|
||||
private Long parentUserId;
|
||||
|
||||
/**
|
||||
* 评论人用户类型 1 设计师 2 表现师
|
||||
*/
|
||||
private Integer parentUserType;
|
||||
|
||||
/**
|
||||
* 上级评论用户名称
|
||||
*/
|
||||
private String parentUserName;
|
||||
|
||||
|
||||
/**
|
||||
* 上级评论用户头像
|
||||
*/
|
||||
private String parentAvatar;
|
||||
|
||||
|
||||
/**
|
||||
* 评论时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String image;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
* @Date 2022/1/15 14:04
|
||||
*/
|
||||
@Data
|
||||
public class FollowPageResp {
|
||||
|
||||
/**
|
||||
* 关注id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 被关注用户类型
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 被关注用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 关注时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
private UserInfo userInfo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class GoeasyResult {
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String content;
|
||||
|
||||
public GoeasyResult() {
|
||||
}
|
||||
|
||||
public GoeasyResult(Integer code,String content) {
|
||||
this.content = content;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static GoeasyResult success() {
|
||||
return new GoeasyResult(200,"success");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/8 17:08
|
||||
*/
|
||||
@Data
|
||||
public class IllegalDeductionPageResp {
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("删除标志 1正常 删除 3 禁用")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("提现记录id")
|
||||
@Excel(name = "提现记录id")
|
||||
private Long withdrawalRecordId;
|
||||
|
||||
@ApiModelProperty("表现师id")
|
||||
@Excel(name = "表现师id")
|
||||
private Long storeId;
|
||||
|
||||
@ApiModelProperty("类型 1平台手动添加 2 平台手动扣除 3提现抵消 4提现失败返还")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("数值")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty("当前扣款金额")
|
||||
private BigDecimal currentPrice;
|
||||
|
||||
@ApiModelProperty("类型 1平台手动添加 2 平台手动扣除 3提现抵消 4提现失败返还")
|
||||
private String record;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/29 17:32
|
||||
*/
|
||||
@Data
|
||||
public class IntegralPageResp {
|
||||
|
||||
@ApiModelProperty("租户号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("积分")
|
||||
private BigDecimal integral;
|
||||
|
||||
@ApiModelProperty("积分余额")
|
||||
private BigDecimal currentBalance;
|
||||
|
||||
@ApiModelProperty("记录类型")
|
||||
private Integer record;
|
||||
|
||||
@ApiModelProperty("记录类型")
|
||||
private String recordName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/19 9:51
|
||||
*/
|
||||
@Data
|
||||
public class RankingResp {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "推广员id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "排名")
|
||||
private Integer ranking;
|
||||
|
||||
@ApiModelProperty(value = "佣金收益")
|
||||
private BigDecimal income;
|
||||
|
||||
@ApiModelProperty(value = "推广人数")
|
||||
private Integer inviteNum;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/4/17 10:42
|
||||
*/
|
||||
@Data
|
||||
public class RefereeUserPageResp {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = " 昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "用户类型")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "等级图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "镶边类型 1 不镶边 2 镶银边 3 镶金边")
|
||||
private Integer edgePipingType;
|
||||
|
||||
@ApiModelProperty("从业时间")
|
||||
private Date practiceDate;
|
||||
|
||||
@ApiModelProperty("擅长领域")
|
||||
private String specialityArea;
|
||||
|
||||
@ApiModelProperty("区域")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty("用户信息")
|
||||
private UserInfo userInfo;
|
||||
|
||||
@ApiModelProperty(value = "排名")
|
||||
private Integer ranking;
|
||||
|
||||
@ApiModelProperty(value = "累计积分收益")
|
||||
private BigDecimal integral;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/28 18:57
|
||||
*/
|
||||
@Data
|
||||
public class SaleDataResp {
|
||||
|
||||
@ApiModelProperty(value = "客户数")
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty(value = "累计金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty(value = "累计佣金")
|
||||
private BigDecimal income;
|
||||
|
||||
@ApiModelProperty(value = "余额")
|
||||
private BigDecimal balance;
|
||||
|
||||
@ApiModelProperty(value = "可提现金额")
|
||||
private BigDecimal withdrawableAmount;
|
||||
|
||||
@ApiModelProperty(value = "已提现金额")
|
||||
private BigDecimal withdrawnAmount;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/20 9:34
|
||||
*/
|
||||
@Data
|
||||
public class SaleDetailPageResp {
|
||||
|
||||
|
||||
@ApiModelProperty("租户号")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("删除标志;1 正常 2 删除 3 禁用")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("订单标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("素材")
|
||||
private String sourceMaterial;
|
||||
|
||||
@ApiModelProperty("订单金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("实际支付金额")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@ApiModelProperty("提出改价的用户身份 1 设计师 2 表现师")
|
||||
private Integer changeUserType;
|
||||
|
||||
@ApiModelProperty("改价状态 1 待确认 2 已确认")
|
||||
@Excel(name = "改价状态 1 待确认 2 已确认")
|
||||
private Integer changeStatus;
|
||||
|
||||
@ApiModelProperty("对图时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private Date confirmDate;
|
||||
|
||||
@ApiModelProperty("设计师id")
|
||||
private Long customerId;
|
||||
|
||||
@ApiModelProperty("表现师id")
|
||||
private Long storeId;
|
||||
|
||||
@ApiModelProperty("内容")
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty("订单状态;-1 已取消 1待确认 2进行中 3待收图 4待评价 5已评价 ")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("首款")
|
||||
private BigDecimal firstPrice;
|
||||
@ApiModelProperty("支付状态 1 未支付 2 已支付")
|
||||
private Integer firstStatus;
|
||||
|
||||
@ApiModelProperty("图纸张数")
|
||||
private Integer drawingNum;
|
||||
|
||||
@ApiModelProperty("订单来源 1 设计师自己下单 2 表现师帮设计师下单")
|
||||
private Integer sourceUserType;
|
||||
|
||||
@ApiModelProperty("作品类型名称")
|
||||
private String worksTypeName;
|
||||
|
||||
@ApiModelProperty("用户(设计师)信息")
|
||||
private UserInfo customerInfo;
|
||||
|
||||
@ApiModelProperty("表现师信息")
|
||||
private UserInfo storeInfo;
|
||||
|
||||
@ApiModelProperty("申诉状态;1无申诉 2申诉中 3申诉完成")
|
||||
private String appealStatus;
|
||||
|
||||
@ApiModelProperty("申诉id")
|
||||
private Long appealId;
|
||||
|
||||
@ApiModelProperty("申请用户类型 1 设计师 2 表现师")
|
||||
@Excel(name = "申请用户类型 1 设计师 2 表现师")
|
||||
private Integer appealUserType;
|
||||
|
||||
@ApiModelProperty("是否可以接单 1 不可以 2 可以")
|
||||
private Integer isReceivingOrder = 1;
|
||||
|
||||
@ApiModelProperty("1 普通 2 高端 3酷家乐")
|
||||
private Integer ifHighend;
|
||||
|
||||
|
||||
@ApiModelProperty("收益")
|
||||
private BigDecimal saleAmount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/19 10:06
|
||||
*/
|
||||
@Data
|
||||
public class SaleUserPageResp {
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "是否高端认证 1 没有 2认证")
|
||||
private Integer ifHighend;
|
||||
|
||||
@ApiModelProperty(value = "等级图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "镶边类型 1 不镶边 2 镶银边 3 镶金边")
|
||||
private Integer edgePipingType;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/4/3 9:41
|
||||
*/
|
||||
@Data
|
||||
public class ShieldPageResp {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 被屏蔽用户id
|
||||
*/
|
||||
private Long shieldUserId;
|
||||
/**
|
||||
* 被屏蔽用户类型 1 用户 2 商家
|
||||
*/
|
||||
private Integer shieldUserType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 屏蔽用户昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 屏蔽用户头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 是否屏蔽 1 没有 2 屏蔽
|
||||
*/
|
||||
private Integer isShield;
|
||||
|
||||
private UserInfo userInfo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/17 18:52
|
||||
*/
|
||||
@Data
|
||||
public class StorePageResp {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户类型")
|
||||
private Integer userType = 2;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "绑定企业id")
|
||||
private Long bindEnterpriseId;
|
||||
|
||||
@ApiModelProperty(value = "入行时间")
|
||||
@JsonFormat(pattern = "yyyy")
|
||||
private Date enterDate;
|
||||
|
||||
@ApiModelProperty(value = "所属区域")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty(value = "在线状态;1:在线,2离线")
|
||||
private Integer onlineStatus;
|
||||
|
||||
@ApiModelProperty(value = "在线时长(单位:分钟)")
|
||||
private Integer onlineDuration;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "等级名称")
|
||||
private String levelName;
|
||||
|
||||
@ApiModelProperty(value = "等级图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "镶边类型 1 不镶边 2 镶银边 3 镶金边")
|
||||
private String edgePipingType;
|
||||
|
||||
@ApiModelProperty(value = "评分")
|
||||
private BigDecimal star;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "累计订单数量")
|
||||
private Integer orderNum;
|
||||
|
||||
@ApiModelProperty(value = "累计服务金额")
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
@ApiModelProperty(value = "当月订单数量")
|
||||
private Integer orderMonthNum;
|
||||
|
||||
|
||||
@ApiModelProperty("是否是高端客户 1普通 2 高端 ")
|
||||
private Integer ifHighend;
|
||||
|
||||
@ApiModelProperty("是否关注 1没有 2 关注 ")
|
||||
private Integer isFollow;
|
||||
|
||||
@ApiModelProperty("擅长领域")
|
||||
private String specialityArea;
|
||||
|
||||
@ApiModelProperty(value = "用户信息")
|
||||
private UserInfo userInfo;
|
||||
|
||||
@ApiModelProperty(value = "报价单图片")
|
||||
private String quotationImage;
|
||||
|
||||
@ApiModelProperty(value = "制作周期")
|
||||
private String productionCycle;
|
||||
|
||||
@ApiModelProperty(value = "人数")
|
||||
private String numberPeople;
|
||||
|
||||
@ApiModelProperty(value = "价格定位")
|
||||
private String pricePosition;
|
||||
|
||||
@ApiModelProperty("企业微信号")
|
||||
private String wecom;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* app用户表
|
||||
*
|
||||
* @author 李文龙
|
||||
* @date 2022/01/13 14:17
|
||||
*/
|
||||
@Data
|
||||
public class UserResultInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户类型 1 用户 2 代理商 3 企业")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "用户状态 1 正常 2 禁用")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除标识 1 正常 2 删除 3 禁用")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "登录密码")
|
||||
private String loginPwd;
|
||||
|
||||
@ApiModelProperty(value = "支付密码")
|
||||
private String payPwd;
|
||||
|
||||
@ApiModelProperty(value = "注销时间")
|
||||
private Date cancellationTime;
|
||||
|
||||
@ApiModelProperty(value = "手机id")
|
||||
private String clientId;
|
||||
|
||||
@ApiModelProperty(value = "微信openid")
|
||||
private String wxOpenid;
|
||||
|
||||
@ApiModelProperty(value = "apple_openid")
|
||||
private String appleOpenid;
|
||||
|
||||
@ApiModelProperty(value = "余额")
|
||||
private BigDecimal balance;
|
||||
|
||||
@ApiModelProperty(value = "是否推送关闭 1 关闭 2 不关闭")
|
||||
private Integer closeMessage;
|
||||
|
||||
@ApiModelProperty(value = "性别 S:未知,M:男,F:女")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "评分")
|
||||
private BigDecimal star;
|
||||
|
||||
@ApiModelProperty("是否认证 1 未认证 2 已认证")
|
||||
private Integer isAuth;
|
||||
|
||||
@ApiModelProperty("是否认证 1 未认证高端 2 已认证")
|
||||
private Integer ifHighend;
|
||||
|
||||
@ApiModelProperty(value = "等级名称")
|
||||
private String levelName;
|
||||
|
||||
@ApiModelProperty(value = "等级图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty(value = "镶边类型 1 不镶边 2 镶银边 3 镶金边")
|
||||
private String edgePipingType;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "在线状态;1:在线,2离线")
|
||||
private Integer onlineStatus;
|
||||
|
||||
@ApiModelProperty(value = "在线时长;分钟")
|
||||
private Integer onlineDuration;
|
||||
|
||||
@ApiModelProperty(value = "背景图")
|
||||
private String backgroundImage;
|
||||
|
||||
@ApiModelProperty(value = "用户信息")
|
||||
private UserInfo userInfo;
|
||||
|
||||
@ApiModelProperty(value = "区域")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty(value = "入行时间")
|
||||
@JsonFormat(pattern = "yyyy")
|
||||
private Date enterDate;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@ApiModelProperty(value = "充值抵用金")
|
||||
private BigDecimal giveBalance;
|
||||
|
||||
@ApiModelProperty(value = "积分")
|
||||
private BigDecimal integral;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
*/
|
||||
@Data
|
||||
public class UserWithdrawalWayResp {
|
||||
|
||||
/**
|
||||
* 用户提现方式id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 平台提现id
|
||||
*/
|
||||
private Long ptId;
|
||||
|
||||
/**
|
||||
* 提现账户
|
||||
*/
|
||||
private String cashAccount;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
private String contactWay;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String linkman;
|
||||
|
||||
/**
|
||||
* 提现方式
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 是否默认1否 2 是
|
||||
*/
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
private String areaCode;
|
||||
|
||||
private Integer isBank;
|
||||
|
||||
private String accountOpeningSubBranch;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/3/28 15:42
|
||||
*/
|
||||
@Data
|
||||
public class WalletPageResp {
|
||||
|
||||
|
||||
/**
|
||||
* 钱包记录id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型 具体看 WalletDetailEnums 枚举类
|
||||
*/
|
||||
private Integer recordType;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String record;
|
||||
|
||||
/**
|
||||
* 来源id
|
||||
*/
|
||||
private Long objectId;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
private BigDecimal currentBalance;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 可提现状态 1 不可提现 2 可提现
|
||||
*/
|
||||
private Integer isWithdrawal;
|
||||
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 是否是快捷支付 1是 2 否
|
||||
*/
|
||||
private Integer isOnline;
|
||||
|
||||
/**
|
||||
* 是否是抵用金记录 1是 2 否
|
||||
*/
|
||||
private Integer isGivePay;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.ruoyi.frequency.klkwithdrawalrecord.entity.KlkWithdrawalRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
* @Date 2022/1/17 11:33
|
||||
*/
|
||||
@Data
|
||||
public class WithdrawalRecordPageResp {
|
||||
|
||||
/**
|
||||
* 提现记录id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 提现列表标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String name;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private BigDecimal amount;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private BigDecimal serviceCharge;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 用户备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 转账凭证
|
||||
*/
|
||||
private String transferVoucher;
|
||||
|
||||
|
||||
private String refuseReason;
|
||||
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String subbranch;
|
||||
|
||||
@ApiModelProperty("银行卡")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String fullName;
|
||||
|
||||
@ApiModelProperty("申请时间")
|
||||
private Date applyTime;
|
||||
|
||||
@ApiModelProperty("审核通过时间")
|
||||
private Date processTime;
|
||||
|
||||
@ApiModelProperty("转账完成时间")
|
||||
private Date transferFinishTime;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "扣款金额")
|
||||
private BigDecimal violationDeduction;
|
||||
|
||||
@ApiModelProperty(value = "拉卡拉提现记录")
|
||||
private KlkWithdrawalRecord klkWithdrawalRecord;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.controller.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WithdrawalRecordPageTimeResp {
|
||||
|
||||
@ApiModelProperty("时间日期")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty("收入金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@ApiModelProperty("提现记录")
|
||||
private List<WithdrawalRecordPageResp> withdrawalRecordPageRespList;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 积分记录枚举
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum IntegralDetailEnums {
|
||||
|
||||
/**
|
||||
* 商城订单支付
|
||||
*/
|
||||
ORDER_PAY(1, "订单支付"),
|
||||
/**
|
||||
* 用户分享佣金收益
|
||||
*/
|
||||
SHARE_TEAM_COMMISSION(2, "订单积分"),
|
||||
|
||||
|
||||
/**
|
||||
* 平台转入
|
||||
*/
|
||||
PLAT_ADD(6, "平台转入"),
|
||||
|
||||
/**
|
||||
* 平台扣除
|
||||
*/
|
||||
PLAT_SUB(7, "平台扣除"),
|
||||
|
||||
/**
|
||||
* 邀请注册赠送积分
|
||||
*/
|
||||
REFEREE_SEND(8, "邀请注册赠送积分"),
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
public static String getName(Integer code) {
|
||||
return getIntegralDetailEnums(code).getName();
|
||||
}
|
||||
|
||||
public static IntegralDetailEnums getIntegralDetailEnums(Integer code) {
|
||||
return Arrays.stream(IntegralDetailEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
|
||||
}
|
||||
|
||||
IntegralDetailEnums(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 登陆类型枚举
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum LoginEnums {
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
code_login(1, "验证码"),
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
pwd_login(2, "密码"),
|
||||
|
||||
|
||||
/**
|
||||
* 一键登录
|
||||
*/
|
||||
one_click_login(3, "一键登录"),
|
||||
|
||||
/**
|
||||
* 微信登录
|
||||
*/
|
||||
wechat_login(4, "微信登录"),
|
||||
|
||||
/**
|
||||
* 小程序登录
|
||||
*/
|
||||
applet_login(5, "小程序登录"),
|
||||
|
||||
/**
|
||||
* 苹果登录
|
||||
*/
|
||||
apple_login(6, "苹果登录"),
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
public static String getName(Integer code) {
|
||||
return getLoginEnums(code).name;
|
||||
}
|
||||
|
||||
|
||||
public static LoginEnums getLoginEnums(Integer code) {
|
||||
return Arrays.stream(LoginEnums.values()).filter(c->c.getCode().equals(code)).findAny().get();
|
||||
}
|
||||
|
||||
LoginEnums(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.enums;
|
||||
|
||||
|
||||
import com.ruoyi.common.exception.enums.abs.AbstractBaseExceptionEnum;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2021/11/1 19:34
|
||||
*/
|
||||
public enum MallExceptionEnum implements AbstractBaseExceptionEnum {
|
||||
|
||||
COUPON_RECEIVE_FINISH("优惠券已被领取完"),
|
||||
COUPON_NOT_EXIST("优惠券已被领取完"),
|
||||
|
||||
DELETER_SHOPPING_CAR_ERROR("删除购物车失败"),
|
||||
GOODS_DEL_FLAG("商品已下架"),
|
||||
NOT_STOCK("库存不足"),
|
||||
|
||||
ORDER_STATUS_ERROR( "订单状态错误 请刷新数据"),
|
||||
ORDER_NOT_SEND( "商品未发货 无需申请退货"),
|
||||
|
||||
ORDER_REPEAT_APPLY( "请勿重复申请"),
|
||||
UPDATE_STOREK_ERROR( "修改库存错误"),
|
||||
UPDATE_SALES_ERROR( "修改销量错误"),
|
||||
|
||||
CREATE_ORDER_ERROR( "创建订单失败"),
|
||||
|
||||
ORDER_BE_ROBBED( "订单已被抢"),
|
||||
|
||||
ORDER_NOT_RESERVATION_TIME( "预约时间未到,请勿操作"),
|
||||
|
||||
ORDER_NOT_AUTH_EXCEPTION( "无权限抢单"),
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
private MallExceptionEnum(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
private MallExceptionEnum(String message) {
|
||||
this.code = 500;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 平台流水
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum PlatformRecordEnums {
|
||||
|
||||
|
||||
PLAT_BASE(0, "资金原始金额"),
|
||||
ORDER_PAY(1, "订单首款支付"),
|
||||
|
||||
ORDER_RETURN(2, "订单首款退款"),
|
||||
ORDER_SECOND_PAY(3, "订单尾款支付"),
|
||||
TEAM_COMMISSION(4, "推广员分佣"),
|
||||
STORE_ORDER_INCOME(5, "表现师收益扣除"),
|
||||
PLATFORM_AUTH_PAY(6, "表现师平台认证"),
|
||||
HEIGHT_AUTH_PAY(7, "表现师高端认证"),
|
||||
BOND_PAY(8, "保证金缴纳"),
|
||||
BOND_WITHDRAWAL(9, "保证金提现"),
|
||||
BOND_WITHDRAWAL_RETURN(10, "保证金提现返还"),
|
||||
RECHARGE_BALANCE(11, "设计师充值"),
|
||||
WITH_DEDU(12, "表现师提现"),
|
||||
WITH_FAIL_RETURN(13, "表现师提现返还"),
|
||||
VIOLATION_DEDUCTION(14, "表现师扣款"),
|
||||
VIOLATION_DEDUCTION_RETURN(15, "表现师扣款退回"),
|
||||
PLAT_ADD(16, "平台手动调整余额"),
|
||||
PLAT_SUB(17, "平台手动调整余额"),
|
||||
|
||||
MALL_ORDER_PAY(18, "商城订单支付"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
public static String getName(Integer code) {
|
||||
return getPlatformRecordEnums(code).name;
|
||||
}
|
||||
|
||||
public static PlatformRecordEnums getPlatformRecordEnums(Integer code) {
|
||||
return Arrays.stream(PlatformRecordEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
|
||||
}
|
||||
|
||||
PlatformRecordEnums(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 提现记录枚举
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum WalletDetailEnums {
|
||||
|
||||
/**
|
||||
* 佣金收益(销售佣金)
|
||||
*/
|
||||
TEAM_COMMISSION(1, "佣金收益"),
|
||||
|
||||
/**
|
||||
* 提现申请扣除
|
||||
*/
|
||||
WITH_DEDU(2, "提现申请扣除"),
|
||||
|
||||
/**
|
||||
* 提现失败返还
|
||||
*/
|
||||
WITH_FAIL_RETURN(3, "提现失败返还"),
|
||||
|
||||
/**
|
||||
* 充值余额
|
||||
*/
|
||||
RECHARGE_BALANCE(4, "充值余额"),
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
*/
|
||||
ORDER_PAY(5, "订单支付"),
|
||||
|
||||
/**
|
||||
* 平台转入
|
||||
*/
|
||||
PLAT_ADD(6, "平台转入"),
|
||||
|
||||
/**
|
||||
* 平台扣除
|
||||
*/
|
||||
PLAT_SUB(7, "平台扣除"),
|
||||
|
||||
|
||||
/**
|
||||
* 订单收入(表现师)
|
||||
*/
|
||||
ORDER_INCOME(8, "订单收入"),
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
ORDER_RETURN(9, "订单退款"),
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
*/
|
||||
PLATFORM_AUTH_PAY(10, "平台认证支付"),
|
||||
|
||||
HEIGHT_AUTH_PAY(11, "高端认证支付"),
|
||||
|
||||
BOND_PAY(12, "保证金支付"),
|
||||
|
||||
RECHARGE_GIVE_BALANCE(13, "充值赠送抵用金"),
|
||||
|
||||
ADJUST_PRICE_PAY(14, "订单调价"),
|
||||
|
||||
DEPOSIT_REFUND(15, "定金退还"),
|
||||
|
||||
|
||||
GIVE_ORDER_PAY(16, "抵用金支付"),
|
||||
|
||||
MALL_ORDER_PAY(17, "商城订单支付"),
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
GIVE_ORDER_RETURN(18, "订单退款"),
|
||||
|
||||
/**
|
||||
* 设计师邀请注册赠送抵用金
|
||||
*/
|
||||
GIVE_BALANCE(19, "邀请注册赠送抵用金"),
|
||||
|
||||
BOND_WITHDRAWAL(20, "保证金提现"),
|
||||
|
||||
|
||||
BOND_RECHARGE(21, "保证金充值"),
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
public static String getName(Integer code) {
|
||||
return getWalletDetailEnums(code).name;
|
||||
}
|
||||
|
||||
public static WalletDetailEnums getWalletDetailEnums(Integer code) {
|
||||
return Arrays.stream(WalletDetailEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
|
||||
}
|
||||
|
||||
WalletDetailEnums(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.ruoyi.enums.mallorder;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 商城订单状态枚举
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum MallOrderStatusEnums {
|
||||
|
||||
|
||||
已取消(-1, "取消"),
|
||||
|
||||
待付款(1, "待付款"),
|
||||
|
||||
待发货(2, "待发货"),
|
||||
|
||||
已发货(3, "已发货"),
|
||||
|
||||
已完成(4, "已完成"),
|
||||
|
||||
已到账(5, "已到账"),
|
||||
|
||||
已评价(6, "已评价"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
public static String getName(Integer code) {
|
||||
return getPayEnums(code).name;
|
||||
}
|
||||
|
||||
|
||||
public static MallOrderStatusEnums getPayEnums(Integer code) {
|
||||
return Arrays.stream(MallOrderStatusEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
|
||||
}
|
||||
|
||||
MallOrderStatusEnums(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ruoyi.enums.mallorder;
|
||||
|
||||
/**
|
||||
* 商城订单状态枚举
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum RefundStatusEnums {
|
||||
|
||||
待审核(1, "申请退款退货"),
|
||||
|
||||
商家同意退款退货(2, "商家同意退款退货"),
|
||||
|
||||
用户发货(3, "用户发货"),
|
||||
|
||||
商家确认收货(4, "商家确认收货"),
|
||||
|
||||
商家拒绝退款退货(5, "商家拒绝退款退货"),
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String name;
|
||||
|
||||
public static String getName(Integer code) {
|
||||
for (RefundStatusEnums c : RefundStatusEnums.values()) {
|
||||
if (c.getCode().equals(code)) {
|
||||
return c.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
RefundStatusEnums(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.ruoyi.enums.message;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 系统消息枚举
|
||||
* @Author liwenlong
|
||||
*/
|
||||
public enum AppMessageEnums {
|
||||
|
||||
/**
|
||||
* 系统消息
|
||||
*/
|
||||
APP_MESSAGE(1, "您有新的系统消息",""),
|
||||
|
||||
/**
|
||||
* 平台认证
|
||||
*/
|
||||
AUTH_MESSAGE_SUSESS(2, "平台认证","您的平台认证审核通过"),
|
||||
|
||||
/**
|
||||
* 平台认证
|
||||
*/
|
||||
AUTH_MESSAGE_FAIL(3, "平台认证","您的平台认证审核失败"),
|
||||
|
||||
/**
|
||||
* 提现审核
|
||||
*/
|
||||
WITHDRAWAL_SUCCESS(4, "提现审核","您的提现审核通过"),
|
||||
|
||||
/**
|
||||
* 提现审核
|
||||
*/
|
||||
WITHDRAWAL_FAIL(5, "提现审核","您的提现审核失败"),
|
||||
|
||||
/**
|
||||
* 保证金提现审核
|
||||
*/
|
||||
BOND_WITHDRAWAL_SUCCESS(6, "保证金退还审核","您的保证金退还审核通过"),
|
||||
|
||||
/**
|
||||
* 保证金提现审核
|
||||
*/
|
||||
BOND_WITHDRAWAL_FAIL(7, "保证金退还审核","您的保证金退还审核失败"),
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String title;
|
||||
private final String content;
|
||||
|
||||
public static String getTitle(Integer code) {
|
||||
return getAppMessageEnums(code).title;
|
||||
}
|
||||
|
||||
public static String getContent(Integer code) {
|
||||
return getAppMessageEnums(code).content;
|
||||
}
|
||||
|
||||
public static AppMessageEnums getAppMessageEnums(Integer code) {
|
||||
return Arrays.stream(AppMessageEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
|
||||
}
|
||||
|
||||
AppMessageEnums(Integer code, String title, String content) {
|
||||
this.code = code;
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
AppMessageEnums(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user