|
@@ -11,9 +11,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.shiro.SecurityUtils;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
|
+import org.jeecg.common.system.vo.LoginUser;
|
|
import org.jeecg.modules.ctop.entity.Project;
|
|
import org.jeecg.modules.ctop.entity.Project;
|
|
import org.jeecg.modules.ctop.entity.ProjectMember;
|
|
import org.jeecg.modules.ctop.entity.ProjectMember;
|
|
import org.jeecg.modules.ctop.mapper.ProjectMemberMapper;
|
|
import org.jeecg.modules.ctop.mapper.ProjectMemberMapper;
|
|
@@ -22,6 +24,7 @@ import org.jeecg.modules.ctop.service.IProjectService;
|
|
import org.jeecg.modules.system.entity.SysUser;
|
|
import org.jeecg.modules.system.entity.SysUser;
|
|
import org.jeecg.modules.system.service.ISysUserService;
|
|
import org.jeecg.modules.system.service.ISysUserService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -353,22 +356,8 @@ public class ProjectMemberController {
|
|
public Result<List<Map<String, Object>>> getProjectAccountBy() {
|
|
public Result<List<Map<String, Object>>> getProjectAccountBy() {
|
|
Result<List<Map<String, Object>>> resultBody = new Result<>();
|
|
Result<List<Map<String, Object>>> resultBody = new Result<>();
|
|
try {
|
|
try {
|
|
- List<Integer> mediaList = new ArrayList<>();
|
|
|
|
- mediaList.add(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT);
|
|
|
|
- mediaList.add(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INSIDE_INT);
|
|
|
|
- //查询登录账号下的项目
|
|
|
|
- List<ProjectMember> projectMemberList = projectMemberService.getProjects(mediaList);
|
|
|
|
- if (projectMemberList.isEmpty()) {
|
|
|
|
- resultBody.error500("账户下未找到项目");
|
|
|
|
- return resultBody;
|
|
|
|
- }
|
|
|
|
- List<Map<String, Object>> result = new ArrayList<>();
|
|
|
|
- projectMemberList.forEach(ProjectMember -> {
|
|
|
|
- Map<String, Object> temp=projectMemberService.queryAccountByProjectId(ProjectMember);
|
|
|
|
- if(temp!=null){
|
|
|
|
- result.add(temp);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ String userId=((LoginUser) SecurityUtils.getSubject().getPrincipal()).getId();
|
|
|
|
+ List<Map<String, Object>> result = projectMemberService.getProjectAccountByUserId(userId);
|
|
resultBody.setSuccess(true);
|
|
resultBody.setSuccess(true);
|
|
resultBody.setResult(result);
|
|
resultBody.setResult(result);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|