country_card-管理发布明细表-列表查询:处理展示数据。
This commit is contained in:
+5
-3
@@ -59,6 +59,7 @@ public class CountryCardManageReleaseDetailEOController extends JeroController<C
|
|||||||
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
||||||
Page<CountryCardManageReleaseDetailEO> page = new Page<CountryCardManageReleaseDetailEO>(pageNo, pageSize);
|
Page<CountryCardManageReleaseDetailEO> page = new Page<CountryCardManageReleaseDetailEO>(pageNo, pageSize);
|
||||||
IPage<CountryCardManageReleaseDetailEO> pageList = countryCardManageReleaseDetailEOService.page(page, queryWrapper);
|
IPage<CountryCardManageReleaseDetailEO> pageList = countryCardManageReleaseDetailEOService.page(page, queryWrapper);
|
||||||
|
this.countryCardManageReleaseDetailEOService.disposeData(pageList.getRecords(),countryCardManageReleaseDetailEO.getCut());
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,9 +71,10 @@ public class CountryCardManageReleaseDetailEOController extends JeroController<C
|
|||||||
@AutoLog(value = "问题知识库-country_card-管理发布明细表-列表查询")
|
@AutoLog(value = "问题知识库-country_card-管理发布明细表-列表查询")
|
||||||
@ApiOperation(value="问题知识库-country_card-管理发布明细表-列表查询", notes="问题知识库-country_card-管理发布明细表-列表查询")
|
@ApiOperation(value="问题知识库-country_card-管理发布明细表-列表查询", notes="问题知识库-country_card-管理发布明细表-列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<List<CountryCardManageReleaseDetailEO>> queryList() {
|
public Result<List<CountryCardManageReleaseDetailEO>> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO,HttpServletRequest req) {
|
||||||
List<CountryCardManageReleaseDetailEO> list = countryCardManageReleaseDetailEOService.queryList();
|
List<CountryCardManageReleaseDetailEO> result = countryCardManageReleaseDetailEOService.queryList(countryCardManageReleaseDetailEO,req);
|
||||||
return Result.OK(list);
|
this.countryCardManageReleaseDetailEOService.disposeData(result,countryCardManageReleaseDetailEO.getCut());
|
||||||
|
return Result.OK(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+9
-4
@@ -1,21 +1,18 @@
|
|||||||
package com.jero.modules.problemKnowledgeBase.entity;
|
package com.jero.modules.problemKnowledgeBase.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -70,6 +67,10 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
|||||||
@Excel(name = "模板表id", width = 15)
|
@Excel(name = "模板表id", width = 15)
|
||||||
@ApiModelProperty(value = "模板表id")
|
@ApiModelProperty(value = "模板表id")
|
||||||
private java.lang.String countryCardTempId;
|
private java.lang.String countryCardTempId;
|
||||||
|
/**标签名称**/
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "标签名称")
|
||||||
|
private java.lang.String countryCardTempIdName;
|
||||||
|
|
||||||
/**描述*/
|
/**描述*/
|
||||||
@Excel(name = "描述", width = 15)
|
@Excel(name = "描述", width = 15)
|
||||||
@@ -81,4 +82,8 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "内容")
|
@ApiModelProperty(value = "内容")
|
||||||
private java.lang.String content;
|
private java.lang.String content;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cut;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-7
@@ -1,8 +1,6 @@
|
|||||||
package com.jero.modules.problemKnowledgeBase.entity;
|
package com.jero.modules.problemKnowledgeBase.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
@@ -18,8 +16,6 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 问题知识库表
|
* @Description: 问题知识库表
|
||||||
@@ -100,9 +96,9 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
|||||||
|
|
||||||
/**内容(正文)*/
|
/**内容(正文)*/
|
||||||
@Excel(name = "内容(正文)", width = 15)
|
@Excel(name = "内容(正文)", width = 15)
|
||||||
private transient java.lang.String contentString;
|
private java.lang.String content;
|
||||||
|
|
||||||
private byte[] content;
|
/*private byte[] content;
|
||||||
|
|
||||||
public byte[] getContent(){
|
public byte[] getContent(){
|
||||||
if(contentString==null){
|
if(contentString==null){
|
||||||
@@ -126,7 +122,7 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}*/
|
||||||
/**附件*/
|
/**附件*/
|
||||||
@Excel(name = "附件", width = 15)
|
@Excel(name = "附件", width = 15)
|
||||||
@ApiModelProperty(value = "附件")
|
@ApiModelProperty(value = "附件")
|
||||||
|
|||||||
+10
-1
@@ -2,6 +2,8 @@ package com.jero.modules.problemKnowledgeBase.service;
|
|||||||
|
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,5 +59,12 @@ public interface ICountryCardManageReleaseDetailEOService extends IService<Count
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CountryCardManageReleaseDetailEO> queryList();
|
List<CountryCardManageReleaseDetailEO> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理数据
|
||||||
|
* @param datas
|
||||||
|
* @param cut
|
||||||
|
*/
|
||||||
|
void disposeData(List<CountryCardManageReleaseDetailEO> datas, String cut);
|
||||||
}
|
}
|
||||||
|
|||||||
+40
-2
@@ -1,15 +1,28 @@
|
|||||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseDetailEOMapper;
|
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseDetailEOMapper;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 问题知识库-country_card-管理发布明细表
|
* @Description: 问题知识库-country_card-管理发布明细表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
@@ -20,6 +33,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||||
public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<CountryCardManageReleaseDetailEOMapper, CountryCardManageReleaseDetailEO> implements ICountryCardManageReleaseDetailEOService {
|
public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<CountryCardManageReleaseDetailEOMapper, CountryCardManageReleaseDetailEO> implements ICountryCardManageReleaseDetailEOService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICountryCardTempEOService countryCardTempEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -86,7 +102,29 @@ public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<Cou
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<CountryCardManageReleaseDetailEO> queryList() {
|
public List<CountryCardManageReleaseDetailEO> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO, HttpServletRequest req) {
|
||||||
return list();
|
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
||||||
|
List<CountryCardManageReleaseDetailEO> result = this.list(queryWrapper);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disposeData(List<CountryCardManageReleaseDetailEO> datas, String cut) {
|
||||||
|
if (CollectionUtils.isNotEmpty(datas)) {
|
||||||
|
//获取模板
|
||||||
|
List<CountryCardTempEO> countryCardTempEOList = this.countryCardTempEOService.list();
|
||||||
|
|
||||||
|
datas.forEach(data -> {
|
||||||
|
String lableName = countryCardTempEOList.stream().filter(countryCardTempEO -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(data.getCountryCardTempId(), countryCardTempEO.getId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(CountryCardTempEO::getLableName).collect(Collectors.joining(","));
|
||||||
|
data.setCountryCardTempIdName(lableName);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user