From 51a4ff5d777028d52a19c314a99f796334cb7b51 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 23 十一月 2019 18:30:01 +0800 Subject: [PATCH] 配置文件修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java index 63dacfd..66b56ac 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java @@ -16,8 +16,9 @@ import com.yeshi.fanli.dao.mybatis.homemodule.FloatADMapper; import com.yeshi.fanli.entity.bus.homemodule.FloatAD; +import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum; import com.yeshi.fanli.entity.common.JumpDetailV2; -import com.yeshi.fanli.exception.FloatADException; +import com.yeshi.fanli.exception.homemodule.FloatADException; import com.yeshi.fanli.service.inter.common.JumpDetailV2Service; import com.yeshi.fanli.service.inter.homemodule.FloatADService; import com.yeshi.fanli.util.StringUtil; @@ -52,6 +53,10 @@ throw new FloatADException(1, "璺宠浆鍙傛暟闈濲SON鏍煎紡"); } + FloatADTypeEnum typeEnum = record.getTypeEnum(); + if (typeEnum == null) + throw new FloatADException(1, "绫诲瀷涓嶈兘涓虹┖"); + if (!StringUtil.isNullOrEmpty(jumpType)) { List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType); if (listByType !=null && listByType.size() > 0) { @@ -82,6 +87,12 @@ String picture = null; if (file != null) { picture = uploadPicture(file); + } + + // 閫傜敤绫诲瀷 锛� 0閫氱敤 1鏂颁汉 + Integer type = record.getType(); + if (type == null) { + record.setType(0); } Long id = record.getId(); @@ -215,6 +226,11 @@ for (FloatAD floatAD : listQuery) { + FloatADTypeEnum typeEnum = floatAD.getTypeEnum(); + if (typeEnum != null) { + floatAD.setTypeName(typeEnum.getDesc()); + } + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm"); Date startTime = floatAD.getStartTime(); if (startTime == null) { @@ -258,8 +274,8 @@ } @Override - public FloatAD getEffectiveFloatAD(String position) { - FloatAD floatAD = floatADMapper.getEffectiveFloatAD(position); + public FloatAD getEffectiveFloatAD(String position, Integer type) { + FloatAD floatAD = floatADMapper.getEffectiveFloatAD(position, type); if (floatAD != null) { JumpDetailV2 jumpDetail = floatAD.getJumpDetail(); @@ -277,5 +293,15 @@ return floatAD; } + + @Override + public List<FloatAD> getValidCommonByPosition(String position) { + return floatADMapper.getValidFloatAD(position, 1); + } + + @Override + public List<FloatAD> getValidByPosition(String position) { + return floatADMapper.getValidFloatAD(position, null); + } } -- Gitblit v1.8.0