From ca3e865a9e3c22fc24c7ca4b67ad8c25d3f2ef18 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 12 十一月 2019 11:01:31 +0800 Subject: [PATCH] 口令过期消息队列 --- fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 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 e2fe975..b6fa8c1 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; @@ -84,6 +85,12 @@ picture = uploadPicture(file); } + // 閫傜敤绫诲瀷 锛� 0閫氱敤 1鏂颁汉 + Integer type = record.getType(); + if (type == null) { + record.setType(0); + } + Long id = record.getId(); if (id == null) { int maxOrder = floatADMapper.getMaxOrderByPosition(position); @@ -93,10 +100,6 @@ record.setState(0); } - Integer type = record.getType(); - if (type == null) { - record.setType(0); - } record.setOrder(maxOrder + 1); record.setCreateTime(new Date()); record.setUpdateTime(new Date()); @@ -117,7 +120,6 @@ record.setPicture(resultObj.getPicture()); } - record.setType(resultObj.getType()); record.setOrder(resultObj.getOrder()); record.setCreateTime(resultObj.getCreateTime()); record.setUpdateTime(new Date()); @@ -220,6 +222,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) { @@ -282,5 +289,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