mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-06 00:07:34 +00:00
v1.0.3
This commit is contained in:
@@ -6,11 +6,11 @@ package com.xmzs.system.cofing;
|
||||
* @author: wangle
|
||||
* @date: 2023/5/18
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package com.xmzs.system.controller.monitor;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.excel.utils.ExcelUtil;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysOperLogBo;
|
||||
import com.xmzs.system.domain.vo.SysOperLogVo;
|
||||
import com.xmzs.system.service.ISysOperLogService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,22 +2,22 @@ package com.xmzs.system.controller.system;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.excel.utils.ExcelUtil;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysDictDataBo;
|
||||
import com.xmzs.system.domain.vo.SysDictDataVo;
|
||||
import com.xmzs.system.service.ISysDictDataService;
|
||||
import com.xmzs.system.service.ISysDictTypeService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.xmzs.system.controller.system;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysNoticeBo;
|
||||
import com.xmzs.system.domain.vo.SysNoticeVo;
|
||||
import com.xmzs.system.service.ISysNoticeService;
|
||||
|
||||
@@ -5,12 +5,12 @@ import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.common.core.validate.QueryGroup;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.common.idempotent.annotation.RepeatSubmit;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysOssConfigBo;
|
||||
import com.xmzs.system.domain.vo.SysOssConfigVo;
|
||||
import com.xmzs.system.service.ISysOssConfigService;
|
||||
|
||||
@@ -5,11 +5,11 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.core.validate.QueryGroup;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.common.log.annotation.Log;
|
||||
import com.xmzs.common.log.enums.BusinessType;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysOssBo;
|
||||
import com.xmzs.system.domain.vo.SysOssUploadVo;
|
||||
import com.xmzs.system.domain.vo.SysOssVo;
|
||||
|
||||
@@ -3,11 +3,6 @@ package com.xmzs.system.controller.system;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||
import com.baomidou.lock.annotation.Lock4j;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.xmzs.common.core.constant.TenantConstants;
|
||||
import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
@@ -23,15 +18,13 @@ import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysTenantBo;
|
||||
import com.xmzs.system.domain.vo.SysTenantVo;
|
||||
import com.xmzs.system.service.ISysTenantService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -2,14 +2,9 @@ package com.xmzs.system.controller.system;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.secure.BCrypt;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.xmzs.system.domain.request.UserRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.xmzs.common.core.domain.R;
|
||||
import com.xmzs.common.core.domain.model.LoginUser;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
@@ -26,9 +21,12 @@ import com.xmzs.common.tenant.helper.TenantHelper;
|
||||
import com.xmzs.common.web.core.BaseController;
|
||||
import com.xmzs.system.domain.bo.SysDeptBo;
|
||||
import com.xmzs.system.domain.bo.SysUserBo;
|
||||
import com.xmzs.system.domain.request.UserRequest;
|
||||
import com.xmzs.system.domain.vo.*;
|
||||
import com.xmzs.system.listener.SysUserImportListener;
|
||||
import com.xmzs.system.service.*;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.xmzs.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.xmzs.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 支付订单对象 payment_orders
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.xmzs.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 租户套餐对象 sys_tenant_package
|
||||
|
||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.xmzs.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 配音角色对象 voice_role
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("voice_role")
|
||||
public class VoiceRole extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private String voiceId;
|
||||
|
||||
/**
|
||||
* 音频地址
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 音频预处理(实验性)
|
||||
*/
|
||||
private String preProcess;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -5,9 +5,10 @@ import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import com.xmzs.system.domain.ChatMessage;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 聊天消息业务对象 chat_message
|
||||
|
||||
@@ -2,12 +2,14 @@ package com.xmzs.system.domain.bo;
|
||||
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,13 +2,14 @@ package com.xmzs.system.domain.bo;
|
||||
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import com.xmzs.system.domain.SysConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 参数配置业务对象 sys_config
|
||||
|
||||
@@ -2,16 +2,16 @@ package com.xmzs.system.domain.bo;
|
||||
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import com.xmzs.system.domain.SysTenant;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 租户业务对象 sys_tenant
|
||||
*
|
||||
|
||||
@@ -2,14 +2,14 @@ package com.xmzs.system.domain.bo;
|
||||
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import com.xmzs.system.domain.SysTenantPackage;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 租户套餐业务对象 sys_tenant_package
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.xmzs.system.domain.bo;
|
||||
|
||||
import com.xmzs.common.mybatis.core.domain.BaseEntity;
|
||||
import com.xmzs.system.domain.VoiceRole;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 配音角色业务对象 voice_role
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = VoiceRole.class, reverseConvertGenerate = false)
|
||||
public class VoiceRoleBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
@NotBlank(message = "角色描述不能为空")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@NotBlank(message = "头像不能为空")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
@NotBlank(message = "角色id不能为空")
|
||||
private String voiceId;
|
||||
|
||||
/**
|
||||
* 音频地址
|
||||
*/
|
||||
@NotBlank(message = "音频地址不能为空")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 音频预处理(实验性)
|
||||
*/
|
||||
@NotBlank(message = "音频预处理(实验性)不能为空")
|
||||
private String preProcess;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@NotBlank(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.xmzs.system.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.esotericsoftware.kryo.serializers.DefaultSerializers;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import com.xmzs.system.handler.CustomerBigDecimalSerialize;
|
||||
import com.xmzs.system.domain.ChatMessage;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@@ -15,7 +11,6 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.xmzs.system.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.xmzs.common.core.validate.AddGroup;
|
||||
import com.xmzs.common.core.validate.EditGroup;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.xmzs.web.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import com.xmzs.common.core.domain.model.LoginUser;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 登录返回信息
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
package com.xmzs.system.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.xmzs.system.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.xmzs.common.excel.annotation.ExcelDictFormat;
|
||||
@@ -11,6 +10,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.xmzs.system.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.xmzs.common.excel.annotation.ExcelDictFormat;
|
||||
@@ -11,6 +10,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,15 +2,12 @@ package com.xmzs.system.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.xmzs.common.translation.annotation.Translation;
|
||||
import com.xmzs.common.translation.constant.TransConstant;
|
||||
import com.xmzs.system.domain.SysUser;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.xmzs.system.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.xmzs.system.domain.VoiceRole;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配音角色视图对象 voice_role
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = VoiceRole.class)
|
||||
public class VoiceRoleVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
@ExcelProperty(value = "角色名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
@ExcelProperty(value = "角色描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ExcelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
@ExcelProperty(value = "角色id")
|
||||
private String voiceId;
|
||||
|
||||
/**
|
||||
* 音频地址
|
||||
*/
|
||||
@ExcelProperty(value = "音频地址")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 音频预处理(实验性)
|
||||
*/
|
||||
@ExcelProperty(value = "音频预处理")
|
||||
private String preProcess;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +1,17 @@
|
||||
package com.xmzs.system.listener;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xmzs.common.chat.config.LocalCache;
|
||||
import com.xmzs.common.chat.constant.OpenAIConst;
|
||||
import com.xmzs.common.chat.entity.chat.ChatCompletion;
|
||||
import com.xmzs.common.chat.entity.chat.ChatCompletionResponse;
|
||||
import com.xmzs.common.chat.utils.TikTokensUtil;
|
||||
import com.xmzs.common.core.utils.SpringUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.system.domain.bo.ChatMessageBo;
|
||||
import com.xmzs.system.service.IChatService;
|
||||
import com.xmzs.system.service.IChatMessageService;
|
||||
import com.xmzs.system.service.IChatService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -72,12 +73,15 @@ public class SSEEventSourceListener extends EventSourceListener {
|
||||
chatMessageBo.setContent(stringBuffer.toString());
|
||||
Long userId = (Long)LocalCache.CACHE.get("userId");
|
||||
chatMessageBo.setUserId(userId);
|
||||
if("gpt-4-all".equals(modelName)
|
||||
|| modelName.startsWith("gpt-4-gizmo")
|
||||
|| modelName.startsWith("net")){
|
||||
// 扣除余额
|
||||
IChatService.deductUserBalance(userId, OpenAIConst.GPT4_ALL_COST);
|
||||
chatMessageBo.setDeductCost(OpenAIConst.GPT4_ALL_COST);
|
||||
if(ChatCompletion.Model.GPT_4_ALL.getName().equals(modelName)
|
||||
|| modelName.startsWith(ChatCompletion.Model.GPT_4_GIZMO.getName())
|
||||
|| modelName.startsWith(ChatCompletion.Model.NET.getName())
|
||||
|| ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName().equals(modelName)
|
||||
|| ChatCompletion.Model.CLAUDE_3_SONNET.getName().equals(modelName)
|
||||
|| ChatCompletion.Model.STABLE_DIFFUSION.getName().equals(modelName)
|
||||
|| ChatCompletion.Model.SUNO_V3.getName().equals(modelName)
|
||||
){
|
||||
chatMessageBo.setDeductCost(0.0);
|
||||
chatMessageBo.setTotalTokens(0);
|
||||
// 保存消息记录
|
||||
chatMessageService.insertByBo(chatMessageBo);
|
||||
@@ -92,7 +96,7 @@ public class SSEEventSourceListener extends EventSourceListener {
|
||||
}
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
ChatCompletionResponse completionResponse = mapper.readValue(data, ChatCompletionResponse.class);
|
||||
if(completionResponse == null){
|
||||
if(completionResponse == null || CollectionUtil.isEmpty(completionResponse.getChoices())){
|
||||
return;
|
||||
}
|
||||
String content = completionResponse.getChoices().get(0).getDelta().getContent();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.xmzs.system.mapper;
|
||||
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.vo.ChatMessageVo;
|
||||
import com.xmzs.system.domain.ChatMessage;
|
||||
import com.xmzs.system.domain.vo.ChatMessageVo;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.xmzs.system.mapper;
|
||||
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import com.xmzs.system.domain.vo.PaymentOrdersVo;
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 支付订单Mapper接口
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.xmzs.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.xmzs.common.core.constant.UserConstants;
|
||||
import com.xmzs.system.domain.SysDictData;
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.SysDictData;
|
||||
import com.xmzs.system.domain.vo.SysDictDataVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.xmzs.system.mapper;
|
||||
|
||||
import com.xmzs.system.domain.SysDictType;
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.SysDictType;
|
||||
import com.xmzs.system.domain.vo.SysDictTypeVo;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.xmzs.common.core.constant.UserConstants;
|
||||
import com.xmzs.system.domain.SysMenu;
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.SysMenu;
|
||||
import com.xmzs.system.domain.vo.SysMenuVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.xmzs.system.mapper;
|
||||
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.SysTenant;
|
||||
import com.xmzs.system.domain.vo.SysTenantVo;
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 租户Mapper接口
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.xmzs.system.mapper;
|
||||
|
||||
import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import com.xmzs.system.domain.VoiceRole;
|
||||
import com.xmzs.system.domain.vo.VoiceRoleVo;
|
||||
|
||||
/**
|
||||
* 配音角色Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
public interface VoiceRoleMapper extends BaseMapperPlus<VoiceRole, VoiceRoleVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.xmzs.system.service;
|
||||
|
||||
import com.xmzs.system.domain.bo.ChatMessageBo;
|
||||
|
||||
/**
|
||||
* @author hncboy
|
||||
* @date 2023/3/22 19:41
|
||||
* 聊天相关业务接口
|
||||
*/
|
||||
public interface ChatService {
|
||||
|
||||
|
||||
/**
|
||||
* 根据消耗的tokens扣除余额
|
||||
*
|
||||
* @param chatMessageBo
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
void deductToken(ChatMessageBo chatMessageBo);
|
||||
|
||||
/**
|
||||
* 扣除用户的余额
|
||||
*
|
||||
*/
|
||||
void deductUserBalance(Long userId, Double numberCost);
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.xmzs.system.service;
|
||||
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.bo.ChatMessageBo;
|
||||
import com.xmzs.system.domain.vo.ChatMessageVo;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -24,4 +24,10 @@ public interface IChatService {
|
||||
*
|
||||
*/
|
||||
void deductUserBalance(Long userId, Double numberCost);
|
||||
|
||||
/**
|
||||
* 扣除mj任务费用
|
||||
*
|
||||
*/
|
||||
void mjTaskDeduct(String prompt, double cost);
|
||||
}
|
||||
|
||||
@@ -3,17 +3,15 @@ package com.xmzs.system.service;
|
||||
|
||||
import com.xmzs.common.chat.domain.request.ChatRequest;
|
||||
import com.xmzs.common.chat.domain.request.Dall3Request;
|
||||
import com.xmzs.common.chat.domain.request.MjTaskRequest;
|
||||
import com.xmzs.common.chat.entity.Tts.TextToSpeech;
|
||||
import com.xmzs.common.chat.entity.files.UploadFileResponse;
|
||||
import com.xmzs.common.chat.entity.images.Item;
|
||||
import com.xmzs.common.chat.entity.whisper.WhisperResponse;
|
||||
import okhttp3.ResponseBody;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,6 +52,10 @@ public interface ISseService {
|
||||
List<Item> dall3(Dall3Request request);
|
||||
|
||||
|
||||
void mjTask(MjTaskRequest mjTaskRequest);
|
||||
/**
|
||||
* 判断用户是否付费
|
||||
*/
|
||||
void checkUserGrade();
|
||||
|
||||
UploadFileResponse upload(MultipartFile file);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.xmzs.system.service;
|
||||
|
||||
import com.xmzs.system.domain.vo.SysTenantPackageVo;
|
||||
import com.xmzs.system.domain.bo.SysTenantPackageBo;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.bo.SysTenantPackageBo;
|
||||
import com.xmzs.system.domain.vo.SysTenantPackageVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.xmzs.system.service;
|
||||
|
||||
import com.xmzs.system.domain.vo.SysTenantVo;
|
||||
import com.xmzs.system.domain.bo.SysTenantBo;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.bo.SysTenantBo;
|
||||
import com.xmzs.system.domain.vo.SysTenantVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.xmzs.system.service;
|
||||
|
||||
|
||||
import com.xmzs.common.chat.domain.request.ChatRequest;
|
||||
import com.xmzs.common.chat.domain.request.Dall3Request;
|
||||
import com.xmzs.common.chat.entity.images.Item;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 描述:
|
||||
*
|
||||
* @author https:www.unfbx.com
|
||||
* @date 2023-04-08
|
||||
*/
|
||||
public interface SseService {
|
||||
|
||||
/**
|
||||
* 客户端发送消息到服务端
|
||||
* @param chatRequest
|
||||
*/
|
||||
SseEmitter sseChat(ChatRequest chatRequest);
|
||||
|
||||
/**
|
||||
* 绘画接口
|
||||
* @param request
|
||||
*/
|
||||
List<Item> dall3(Dall3Request request);
|
||||
|
||||
|
||||
/**
|
||||
* mj绘画接口
|
||||
*/
|
||||
void mjTask();
|
||||
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.xmzs.system.service.impl;
|
||||
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.ChatMessage;
|
||||
import com.xmzs.system.domain.bo.ChatMessageBo;
|
||||
import com.xmzs.system.domain.vo.ChatMessageVo;
|
||||
import com.xmzs.system.mapper.ChatMessageMapper;
|
||||
import com.xmzs.system.service.IChatMessageService;
|
||||
import com.xmzs.system.domain.ChatMessage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 聊天消息Service业务层处理
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
package com.xmzs.system.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.xmzs.common.chat.constant.OpenAIConst;
|
||||
import com.xmzs.common.chat.entity.chat.ChatCompletion;
|
||||
import com.xmzs.common.core.domain.model.LoginUser;
|
||||
import com.xmzs.common.core.exception.ServiceException;
|
||||
import com.xmzs.common.core.exception.base.BaseException;
|
||||
import com.xmzs.common.satoken.utils.LoginHelper;
|
||||
import com.xmzs.system.domain.ChatToken;
|
||||
import com.xmzs.system.domain.SysUser;
|
||||
import com.xmzs.system.domain.bo.ChatMessageBo;
|
||||
import com.xmzs.system.mapper.SysUserMapper;
|
||||
import com.xmzs.system.service.IChatService;
|
||||
import com.xmzs.system.service.IChatMessageService;
|
||||
import com.xmzs.system.service.IChatService;
|
||||
import com.xmzs.system.service.IChatTokenService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -23,11 +26,10 @@ import org.springframework.stereotype.Service;
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class IChatServiceImpl implements IChatService {
|
||||
public class ChatServiceImpl implements IChatService {
|
||||
|
||||
private final SysUserMapper sysUserMapper;
|
||||
|
||||
|
||||
private final IChatMessageService chatMessageService;
|
||||
|
||||
private final IChatTokenService chatTokenService;
|
||||
@@ -37,32 +39,34 @@ public class IChatServiceImpl implements IChatService {
|
||||
* 根据消耗的tokens扣除余额
|
||||
*
|
||||
* @param chatMessageBo
|
||||
*
|
||||
*/
|
||||
public void deductToken(ChatMessageBo chatMessageBo) {
|
||||
// 计算总token数
|
||||
ChatToken chatToken = chatTokenService.queryByUserId(chatMessageBo.getUserId(), chatMessageBo.getModelName());
|
||||
if(chatToken == null){
|
||||
if (chatToken == null) {
|
||||
chatToken = new ChatToken();
|
||||
chatToken.setToken(0);
|
||||
}
|
||||
int totalTokens = chatToken.getToken()+ chatMessageBo.getTotalTokens();
|
||||
int totalTokens = chatToken.getToken() + chatMessageBo.getTotalTokens();
|
||||
// 如果总token数大于等于1000,进行费用扣除
|
||||
if (totalTokens >= 1000) {
|
||||
// 计算费用
|
||||
int token1 = totalTokens / 1000;
|
||||
int token2 = totalTokens % 1000;
|
||||
if(token2 > 0){
|
||||
if (token2 > 0) {
|
||||
// 保存剩余tokens
|
||||
chatToken.setToken(token2);
|
||||
chatTokenService.editToken(chatToken);
|
||||
}else {
|
||||
} else {
|
||||
chatTokenService.resetToken(chatMessageBo.getUserId(), chatMessageBo.getModelName());
|
||||
}
|
||||
chatMessageBo.setDeductCost(token1 * ChatCompletion.getModelCost(chatMessageBo.getModelName()));
|
||||
// 扣除用户余额
|
||||
deductUserBalance(chatMessageBo.getUserId(), chatMessageBo.getDeductCost());
|
||||
Double numberCost = token1 * ChatCompletion.getModelCost(chatMessageBo.getModelName());
|
||||
deductUserBalance(chatMessageBo.getUserId(), numberCost);
|
||||
chatMessageBo.setDeductCost(numberCost);
|
||||
} else {
|
||||
// 扣除用户余额
|
||||
deductUserBalance(chatMessageBo.getUserId(), 0.0);
|
||||
chatMessageBo.setDeductCost(0d);
|
||||
chatMessageBo.setRemark("不满1kToken,计入下一次!");
|
||||
chatToken.setToken(totalTokens);
|
||||
@@ -88,7 +92,7 @@ public class IChatServiceImpl implements IChatService {
|
||||
}
|
||||
|
||||
Double userBalance = sysUser.getUserBalance();
|
||||
if (userBalance < numberCost) {
|
||||
if (userBalance < numberCost || userBalance < OpenAIConst.GPT4_COST) {
|
||||
throw new ServiceException("余额不足,请联系管理员充值!");
|
||||
}
|
||||
|
||||
@@ -98,4 +102,35 @@ public class IChatServiceImpl implements IChatService {
|
||||
.eq(SysUser::getUserId, userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 扣除mj任务费用
|
||||
*
|
||||
* @param prompt
|
||||
* @param cost
|
||||
*/
|
||||
@Override
|
||||
public void mjTaskDeduct(String prompt, double cost) {
|
||||
deductUserBalance(getUserId(), cost);
|
||||
// 保存消息记录
|
||||
ChatMessageBo chatMessageBo = new ChatMessageBo();
|
||||
chatMessageBo.setUserId(getUserId());
|
||||
chatMessageBo.setModelName("mj");
|
||||
chatMessageBo.setContent(prompt);
|
||||
chatMessageBo.setDeductCost(cost);
|
||||
chatMessageBo.setTotalTokens(0);
|
||||
chatMessageService.insertByBo(chatMessageBo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户Id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getUserId() {
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
throw new BaseException("用户未登录!");
|
||||
}
|
||||
return loginUser.getUserId();
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.xmzs.system.service.impl;
|
||||
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import com.xmzs.system.domain.bo.PaymentOrdersBo;
|
||||
import com.xmzs.system.domain.vo.PaymentOrdersVo;
|
||||
import com.xmzs.system.domain.PaymentOrders;
|
||||
import com.xmzs.system.mapper.PaymentOrdersMapper;
|
||||
import com.xmzs.system.service.IPaymentOrdersService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 支付订单Service业务层处理
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.xmzs.system.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.xmzs.common.chat.config.LocalCache;
|
||||
import com.xmzs.common.chat.constant.OpenAIConst;
|
||||
import com.xmzs.common.chat.domain.request.ChatRequest;
|
||||
import com.xmzs.common.chat.domain.request.Dall3Request;
|
||||
import com.xmzs.common.chat.domain.request.MjTaskRequest;
|
||||
import com.xmzs.common.chat.entity.Tts.TextToSpeech;
|
||||
import com.xmzs.common.chat.entity.chat.*;
|
||||
import com.xmzs.common.chat.entity.files.UploadFileResponse;
|
||||
import com.xmzs.common.chat.entity.images.Image;
|
||||
import com.xmzs.common.chat.entity.images.ImageResponse;
|
||||
import com.xmzs.common.chat.entity.images.Item;
|
||||
@@ -15,40 +14,36 @@ import com.xmzs.common.chat.entity.whisper.WhisperResponse;
|
||||
import com.xmzs.common.chat.openai.OpenAiStreamClient;
|
||||
import com.xmzs.common.chat.utils.TikTokensUtil;
|
||||
import com.xmzs.common.core.domain.model.LoginUser;
|
||||
import com.xmzs.common.core.exception.ServiceException;
|
||||
import com.xmzs.common.core.exception.base.BaseException;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.satoken.utils.LoginHelper;
|
||||
import com.xmzs.system.domain.SysUser;
|
||||
import com.xmzs.system.domain.bo.ChatMessageBo;
|
||||
import com.xmzs.system.listener.SSEEventSourceListener;
|
||||
import com.xmzs.system.mapper.SysUserMapper;
|
||||
import com.xmzs.system.service.IChatService;
|
||||
import com.xmzs.system.service.IChatMessageService;
|
||||
|
||||
import com.xmzs.system.service.IChatService;
|
||||
import com.xmzs.system.service.ISseService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.ResponseBody;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.InputStreamResource;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
import org.springframework.http.MediaType;
|
||||
import java.io.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import org.springframework.core.io.InputStreamResource;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
/**
|
||||
* 描述:
|
||||
@@ -59,7 +54,7 @@ import okhttp3.ResponseBody;
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ISseServiceImpl implements ISseService {
|
||||
public class SseServiceImpl implements ISseService {
|
||||
|
||||
private final OpenAiStreamClient openAiStreamClient;
|
||||
|
||||
@@ -70,38 +65,62 @@ public class ISseServiceImpl implements ISseService {
|
||||
|
||||
private final IChatMessageService chatMessageService;
|
||||
|
||||
@Value("${chat.apiKey}")
|
||||
private String apiKey;
|
||||
@Value("${chat.apiHost}")
|
||||
private String apiHost;
|
||||
|
||||
@Override
|
||||
public SseEmitter sseChat(ChatRequest chatRequest) {
|
||||
LocalCache.CACHE.put("userId",getUserId());
|
||||
SseEmitter sseEmitter = new SseEmitter(0L);
|
||||
SysUser sysUser = sysUserMapper.selectById(getUserId());
|
||||
// TODO 添加枚举
|
||||
if ("0".equals(sysUser.getUserGrade()) && !ChatCompletion.Model.GPT_3_5_TURBO.getName().equals(chatRequest.getModel())) {
|
||||
// 创建并发送一个名为 "error" 的事件,带有错误消息和状态码
|
||||
SseEmitter.SseEventBuilder event = SseEmitter.event()
|
||||
.name("error") // 客户端将监听这个事件名
|
||||
.data("免费用户暂时不支持此模型,请切换gpt-3.5-turbo模型或者点击《进入市场选购您的商品》充值后使用!");
|
||||
try {
|
||||
sseEmitter.send(event);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
sseEmitter.complete();
|
||||
return sseEmitter;
|
||||
}
|
||||
|
||||
SSEEventSourceListener openAIEventSourceListener = new SSEEventSourceListener(sseEmitter);
|
||||
// 获取对话消息列表
|
||||
List<Message> msgList = chatRequest.getMessages();
|
||||
|
||||
// 图文识别上下文信息
|
||||
List<Content> contentList = chatRequest.getContent();
|
||||
List<Content> contentList = chatRequest.getImageContent();
|
||||
// 消息记录
|
||||
Message message = msgList.get(msgList.size() - 1);
|
||||
ChatMessageBo chatMessageBo = new ChatMessageBo();
|
||||
chatMessageBo.setUserId(getUserId());
|
||||
chatMessageBo.setModelName(chatRequest.getModel());
|
||||
chatMessageBo.setContent(message.getContent());
|
||||
|
||||
try{
|
||||
if(!chatRequest.getModel().startsWith("gpt-3.5")){
|
||||
// 判断用户是否付费
|
||||
checkUserGrade();
|
||||
}
|
||||
// 按次数扣费
|
||||
if(ChatCompletion.Model.GPT_4_ALL.getName().equals(chatRequest.getModel())
|
||||
|| chatRequest.getModel().startsWith(ChatCompletion.Model.GPT_4_GIZMO.getName())
|
||||
|| chatRequest.getModel().startsWith(ChatCompletion.Model.NET.getName())
|
||||
|| ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName().equals(chatRequest.getModel())
|
||||
|| ChatCompletion.Model.CLAUDE_3_SONNET.getName().equals(chatRequest.getModel())
|
||||
|| ChatCompletion.Model.STABLE_DIFFUSION.getName().equals(chatRequest.getModel())
|
||||
|| ChatCompletion.Model.SUNO_V3.getName().equals(chatRequest.getModel())
|
||||
){
|
||||
double cost = OpenAIConst.GPT4_COST;
|
||||
if(ChatCompletion.Model.STABLE_DIFFUSION.getName().equals(chatRequest.getModel())){
|
||||
cost = 0.1;
|
||||
}
|
||||
if(ChatCompletion.Model.SUNO_V3.getName().equals(chatRequest.getModel())){
|
||||
cost = 0.5;
|
||||
}
|
||||
IChatService.deductUserBalance(getUserId(), cost);
|
||||
chatMessageBo.setDeductCost(cost);
|
||||
// 保存消息记录
|
||||
chatMessageService.insertByBo(chatMessageBo);
|
||||
}else {
|
||||
int tokens = TikTokensUtil.tokens(chatRequest.getModel(), msgList);
|
||||
chatMessageBo.setTotalTokens(tokens);
|
||||
// 按token扣费并且保存消息记录
|
||||
IChatService.deductToken(chatMessageBo);
|
||||
}
|
||||
}catch (Exception e){
|
||||
sendErrorEvent(sseEmitter, e.getMessage());
|
||||
return sseEmitter;
|
||||
}
|
||||
// 图文识别模型
|
||||
if (ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName().equals(chatRequest.getModel())) {
|
||||
MessagePicture messagePicture = MessagePicture.builder().role(Message.Role.USER.getName()).content(contentList).build();
|
||||
@@ -114,14 +133,6 @@ public class ISseServiceImpl implements ISseService {
|
||||
.stream(true)
|
||||
.build();
|
||||
openAiStreamClient.streamChatCompletion(chatCompletion, openAIEventSourceListener);
|
||||
// 扣除图文对话费用
|
||||
IChatService.deductUserBalance(getUserId(),OpenAIConst.GPT4_COST);
|
||||
String text = contentList.get(contentList.size() - 1).getText();
|
||||
// 保存消息记录
|
||||
chatMessageBo.setContent(text);
|
||||
chatMessageBo.setDeductCost(OpenAIConst.GPT4_COST);
|
||||
chatMessageBo.setTotalTokens(0);
|
||||
chatMessageService.insertByBo(chatMessageBo);
|
||||
} else {
|
||||
ChatCompletion completion = ChatCompletion
|
||||
.builder()
|
||||
@@ -132,20 +143,6 @@ public class ISseServiceImpl implements ISseService {
|
||||
.stream(true)
|
||||
.build();
|
||||
openAiStreamClient.streamChatCompletion(completion, openAIEventSourceListener);
|
||||
|
||||
if("gpt-4-all".equals(chatRequest.getModel())
|
||||
|| chatRequest.getModel().startsWith("gpt-4-gizmo")
|
||||
|| chatRequest.getModel().startsWith("net")
|
||||
){
|
||||
chatMessageBo.setDeductCost(0.0);
|
||||
// 保存消息记录
|
||||
chatMessageService.insertByBo(chatMessageBo);
|
||||
}else {
|
||||
// 扣除余额
|
||||
int tokens = TikTokensUtil.tokens(chatRequest.getModel(), msgList);
|
||||
chatMessageBo.setTotalTokens(tokens);
|
||||
IChatService.deductToken(chatMessageBo);
|
||||
}
|
||||
}
|
||||
return sseEmitter;
|
||||
}
|
||||
@@ -156,19 +153,20 @@ public class ISseServiceImpl implements ISseService {
|
||||
*/
|
||||
@Override
|
||||
public ResponseEntity<Resource> textToSpeed(TextToSpeech textToSpeech) {
|
||||
ResponseBody body = openAiStreamClient.textToSpeech(textToSpeech);
|
||||
if (body != null) {
|
||||
// 将ResponseBody转换为InputStreamResource
|
||||
InputStreamResource resource = new InputStreamResource(body.byteStream());
|
||||
try (ResponseBody body = openAiStreamClient.textToSpeech(textToSpeech)) {
|
||||
if (body != null) {
|
||||
// 将ResponseBody转换为InputStreamResource
|
||||
InputStreamResource resource = new InputStreamResource(body.byteStream());
|
||||
|
||||
// 创建并返回ResponseEntity
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.parseMediaType("audio/mpeg")) // 假设是MP3文件
|
||||
.body(resource);
|
||||
// 创建并返回ResponseEntity
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.parseMediaType("audio/mpeg")) // 假设是MP3文件
|
||||
.body(resource);
|
||||
|
||||
} else {
|
||||
// 如果ResponseBody为空,返回404状态码
|
||||
return ResponseEntity.notFound().build();
|
||||
} else {
|
||||
// 如果ResponseBody为空,返回404状态码
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +188,6 @@ public class ISseServiceImpl implements ISseService {
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to convert MultipartFile to File", e);
|
||||
}
|
||||
|
||||
return openAiStreamClient.speechToTextTranscriptions(fileA);
|
||||
}
|
||||
|
||||
@@ -213,7 +210,7 @@ public class ISseServiceImpl implements ISseService {
|
||||
* @return
|
||||
*/
|
||||
public List<Item> dall3(Dall3Request request) {
|
||||
checkUserGrade(null,"");
|
||||
checkUserGrade();
|
||||
// DALL3 绘图模型
|
||||
Image image = Image.builder()
|
||||
.responseFormat(com.xmzs.common.chat.entity.images.ResponseFormat.URL.getName())
|
||||
@@ -243,46 +240,15 @@ public class ISseServiceImpl implements ISseService {
|
||||
return imageResponse.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mjTask(MjTaskRequest mjTaskRequest) {
|
||||
// 检验是否是付费用户
|
||||
checkUserGrade(null,"");
|
||||
//扣除费用
|
||||
IChatService.deductUserBalance(getUserId(),0.5);
|
||||
// 保存消息记录
|
||||
ChatMessageBo chatMessageBo = new ChatMessageBo();
|
||||
chatMessageBo.setUserId(getUserId());
|
||||
chatMessageBo.setModelName("mj");
|
||||
chatMessageBo.setContent(mjTaskRequest.getPrompt());
|
||||
chatMessageBo.setDeductCost(0.5);
|
||||
chatMessageBo.setTotalTokens(0);
|
||||
chatMessageService.insertByBo(chatMessageBo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断用户是否付费
|
||||
*/
|
||||
public void checkUserGrade(SseEmitter emitter, String model) {
|
||||
@Override
|
||||
public void checkUserGrade() {
|
||||
SysUser sysUser = sysUserMapper.selectById(getUserId());
|
||||
if(StringUtils.isEmpty(model)){
|
||||
if("0".equals(sysUser.getUserGrade())){
|
||||
throw new ServiceException("免费用户暂时不支持此模型,请切换gpt-3.5-turbo模型或者点击《进入市场选购您的商品》充值后使用!",500);
|
||||
}
|
||||
if("0".equals(sysUser.getUserGrade())){
|
||||
throw new BaseException("免费用户暂时不支持此模型,请切换gpt-3.5-turbo模型或者点击《进入市场选购您的商品》充值后使用!");
|
||||
}
|
||||
// TODO 添加枚举
|
||||
// if ("0".equals(sysUser.getUserGrade()) && !ChatCompletion.Model.GPT_3_5_TURBO.getName().equals(model)) {
|
||||
// // 创建并发送一个名为 "error" 的事件,带有错误消息和状态码
|
||||
// SseEmitter.SseEventBuilder event = SseEmitter.event()
|
||||
// .name("error") // 客户端将监听这个事件名
|
||||
// .data("免费用户暂时不支持此模型,请切换gpt-3.5-turbo模型或者点击《进入市场选购您的商品》充值后使用!");
|
||||
// try {
|
||||
// emitter.send(event);
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// emitter.complete();
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,13 +264,56 @@ public class ISseServiceImpl implements ISseService {
|
||||
return loginUser.getUserId();
|
||||
}
|
||||
|
||||
public static double calculateMjCost(String speed) {
|
||||
return switch (speed) {
|
||||
case "mj-relax" -> 0.2; // Handles null and "mj-relax"
|
||||
case "mj-fast" -> 0.5;
|
||||
case "mj-turbo" -> 1.0;
|
||||
default -> 0.5; // Default cost if none of the above speeds match
|
||||
};
|
||||
@Override
|
||||
public UploadFileResponse upload(MultipartFile file) {
|
||||
return openAiStreamClient.uploadFile("fine-tune", convertMultiPartToFile(file));
|
||||
}
|
||||
|
||||
private File convertMultiPartToFile(MultipartFile multipartFile) {
|
||||
File file = null;
|
||||
try {
|
||||
// 获取原始文件名
|
||||
String originalFileName = multipartFile.getOriginalFilename();
|
||||
// 默认扩展名
|
||||
String extension = ".tmp";
|
||||
// 尝试从原始文件名中获取扩展名
|
||||
if (originalFileName != null && originalFileName.contains(".")) {
|
||||
extension = originalFileName.substring(originalFileName.lastIndexOf("."));
|
||||
}
|
||||
|
||||
// 使用原始文件的扩展名创建临时文件
|
||||
Path tempFile = Files.createTempFile(null, extension);
|
||||
file = tempFile.toFile();
|
||||
|
||||
// 将MultipartFile的内容写入文件
|
||||
try (InputStream inputStream = multipartFile.getInputStream();
|
||||
FileOutputStream outputStream = new FileOutputStream(file)) {
|
||||
int read;
|
||||
byte[] bytes = new byte[1024];
|
||||
while ((read = inputStream.read(bytes)) != -1) {
|
||||
outputStream.write(bytes, 0, read);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// 处理文件写入异常
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// 处理临时文件创建异常
|
||||
e.printStackTrace();
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
// 发送SSE错误事件的封装方法
|
||||
private void sendErrorEvent(SseEmitter sseEmitter, String errorMessage) {
|
||||
SseEmitter.SseEventBuilder event = SseEmitter.event()
|
||||
.name("error")
|
||||
.data(errorMessage);
|
||||
try {
|
||||
sseEmitter.send(event);
|
||||
} catch (IOException e) {
|
||||
log.error("发送事件失败: {}", e.getMessage());
|
||||
}
|
||||
sseEmitter.complete();
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ package com.xmzs.system.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.xmzs.system.domain.SysDept;
|
||||
import com.xmzs.common.mybatis.helper.DataBaseHelper;
|
||||
import com.xmzs.common.core.utils.StreamUtils;
|
||||
import com.xmzs.common.mybatis.helper.DataBaseHelper;
|
||||
import com.xmzs.system.domain.SysDept;
|
||||
import com.xmzs.system.domain.SysRoleDept;
|
||||
import com.xmzs.system.mapper.SysDeptMapper;
|
||||
import com.xmzs.system.mapper.SysRoleDeptMapper;
|
||||
|
||||
@@ -4,13 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xmzs.common.core.constant.CacheNames;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.system.domain.SysDictData;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.core.exception.ServiceException;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.redis.utils.CacheUtils;
|
||||
import com.xmzs.system.domain.SysDictData;
|
||||
import com.xmzs.system.domain.bo.SysDictDataBo;
|
||||
import com.xmzs.system.domain.vo.SysDictDataVo;
|
||||
import com.xmzs.system.mapper.SysDictDataMapper;
|
||||
|
||||
@@ -6,24 +6,24 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xmzs.common.core.constant.Constants;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.log.event.LogininforEvent;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.core.utils.ServletUtils;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.core.utils.ip.AddressUtils;
|
||||
import com.xmzs.common.log.event.LogininforEvent;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.SysLogininfor;
|
||||
import com.xmzs.system.domain.bo.SysLogininforBo;
|
||||
import com.xmzs.system.domain.vo.SysLogininforVo;
|
||||
import com.xmzs.system.mapper.SysLogininforMapper;
|
||||
import com.xmzs.system.service.ISysLogininforService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -4,11 +4,11 @@ import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xmzs.common.core.utils.MapstructUtils;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.common.core.utils.StringUtils;
|
||||
import com.xmzs.common.core.utils.ip.AddressUtils;
|
||||
import com.xmzs.common.log.event.OperLogEvent;
|
||||
import com.xmzs.common.mybatis.core.page.PageQuery;
|
||||
import com.xmzs.common.mybatis.core.page.TableDataInfo;
|
||||
import com.xmzs.system.domain.SysOperLog;
|
||||
import com.xmzs.system.domain.bo.SysOperLogBo;
|
||||
import com.xmzs.system.domain.vo.SysOperLogVo;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user