|
@@ -1,5 +1,9 @@
|
|
|
package cn.com.ctop.kuaishou.modules.hosting.controller;
|
|
|
|
|
|
+import cn.com.ctop.common.module.entity.Project;
|
|
|
+import cn.com.ctop.common.module.entity.UserAllocation;
|
|
|
+import cn.com.ctop.common.module.service.IProjectService;
|
|
|
+import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
|
|
@@ -97,6 +101,12 @@ public class KuaishouHostingTemplateController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IUserAllocationService userAllocationService;
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IProjectService projectService;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -123,6 +133,22 @@ public class KuaishouHostingTemplateController {
|
|
|
queryWrapper.orderByDesc("create_time");
|
|
|
Page<KuaishouHostingTemplate> page = new Page<KuaishouHostingTemplate>(pageNo, pageSize);
|
|
|
IPage<KuaishouHostingTemplate> pageList = kuaishouHostingTemplateService.page(page, queryWrapper);
|
|
|
+ List<KuaishouHostingTemplate> records = pageList.getRecords();
|
|
|
+ if (!Check.isNull(records)) {
|
|
|
+ for (KuaishouHostingTemplate template : records) {
|
|
|
+ UserAllocation userAllocation = userAllocationService.getByAccountId(template.getAccountId());
|
|
|
+ if (Check.isNull(userAllocation)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ template.setAccountName(userAllocation.getAuthName());
|
|
|
+ template.setUserName(userAllocation.getUserName());
|
|
|
+ Project project = projectService.getById(userAllocation.getProjectId());
|
|
|
+ if (!Check.isNull(project)) {
|
|
|
+ template.setProjectName(project.getProjectName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
result.setSuccess(true);
|
|
|
result.setResult(pageList);
|
|
|
return result;
|