|
@@ -173,6 +173,12 @@ 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();
|
|
|
|
+ project.setProjectName(null);
|
|
|
|
+
|
|
|
|
+
|
|
String industryId = project.getIndustryId();
|
|
String industryId = project.getIndustryId();
|
|
project.setIndustryId(null);
|
|
project.setIndustryId(null);
|
|
QueryWrapper<Project> queryWrapper = QueryGenerator.initQueryWrapper(project, req.getParameterMap());
|
|
QueryWrapper<Project> queryWrapper = QueryGenerator.initQueryWrapper(project, req.getParameterMap());
|
|
@@ -183,12 +189,19 @@ public class ProjectController {
|
|
queryWrapper.eq("user_id", sysUser.getId());
|
|
queryWrapper.eq("user_id", sysUser.getId());
|
|
queryWrapper.orderByDesc("create_time");
|
|
queryWrapper.orderByDesc("create_time");
|
|
}
|
|
}
|
|
- if(null!=industryId&&!"".equals(industryId.trim())){
|
|
|
|
|
|
+ if (null != industryId && !"".equals(industryId.trim())) {
|
|
SysCategory category = sysCategoryService.getById(industryId);
|
|
SysCategory category = sysCategoryService.getById(industryId);
|
|
- if(null!=category){
|
|
|
|
- queryWrapper.likeRight("industry_code",category.getCode());
|
|
|
|
|
|
+ if (null != category) {
|
|
|
|
+ queryWrapper.likeRight("industry_code", category.getCode());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (!Check.isNull(advertiserName)) {
|
|
|
|
+ queryWrapper.like("advertiser_name", advertiserName);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(projectName)) {
|
|
|
|
+ queryWrapper.like("project_name", projectName);
|
|
|
|
+ }
|
|
IPage<Project> pageList = projectService.page(page, queryWrapper);
|
|
IPage<Project> pageList = projectService.page(page, queryWrapper);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
result.setResult(pageList);
|
|
result.setResult(pageList);
|
|
@@ -217,7 +230,7 @@ public class ProjectController {
|
|
project.setCompanyId(advertiser.getCompanyId());
|
|
project.setCompanyId(advertiser.getCompanyId());
|
|
}
|
|
}
|
|
SysCategory category = sysCategoryService.getById(project.getIndustryId());
|
|
SysCategory category = sysCategoryService.getById(project.getIndustryId());
|
|
- if(null!=category){
|
|
|
|
|
|
+ if (null != category) {
|
|
project.setIndustryCode(category.getCode());
|
|
project.setIndustryCode(category.getCode());
|
|
project.setIndustryId(category.getId());
|
|
project.setIndustryId(category.getId());
|
|
}
|
|
}
|
|
@@ -283,7 +296,7 @@ public class ProjectController {
|
|
}
|
|
}
|
|
|
|
|
|
SysCategory category = sysCategoryService.getById(project.getIndustryId());
|
|
SysCategory category = sysCategoryService.getById(project.getIndustryId());
|
|
- if(null!=category){
|
|
|
|
|
|
+ if (null != category) {
|
|
project.setIndustryCode(category.getCode());
|
|
project.setIndustryCode(category.getCode());
|
|
project.setIndustryId(category.getId());
|
|
project.setIndustryId(category.getId());
|
|
}
|
|
}
|
|
@@ -308,7 +321,7 @@ public class ProjectController {
|
|
userAllocationQueryWrapper.eq("project_id", project.getId());
|
|
userAllocationQueryWrapper.eq("project_id", project.getId());
|
|
UserAllocation updateUserAllocation = new UserAllocation();
|
|
UserAllocation updateUserAllocation = new UserAllocation();
|
|
updateUserAllocation.setProjectName(project.getProjectName());
|
|
updateUserAllocation.setProjectName(project.getProjectName());
|
|
- // updateUserAllocation.setMediaId(project.getMediaId());
|
|
|
|
|
|
+ // updateUserAllocation.setMediaId(project.getMediaId());
|
|
userAllocationService.update(updateUserAllocation, userAllocationQueryWrapper);
|
|
userAllocationService.update(updateUserAllocation, userAllocationQueryWrapper);
|
|
|
|
|
|
if (ok) {
|
|
if (ok) {
|