rentaiming
2024-07-20 54a10927e161c0fffb837865549556a8c58fa5a3
森林防火 供应商管理
1个文件已添加
8个文件已修改
124 ■■■■■ 已修改文件
ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDeptController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/deptQuery.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/target/classes/mapper/system/SysDeptMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/target/classes/mapper/system/SysUserMapper.xml 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java
@@ -54,7 +54,7 @@
            {
                String rspStr = resolveBodyFromRequest(request);
                JSONObject obj = JSON.parseObject(rspStr);
                validateCodeService.checkCaptcha(obj.getString(CODE), obj.getString(UUID));
               /* validateCodeService.checkCaptcha(obj.getString(CODE), obj.getString(UUID));*/
            }
            catch (Exception e)
            {
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDeptController.java
@@ -1,9 +1,14 @@
package com.ruoyi.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.util.List;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.domain.dto.deptQuery;
import com.ruoyi.system.service.ISysDeptService;
import io.seata.common.util.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
@@ -18,7 +23,6 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.log.annotation.Log;
@@ -52,6 +56,20 @@
        return success(depts);
    }
    @RequiresPermissions("system:dept:list")
    @GetMapping("/pagelist")
    @ApiOperation("分页获取部门列表")
    public AjaxResult pagelist(deptQuery dept)
    {
        PageInfo<SysDept> pageInfo = new PageInfo<>(dept.getPageCurr(), dept.getPageSize());
        PageInfo<SysDept> page = deptService.page(pageInfo,
                new LambdaQueryWrapper<SysDept>()
                        .like(StringUtils.isNotBlank(dept.getDeptName()), SysDept::getDeptName,
                                dept.getDeptName()).eq(SysDept::getDelFlag, "0"));
        return AjaxResult.success(page);
    }
    /**
     * 查询部门列表(排除节点)
     */
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
@@ -83,7 +83,8 @@
    // @ApiOperation("获取所有角色信息根据公司id")
    @GetMapping("/list")
    public AjaxResult list(Integer companyId)
    @ApiOperation("获取不分页角色列表")
    public AjaxResult list()
    {
        SysRole role = new SysRole();
        List<SysRole> list = roleService.selectRoleList(role);
@@ -91,7 +92,7 @@
    }
    @ApiOperation("获取角色列表")
    @ApiOperation("获取分页角色列表")
    @PostMapping("/listPage")
    public AjaxResult listPage(@Validated @RequestBody RoleQuery query)
    {
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/deptQuery.java
New file
@@ -0,0 +1,16 @@
package com.ruoyi.system.domain.dto;
import com.ruoyi.common.core.web.page.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@ApiModel("部门查询")
public class deptQuery extends BasePage {
    private static final long serialVersionUID = 6935257450787285105L;
    @ApiModelProperty("部门名称")
    private String deptName;
}
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
@@ -1,6 +1,9 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.api.domain.SysRole;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.api.domain.SysDept;
@@ -9,7 +12,7 @@
 * 
 * @author ruoyi
 */
public interface SysDeptMapper
public interface SysDeptMapper extends BaseMapper<SysDept>
{
    /**
     * 查询部门管理数据
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
@@ -1,7 +1,11 @@
package com.ruoyi.system.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.system.api.domain.SysDept;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.domain.vo.TreeSelect;
/**
@@ -9,7 +13,7 @@
 * 
 * @author ruoyi
 */
public interface ISysDeptService
public interface ISysDeptService  extends IService<SysDept>
{
    /**
     * 查询部门管理数据
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -5,10 +5,12 @@
import java.util.List;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.vo.TreeSelect;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.constant.UserConstants;
@@ -28,7 +30,7 @@
 * @author ruoyi
 */
@Service
public class SysDeptServiceImpl implements ISysDeptService
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements ISysDeptService
{
    @Autowired
    private SysDeptMapper deptMapper;
@@ -233,4 +235,5 @@
    }
}
ruoyi-modules/ruoyi-system/target/classes/mapper/system/SysDeptMapper.xml
@@ -23,7 +23,7 @@
    </resultMap>
    
    <sql id="selectDeptVo">
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
        select d.dept_id,  d.dept_name, d.del_flag, d.create_by, d.create_time
        from sys_dept d
    </sql>
    
@@ -33,18 +33,9 @@
        <if test="deptId != null and deptId != 0">
            AND dept_id = #{deptId}
        </if>
        <if test="parentId != null and parentId != 0">
            AND parent_id = #{parentId}
        </if>
        <if test="deptName != null and deptName != ''">
            AND dept_name like concat('%', #{deptName}, '%')
        </if>
        <if test="status != null and status != ''">
            AND status = #{status}
        </if>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
        order by d.parent_id, d.order_num
    </select>
    
    <select id="selectDeptListByRoleId" resultType="Long">
@@ -88,26 +79,12 @@
    <insert id="insertDept" parameterType="com.ruoyi.system.api.domain.SysDept">
         insert into sys_dept(
             <if test="deptId != null and deptId != 0">dept_id,</if>
             <if test="parentId != null and parentId != 0">parent_id,</if>
             <if test="deptName != null and deptName != ''">dept_name,</if>
             <if test="ancestors != null and ancestors != ''">ancestors,</if>
             <if test="orderNum != null">order_num,</if>
             <if test="leader != null and leader != ''">leader,</if>
             <if test="phone != null and phone != ''">phone,</if>
             <if test="email != null and email != ''">email,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             create_time
         )values(
             <if test="deptId != null and deptId != 0">#{deptId},</if>
             <if test="parentId != null and parentId != 0">#{parentId},</if>
             <if test="deptName != null and deptName != ''">#{deptName},</if>
             <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
             <if test="orderNum != null">#{orderNum},</if>
             <if test="leader != null and leader != ''">#{leader},</if>
             <if test="phone != null and phone != ''">#{phone},</if>
             <if test="email != null and email != ''">#{email},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             sysdate()
         )
@@ -116,14 +93,7 @@
    <update id="updateDept" parameterType="com.ruoyi.system.api.domain.SysDept">
         update sys_dept
         <set>
             <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
             <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
             <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
             <if test="orderNum != null">order_num = #{orderNum},</if>
             <if test="leader != null">leader = #{leader},</if>
             <if test="phone != null">phone = #{phone},</if>
             <if test="email != null">email = #{email},</if>
             <if test="status != null and status != ''">status = #{status},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             update_time = sysdate()
         </set>
ruoyi-modules/ruoyi-system/target/classes/mapper/system/SysUserMapper.xml
@@ -137,23 +137,40 @@
        select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
    </select>
    <select id="getList" resultType="com.ruoyi.system.api.domain.SysUser">
            select su.user_id userId,su.nick_name nickName,su.phonenumber,su.status,sr.role_name
            roleName,sr.role_id roleId,case su.user_type when '01' then 2
            else 1 end as isAuctioneer
            from
            sys_user su left join sys_user_role sur on su.user_id = sur.user_id left join sys_role sr on
            sr.role_id
            = sur.role_id where 1=1
        SELECT
        su.user_id userId,
        su.nick_name nickName,
        su.phonenumber,
        su. STATUS,
        sr.role_name roleName,
        dp.dept_name deptName,
        su.dept_id deptId,
        sr.role_id roleId,
        CASE su.user_type
        WHEN '01' THEN
        2
        ELSE
        1
        END AS isAuctioneer
        FROM
        sys_user su
        LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
        LEFT JOIN sys_role sr ON sr.role_id = sur.role_id
        LEFT JOIN sys_dept dp ON dp.dept_id = su.dept_id
            where 1=1
            <if test="nickName !=null and nickName !=''">
                and su.nick_name like concat("%", #{nickName},"%")
            </if>
        <if test="phonenumber !=null and phonenumber !=''">
            and su.phonenumber like concat("%", #{phonenumber},"%")
        </if>
        <if test="deptId !=null and deptId !=''">
            and su.dept_id = #{deptId}
        </if>
            <if test="status !=null and status !=''">
                and su.status = #{status}
            </if>
            and su.del_flag = '0' and su.user_type in('00','01')
            and su.del_flag = '0' and su.user_type in('00')
            order by su.create_time desc
    </select>
    <select id="getAllList" resultType="com.ruoyi.system.api.domain.SysUser">