| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.ruoyi.account.service.UserPointService; |
| | | import com.ruoyi.account.vo.UserPointDetailVO; |
| | | import com.ruoyi.account.vo.UserPointVO; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | 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; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/user-point") |
| | | public class UserPointController { |
| | | @Api("用户积分") |
| | | public class UserPointController extends BaseController { |
| | | @Resource |
| | | private UserPointService userPointService; |
| | | |
| | | |
| | | /** |
| | | * 获取个人积分 |
| | | */ |
| | | @GetMapping("/getUserPoint") |
| | | @ApiOperation("获取个人积分") |
| | | public R<UserPointVO> getUserPoint(){ |
| | | return R.ok(userPointService.getUserPoint(SecurityUtils.getUserId())); |
| | | } |
| | | |
| | | /** |
| | | * 获取变更明细 |
| | | */ |
| | | @GetMapping("/getUserPointDetail") |
| | | @ApiOperation("获取变更明细") |
| | | public R<UserPointDetailVO> getUserPointDetail(@ApiParam("指定日期") LocalDateTime date, |
| | | @ApiParam("变动类型(1=消费积分,2=返佣积分,3=拉新人积分,4=兑换商品 " + |
| | | "5 = 门店业绩积分 6 =门店返佣积分7=技师业绩积分8 =转赠积分 9 =做工积分 " + |
| | | "10 =注册积分)") Integer type){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 转赠积分 |
| | | */ |
| | | @PostMapping("/transferPoint") |
| | | @ApiOperation("转赠积分") |
| | | public R<Void> transferPoint(@ApiParam("积分") BigDecimal point, @ApiParam("手机号") Long phone){ |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |