Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
6477e48b44
|
|
@ -1,14 +1,10 @@
|
|||
package com.sqx.modules.callback;
|
||||
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.callback.dao.UniAdCallBackDTO;
|
||||
import com.sqx.modules.callback.service.UniAdCallbackRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/uniCallBack")
|
||||
|
|
@ -21,8 +17,18 @@ public class UniCallBackController {
|
|||
}
|
||||
|
||||
@GetMapping("/adCallBack")
|
||||
public ResponseEntity<?> adCallBack(@RequestBody UniAdCallBackDTO callBackDTO) {
|
||||
log.info("接收到uni-ad广告完播回调,回调信息: {}", callBackDTO);
|
||||
return ResponseEntity.ok(uniCallBackService.adCallBack(callBackDTO));
|
||||
public ResponseEntity<?> adCallBack(@RequestParam String adpid, @RequestParam String provider,
|
||||
@RequestParam String platform, @RequestParam String sign, @RequestParam String trans_id,
|
||||
@RequestParam String user_id, @RequestParam(required = false) String extra) {
|
||||
UniAdCallBackDTO dto = new UniAdCallBackDTO();
|
||||
dto.setAdpid(adpid);
|
||||
dto.setProvider(provider);
|
||||
dto.setPlatform(platform);
|
||||
dto.setSign(sign);
|
||||
dto.setTrans_id(trans_id);
|
||||
dto.setUser_id(user_id);
|
||||
dto.setExtra(extra);
|
||||
log.info("接收到uni-ad广告完播回调,回调信息: {}", dto);
|
||||
return ResponseEntity.ok(uniCallBackService.adCallBack(dto));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class UniAdCallbackRecordServiceImpl extends ServiceImpl<UniAdCallbackRec
|
|||
return respData;
|
||||
}
|
||||
|
||||
redisService.setFreeWatchTime(callbackRecord.getUserId(), Integer.valueOf(info.getValue()), true);
|
||||
redisService.setFreeWatchTime(callbackRecord.getUserId(), Integer.parseInt(info.getValue()) * 60, true);
|
||||
save(callbackRecord);
|
||||
respData.put("isValid", true);
|
||||
return respData;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
|
||||
// 购买次数超过,设置redis标识
|
||||
if (count >= Integer.parseInt(needCountCommonInfo.getValue())) {
|
||||
redisServiceImpl.setFreeWatchTime(userId, Integer.parseInt(freeTimeCommonInfo.getValue()), false);
|
||||
redisServiceImpl.setFreeWatchTime(userId, Integer.parseInt(freeTimeCommonInfo.getValue()) * 60, false);
|
||||
// 触发计时
|
||||
redisServiceImpl.getFreeWatchTimeIsExpire(userId);
|
||||
isExpire = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue