Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, MaintenanceTask maintenanceTask) { |
| | | Page<MaintenanceTask> taskPage = maintenanceTaskMapper.selectPage(page, null); |
| | | Page<MaintenanceTask> taskPage = maintenanceTaskMapper.selectPage(page, new QueryWrapper<MaintenanceTask>().orderByDesc("create_time")); |
| | | // 2. 如果没有数据,直接返回空分页 |
| | | if (taskPage.getRecords().isEmpty()) { |
| | | return AjaxResult.success(taskPage); |
| | |
| | | if (StringUtils.isNotBlank(inspectionTaskDto.getInspectionProject())) { |
| | | queryWrapper.like(InspectionTask::getInspectionProject, inspectionTaskDto.getInspectionProject()); |
| | | } |
| | | queryWrapper.orderByDesc(InspectionTask::getCreateTime); |
| | | IPage<InspectionTask> entityPage = inspectionTaskMapper.selectPage(page, queryWrapper); |
| | | |
| | | // 无数据提前返回 |
| | |
| | | if (timingTask.getIsEnabled() != null) { |
| | | queryWrapper.eq(TimingTask::getIsEnabled, timingTask.getIsEnabled()); |
| | | } |
| | | queryWrapper.orderByDesc(TimingTask::getCreateTime); |
| | | IPage<TimingTask> taskPage = timingTaskMapper.selectPage(page, queryWrapper); |
| | | |
| | | // 2. 如果没有数据,直接返回空分页 |
| | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.aftersalesservice.pojo.AfterSalesNearExpiry"> |
| | | select * from after_sales_near_expiry |
| | | where 1 = 1 |
| | | <if test="req.expireDate != null"> |
| | | AND expire_date = #{req.expireDate} |
| | | </if> |
| | | <if test="req.disDate != null"> |
| | | AND dis_date = #{req.disDate} |
| | | </if> |
| | | <if test="req.status != null"> |
| | | AND status = #{req.status} |
| | | </if> |
| | | <where> |
| | | <if test="req.expireDate != null"> |
| | | AND expire_date = #{req.expireDate} |
| | | </if> |
| | | <if test="req.disDate != null"> |
| | | AND dis_date = #{req.disDate} |
| | | </if> |
| | | <if test="req.status != null"> |
| | | AND status = #{req.status} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <if test="req.serviceType != null"> |
| | | and service_type = #{req.serviceType} |
| | | </if> |
| | | order by update_time desc |
| | | order by create_time desc |
| | | </select> |
| | | <select id="countAfterSalesService" resultType="com.ruoyi.aftersalesservice.dto.CountDto"> |
| | | select |
| | |
| | | group by status |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | and ai.applicant_name = #{ew.applicantName} |
| | | </if> |
| | | </where> |
| | | order by ai.id desc |
| | | order by ai.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and create_time <= #{ew.createTimeEnd} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and en.create_time between #{enterpriseNewsDto.createTimeStart} and #{enterpriseNewsDto.createTimeEnd} |
| | | </if> |
| | | </where> |
| | | order by en.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and n.status = #{ew.status} |
| | | </if> |
| | | </where> |
| | | order by n.id desc |
| | | order by n.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | left join device_ledger dl on dm.device_ledger_id = dl.id |
| | | left join sys_user su on dm.create_user = su.user_id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="deviceMaintenanceDto.deviceName != null"> |
| | | and dl.device_name like concat('%',#{deviceMaintenanceDto.deviceName},'%') |
| | | </if> |
| | |
| | | and dm.maintenance_actually_time < date_add(str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d'), interval 1 day) |
| | | </if> |
| | | </where> |
| | | order by dm.create_time desc |
| | | </select> |
| | | <select id="detailById" resultType="com.ruoyi.device.vo.DeviceMaintenanceVo"> |
| | | select dm.id, |
| | |
| | | from device_repair dr |
| | | left join device_ledger dl on dr.device_ledger_id = dl.id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="deviceRepairDto.deviceName != null"> |
| | | and dl.device_name like concat('%',#{deviceRepairDto.deviceName},'%') |
| | | </if> |
| | |
| | | and dr.maintenance_time like concat('%',#{deviceRepairDto.maintenanceTimeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by dr.create_time desc |
| | | </select> |
| | | <select id="detailById" resultType="com.ruoyi.device.vo.DeviceRepairVo"> |
| | | select dr.id, |
| | |
| | | AND record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY update_time DESC |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | AND t1.record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY t1.update_time DESC |
| | | ORDER BY t1.create_time DESC |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedgerRecord"> |
| | | SELECT |
| | |
| | | </where> |
| | | ORDER BY t1.update_time DESC |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | and sp.name like concat('%',#{spareParts.name},'%') |
| | | </if> |
| | | </where> |
| | | order by sp.create_time desc |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | and sprr.source_type = #{params.sourceType} |
| | | </if> |
| | | </where> |
| | | order by sprr.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | from sales_ledger sl |
| | | left join purchase_ledger pl on sl.id = pl.sales_ledger_id |
| | | left join customer c on sl.customer_id = c.id |
| | | where 1=1 |
| | | <if test="customerName != null and customerName != '' "> |
| | | and c.customer_name like concat('%',#{customerName},'%') |
| | | </if> |
| | | <where> |
| | | <if test="customerName != null and customerName != '' "> |
| | | and c.customer_name like concat('%',#{customerName},'%') |
| | | </if> |
| | | </where> |
| | | order by sl.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | order by staff_leave.id desc |
| | | order by staff_leave.create_time desc |
| | | </select> |
| | | <select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | | SELECT |
| | |
| | | sys_post sp ON sp.post_id = soj.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = soj.sys_dept_id |
| | | where 1=1 |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | <where> |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | </where> |
| | | order by staff_leave.create_time desc |
| | | </select> |
| | | |
| | | <select id="staffLeaveReasonAnalytics" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | |
| | | <if test="staffOnJob.contractStartTime != null"> |
| | | HAVING MIN(t1.contract_start_time) = #{staffOnJob.contractStartTime} |
| | | </if> |
| | | order by staff_on_job.id desc |
| | | order by staff_on_job.create_time desc |
| | | </select> |
| | | <select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto"> |
| | | SELECT |
| | |
| | | sys_post sp ON sp.post_id = staff_on_job.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id |
| | | where 1=1 |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | <where> |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | </where> |
| | | order by staff_on_job.create_time desc |
| | | </select> |
| | | <!-- 统计指定日期的在职员工数 --> |
| | | <select id="countOnJobStaffByDate" resultType="java.lang.Integer"> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="staffCount" column="staff_count" /> |
| | | </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.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 |
| | | from sys_dept d |
| | | order by d.create_time desc |
| | | </sql> |
| | | |
| | | <select id="selectDeptList" parameterType="com.ruoyi.project.system.domain.SysDept" resultMap="SysDeptResult"> |
| | |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | group by 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 |
| | | order by d.parent_id, d.order_num |
| | | order by d.parent_id asc, d.order_num asc, d.create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="java.lang.Long"> |
| | | select d.dept_id |
| | | from sys_dept d |
| | |
| | | <if test="deptCheckStrictly"> |
| | | and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) |
| | | </if> |
| | | order by d.parent_id, d.order_num |
| | | order by d.parent_id asc, d.order_num asc, d.create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name, |
| | | d.dept_nick |
| | | from sys_dept d |
| | | where d.dept_id = #{deptId} |
| | | order by d.create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="checkDeptExistUser" parameterType="Long" resultType="int"> |
| | | select count(1) from sys_user_dept where dept_id = #{deptId} |
| | | </select> |
| | | |
| | | |
| | | <select id="hasChildByDeptId" parameterType="Long" resultType="int"> |
| | | select count(1) from sys_dept |
| | | where del_flag = '0' and parent_id = #{deptId} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | | select * from sys_dept where find_in_set(#{deptId}, ancestors) |
| | | </select> |
| | | |
| | | |
| | | <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int"> |
| | | select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors) |
| | | </select> |
| | | |
| | | |
| | | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| | | <include refid="selectDeptVo"/> |
| | | where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertDept" parameterType="com.ruoyi.project.system.domain.SysDept"> |
| | | insert into sys_dept( |
| | | <if test="deptId != null and deptId != 0">dept_id,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateDept" parameterType="com.ruoyi.project.system.domain.SysDept"> |
| | | update sys_dept |
| | | <set> |
| | |
| | | </set> |
| | | where dept_id = #{deptId} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateDeptChildren" parameterType="java.util.List"> |
| | | update sys_dept set ancestors = |
| | | <foreach collection="depts" item="item" index="index" |
| | |
| | | #{item.deptId} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | <update id="updateDeptStatusNormal" parameterType="Long"> |
| | | update sys_dept set status = '0' where dept_id in |
| | | update sys_dept set status = '0' where dept_id in |
| | | <foreach collection="array" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteDeptById" parameterType="Long"> |
| | | update sys_dept set del_flag = '2' where dept_id = #{deptId} |
| | | </delete> |
| | |
| | | WHERE parent_id = 100; |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectDictTypeVo"> |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | from sys_dict_type |
| | | </sql> |
| | | |
| | |
| | | and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_id = #{dictId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} |
| | | </select> |
| | | |
| | | |
| | | <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteDictTypeById" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id = #{dictId} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteDictTypeByIds" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id in |
| | | <foreach collection="array" item="dictId" open="(" separator="," close=")"> |
| | | #{dictId} |
| | | </foreach> |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDictType" parameterType="com.ruoyi.project.system.domain.SysDictType"> |
| | |
| | | </set> |
| | | where dict_id = #{dictId} |
| | | </update> |
| | | |
| | | |
| | | <insert id="insertDictType" parameterType="com.ruoyi.project.system.domain.SysDictType"> |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''">dict_name,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | </mapper> |
| | | |
| | | </mapper> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectPostVo"> |
| | | select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
| | | select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
| | | from sys_post |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectPostList" parameterType="com.ruoyi.project.system.domain.SysPost" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | <where> |
| | |
| | | AND post_name like concat('%', #{postName}, '%') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostAll" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostById" parameterType="Long" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | where post_id = #{postId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostListByUserId" parameterType="Long" resultType="Long"> |
| | | select p.post_id |
| | | from sys_post p |
| | |
| | | left join sys_user u on u.user_id = up.user_id |
| | | where u.user_id = #{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult"> |
| | | select p.post_id, p.post_name, p.post_code |
| | | from sys_post p |
| | |
| | | left join sys_user u on u.user_id = up.user_id |
| | | where u.user_name = #{userName} |
| | | </select> |
| | | |
| | | |
| | | <select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | where post_name=#{postName} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | where post_code=#{postCode} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost"> |
| | | update sys_post |
| | | <set> |
| | |
| | | </set> |
| | | where post_id = #{postId} |
| | | </update> |
| | | |
| | | |
| | | <insert id="insertPost" parameterType="com.ruoyi.project.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId"> |
| | | insert into sys_post( |
| | | <if test="postId != null and postId != 0">post_id,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <delete id="deletePostById" parameterType="Long"> |
| | | delete from sys_post where post_id = #{postId} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deletePostByIds" parameterType="Long"> |
| | | delete from sys_post where post_id in |
| | | <foreach collection="array" item="postId" open="(" separator="," close=")"> |
| | | #{postId} |
| | | </foreach> |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectRoleVo"> |
| | | select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, |
| | | r.status, r.del_flag, r.create_time, r.remark |
| | | r.status, r.del_flag, r.create_time, r.remark |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = ur.user_id |
| | |
| | | ${params.dataScope} |
| | | order by r.role_sort |
| | | </select> |
| | | |
| | | |
| | | <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | WHERE r.del_flag = '0' and ur.user_id = #{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectRoleAll" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | WHERE r.del_flag = '0' |
| | | </select> |
| | | |
| | | |
| | | <select id="selectRoleListByUserId" parameterType="Long" resultType="Long"> |
| | | select r.role_id |
| | | from sys_role r |
| | |
| | | left join sys_user u on u.user_id = ur.user_id |
| | | where u.user_id = #{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.role_id = #{roleId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | WHERE r.del_flag = '0' and u.user_name = #{userName} |
| | | </select> |
| | | |
| | | |
| | | <select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.role_name=#{roleName} and r.del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.role_key=#{roleKey} and r.del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertRole" parameterType="com.ruoyi.project.system.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
| | | insert into sys_role( |
| | | <if test="roleId != null and roleId != 0">role_id,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateRole" parameterType="com.ruoyi.project.system.domain.SysRole"> |
| | | update sys_role |
| | | <set> |
| | |
| | | </set> |
| | | where role_id = #{roleId} |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteRoleById" parameterType="Long"> |
| | | update sys_role set del_flag = '2' where role_id = #{roleId} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteRoleByIds" parameterType="Long"> |
| | | update sys_role set del_flag = '2' where role_id in |
| | | <foreach collection="array" item="roleId" open="(" separator="," close=")"> |
| | | #{roleId} |
| | | </foreach> |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_name = #{userName} and u.del_flag = '0' |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_id = #{userId} |
| | | and u.del_flag = '0' |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | |
| | | <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> |
| | |
| | | </if> |
| | | and u.del_flag = '0' |
| | | </where> |
| | | ORDER BY u.create_time DESC |
| | | </select> |
| | | <select id="selectRegistrantIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT user_id, nick_name FROM sys_user |
| | |
| | | 1=0 <!-- 空列表时返回空结果 --> |
| | | </if> |
| | | </where> |
| | | ORDER BY sys_user.create_time DESC |
| | | </select> |
| | | <select id="selectUsersByIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT user_id, nick_name |
| | |
| | | #{id} |
| | | </foreach> |
| | | and del_flag = '0' |
| | | ORDER BY sys_user.create_time DESC |
| | | </select> |
| | | <select id="selectUserByNickName" resultType="com.ruoyi.project.system.domain.SysUser" |
| | | parameterType="java.lang.String"> |
| | |
| | | and sr.status = '0' |
| | | and su.status = '0' |
| | | and su.del_flag = '0' |
| | | ORDER BY su.create_time DESC |
| | | </select> |
| | | <select id="getUserByPerms" resultType="java.lang.Long"> |
| | | select distinct t5.user_id |