接口执行时间
领取过慢
This commit is contained in:
@@ -28,6 +28,7 @@ import io.swagger.annotations.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -160,8 +161,14 @@ public class DiscSpinningController {
|
||||
|
||||
@PostMapping("/app/discSpinning/receive")
|
||||
@ApiOperation("大转盘奖项领取")
|
||||
@Transactional
|
||||
public Result receive(@RequestBody DiscSpinningRecord receive) {
|
||||
receiveAsync(receive);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Async
|
||||
@Transactional
|
||||
public void receiveAsync(DiscSpinningRecord receive) {
|
||||
UserEntity userInfo = userService.queryByUserId(receive.getUserId());
|
||||
if (StringUtils.isNotBlank(userInfo.getZhiFuBao()) && StringUtils.isNotBlank(userInfo.getZhiFuBaoName())) {
|
||||
receive.setTarget("1");
|
||||
@@ -170,11 +177,13 @@ public class DiscSpinningController {
|
||||
recordService.updateById(receive);
|
||||
|
||||
if (StringUtils.isBlank(result)) {
|
||||
return Result.success();
|
||||
// return Result.success();
|
||||
return;
|
||||
}
|
||||
|
||||
if ("提现成功,将在三个工作日内到账,请耐心等待!".equals(result)) {
|
||||
return Result.success(result);
|
||||
// return Result.success(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,9 +204,10 @@ public class DiscSpinningController {
|
||||
receive.setTargetId(userMoneyDetails.getId());
|
||||
|
||||
recordService.updateById(receive);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public String withdraw(DiscSpinningRecord record, Long userId, Double money) {
|
||||
UserEntity userInfo = userService.queryByUserId(userId);
|
||||
//最高提现金额
|
||||
|
||||
Reference in New Issue
Block a user