| | |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.system.api.domain.MemberPoints; |
| | | import com.ruoyi.member.service.IMemberPointsService; |
| | | import com.ruoyi.system.api.domain.dto.MemberDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberPointsDTO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @PostMapping("/addMemberPoints") |
| | | @ApiOperation(value = "用户端-添加或减少用户积分") |
| | | public R addMemberPoints(@RequestBody MemberPointsDTO memberPointsDTO) { |
| | | MemberPoints points=new MemberPoints(); |
| | | points.setMemberId(memberPointsDTO.getMemberId()); |
| | | points.setPointsType(memberPointsDTO.getPointsType()); |
| | | points.setPoints(memberPointsDTO.getPoints()); |
| | | iMemberPointsService.save(points); |
| | | iMemberPointsService.addMemberPoints(memberPointsDTO); |
| | | return R.ok(); |
| | | } |
| | | |