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();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Getter;
|
||||
public enum OrderTypeEnum {
|
||||
VIP_ORDER_SUB("V"),
|
||||
RECHARGE_ORDER_SUB("R"),
|
||||
WITHDRAW_ORDER_SUB("W"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
|
||||
@@ -22,7 +22,7 @@ public interface AccountCashService extends IService<AccountCash> {
|
||||
|
||||
Page<AccountCashAdminVo> pageAdmin(PageQuery pageQuery, AccountCashAdminVo bo);
|
||||
|
||||
void fail(Long id);
|
||||
void fail(Long id,String failRemark);
|
||||
|
||||
ExportBatchAuditVo batchAudit(List<Long> result);
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ import com.ruoyi.cai.manager.IdManager;
|
||||
import com.ruoyi.cai.mapper.AccountCashMapper;
|
||||
import com.ruoyi.cai.notice.YunxinHttpService;
|
||||
import com.ruoyi.cai.notice.dto.CashSuccessSendMesDTO;
|
||||
import com.ruoyi.cai.pay.OrderNoUtil;
|
||||
import com.ruoyi.cai.pay.OrderTypeEnum;
|
||||
import com.ruoyi.cai.service.AccountCashService;
|
||||
import com.ruoyi.cai.service.AccountBankcardService;
|
||||
import com.ruoyi.cai.service.AccountService;
|
||||
@@ -58,7 +60,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
AccountCash cash = new AccountCash();
|
||||
cash.setUserId(res.getUserId());
|
||||
cash.setTraceId(traceId);
|
||||
cash.setOrderNo("orderNo");
|
||||
cash.setOrderNo(OrderNoUtil.createOrderNo(OrderTypeEnum.WITHDRAW_ORDER_SUB));
|
||||
cash.setWithdrawCoin(coinNum);
|
||||
cash.setCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney()));
|
||||
cash.setRealCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney()));
|
||||
@@ -75,7 +77,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(Long id) {
|
||||
public void fail(Long id,String failRemark) {
|
||||
AccountCash accountCash = this.getById(id);
|
||||
if(accountCash == null){
|
||||
return;
|
||||
@@ -84,6 +86,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
.set(AccountCash::getVerifyTime, LocalDateTime.now())
|
||||
.set(AccountCash::getOperateIp, ServletUtils.getClientIP())
|
||||
.set(AccountCash::getStatus, AccountCashStatusEnum.FAIL.getCode())
|
||||
.set(AccountCash::getVerifyRemark,failRemark)
|
||||
.eq(AccountCash::getStatus, AccountCashStatusEnum.READY.getCode())
|
||||
.eq(AccountCash::getId, id));
|
||||
if(!update){
|
||||
@@ -91,7 +94,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
|
||||
}
|
||||
accountService.withdrawFail(accountCash.getUserId(),accountCash.getWithdrawCoin(),accountCash.getTraceId());
|
||||
yunxinHttpService.cashFailSendMessage(accountCash.getUserId(),accountCash.getCreateTime(),accountCash.getCashMoney(),
|
||||
accountCash.getVerifyRemark());
|
||||
failRemark);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.cai.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -33,7 +32,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户账户Service业务层处理
|
||||
|
||||
@@ -23,6 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join cai_user t2 on t1.user_id = t2.id
|
||||
left join cai_user t3 on t1.report_uid = t3.id
|
||||
<where>
|
||||
<if test="bo.status != null">
|
||||
and t1.status = #{bo.status}
|
||||
</if>
|
||||
<if test="bo.mobile != null and bo.mobile != ''">
|
||||
and t2.mobile = #{bo.mobile}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user