|
@@ -29,6 +29,7 @@ import com.ytpm.middle.view.UserRankingListVO;
|
|
|
import com.ytpm.nofeeds.dao.AdRecordMapper;
|
|
import com.ytpm.nofeeds.dao.AdRecordMapper;
|
|
|
import com.ytpm.nofeeds.dao.AppUserMapper;
|
|
import com.ytpm.nofeeds.dao.AppUserMapper;
|
|
|
import com.ytpm.nofeeds.service.AdService;
|
|
import com.ytpm.nofeeds.service.AdService;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -51,6 +52,7 @@ import java.util.Objects;
|
|
|
import java.util.concurrent.CountDownLatch;
|
|
import java.util.concurrent.CountDownLatch;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
@RefreshScope
|
|
@RefreshScope
|
|
|
public class AdServiceImpl implements AdService {
|
|
public class AdServiceImpl implements AdService {
|
|
@@ -72,6 +74,7 @@ public class AdServiceImpl implements AdService {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Result<?> saveRecord(DyzAdRecordParam param) {
|
|
public Result<?> saveRecord(DyzAdRecordParam param) {
|
|
|
YtDyzUser user = appUserMapper.selectPrimaryKey(param.getUserId());
|
|
YtDyzUser user = appUserMapper.selectPrimaryKey(param.getUserId());
|
|
|
|
|
+ log.error(StrUtil.format("[saveRecord]:{} ", param.getBeginTime()));
|
|
|
if(Objects.isNull(user)){
|
|
if(Objects.isNull(user)){
|
|
|
return Result.resultOk(RepMessage.SAVE_SUCCESS);
|
|
return Result.resultOk(RepMessage.SAVE_SUCCESS);
|
|
|
}
|
|
}
|
|
@@ -87,9 +90,15 @@ public class AdServiceImpl implements AdService {
|
|
|
Result<?> result = riskFeign.checkAdRisk(user);
|
|
Result<?> result = riskFeign.checkAdRisk(user);
|
|
|
if (result.getCode() != 200) {
|
|
if (result.getCode() != 200) {
|
|
|
Result<Object> resultObj = new Result<>(StatusCode.ACCESS_ERR, getTipsMsg());
|
|
Result<Object> resultObj = new Result<>(StatusCode.ACCESS_ERR, getTipsMsg());
|
|
|
|
|
+ // 766处理
|
|
|
if("766".contains(result.getMessage())){
|
|
if("766".contains(result.getMessage())){
|
|
|
resultObj.setData(result.getMessage());
|
|
resultObj.setData(result.getMessage());
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (result.getCode() == StatusCode.ACCESS_RISK_ERROR && StrUtil.isNotBlank(result.getMessage())) {
|
|
|
|
|
+ // 体力不再获取处理
|
|
|
|
|
+ resultObj.setMessage(result.getMessage());
|
|
|
|
|
+ resultObj.setData("767");
|
|
|
|
|
+ }
|
|
|
return resultObj;
|
|
return resultObj;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|