From 020d940ae4e16f55f69cef3dd4c8dc0b9764af07 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 26 六月 2019 10:59:48 +0800
Subject: [PATCH] 邀请对应奖励红包加入版本区分
---
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java | 13 ++++++++++---
1 files changed, 10 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 8ed9d59..e2fe975 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
@@ -8,9 +8,9 @@
import java.util.UUID;
import javax.annotation.Resource;
-import javax.transaction.Transactional;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.yeshi.utils.tencentcloud.COSManager;
@@ -48,6 +48,8 @@
String params = record.getParams();
if (params == null || params.trim().length() == 0 || "null".equalsIgnoreCase(params) ) {
record.setParams(null);
+ } else if (!StringUtil.isJson(params)) {
+ throw new FloatADException(1, "璺宠浆鍙傛暟闈濲SON鏍煎紡");
}
if (!StringUtil.isNullOrEmpty(jumpType)) {
@@ -91,6 +93,10 @@
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());
@@ -111,6 +117,7 @@
record.setPicture(resultObj.getPicture());
}
+ record.setType(resultObj.getType());
record.setOrder(resultObj.getOrder());
record.setCreateTime(resultObj.getCreateTime());
record.setUpdateTime(new Date());
@@ -256,8 +263,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();
--
Gitblit v1.8.0