手机端-搜索-根据用户获取文档库订阅和收藏信息接口开发。
This commit is contained in:
+8
-1
@@ -5,10 +5,10 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.phone.service.ISearchCenterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -27,4 +27,11 @@ public class SearchCenterController {
|
||||
public Result<Map<String, Object>> getDataCount() {
|
||||
return this.searchCenterService.getDataCount();
|
||||
}
|
||||
|
||||
@AutoLog(value = "手机端-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
@ApiOperation(value = "手机端-搜索-根据用户获取文档库订阅和收藏信息", notes = "手机端-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
@GetMapping(value = "/getWdkCollectAndSubscribeInfoByUser")
|
||||
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(@RequestParam Map<String,Object> params) {
|
||||
return this.searchCenterService.getWdkCollectAndSubscribeInfoByUser(params);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -7,4 +7,6 @@ import java.util.Map;
|
||||
public interface ISearchCenterService {
|
||||
|
||||
Result<Map<String, Object>> getDataCount();
|
||||
|
||||
Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params);
|
||||
}
|
||||
|
||||
+30
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.phone.service.ISearchCenterService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
@@ -13,12 +15,15 @@ import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@@ -32,6 +37,10 @@ public class SearchCenterServiceImpl implements ISearchCenterService {
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
@Autowired
|
||||
private ILawsMonthlyReportManageEOService lawsMonthlyReportManageEOService;
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
private IOnlCgformSubscribeService onlCgformSubscribeService;
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getDataCount() {
|
||||
@@ -71,4 +80,25 @@ public class SearchCenterServiceImpl implements ISearchCenterService {
|
||||
result.put("lawsMonthlyReportManageCount", lawsMonthlyReportManageCount);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params) {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
String id = (String) params.get("id");
|
||||
QueryWrapper<OnlCgformCollection> collectionQueryWrap = new QueryWrapper<>();
|
||||
collectionQueryWrap.lambda().eq(OnlCgformCollection::getDocumentId, id);
|
||||
collectionQueryWrap.lambda().eq(OnlCgformCollection::getCreateBy, currentUser.getUsername());
|
||||
List<OnlCgformCollection> collectionList = this.onlCgformCollectionService.list(collectionQueryWrap);
|
||||
|
||||
QueryWrapper<OnlCgformSubscribe> subscribeQueryWrap = new QueryWrapper();
|
||||
subscribeQueryWrap.lambda().eq(OnlCgformSubscribe::getDocumentId, id);
|
||||
subscribeQueryWrap.lambda().eq(OnlCgformSubscribe::getCreateBy, currentUser.getUsername());
|
||||
List<OnlCgformSubscribe> subscribeList = this.onlCgformSubscribeService.list(subscribeQueryWrap);
|
||||
|
||||
result.put("subscribeList", subscribeList);
|
||||
result.put("collectionList", collectionList);
|
||||
return Result.OK(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user