| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.UserPoint; |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.service.UserPointService; |
| | | import com.ruoyi.account.vo.UserPointDetailVO; |
| | | import com.ruoyi.account.vo.UserPointStatistics; |
| | | import com.ruoyi.account.vo.UserPointVO; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public class UserPointController extends BaseController { |
| | | @Resource |
| | | private UserPointService userPointService; |
| | | @Resource |
| | | private AppUserService appUserService; |
| | | |
| | | |
| | | /** |
| | |
| | | userPointService.save(userPoint); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 积分统计 |
| | | */ |
| | | @GetMapping("/statistics") |
| | | public R<UserPointStatistics> statistics(UserPoint userPoint) { |
| | | List<AppUser> appUserList = appUserService.list(); |
| | | Integer totalPoint = 0; |
| | | Integer consumePoint = 0; |
| | | Integer sharePoint = 0; |
| | | List<UserPoint> userPointList = userPointService.list(); |
| | | UserPointStatistics userPointStatistics = new UserPointStatistics(); |
| | | userPointStatistics.setTotalPoint(totalPoint); |
| | | userPointStatistics.setConsumePoint(consumePoint); |
| | | userPointStatistics.setSharePoint(sharePoint); |
| | | return null; |
| | | } |
| | | } |
| | | |