|
@@ -240,33 +240,29 @@ public class ProjectController {
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
HttpServletRequest req) {
|
|
HttpServletRequest req) {
|
|
Result<IPage<Project>> result = new Result<>();
|
|
Result<IPage<Project>> result = new Result<>();
|
|
- /* String advertiserName = project.getAdvertiserName();
|
|
|
|
- project.setAdvertiserName(null);*/
|
|
|
|
|
|
+
|
|
String projectName = project.getProjectName();
|
|
String projectName = project.getProjectName();
|
|
project.setProjectName(null);
|
|
project.setProjectName(null);
|
|
- /* String industryId = project.getIndustryId();
|
|
|
|
- project.setIndustryId(null);*/
|
|
|
|
|
|
+
|
|
|
|
+ String userId = project.getUserId();
|
|
|
|
+ project.setUserId(null);
|
|
|
|
+
|
|
QueryWrapper<Project> queryWrapper = QueryGenerator.initQueryWrapper(project, req.getParameterMap());
|
|
QueryWrapper<Project> queryWrapper = QueryGenerator.initQueryWrapper(project, req.getParameterMap());
|
|
Page<Project> page = new Page<>(pageNo, pageSize);
|
|
Page<Project> page = new Page<>(pageNo, pageSize);
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(sysUser.getId());
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(sysUser.getId());
|
|
- if (!(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode) || roleCode.contains("sale") || "meidaManager".equals(roleCode))) {
|
|
|
|
- queryWrapper.eq("user_id", sysUser.getId());
|
|
|
|
- queryWrapper.orderByDesc("create_time");
|
|
|
|
- }
|
|
|
|
- /*if (null != industryId && !"".equals(industryId.trim())) {
|
|
|
|
- SysCategory category = sysCategoryService.getById(industryId);
|
|
|
|
- if (null != category) {
|
|
|
|
- queryWrapper.likeRight("industry_code", category.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+ if ("operator".equals(roleCode) || "kuaishouOperationManager".equals(roleCode) || "touTiaoOperationManager".equals(roleCode)) {
|
|
|
|
+ queryWrapper.eq("responsible_id", userId);
|
|
|
|
+
|
|
|
|
+ } else if ("plane".equals(roleCode) || "plan".equals(roleCode) || "shot".equals(roleCode) || "clip".equals(roleCode) || "designTeamLeader".equals(roleCode) || "planeLeader".equals(roleCode)) {
|
|
|
|
+ queryWrapper.eq("design_responsible_id", userId);
|
|
}
|
|
}
|
|
- if (!Check.isNull(advertiserName)) {
|
|
|
|
- queryWrapper.like("advertiser_name", advertiserName);
|
|
|
|
|
|
|
|
- }*/
|
|
|
|
if (!Check.isNull(projectName)) {
|
|
if (!Check.isNull(projectName)) {
|
|
queryWrapper.like("project_name", projectName);
|
|
queryWrapper.like("project_name", projectName);
|
|
}
|
|
}
|
|
|
|
+ queryWrapper.orderByDesc("create_time");
|
|
|
|
+
|
|
IPage<Project> pageList = projectService.page(page, queryWrapper);
|
|
IPage<Project> pageList = projectService.page(page, queryWrapper);
|
|
List<Project> records = pageList.getRecords();
|
|
List<Project> records = pageList.getRecords();
|
|
if (!Check.isNull(records)) {
|
|
if (!Check.isNull(records)) {
|