Commit ac84656a authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'dev'

2024/12/3修改接口

See merge request !473
parents dcc494a0 a9254848
......@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.domain.Sample;
import com.ruoyi.system.domain.vo.SysUserVO;
import com.ruoyi.system.domain.vo.SysUserVONew;
import com.ruoyi.system.request.InspectionRequest;
......@@ -140,7 +141,8 @@ public class SysUserController extends BaseController
@ApiOperation("获取检验人员列表新")
@PostMapping("/getInspectionNew")
public R<List<SysUserVONew>> getInspectionNew() {
return R.ok(userService.getInspectionNew());
SysUserVONew s = new SysUserVONew();
return R.ok(userService.getInspectionNew(s));
}
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "param1", value = "arg[1]"), @Tag(key = "result", value = "returnedObj")})
......
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
......@@ -8,7 +9,7 @@ import java.util.List;
@Data
@Accessors(chain = true)
public class SysUserVONew {
public class SysUserVONew extends BaseEntity {
@ApiModelProperty("用户id")
private Long userId;
......
......@@ -166,5 +166,5 @@ public interface SysUserMapper
* 获取检验人员列表
* @return
*/
List<SysUserVONew> getInspectionNew();
List<SysUserVONew> getInspectionNew(SysUserVONew s);
}
......@@ -4,7 +4,6 @@ import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.vo.SysUserVO;
import com.ruoyi.system.domain.vo.SysUserVONew;
import com.ruoyi.system.request.InspectionRequest;
/**
* 用户 业务层
......@@ -241,5 +240,5 @@ public interface ISysUserService
*/
List<SysUserVO> getInspection();
List<SysUserVONew> getInspectionNew();
List<SysUserVONew> getInspectionNew(SysUserVONew s);
}
......@@ -10,7 +10,6 @@ import com.ruoyi.system.domain.vo.SysUserVO;
import com.ruoyi.system.domain.vo.SysUserVONew;
import com.ruoyi.system.domain.vo.UserCountVo;
import com.ruoyi.system.mapper.*;
import com.ruoyi.system.request.InspectionRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -627,8 +626,9 @@ public class SysUserServiceImpl implements ISysUserService
* @return
*/
@Override
public List<SysUserVONew> getInspectionNew() {
List<SysUserVONew> userList = userMapper.getInspectionNew();
@DataScope(deptAlias = "d")
public List<SysUserVONew> getInspectionNew(SysUserVONew s) {
List<SysUserVONew> userList = userMapper.getInspectionNew(s);
for (SysUserVONew sysUserVONew : userList){
List<Long> roleId = userRoleMapper.selectRoleIdByUserId(sysUserVONew.getUserId());
sysUserVONew.setRoleId(roleId);
......
......@@ -261,12 +261,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and u.del_flag = '0'
</select>
<select id="getInspectionNew" resultType="com.ruoyi.system.domain.vo.SysUserVONew">
select u.user_id,u.user_name,u.nick_name,u.status,u.del_flag, sd.dept_name
select u.user_id,u.user_name,u.nick_name,u.status,u.del_flag, d.dept_name
from sys_user u
left join sys_user_role sr on u.user_id = sr.user_id
left join sys_dept sd on sd.dept_id = u.dept_id
where sr.role_id IN (106, 112)
left join sys_dept d on d.dept_id = u.dept_id
where
'a'='a'
${params.dataScope}
and sr.role_id IN (106, 112)
and u.del_flag = '0'
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment