Commit 0430fbd2 by 徐高华

朋友圈

parent 932dba37
...@@ -7,6 +7,8 @@ import com.gic.api.base.commons.ServiceResponse; ...@@ -7,6 +7,8 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.DateUtil; import com.gic.commons.util.DateUtil;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.api.dto.EnterpriseDTO; import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO; import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDataDTO; import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDataDTO;
import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO; import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO;
...@@ -17,6 +19,7 @@ import com.gic.haoban.manage.web.vo.moment.MomentPlanExcelVO; ...@@ -17,6 +19,7 @@ import com.gic.haoban.manage.web.vo.moment.MomentPlanExcelVO;
import com.gic.web.common.download.DownloadHandlerAbstract; import com.gic.web.common.download.DownloadHandlerAbstract;
import com.gic.web.common.download.context.Context; import com.gic.web.common.download.context.Context;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -30,6 +33,11 @@ public class MomentDataExcelHandler extends DownloadHandlerAbstract<MomentDataEx ...@@ -30,6 +33,11 @@ public class MomentDataExcelHandler extends DownloadHandlerAbstract<MomentDataEx
@Autowired @Autowired
private QwMomentApiService qwMomentApiService ; private QwMomentApiService qwMomentApiService ;
@Autowired
private StoreService storeService ;
@Override @Override
public List<MomentDataExcelVO> getData(Context context, String json, Integer currentPage) { public List<MomentDataExcelVO> getData(Context context, String json, Integer currentPage) {
PlanDataListQDTO qdto = JSON.parseObject(json, PlanDataListQDTO.class); PlanDataListQDTO qdto = JSON.parseObject(json, PlanDataListQDTO.class);
...@@ -48,6 +56,11 @@ public class MomentDataExcelHandler extends DownloadHandlerAbstract<MomentDataEx ...@@ -48,6 +56,11 @@ public class MomentDataExcelHandler extends DownloadHandlerAbstract<MomentDataEx
if(qdto.getType()==2 && null != vo.getCommentTime()) { if(qdto.getType()==2 && null != vo.getCommentTime()) {
vo.setTimeExcel(DateUtil.dateToStr(vo.getCommentTime(),"yyyy-MM-dd HH:mm:ss")); vo.setTimeExcel(DateUtil.dateToStr(vo.getCommentTime(),"yyyy-MM-dd HH:mm:ss"));
} }
if(StringUtils.isNotBlank(vo.getStoreId())) {
StoreDTO store = this.storeService.getStore(vo.getStoreId());
vo.setStoreName(store.getStoreName());
vo.setStoreCode(store.getStoreCode());
}
voList.add(vo) ; voList.add(vo) ;
} }
} }
......
...@@ -383,6 +383,18 @@ public class QwMomentController { ...@@ -383,6 +383,18 @@ public class QwMomentController {
PlanDataListQDTO qdto = EntityUtil.changeEntityByJSON(PlanDataListQDTO.class,qo) ; PlanDataListQDTO qdto = EntityUtil.changeEntityByJSON(PlanDataListQDTO.class,qo) ;
ServiceResponse<Page<QwMomentPlanDataDTO>> resp = this.qwMomentApiService.dataList(qdto) ; ServiceResponse<Page<QwMomentPlanDataDTO>> resp = this.qwMomentApiService.dataList(qdto) ;
Page<QwMomentPlanDataVO> retPage = PageHelperUtils.changePageToCurrentPage(resp.getResult(), QwMomentPlanDataVO.class); Page<QwMomentPlanDataVO> retPage = PageHelperUtils.changePageToCurrentPage(resp.getResult(), QwMomentPlanDataVO.class);
List<QwMomentPlanDataVO> list = retPage.getResult() ;
if(CollectionUtils.isNotEmpty(list)) {
for (QwMomentPlanDataVO vo : list) {
String storeId = vo.getStoreId() ;
if(StringUtils.isNotBlank(storeId)) {
StoreDTO store = this.storeService.getStore(storeId);
vo.setStoreId(storeId);
vo.setStoreName(store.getStoreName());
vo.setStoreCode(store.getStoreCode());
}
}
}
return RestResponse.successResult(retPage); return RestResponse.successResult(retPage);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment