Browse Source

图片配置修改

feature/screenDataPush
songyunpeng 5 years ago
parent
commit
6f4f1ec3b6
  1. 43
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppImgTypeListFormDTO.java
  2. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiImgConfigController.java
  3. 9
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ImgConfigService.java
  4. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ImgConfigServiceImpl.java

43
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppImgTypeListFormDTO.java

@ -0,0 +1,43 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.form;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 取消报名参数
*
* @author wanggongfeng
* @since v1.0.0 2019-12-17
*/
@Data
public class EpdcAppImgTypeListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 图片类型列表
*/
private List<String> imageTypes;
}

12
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiImgConfigController.java

@ -1,6 +1,7 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.EpdcAppImgTypeListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcImgConfigResultDTO;
import com.elink.esua.epdc.service.ImgConfigService;
import org.springframework.beans.factory.annotation.Autowired;
@ -35,4 +36,15 @@ public class ApiImgConfigController {
public Result<List<EpdcImgConfigResultDTO>> getImgUrlList(@PathVariable("imgType") String imgType){
return imgConfigService.listImgUrl(imgType);
}
/**
* 根据 志愿者模块图片类型 查询图片列表
* @param epdcAppImgTypeListFormDTO 志愿者模块图片类型
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcImgConfigResultDTO>>
* @Author zhangyong
* @Date 17:04 2020-05-27
**/
@GetMapping("getImgUrlList")
public Result<List<EpdcImgConfigResultDTO>> getImgUrlList(EpdcAppImgTypeListFormDTO epdcAppImgTypeListFormDTO){
return imgConfigService.listImgUrlByTypeList(epdcAppImgTypeListFormDTO);
}
}

9
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ImgConfigService.java

@ -22,6 +22,7 @@ import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.ImgConfigDTO;
import com.elink.esua.epdc.dto.SysSimpleDictDTO;
import com.elink.esua.epdc.dto.form.EpdcAppImgTypeListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcImgConfigResultDTO;
import com.elink.esua.epdc.entity.ImgConfigEntity;
@ -114,4 +115,12 @@ public interface ImgConfigService extends BaseService<ImgConfigEntity> {
* @Date 17:04 2020-05-27
**/
Result<List<EpdcImgConfigResultDTO>> listImgUrl(String imgType);
/**
* @Description 根据 志愿者模块图片类型列表 查询图片列表
* @Author songyunpeng
* @Date 2021/5/14
* @Param [epdcAppImgTypeListFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcImgConfigResultDTO>>
**/
Result<List<EpdcImgConfigResultDTO>> listImgUrlByTypeList(EpdcAppImgTypeListFormDTO epdcAppImgTypeListFormDTO);
}

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ImgConfigServiceImpl.java

@ -27,6 +27,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dao.ImgConfigDao;
import com.elink.esua.epdc.dto.ImgConfigDTO;
import com.elink.esua.epdc.dto.SysSimpleDictDTO;
import com.elink.esua.epdc.dto.form.EpdcAppImgTypeListFormDTO;
import com.elink.esua.epdc.dto.result.EpdcImgConfigResultDTO;
import com.elink.esua.epdc.entity.ImgConfigEntity;
import com.elink.esua.epdc.feign.AdminFeignClient;
@ -117,4 +118,14 @@ public class ImgConfigServiceImpl extends BaseServiceImpl<ImgConfigDao, ImgConfi
return new Result<List<EpdcImgConfigResultDTO>>().ok(list);
}
@Override
public Result<List<EpdcImgConfigResultDTO>> listImgUrlByTypeList(EpdcAppImgTypeListFormDTO epdcAppImgTypeListFormDTO) {
QueryWrapper<ImgConfigEntity> queryWrapper = new QueryWrapper();
queryWrapper.eq("ENABLE_FLAG",1);
queryWrapper.in(epdcAppImgTypeListFormDTO.getImageTypes().size()>0,"IMG_TYPE",epdcAppImgTypeListFormDTO.getImageTypes());
List<ImgConfigEntity> imgConfigEntities = baseDao.selectList(queryWrapper);
List<EpdcImgConfigResultDTO> epdcImgConfigResultDTOS = ConvertUtils.sourceToTarget(imgConfigEntities, EpdcImgConfigResultDTO.class);
return new Result<List<EpdcImgConfigResultDTO>>().ok(epdcImgConfigResultDTOS;
}
}

Loading…
Cancel
Save