同步ruoyi4,1最新版本,修复订单发货及其规格修改bug
This commit is contained in:
1 parent
d2306354db
commit
49e46e68c4
156 files changed
+12006
-10025
No files matched your search
@@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -91,9 +92,11 @@ public class StoreOrder extends BaseEntity
|
||||
private Integer receiveType;
|
||||
|
||||
/** 物流code 单号 */
|
||||
@NotBlank(message = "物流单号不能为空")
|
||||
private String shippingCode;
|
||||
|
||||
/** 物流名称 */
|
||||
@NotBlank(message = "物流公司不能为空")
|
||||
private String shippingName;
|
||||
|
||||
/** 支付code */
|
||||
|
||||
@@ -25,7 +25,7 @@ public class SysDictType extends BaseEntity
|
||||
private String dictName;
|
||||
|
||||
/** 字典类型 */
|
||||
@Excel(name = "字典类型 ")
|
||||
@Excel(name = "字典类型")
|
||||
private String dictType;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SysLogininfor extends BaseEntity
|
||||
private String browser;
|
||||
|
||||
/** 操作系统 */
|
||||
@Excel(name = "操作系统 ")
|
||||
@Excel(name = "操作系统")
|
||||
private String os;
|
||||
|
||||
/** 提示消息 */
|
||||
|
||||
@@ -35,6 +35,10 @@ public class SysOperLog extends BaseEntity
|
||||
@Excel(name = "请求方法")
|
||||
private String method;
|
||||
|
||||
/** 请求方式 */
|
||||
@Excel(name = "请求方式")
|
||||
private String requestMethod;
|
||||
|
||||
/** 操作类别(0其它 1后台用户 2手机端用户) */
|
||||
@Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
|
||||
private Integer operatorType;
|
||||
@@ -63,6 +67,10 @@ public class SysOperLog extends BaseEntity
|
||||
@Excel(name = "请求参数")
|
||||
private String operParam;
|
||||
|
||||
/** 返回参数 */
|
||||
@Excel(name = "返回参数")
|
||||
private String jsonResult;
|
||||
|
||||
/** 操作状态(0正常 1异常) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=异常")
|
||||
private Integer status;
|
||||
@@ -125,6 +133,16 @@ public class SysOperLog extends BaseEntity
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getRequestMethod()
|
||||
{
|
||||
return requestMethod;
|
||||
}
|
||||
|
||||
public void setRequestMethod(String requestMethod)
|
||||
{
|
||||
this.requestMethod = requestMethod;
|
||||
}
|
||||
|
||||
public Integer getOperatorType()
|
||||
{
|
||||
return operatorType;
|
||||
@@ -195,6 +213,16 @@ public class SysOperLog extends BaseEntity
|
||||
this.operParam = operParam;
|
||||
}
|
||||
|
||||
public String getJsonResult()
|
||||
{
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
public void setJsonResult(String jsonResult)
|
||||
{
|
||||
this.jsonResult = jsonResult;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
@@ -233,6 +261,7 @@ public class SysOperLog extends BaseEntity
|
||||
.append("businessType", getBusinessType())
|
||||
.append("businessTypes", getBusinessTypes())
|
||||
.append("method", getMethod())
|
||||
.append("requestMethod", getRequestMethod())
|
||||
.append("operatorType", getOperatorType())
|
||||
.append("operName", getOperName())
|
||||
.append("deptName", getDeptName())
|
||||
|
||||
@@ -52,6 +52,16 @@ public class SysRole extends BaseEntity
|
||||
/** 部门组(数据权限) */
|
||||
private Long[] deptIds;
|
||||
|
||||
public SysRole()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SysRole(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getRoleId()
|
||||
{
|
||||
return roleId;
|
||||
@@ -62,6 +72,16 @@ public class SysRole extends BaseEntity
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public boolean isAdmin()
|
||||
{
|
||||
return isAdmin(this.roleId);
|
||||
}
|
||||
|
||||
public static boolean isAdmin(Long roleId)
|
||||
{
|
||||
return roleId != null && 1L == roleId;
|
||||
}
|
||||
|
||||
public String getDataScope()
|
||||
{
|
||||
return dataScope;
|
||||
|
||||
@@ -93,6 +93,16 @@ public class SysUser extends BaseEntity
|
||||
/** 岗位组 */
|
||||
private Long[] postIds;
|
||||
|
||||
public SysUser()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SysUser(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.ruoyi.system.domain.SysDictType;
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,6 @@ import com.ruoyi.system.domain.SysDictType;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysDictTypeMapper
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.List;
|
||||
import com.ruoyi.system.domain.SysUserPost;
|
||||
|
||||
/**
|
||||
* 用户与岗位 表 数据层
|
||||
* 用户与岗位关联表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
|
||||
/**
|
||||
* 用户表 数据层
|
||||
* 用户与角色关联表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
|
||||
@@ -108,6 +108,13 @@ public interface ISysRoleService
|
||||
*/
|
||||
public String checkRoleKeyUnique(SysRole role);
|
||||
|
||||
/**
|
||||
* 校验角色是否允许操作
|
||||
*
|
||||
* @param role 角色信息
|
||||
*/
|
||||
public void checkRoleAllowed(SysRole role);
|
||||
|
||||
/**
|
||||
* 通过角色ID查询角色使用数量
|
||||
*
|
||||
@@ -123,6 +130,7 @@ public interface ISysRoleService
|
||||
* @return 结果
|
||||
*/
|
||||
public int changeStatus(SysRole role);
|
||||
|
||||
/**
|
||||
* 取消授权用户角色
|
||||
*
|
||||
@@ -139,7 +147,7 @@ public interface ISysRoleService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAuthUsers(Long roleId, String userIds);
|
||||
|
||||
|
||||
/**
|
||||
* 批量选择授权用户角色
|
||||
*
|
||||
|
||||
@@ -139,6 +139,13 @@ public interface ISysUserService
|
||||
*/
|
||||
public String checkEmailUnique(SysUser user);
|
||||
|
||||
/**
|
||||
* 校验用户是否允许操作
|
||||
*
|
||||
* @param user 用户信息
|
||||
*/
|
||||
public void checkUserAllowed(SysUser user);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户所属角色组
|
||||
*
|
||||
|
||||
@@ -150,6 +150,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
Long[] roleIds = Convert.toLongArray(ids);
|
||||
for (Long roleId : roleIds)
|
||||
{
|
||||
checkRoleAllowed(new SysRole(roleId));
|
||||
SysRole role = selectRoleById(roleId);
|
||||
if (countUserRoleByRoleId(roleId) > 0)
|
||||
{
|
||||
@@ -293,6 +294,19 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
return UserConstants.ROLE_KEY_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验角色是否允许操作
|
||||
*
|
||||
* @param role 角色信息
|
||||
*/
|
||||
public void checkRoleAllowed(SysRole role)
|
||||
{
|
||||
if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin())
|
||||
{
|
||||
throw new BusinessException("不允许操作超级管理员角色");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过角色ID查询角色使用数量
|
||||
*
|
||||
|
||||
@@ -167,10 +167,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
Long[] userIds = Convert.toLongArray(ids);
|
||||
for (Long userId : userIds)
|
||||
{
|
||||
if (SysUser.isAdmin(userId))
|
||||
{
|
||||
throw new BusinessException("不允许删除超级管理员用户");
|
||||
}
|
||||
checkUserAllowed(new SysUser(userId));
|
||||
}
|
||||
return userMapper.deleteUserByIds(userIds);
|
||||
}
|
||||
@@ -345,6 +342,19 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
return UserConstants.USER_EMAIL_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验用户是否允许操作
|
||||
*
|
||||
* @param user 用户信息
|
||||
*/
|
||||
public void checkUserAllowed(SysUser user)
|
||||
{
|
||||
if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
|
||||
{
|
||||
throw new BusinessException("不允许操作超级管理员用户");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户所属角色组
|
||||
*
|
||||
@@ -465,10 +475,6 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
@Override
|
||||
public int changeStatus(SysUser user)
|
||||
{
|
||||
if (SysUser.isAdmin(user.getUserId()))
|
||||
{
|
||||
throw new BusinessException("不允许修改超级管理员用户");
|
||||
}
|
||||
return userMapper.updateUser(user);
|
||||
}
|
||||
}
|
||||
@@ -5,30 +5,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysOperLogMapper">
|
||||
|
||||
<resultMap type="SysOperLog" id="SysOperLogResult">
|
||||
<id property="operId" column="oper_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="businessType" column="business_type" />
|
||||
<result property="method" column="method" />
|
||||
<result property="operatorType" column="operator_type" />
|
||||
<result property="operName" column="oper_name" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="operUrl" column="oper_url" />
|
||||
<result property="operIp" column="oper_ip" />
|
||||
<result property="operLocation" column="oper_location" />
|
||||
<result property="operParam" column="oper_param" />
|
||||
<result property="status" column="status" />
|
||||
<result property="errorMsg" column="error_msg" />
|
||||
<result property="operTime" column="oper_time" />
|
||||
<id property="operId" column="oper_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="businessType" column="business_type" />
|
||||
<result property="method" column="method" />
|
||||
<result property="requestMethod" column="request_method" />
|
||||
<result property="operatorType" column="operator_type" />
|
||||
<result property="operName" column="oper_name" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="operUrl" column="oper_url" />
|
||||
<result property="operIp" column="oper_ip" />
|
||||
<result property="operLocation" column="oper_location" />
|
||||
<result property="operParam" column="oper_param" />
|
||||
<result property="jsonResult" column="json_result" />
|
||||
<result property="status" column="status" />
|
||||
<result property="errorMsg" column="error_msg" />
|
||||
<result property="operTime" column="oper_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOperLogVo">
|
||||
select oper_id, title, business_type, method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time
|
||||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time
|
||||
from sys_oper_log
|
||||
</sql>
|
||||
|
||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||
insert into sys_oper_log(title, business_type, method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{status}, #{errorMsg}, sysdate())
|
||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
||||
|
||||
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
<result property="roleSort" column="role_sort" />
|
||||
<result property="dataScope" column="data_scope" />
|
||||
<result property="dataScope" column="data_scope" />
|
||||
<result property="status" column="role_status" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
Reference in new issue
Block a user