| | |
| | | import com.ruoyi.other.api.domain.PointSetting; |
| | | import com.ruoyi.other.api.feignClient.PointSettingClient; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | |
| | | |
| | | |
| | | @PostMapping("/saveAppUserShare") |
| | | @GetMapping("/saveAppUserShare") |
| | | @ApiOperation(value = "操作分享调用接口", tags = {"小程序-推广中心"}) |
| | | public R saveAppUserShare(){ |
| | | Long userid = tokenService.getLoginUserApplet().getUserid(); |
| | |
| | | appUser.setTotalSharePoint(appUser.getTotalSharePoint() + everySharePoint); |
| | | appUserService.updateById(appUser); |
| | | //添加积分变动记录 |
| | | UserPoint userPoint = new UserPoint(); |
| | | userPoint.setType(6); |
| | | userPoint.setHistoricalPoint(lavePoint); |
| | | userPoint.setVariablePoint(everySharePoint); |
| | | userPoint.setBalance(appUser.getLavePoint()); |
| | | userPoint.setCreateTime(LocalDateTime.now()); |
| | | userPoint.setAppUserId(appUser.getId()); |
| | | userPointService.save(userPoint); |
| | | if(everySharePoint > 0){ |
| | | UserPoint userPoint = new UserPoint(); |
| | | userPoint.setType(6); |
| | | userPoint.setHistoricalPoint(lavePoint); |
| | | userPoint.setVariablePoint(everySharePoint); |
| | | userPoint.setBalance(appUser.getLavePoint()); |
| | | userPoint.setCreateTime(LocalDateTime.now()); |
| | | userPoint.setAppUserId(appUser.getId()); |
| | | userPointService.save(userPoint); |
| | | } |
| | | //变更等级 |
| | | appUserService.vipUpgrade(appUser.getId()); |
| | | } |