Compare commits
No commits in common. "3c77c5047c8334e40218eee2b4bae1caa73ea194" and "1d78d147acda41ee6538b077b2c7c5c7d2449cde" have entirely different histories.
3c77c5047c
...
1d78d147ac
@ -35,7 +35,7 @@ public class ProjectController {
|
||||
}
|
||||
|
||||
@GetMapping("/project/header")
|
||||
public BaseResponse projectGetByName(@RequestParam String name) {
|
||||
public BaseResponse projectGetByName(@RequestParam(required = false) String name) {
|
||||
log.info("请求接口[GET]: /project/header");
|
||||
return projectService.getByName(name);
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ import com.jsl.oa.model.doData.ProjectDO;
|
||||
import com.jsl.oa.model.doData.info.ProjectShowDO;
|
||||
import com.jsl.oa.model.voData.ProjectInfoVO;
|
||||
import com.jsl.oa.utils.BaseResponse;
|
||||
import com.jsl.oa.utils.ErrorCode;
|
||||
import com.jsl.oa.utils.ResultUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -94,9 +92,6 @@ public class ProjectDAO {
|
||||
}
|
||||
|
||||
public BaseResponse getByName(String name) {
|
||||
if(projectMapper.getByName(name)!=null){
|
||||
return ResultUtil.success(projectMapper.getByName(name));
|
||||
}else return ResultUtil.error(ErrorCode.PROJECT_NOT_EXIST);
|
||||
|
||||
return projectMapper.getByName(name);
|
||||
}
|
||||
}
|
||||
|
@ -45,5 +45,5 @@ public interface ProjectMapper {
|
||||
List<ProjectDO> get();
|
||||
|
||||
@Select("select * from organize_oa.oa_project where name=#{name}")
|
||||
ProjectDO getByName(String name);
|
||||
BaseResponse getByName(String name);
|
||||
}
|
||||
|
@ -168,7 +168,6 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
|
||||
@Override
|
||||
public BaseResponse getByName(String name) {
|
||||
|
||||
return projectDAO.getByName(name);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user