1. 调整
This commit is contained in:
		
							parent
							
								
									881ec010f9
								
							
						
					
					
						commit
						8901137783
					
				|  | @ -31,6 +31,14 @@ public class EtArticle extends BaseEntity | |||
|     @Excel(name = "运营区id") | ||||
|     private Long areaId; | ||||
| 
 | ||||
|     /** 运营区 */ | ||||
|     @Excel(name = "运营区") | ||||
|     private String areaName; | ||||
| 
 | ||||
|     /** 运营商 */ | ||||
|     @Excel(name = "运营商") | ||||
|     private String deptName; | ||||
| 
 | ||||
|     /** logo地址 */ | ||||
|     private String logo; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,15 +1,21 @@ | |||
| package com.ruoyi.system.service.impl; | ||||
| 
 | ||||
| import cn.hutool.core.util.ObjectUtil; | ||||
| import com.ruoyi.common.annotation.DataScope; | ||||
| import com.ruoyi.common.core.domain.entity.AsArticleClassify; | ||||
| import com.ruoyi.common.core.domain.entity.SysDept; | ||||
| import com.ruoyi.common.utils.DateUtils; | ||||
| import com.ruoyi.system.domain.EtArticle; | ||||
| import com.ruoyi.system.domain.EtOperatingArea; | ||||
| import com.ruoyi.system.mapper.AsArticleClassifyMapper; | ||||
| import com.ruoyi.system.mapper.AsArticleMapper; | ||||
| import com.ruoyi.system.mapper.EtOperatingAreaMapper; | ||||
| import com.ruoyi.system.mapper.SysDictDataMapper; | ||||
| import com.ruoyi.system.service.IAsArticleClassifyService; | ||||
| import com.ruoyi.system.service.IAsArticleService; | ||||
| import com.ruoyi.system.service.IWxPayService; | ||||
| import org.apache.commons.lang3.ObjectUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| import javax.annotation.Resource; | ||||
|  | @ -33,6 +39,12 @@ public class AsArticleServiceImpl implements IAsArticleService | |||
|     @Resource | ||||
|     private AsArticleClassifyMapper articleClassifyMapper; | ||||
| 
 | ||||
|     @Resource | ||||
|     private EtOperatingAreaMapper etOperatingAreaMapper; | ||||
| 
 | ||||
|     @Autowired | ||||
|     private IWxPayService wxPayService; | ||||
| 
 | ||||
|     /** | ||||
|      * 查询文章 | ||||
|      * | ||||
|  | @ -61,7 +73,15 @@ public class AsArticleServiceImpl implements IAsArticleService | |||
|     { | ||||
|         List<EtArticle> etArticles = asArticleMapper.selectAsArticleList(etArticle); | ||||
|         for (EtArticle etArticle1 : etArticles) { | ||||
|             etArticle.setFormatCreateTime(DateUtils.getYYYY_MM_DD(etArticle1.getCreateTime())); | ||||
|             EtOperatingArea area = etOperatingAreaMapper.selectEtOperatingAreaByAreaId(etArticle1.getAreaId()); | ||||
|             SysDept sysDept = wxPayService.getDeptObjByAreaId(etArticle1.getAreaId()); | ||||
|             if(ObjectUtil.isNotNull(sysDept)){ | ||||
|                 etArticle1.setDeptName(sysDept.getDeptName()); | ||||
|             } | ||||
|             if(ObjectUtil.isNotNull(area)){ | ||||
|                 etArticle1.setAreaName(area.getAreaName()); | ||||
|             } | ||||
|             etArticle1.setFormatCreateTime(DateUtils.getYYYY_MM_DD(etArticle1.getCreateTime())); | ||||
|         } | ||||
|         return etArticles; | ||||
|     } | ||||
|  |  | |||
|  | @ -285,7 +285,8 @@ public class WxPayService implements IWxPayService { | |||
|             log.info("获取到运营商对象:【{}】",JSON.toJSON(sysDept)); | ||||
|         }else{ | ||||
|             log.info("区域:【{}】没有绑定运营商",areaId); | ||||
|             throw new ServiceException("区域:【"+areaId+"】没有绑定运营商"); | ||||
| //            throw new ServiceException("区域:【"+areaId+"】没有绑定运营商"); | ||||
|             return null; | ||||
|         } | ||||
|         return sysDept; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user