package com.cusc.nirvana.user.rnr.fp.controller;

import com.cusc.nirvana.common.result.Response;
import com.cusc.nirvana.user.rnr.fp.service.IRnrUnbindService;
import com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 解绑接口
 *
 * @author yubo
 * @since 2022-04-25 10:08
 */
@RestController
@RequestMapping("rnrUnbind")
public class RnrUnbindController {

    @Autowired
    IRnrUnbindService rnrUnbindService;

    @PostMapping("/secondHandUnbind/{serialNumber}/{requestId}")
    public Response<Integer> personSecondHandRnr(@PathVariable("serialNumber") String serialNumber,
                                                 @PathVariable("requestId") String requestId,
                                                 @RequestBody RnrRelationDTO dto) {
        return Response.createSuccess(rnrUnbindService.secondHandPersonalUnbind(serialNumber, requestId, dto));
    }
}
