游客查询
Some checks failed
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head There was a failure building this commit
Some checks failed
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head There was a failure building this commit
This commit is contained in:
parent
ce123e1858
commit
6e4f22170d
|
@ -76,7 +76,7 @@ public class AuthControllerAspect {
|
|||
"&& !execution(* com.jsl.oa.controllers.CustomController.*(..)) " +
|
||||
"&& !execution(* com.jsl.oa.controllers.InfoController.infoGetHeaderImage(..)) " +
|
||||
"&& !execution(* com.jsl.oa.controllers.InfoController.infoGetHeaderUser(..))" +
|
||||
"&& !execution(* com.jsl.oa.controllers.ProjectController.projectGet(..))")
|
||||
"&& !execution(* com.jsl.oa.controllers.ProjectController.projectGetCustom(..))")
|
||||
public Object tokenControllerAround(ProceedingJoinPoint pjp) throws Throwable {
|
||||
// 获取 HttpServletRequest 对象
|
||||
HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
|
||||
|
|
|
@ -63,7 +63,9 @@ public class ShiroConfiguration {
|
|||
filterChainDefinitionMap.put("/info/header-user/get", "anon"); // 信息接口允许匿名访问
|
||||
filterChainDefinitionMap.put("/project/header/get", "anon"); // 信息接口允许匿名访问
|
||||
filterChainDefinitionMap.put("/project/get", "anon"); // 信息接口允许匿名访问
|
||||
filterChainDefinitionMap.put("/project/get/custom", "anon"); // 游客获取项目允许匿名访问
|
||||
filterChainDefinitionMap.put("/**/**", "authc"); // 其他接口一律拦截(需要Token)
|
||||
|
||||
return filterChainDefinitionMap;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,18 @@ public class ProjectController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 全部项目的信息获取(打开项目页)
|
||||
* 游客获取项目
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/project/get/custom")
|
||||
public BaseResponse projectGetCustom(@RequestParam(required = false) Integer id){
|
||||
log.info("请求接口[GET]: /project/all/get");
|
||||
return projectService.tget(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我负责的界面的获取项目
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.jsl.oa.model.doData.ProjectWorkDO;
|
|||
import com.jsl.oa.model.doData.info.ProjectShowDO;
|
||||
import com.jsl.oa.model.voData.ProjectInfoVO;
|
||||
import com.jsl.oa.model.voData.ProjectWorkVO;
|
||||
import com.jsl.oa.utils.BaseResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -198,5 +199,8 @@ public class ProjectDAO {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public List<ProjectDO> tget(Integer id) {
|
||||
log.info("DAO层");
|
||||
return projectMapper.tget(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,15 +50,15 @@ public interface ProjectMapper {
|
|||
|
||||
//@Select("select * from organize_oa.oa_project where json_extract(tags,'$.tags')" +
|
||||
//"like concat('%',#{tags},'%')")
|
||||
@Select("select * from organize_oa.oa_project where is_finish=#{isFinish} and is_delete=false")
|
||||
@Select("select * from organize_oa.oa_project where is_finish=#{isFinish} and is_delete=false and principal_id=#{userId}")
|
||||
List<ProjectDO>getByIsfinish(Long userId,Integer isFinish);
|
||||
|
||||
List<ProjectDO>getByTags(Long userId,List<String> tags);
|
||||
|
||||
@Select("select * from organize_oa.oa_project where is_delete=false and status=1")
|
||||
@Select("select * from organize_oa.oa_project where is_delete=false and status=1 and principal_id=#{userId}")
|
||||
List<ProjectDO> get(Long userId);
|
||||
|
||||
@Select("select * from organize_oa.oa_project where status =1 and is_delete =true")
|
||||
@Select("select * from organize_oa.oa_project where status =1 and is_delete =true and principal_id=#{userId}")
|
||||
List<ProjectDO> get1(Long userId);
|
||||
|
||||
@Select("select * from organize_oa.oa_project where name=#{name}")
|
||||
|
@ -96,5 +96,6 @@ public interface ProjectMapper {
|
|||
@Select("select * from organize_oa.oa_project_work where is_delete =true and status=1 and principal_id=#{userId}")
|
||||
List<ProjectWorkDO> workget1(Long userId);
|
||||
|
||||
|
||||
//@Select("select * from organize_oa.oa_project where is_delete=false and status=1")
|
||||
List<ProjectDO> tget(Integer id);
|
||||
}
|
||||
|
|
|
@ -42,4 +42,6 @@ public interface ProjectService {
|
|||
BaseResponse workget(Integer listAll, HttpServletRequest request, List<String> tags, Integer isFinish);
|
||||
|
||||
BaseResponse projecWorktAdd(HttpServletRequest request, ProjectWorkVO projectWorkVO);
|
||||
|
||||
BaseResponse tget(Integer id);
|
||||
}
|
||||
|
|
|
@ -64,6 +64,13 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
return ResultUtil.success("添加成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse tget(Integer id) {
|
||||
log.info("\t> 执行 Service 层 ProjectService.tget 方法");
|
||||
List<ProjectDO> projectDOList = projectDAO.tget(id);
|
||||
return ResultUtil.success(projectDOList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CheckUserHasPermission("project.edit")
|
||||
public BaseResponse projectEdit(HttpServletRequest request, @NotNull ProjectInfoVO projectEdit) {
|
||||
|
|
|
@ -64,5 +64,11 @@
|
|||
#{tag}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="tget" resultType="com.jsl.oa.model.doData.ProjectDO">
|
||||
select * from organize_oa.oa_project where is_delete=false
|
||||
<if test="id != null">
|
||||
and id=#{id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user