This commit is contained in:
dute7liang
2024-01-28 16:24:40 +08:00
parent afa28e5039
commit 76cfa50e5e
12 changed files with 61 additions and 47 deletions

View File

@@ -1,12 +1,12 @@
--- # 监控中心配置 --- # 监控中心配置
spring.boot.admin.client: #spring.boot.admin.client:
# 增加客户端开关 # # 增加客户端开关
enabled: true # enabled: true
url: http://localhost:9090/admin # url: http://localhost:9090/admin
instance: # instance:
service-host-type: IP # service-host-type: IP
username: ruoyi # username: ruoyi
password: 123456 # password: 123456
--- # xxl-job 配置 --- # xxl-job 配置
xxl.job: xxl.job:

View File

@@ -2,14 +2,14 @@
spring.servlet.multipart.location: /ruoyi/server/temp spring.servlet.multipart.location: /ruoyi/server/temp
--- # 监控中心配置 --- # 监控中心配置
spring.boot.admin.client: #spring.boot.admin.client:
# 增加客户端开关 # # 增加客户端开关
enabled: false # enabled: false
url: http://localhost:9090/admin # url: http://localhost:9090/admin
instance: # instance:
service-host-type: IP # service-host-type: IP
username: ruoyi # username: ruoyi
password: 123456 # password: 123456
--- # xxl-job 配置 --- # xxl-job 配置
xxl.job: xxl.job:

View File

@@ -244,11 +244,12 @@ lock4j:
--- # Actuator 监控端点的配置项 --- # Actuator 监控端点的配置项
management: management:
endpoints: endpoints:
web: enabled-by-default: false
exposure: # web:
include: '*' # exposure:
endpoint: # include: '*'
health: # endpoint:
show-details: ALWAYS # health:
logfile: # show-details: ALWAYS
external-file: ./logs/sys-console.log # logfile:
# external-file: ./logs/sys-console.log

View File

@@ -105,8 +105,8 @@ public class AccountCashController extends BaseController {
@Log(title = "用户提现不通过", businessType = BusinessType.UPDATE) @Log(title = "用户提现不通过", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@GetMapping("/fail") @GetMapping("/fail")
public R<Void> fail(Long id) { public R<Void> fail(Long id,String remark) {
accountCashService.fail(id); accountCashService.fail(id,remark);
return R.ok(); return R.ok();
} }

View File

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.cai.domain.Report; import com.ruoyi.cai.domain.Report;
import com.ruoyi.cai.dto.admin.vo.ReportAdminVo; 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.cai.service.ReportService;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit; 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.core.validate.EditGroup;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -36,6 +39,8 @@ import java.util.Arrays;
public class ReportController extends BaseController { public class ReportController extends BaseController {
private final ReportService reportService; private final ReportService reportService;
@Autowired
private YunxinHttpService yunxinHttpService;
/** /**
* 查询举报列表 * 查询举报列表
@@ -59,15 +64,22 @@ public class ReportController extends BaseController {
return R.ok(reportService.getById(id)); return R.ok(reportService.getById(id));
} }
/**
* 修改举报
*/
@SaCheckPermission("cai:report:edit") @SaCheckPermission("cai:report:edit")
@Log(title = "举报", businessType = BusinessType.UPDATE) @Log(title = "举报处理", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping("/audit/success")
public R<Void> edit(@Validated(EditGroup.class) @RequestBody Report bo) { public R<Void> edit(@RequestBody IdRes id) {
return toAjax(reportService.updateById(bo)); 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();
} }
/** /**

View File

@@ -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.UserReportReq;
import com.ruoyi.cai.dto.app.query.push.PushErrorReq; 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.ReportService;
import com.ruoyi.cai.service.UserErrorLogService; import com.ruoyi.cai.service.UserErrorLogService;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
@@ -26,8 +25,6 @@ public class OtherController {
private ReportService reportService; private ReportService reportService;
@Autowired @Autowired
private UserErrorLogService userErrorLogService; private UserErrorLogService userErrorLogService;
@Autowired
private YunxinHttpService yunxinHttpService;
@PostMapping("/report") @PostMapping("/report")
@Operation(summary = "举报") @Operation(summary = "举报")
@@ -36,7 +33,6 @@ public class OtherController {
Long userId = LoginHelper.getUserId(); Long userId = LoginHelper.getUserId();
reportRes.setUserId(userId); reportRes.setUserId(userId);
reportService.report(reportRes); reportService.report(reportRes);
yunxinHttpService.reportSendMessage(userId);
return R.ok(); return R.ok();
} }

View File

@@ -6,6 +6,7 @@ import lombok.Getter;
public enum OrderTypeEnum { public enum OrderTypeEnum {
VIP_ORDER_SUB("V"), VIP_ORDER_SUB("V"),
RECHARGE_ORDER_SUB("R"), RECHARGE_ORDER_SUB("R"),
WITHDRAW_ORDER_SUB("W"),
; ;
private final String type; private final String type;

View File

@@ -22,7 +22,7 @@ public interface AccountCashService extends IService<AccountCash> {
Page<AccountCashAdminVo> pageAdmin(PageQuery pageQuery, AccountCashAdminVo bo); Page<AccountCashAdminVo> pageAdmin(PageQuery pageQuery, AccountCashAdminVo bo);
void fail(Long id); void fail(Long id,String failRemark);
ExportBatchAuditVo batchAudit(List<Long> result); ExportBatchAuditVo batchAudit(List<Long> result);

View File

@@ -15,6 +15,8 @@ import com.ruoyi.cai.manager.IdManager;
import com.ruoyi.cai.mapper.AccountCashMapper; import com.ruoyi.cai.mapper.AccountCashMapper;
import com.ruoyi.cai.notice.YunxinHttpService; import com.ruoyi.cai.notice.YunxinHttpService;
import com.ruoyi.cai.notice.dto.CashSuccessSendMesDTO; 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.AccountCashService;
import com.ruoyi.cai.service.AccountBankcardService; import com.ruoyi.cai.service.AccountBankcardService;
import com.ruoyi.cai.service.AccountService; import com.ruoyi.cai.service.AccountService;
@@ -58,7 +60,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
AccountCash cash = new AccountCash(); AccountCash cash = new AccountCash();
cash.setUserId(res.getUserId()); cash.setUserId(res.getUserId());
cash.setTraceId(traceId); cash.setTraceId(traceId);
cash.setOrderNo("orderNo"); cash.setOrderNo(OrderNoUtil.createOrderNo(OrderTypeEnum.WITHDRAW_ORDER_SUB));
cash.setWithdrawCoin(coinNum); cash.setWithdrawCoin(coinNum);
cash.setCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney())); cash.setCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney()));
cash.setRealCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney())); cash.setRealCashMoney(BigDecimal.valueOf(withdrawExchange.getMoney()));
@@ -75,7 +77,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
} }
@Override @Override
public void fail(Long id) { public void fail(Long id,String failRemark) {
AccountCash accountCash = this.getById(id); AccountCash accountCash = this.getById(id);
if(accountCash == null){ if(accountCash == null){
return; return;
@@ -84,6 +86,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
.set(AccountCash::getVerifyTime, LocalDateTime.now()) .set(AccountCash::getVerifyTime, LocalDateTime.now())
.set(AccountCash::getOperateIp, ServletUtils.getClientIP()) .set(AccountCash::getOperateIp, ServletUtils.getClientIP())
.set(AccountCash::getStatus, AccountCashStatusEnum.FAIL.getCode()) .set(AccountCash::getStatus, AccountCashStatusEnum.FAIL.getCode())
.set(AccountCash::getVerifyRemark,failRemark)
.eq(AccountCash::getStatus, AccountCashStatusEnum.READY.getCode()) .eq(AccountCash::getStatus, AccountCashStatusEnum.READY.getCode())
.eq(AccountCash::getId, id)); .eq(AccountCash::getId, id));
if(!update){ if(!update){
@@ -91,7 +94,7 @@ public class AccountCashServiceImpl extends ServiceImpl<AccountCashMapper, Accou
} }
accountService.withdrawFail(accountCash.getUserId(),accountCash.getWithdrawCoin(),accountCash.getTraceId()); accountService.withdrawFail(accountCash.getUserId(),accountCash.getWithdrawCoin(),accountCash.getTraceId());
yunxinHttpService.cashFailSendMessage(accountCash.getUserId(),accountCash.getCreateTime(),accountCash.getCashMoney(), yunxinHttpService.cashFailSendMessage(accountCash.getUserId(),accountCash.getCreateTime(),accountCash.getCashMoney(),
accountCash.getVerifyRemark()); failRemark);
} }

View File

@@ -1,6 +1,5 @@
package com.ruoyi.cai.service.impl; package com.ruoyi.cai.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -33,7 +32,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
/** /**
* 用户账户Service业务层处理 * 用户账户Service业务层处理

View File

@@ -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 t2 on t1.user_id = t2.id
left join cai_user t3 on t1.report_uid = t3.id left join cai_user t3 on t1.report_uid = t3.id
<where> <where>
<if test="bo.status != null">
and t1.status = #{bo.status}
</if>
<if test="bo.mobile != null and bo.mobile != ''"> <if test="bo.mobile != null and bo.mobile != ''">
and t2.mobile = #{bo.mobile} and t2.mobile = #{bo.mobile}
</if> </if>

View File

@@ -46,15 +46,15 @@
<artifactId>p6spy</artifactId> <artifactId>p6spy</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>-->
<dependency> <!--<dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId> <artifactId>spring-boot-admin-starter-client</artifactId>
</dependency> </dependency>-->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>