08-21-查询提资人对应专业(重复)-/getProfession/{id}
This commit is contained in:
@ -2,10 +2,13 @@ package org.dromara.design.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.dromara.design.domain.DesUser;
|
||||
import org.dromara.design.domain.bo.DesCollectFileBo;
|
||||
import org.dromara.design.domain.bo.DesUserBo;
|
||||
import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto;
|
||||
@ -150,4 +153,13 @@ public class DesExtractController extends BaseController {
|
||||
return R.ok(desExtractService.fileList(id));
|
||||
}
|
||||
|
||||
/***
|
||||
* 查询提资人对应专业
|
||||
*/
|
||||
@GetMapping("/getProfession/{id}")
|
||||
public R<List<String>> getProfession(@PathVariable Long id){
|
||||
List<String> majors = deUserService.selectUserMajors(id);
|
||||
return R.ok( majors);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,12 @@
|
||||
package org.dromara.design.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.dromara.design.domain.DesUser;
|
||||
import org.dromara.design.domain.vo.DesUserVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设计人员Mapper接口
|
||||
*
|
||||
@ -12,4 +15,9 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface DesUserMapper extends BaseMapperPlus<DesUser, DesUserVo> {
|
||||
|
||||
|
||||
// 查询用户专业
|
||||
@Select("select user_major from des_user where user_id = ${userId}")
|
||||
List<String> selectUserMajors(Long userId);
|
||||
|
||||
}
|
||||
|
@ -78,4 +78,10 @@ public interface IDesUserService extends IService<DesUser>{
|
||||
* @return
|
||||
*/
|
||||
Boolean batchAddOrUpdate( DesUserBatchDto dto);
|
||||
|
||||
|
||||
/***
|
||||
* 查询用户对应专业
|
||||
*/
|
||||
List<String> selectUserMajors(Long userId);
|
||||
}
|
||||
|
@ -141,4 +141,9 @@ public class DesUserServiceImpl extends ServiceImpl<DesUserMapper, DesUser> impl
|
||||
//todo:发消息
|
||||
return baseMapper.insertBatch(desUsers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> selectUserMajors(Long userId){
|
||||
return baseMapper.selectUserMajors(userId);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user