package com.njcn.supervision.controller.user;


import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.supervision.pojo.param.user.UserReportParam;
import com.njcn.supervision.service.user.IUserReportDeleteService;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户档案信息表	 前端控制器
 * </p>
 *
 * @author wr
 * @since 2024-06-26
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/userReportDelete")
@Api(tags = "干扰源常态化管理信息删除(功能取消)")
@Deprecated()
public class UserReportDeleteController extends BaseController {

    private final IUserReportDeleteService userReportDeleteService;

    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @PostMapping("/addEditor")
    @ApiOperation("干扰源用户管理删除信息新增功能")
    public HttpResult<String> addEditor(@RequestBody @Validated UserReportParam userReportParam) {
        String methodDescribe = getMethodDescribe("addEditor");
        String s = userReportDeleteService.addEditor(userReportParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
    }

    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @PostMapping("/resend")
    @ApiOperation("干扰源用户管理删除信息重新发送功能")
    public HttpResult<String> resend(@RequestBody @Validated UserReportParam userReportParam) {
        String methodDescribe = getMethodDescribe("resend");
        String s = userReportDeleteService.resend(userReportParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
    }
}

