获取管理员
This commit is contained in:
parent
112265865b
commit
495a07edde
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.base.controller;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
||||
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
||||
import com.bonus.sgzb.base.service.ITypeService;
|
||||
|
|
@ -42,6 +43,13 @@ public class MaTypeController extends BaseController {
|
|||
return AjaxResult.success(maTypeList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询全部库管员信息")
|
||||
@GetMapping("/getMaTypeKeeper")
|
||||
public AjaxResult getMaTypeKeeper(){
|
||||
List<MaKeeperUser> maTypeList = iTypeService.getMaTypeKeeper();
|
||||
return AjaxResult.success(maTypeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工机具类型下拉树
|
||||
* @return 结果
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.bonus.sgzb.base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MaKeeperUser {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.bonus.sgzb.base.mapper;
|
|||
|
||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
||||
import com.bonus.sgzb.base.domain.MaPropSet;
|
||||
import com.bonus.sgzb.base.domain.MaTypeKeeper;
|
||||
import com.bonus.sgzb.base.domain.MaTypeRepair;
|
||||
|
|
@ -86,4 +87,10 @@ public interface MaTypeMapper {
|
|||
int updateTypeNum(MaMachine maMachine);
|
||||
|
||||
List<MaTypeKeeper> selectMaTypeByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询全部库管员信息
|
||||
* @return
|
||||
*/
|
||||
List<MaKeeperUser> getMaTypeKeeper();
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.base.service;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.MaKeeperUser;
|
||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -69,4 +70,9 @@ public interface ITypeService {
|
|||
|
||||
List<MaType> getEquipmentType(Long typeId, String typeName);
|
||||
|
||||
/**
|
||||
* 查询全部库管员信息
|
||||
* @return
|
||||
*/
|
||||
List<MaKeeperUser> getMaTypeKeeper();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
package com.bonus.sgzb.base.service.impl;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.domain.MaPropSet;
|
||||
import com.bonus.sgzb.base.domain.MaTypeFile;
|
||||
import com.bonus.sgzb.base.domain.MaTypeKeeper;
|
||||
import com.bonus.sgzb.base.domain.MaTypeRepair;
|
||||
import com.bonus.sgzb.base.domain.*;
|
||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
||||
import com.bonus.sgzb.base.mapper.MaTypeFileMapper;
|
||||
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
||||
|
|
@ -344,7 +341,14 @@ public class MaTypeServiceImpl implements ITypeService {
|
|||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询全部库管员信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MaKeeperUser> getMaTypeKeeper() {
|
||||
return maTypeMapper.getMaTypeKeeper();
|
||||
}
|
||||
/**
|
||||
* @Author dingjie
|
||||
* @Date 2023/12/14
|
||||
|
|
|
|||
|
|
@ -422,5 +422,15 @@
|
|||
<update id="updateTypeNum">
|
||||
update ma_type set num = IFNULL( num, 0 ) + 1 where type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<select id="getMaTypeKeeper" resultType="com.bonus.sgzb.base.domain.MaKeeperUser">
|
||||
SELECT
|
||||
mtk.user_id AS userId,
|
||||
su.user_name AS userName,
|
||||
su.nick_name AS nickName
|
||||
FROM
|
||||
ma_type_keeper mtk
|
||||
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
|
||||
GROUP BY
|
||||
mtk.user_id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue