mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-08 18:36:51 +08:00
feign
This commit is contained in:
@@ -24,6 +24,11 @@
|
||||
<artifactId>boe-springcloud</artifactId>
|
||||
<version>${xboe.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xboe</groupId>
|
||||
<artifactId>xboe-feign-api</artifactId>
|
||||
<version>${xboe.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
|
||||
@@ -6,6 +6,9 @@ import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.boe.feign.api.serverall.entity.CaseVo;
|
||||
import com.boe.feign.api.serverall.entity.CasesFiledVo;
|
||||
import com.boe.feign.api.serverall.reps.CasesReps;
|
||||
import com.xboe.core.orm.FieldFilters;
|
||||
import com.xboe.module.boecase.dao.CasesMajorTypeDao;
|
||||
import com.xboe.module.boecase.dto.*;
|
||||
@@ -17,6 +20,7 @@ import com.xboe.module.excel.ExportsExcelSenderUtil;
|
||||
|
||||
import com.xboe.system.user.dao.UserDao;
|
||||
import com.xboe.system.user.entity.User;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -372,11 +376,15 @@ public class CasesApi extends ApiBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 案例详情
|
||||
* @param id id
|
||||
* @param addView 是否记录查看次数
|
||||
* @return JsonResponse<CasesReps>
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public JsonResponse<Cases> selectById(String id, Boolean addView) {
|
||||
public JsonResponse<CasesReps> selectById(String id, Boolean addView) {
|
||||
if (StringUtil.isBlank(id)) {
|
||||
return badRequest("参数错误");
|
||||
}
|
||||
@@ -386,11 +394,15 @@ public class CasesApi extends ApiBaseController {
|
||||
}
|
||||
try {
|
||||
Cases cases = casesService.selectById(id, addView);
|
||||
|
||||
if (cases == null){
|
||||
return badRequest("当前案例不存在");
|
||||
}
|
||||
if (cases.getDeleted()) {
|
||||
return badRequest("当前案例已被删除");
|
||||
}
|
||||
return success(cases);
|
||||
CasesReps reps=new CasesReps();
|
||||
BeanUtils.copyProperties(cases,reps);
|
||||
return success(reps);
|
||||
} catch (Exception e) {
|
||||
log.error("查看案例失败", e);
|
||||
return error("查看失败", e.getMessage());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.xboe.module.boecase.dao;
|
||||
|
||||
import com.xboe.module.boecase.dto.CasePageVo;
|
||||
import com.xboe.module.boecase.dto.CaseVo;
|
||||
import com.xboe.module.boecase.entity.Cases;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.xboe.module.boecase.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CaseVo {
|
||||
|
||||
|
||||
private String keyWord;
|
||||
|
||||
private Boolean breCommend;
|
||||
|
||||
private String orderField;
|
||||
|
||||
private Boolean orderAsc;
|
||||
|
||||
private String orgDomain;//后台查询一级
|
||||
|
||||
private String majorType;
|
||||
|
||||
private Boolean isTop;
|
||||
|
||||
private String caseType;
|
||||
|
||||
private Boolean excellent;
|
||||
|
||||
|
||||
private String authorName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.xboe.module.boecase.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CasesFiledVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String companyId;
|
||||
|
||||
private String coverUrl;
|
||||
|
||||
private String title;
|
||||
|
||||
private String authorId;
|
||||
|
||||
private String authorName;
|
||||
|
||||
private Boolean excellent;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.xboe.module.boecase.service;
|
||||
|
||||
import com.boe.feign.api.serverall.entity.CaseVo;
|
||||
import com.boe.feign.api.serverall.entity.CasesFiledVo;
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.core.CurrentUser;
|
||||
import com.xboe.module.boecase.dto.*;
|
||||
@@ -28,7 +30,7 @@ public interface ICasesService{
|
||||
/**
|
||||
* 案例管理列表搜索
|
||||
* */
|
||||
PageList<Cases> managerList(int pageIndex,int pageSize,CaseVo caseVo);
|
||||
PageList<Cases> managerList(int pageIndex, int pageSize, CaseVo caseVo);
|
||||
|
||||
List<Cases> exportCase(CaseVo caseVo);
|
||||
|
||||
@@ -37,7 +39,7 @@ public interface ICasesService{
|
||||
/**
|
||||
* 案例分页
|
||||
* */
|
||||
PageList<CasesFiledVo> queryList(int pageIndex,int pageSize,CaseVo caseVo);
|
||||
PageList<CasesFiledVo> queryList(int pageIndex, int pageSize, CaseVo caseVo);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,8 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.boe.feign.api.serverall.entity.CaseVo;
|
||||
import com.boe.feign.api.serverall.entity.CasesFiledVo;
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.api.vo.UserDynamic;
|
||||
import com.xboe.api.vo.UserDynamicResult;
|
||||
|
||||
Reference in New Issue
Block a user