fix
This commit is contained in:
@@ -2,6 +2,8 @@ package com.tailbet.controller;
|
||||
|
||||
import com.tailbet.model.dto.ReceiveRpDTO;
|
||||
import com.tailbet.model.dto.SendRpDTO;
|
||||
import com.tailbet.model.entity.RedPacket;
|
||||
import com.tailbet.model.entity.RedPacketRecv;
|
||||
import com.tailbet.model.vo.R;
|
||||
import com.tailbet.model.vo.UserContext;
|
||||
import com.tailbet.service.IRedPacketService;
|
||||
@@ -22,7 +24,7 @@ public class RedPacketController {
|
||||
* 发红包
|
||||
*/
|
||||
@PostMapping("/send")
|
||||
public R<?> sendRp(@RequestBody SendRpDTO dto) {
|
||||
public R<RedPacket> sendRp(@RequestBody SendRpDTO dto) {
|
||||
try {
|
||||
Long userId = UserContext.getUserId();
|
||||
var rp = redPacketService.sendRp(userId, dto.getGroupId(),
|
||||
@@ -37,7 +39,7 @@ public class RedPacketController {
|
||||
* 领红包
|
||||
*/
|
||||
@PostMapping("/receive")
|
||||
public R<?> receiveRp(@RequestBody ReceiveRpDTO dto) {
|
||||
public R<RedPacketRecv> receiveRp(@RequestBody ReceiveRpDTO dto) {
|
||||
try {
|
||||
Long userId = UserContext.getUserId();
|
||||
var recv = redPacketService.receiveRp(dto.getRpId(), userId);
|
||||
@@ -51,8 +53,8 @@ public class RedPacketController {
|
||||
* 获取红包详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<?> detail(Long rpId) {
|
||||
public R<RedPacket> detail(Long rpId) {
|
||||
var rp = redPacketService.getById(rpId);
|
||||
return R.ok(rp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user