init
This commit is contained in:
@@ -105,8 +105,8 @@ public class AccountCashController extends BaseController {
|
||||
@Log(title = "用户提现不通过", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@GetMapping("/fail")
|
||||
public R<Void> fail(Long id) {
|
||||
accountCashService.fail(id);
|
||||
public R<Void> fail(Long id,String remark) {
|
||||
accountCashService.fail(id,remark);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.cai.domain.Report;
|
||||
import com.ruoyi.cai.dto.admin.vo.ReportAdminVo;
|
||||
import com.ruoyi.cai.dto.app.query.IdRes;
|
||||
import com.ruoyi.cai.notice.YunxinHttpService;
|
||||
import com.ruoyi.cai.service.ReportService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
@@ -16,6 +18,7 @@ import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -36,6 +39,8 @@ import java.util.Arrays;
|
||||
public class ReportController extends BaseController {
|
||||
|
||||
private final ReportService reportService;
|
||||
@Autowired
|
||||
private YunxinHttpService yunxinHttpService;
|
||||
|
||||
/**
|
||||
* 查询举报列表
|
||||
@@ -59,15 +64,22 @@ public class ReportController extends BaseController {
|
||||
return R.ok(reportService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改举报
|
||||
*/
|
||||
@SaCheckPermission("cai:report:edit")
|
||||
@Log(title = "举报", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "举报处理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody Report bo) {
|
||||
return toAjax(reportService.updateById(bo));
|
||||
@PutMapping("/audit/success")
|
||||
public R<Void> edit(@RequestBody IdRes id) {
|
||||
boolean update = reportService.update(Wrappers.lambdaUpdate(Report.class)
|
||||
.eq(Report::getId, id.getId())
|
||||
.eq(Report::getStatus, 0)
|
||||
.set(Report::getStatus, 1));
|
||||
if(update){
|
||||
Report report = reportService.getById(id.getId());
|
||||
if(report != null){
|
||||
yunxinHttpService.reportSendMessage(report.getUserId());
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.ruoyi.cai.controller.app;
|
||||
|
||||
import com.ruoyi.cai.dto.app.query.UserReportReq;
|
||||
import com.ruoyi.cai.dto.app.query.push.PushErrorReq;
|
||||
import com.ruoyi.cai.notice.YunxinHttpService;
|
||||
import com.ruoyi.cai.service.ReportService;
|
||||
import com.ruoyi.cai.service.UserErrorLogService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
@@ -26,8 +25,6 @@ public class OtherController {
|
||||
private ReportService reportService;
|
||||
@Autowired
|
||||
private UserErrorLogService userErrorLogService;
|
||||
@Autowired
|
||||
private YunxinHttpService yunxinHttpService;
|
||||
|
||||
@PostMapping("/report")
|
||||
@Operation(summary = "举报")
|
||||
@@ -36,7 +33,6 @@ public class OtherController {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
reportRes.setUserId(userId);
|
||||
reportService.report(reportRes);
|
||||
yunxinHttpService.reportSendMessage(userId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user