Browse Source

Changes

master
主管理员 1 week ago
parent
commit
e222004601
14 changed files with 671 additions and 69 deletions
  1. +3
    -3
      CatmDogd-Mall-Front-test/.env.production
  2. +9
    -0
      CatmDogd-Mall-Front-test/src/api/model/AppletUsersTeacher.js
  3. +2
    -2
      CatmDogd-Mall-Front-test/src/views/model/AppletAmountLog/audit.vue
  4. +28
    -47
      CatmDogd-Mall-Front-test/src/views/model/AppletUsersTeacher/openindex.vue
  5. +9
    -8
      ruoyi-admin/src/main/resources/application-druid-root.yml
  6. +1
    -1
      ruoyi-catdog/pom.xml
  7. +44
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/ApiAppletAmountController.java
  8. +19
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/ApiAppletExaminationController.java
  9. +254
    -6
      ruoyi-catdog/src/main/java/com/ruoyi/applet/service/impl/AppletAmountService.java
  10. +206
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/applet/transfer/TransferDetailEntityNew.java
  11. +40
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/job/AppletAmountTimeoutJob.java
  12. +46
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletUsersTeacherController.java
  13. +9
    -1
      ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletAmountLog.java
  14. +1
    -1
      ruoyi-catdog/src/main/resources/mapper/model/AppletAmountLogMapper.xml

+ 3
- 3
CatmDogd-Mall-Front-test/.env.production View File

@ -5,6 +5,6 @@ VUE_APP_TITLE = 下单伴宠师综合管理平台
ENV = 'production' ENV = 'production'
# 若依管理系统/生产环境 # 若依管理系统/生产环境
# VUE_APP_BASE_API = '/api'
VUE_APP_BASE_API = '/prod-api'
VUE_APP_JUDGE_STAR = 0
VUE_APP_BASE_API = '/api'
# VUE_APP_BASE_API = '/prod-api'
VUE_APP_JUDGE_STAR = 08

+ 9
- 0
CatmDogd-Mall-Front-test/src/api/model/AppletUsersTeacher.js View File

@ -43,3 +43,12 @@ export function delAppletUsersTeacher(id) {
method: 'delete' method: 'delete'
}) })
} }
// 批量审核通过
export function batchApproveAppletUsersTeacher(ids) {
return request({
url: '/model/AppletUsersTeacher/batchApprove',
method: 'put',
data: ids
})
}

+ 2
- 2
CatmDogd-Mall-Front-test/src/views/model/AppletAmountLog/audit.vue View File

@ -231,9 +231,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="form.auditRemark">
<el-row v-if="form.errorInfo">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="错误信息" v-if="form.errorInfo">
<el-form-item label="错误信息">
{{ form.errorInfo }} {{ form.errorInfo }}
</el-form-item> </el-form-item>
</el-col> </el-col>


+ 28
- 47
CatmDogd-Mall-Front-test/src/views/model/AppletUsersTeacher/openindex.vue View File

@ -81,52 +81,20 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['model:AppletUsersTeacher:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['model:AppletUsersTeacher:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['model:AppletUsersTeacher:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- :loading="exportLoading"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['model:AppletUsersTeacher:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>-->
<!-- </el-row>-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-check"
size="mini"
:disabled="multiple"
@click="handleBatchApprove"
v-hasPermi="['model:AppletUsersTeacher:edit']"
>批量审核通过</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="AppletUsersTeacherList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletUsersTeacherList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
@ -286,7 +254,7 @@
</template> </template>
<script> <script>
import { listAppletUsersTeacher, getAppletUsersTeacher, delAppletUsersTeacher, addAppletUsersTeacher, updateAppletUsersTeacher, exportAppletUsersTeacher } from "@/api/model/AppletUsersTeacher";
import { listAppletUsersTeacher, getAppletUsersTeacher, delAppletUsersTeacher, addAppletUsersTeacher, updateAppletUsersTeacher, exportAppletUsersTeacher, batchApproveAppletUsersTeacher } from "@/api/model/AppletUsersTeacher";
import ExamInfo from './components/ExamInfo.vue'; import ExamInfo from './components/ExamInfo.vue';
export default { export default {
@ -431,6 +399,19 @@ export default {
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 批量审核通过 */
handleBatchApprove() {
if (!this.ids || this.ids.length === 0) {
this.$modal.msgWarning('请先选择要审核的用户');
return;
}
this.$modal.confirm('确认将选中的用户审核通过吗?').then(() => {
return batchApproveAppletUsersTeacher(this.ids);
}).then(() => {
this.$modal.msgSuccess('批量审核成功');
this.getList();
}).catch(() => {});
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();


+ 9
- 8
ruoyi-admin/src/main/resources/application-druid-root.yml View File

@ -6,8 +6,8 @@ spring:
druid: druid:
# 主库数据源 jdbc:mysql://localhost:3306/catmdogf?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true # 主库数据源 jdbc:mysql://localhost:3306/catmdogf?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
master: master:
# url: jdbc:mysql://47.97.158.59:3306/catmdogf_test20250624?useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
url: jdbc:mysql://47.97.158.59:3306/catmdogf_prod20250624?useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
url: jdbc:mysql://47.97.158.59:3306/catmdogf_test20250624?useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
# url: jdbc:mysql://47.97.158.59:3306/catmdogf_prod20250624?useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root username: root
password: Qweruiop@123 password: Qweruiop@123
# 从库数据源 # 从库数据源
@ -58,8 +58,8 @@ wechat:
merchantId: 1665639691 merchantId: 1665639691
# privateKeyPath: /data/software/app/key/apiclient_key.pem # privateKeyPath: /data/software/app/key/apiclient_key.pem
# privateKeyPath: E:\\git_java\\api_java\\pet-admin\\pet-admin\\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem
privateKeyPath: E:\\file\\2025\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem
privateKeyPath: E:\\git_java\\api_java\\pet-admin\\pet-admin\\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem
# privateKeyPath: E:\\file\\2025\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem
# privateKeyPath: E:\\file\\2025\\project\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem # privateKeyPath: E:\\file\\2025\\project\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem
# privateKeyPath: /root/pem/apiclient_key.pem # privateKeyPath: /root/pem/apiclient_key.pem
# privateKeyPath: F:\\java_work\\team_work_java\\pet-admin-25-01-25\\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem # privateKeyPath: F:\\java_work\\team_work_java\\pet-admin-25-01-25\\pet-admin\\ruoyi-admin\\src\\main\\resources\\apiclient_key.pem
@ -73,13 +73,14 @@ wechat:
# notifyUrlForBCHSH: https://pet-admin.hhlm1688.com/api/no-auth/wechat/notifyForBCHSH # notifyUrlForBCHSH: https://pet-admin.hhlm1688.com/api/no-auth/wechat/notifyForBCHSH
notifyUrl: http://h5.xzaiyp.top/no-auth/wechat/notify notifyUrl: http://h5.xzaiyp.top/no-auth/wechat/notify
notifyUrlForBCHSH: http://h5.xzaiyp.top/no-auth/wechat/notifyForBCHSH notifyUrlForBCHSH: http://h5.xzaiyp.top/no-auth/wechat/notifyForBCHSH
notifyUrlForTransfer: http://h5.xzaiyp.top/amount/wechat/transferNotify
miniProgramAppId: wxd1a6ba7b5e17a5b6 miniProgramAppId: wxd1a6ba7b5e17a5b6
miniProgramSecret: 06e946a2c9010f8eb9e306018a779a7f miniProgramSecret: 06e946a2c9010f8eb9e306018a779a7f
staffAppId: wx01f0f43759922fda staffAppId: wx01f0f43759922fda
staffSecret: b0a5617e6e4c387262a32af2b355c8b6 staffSecret: b0a5617e6e4c387262a32af2b355c8b6
publicKeyId: PUB_KEY_ID_0116656396912025062400291558001601 publicKeyId: PUB_KEY_ID_0116656396912025062400291558001601
# publicKeyPath: E:\\git_java\\api_java\\pet-admin\\pet-admin\\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
publicKeyPath: E:\\file\\2025\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
publicKeyPath: E:\\git_java\\api_java\\pet-admin\\pet-admin\\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
# publicKeyPath: E:\\file\\2025\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
# publicKeyPath: E:\\file\\2025\\project\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem # publicKeyPath: E:\\file\\2025\\project\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
# publicKeyPath: /data/software/app/key/pub_key.pem # publicKeyPath: /data/software/app/key/pub_key.pem
pay: pay:
@ -140,8 +141,8 @@ wechat-admin:
staffAppId: wx01f0f43759922fda staffAppId: wx01f0f43759922fda
staffSecret: b0a5617e6e4c387262a32af2b355c8b6 staffSecret: b0a5617e6e4c387262a32af2b355c8b6
# publicKeyPath: /root/pem/pub_key.pem # publicKeyPath: /root/pem/pub_key.pem
# publicKeyPath: E:\\git_java\\api_java\\pet-admin\\pet-admin\\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
publicKeyPath: E:\\file\\2025\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
publicKeyPath: E:\\git_java\\api_java\\pet-admin\\pet-admin\\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
# publicKeyPath: E:\\file\\2025\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
# publicKeyPath: E:\\file\\2025\\project\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem # publicKeyPath: E:\\file\\2025\\project\\1\pet-admin\\ruoyi-admin\\src\\main\\resources\\pub_key.pem
# publicKeyPath: /data/software/app/key/pub_key.pem # publicKeyPath: /data/software/app/key/pub_key.pem
publicKeyId: PUB_KEY_ID_0116656396912025062400291558001601 publicKeyId: PUB_KEY_ID_0116656396912025062400291558001601


+ 1
- 1
ruoyi-catdog/pom.xml View File

@ -37,7 +37,7 @@
<dependency> <dependency>
<groupId>com.github.wechatpay-apiv3</groupId> <groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-java</artifactId> <artifactId>wechatpay-java</artifactId>
<version>0.2.9</version>
<version>0.2.17</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>


+ 44
- 0
ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/ApiAppletAmountController.java View File

@ -1,5 +1,8 @@
package com.ruoyi.applet.contoller; package com.ruoyi.applet.contoller;
import cn.hutool.core.io.IoUtil;
import com.ruoyi.applet.service.impl.AppletAmountService;
import com.ruoyi.applet.transfer.TransferDetailEntityNew;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.applet.utils.AppletTokenUtils; import com.ruoyi.applet.utils.AppletTokenUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
@ -10,10 +13,18 @@ import com.ruoyi.model.service.IAppletAmountLogService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.mapstruct.Context;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
@ -26,6 +37,9 @@ public class ApiAppletAmountController {
//金额流水信息 //金额流水信息
@Autowired @Autowired
private IAppletAmountLogService appletAmountLogService; private IAppletAmountLogService appletAmountLogService;
//金额流水信息
@Autowired
private AppletAmountService appletAmountService;
@Autowired @Autowired
private IAppUsersService appUsersService; private IAppUsersService appUsersService;
@ -46,6 +60,36 @@ public class ApiAppletAmountController {
return AjaxResult.success("金额流水信息列表数据", amountLogList); return AjaxResult.success("金额流水信息列表数据", amountLogList);
} }
// public void notifyHandle(HttpServletRequest request){
// // 从请求头中获取信息
// String timestamp = request.getHeader("Wechatpay-Timestamp");
// String nonce = request.getHeader("Wechatpay-Nonce");
// String signature = request.getHeader("Wechatpay-Signature");
// String singType = request.getHeader("Wechatpay-Signature-Type");
// String wechatPayCertificateSerialNumber = request.getHeader("Wechatpay-Serial");
//
//
// }
/**
* 微信商户零线转账 - 回调通知
* @Context注解 把HTTP请求上下文对象注入进来HttpServletRequestHttpServletResponseUriInfo
* @return
*/
@PostMapping(value = "/wechat/transferNotify")
public void wxPayCallback(@Context HttpServletRequest request) {
Map<String,String> errMap = new HashMap<>();
try {
log.info("微信商户零线转账 - 回调通知 /wxpay/callback");
appletAmountService.wxPaySuccessCallback(request);
} catch (Exception e) {
log.error("微信商户零线转账 - 回调通知 /wxpay/callback:异常!", e);
errMap.put("code", "FAIL");
errMap.put("message", "服务器内部错误");
}
}
@ApiOperation("小程序-充值") @ApiOperation("小程序-充值")
@PostMapping("/cashIn") @PostMapping("/cashIn")
public AjaxResult cashIn(AppletAmountLog appletAmountLog){ public AjaxResult cashIn(AppletAmountLog appletAmountLog){


+ 19
- 0
ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/ApiAppletExaminationController.java View File

@ -295,6 +295,10 @@ public class ApiAppletExaminationController {
if (appletAnswerTrain.getQuestionId() == null) { if (appletAnswerTrain.getQuestionId() == null) {
return AjaxResult.error("questionId标识不能为空"); return AjaxResult.error("questionId标识不能为空");
} }
String ans = appletAnswerTrain.getAnswer();
if (!StringUtils.isBlank(ans) && containsIllegalEncoding(ans)) {
return AjaxResult.error("答案内容包含非法字符编码(如表情),请去掉后再提交");
}
ids.add(appletAnswerTrain.getQuestionId()); ids.add(appletAnswerTrain.getQuestionId());
userId = appletAnswerTrain.getUserId(); userId = appletAnswerTrain.getUserId();
} }
@ -450,6 +454,21 @@ public class ApiAppletExaminationController {
return AjaxResult.success(); return AjaxResult.success();
} }
public static boolean containsIllegalEncoding(String text) {
if (StringUtils.isBlank(text)) {
return false;
}
int len = text.length();
for (int i = 0; i < len; ) {
int cp = text.codePointAt(i);
if (cp > 0xFFFF) {
return true;
}
i += Character.charCount(cp);
}
return false;
}
protected AjaxResult toAjax(int rows) { protected AjaxResult toAjax(int rows) {
return rows > 0 ? AjaxResult.success() : AjaxResult.error(); return rows > 0 ? AjaxResult.success() : AjaxResult.error();
} }


+ 254
- 6
ruoyi-catdog/src/main/java/com/ruoyi/applet/service/impl/AppletAmountService.java View File

@ -1,12 +1,21 @@
package com.ruoyi.applet.service.impl; package com.ruoyi.applet.service.impl;
import cn.hutool.core.io.IoUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ruoyi.applet.transfer.TransferDetailEntityNew;
import com.ruoyi.applet.transfer.TransferToUser; import com.ruoyi.applet.transfer.TransferToUser;
import com.ruoyi.common.core.sms.AliyunSmsUtils; import com.ruoyi.common.core.sms.AliyunSmsUtils;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.model.domain.AppUsers; import com.ruoyi.model.domain.AppUsers;
import com.ruoyi.model.domain.AppletAmountLog; import com.ruoyi.model.domain.AppletAmountLog;
import com.ruoyi.model.service.IAppUsersService; import com.ruoyi.model.service.IAppUsersService;
import com.ruoyi.model.service.IAppletAmountLogService; import com.ruoyi.model.service.IAppletAmountLogService;
import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.core.RSAPublicKeyConfig;
import com.wechat.pay.java.core.notification.NotificationConfig;
import com.wechat.pay.java.core.notification.NotificationParser;
import com.wechat.pay.java.core.notification.RequestParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.map.HashedMap; import org.apache.commons.collections4.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -14,16 +23,22 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
@Slf4j @Slf4j
@Component @Component
public class AppletAmountService { public class AppletAmountService {
@Autowired @Autowired
private IAppUsersService appUsersService; private IAppUsersService appUsersService;
@ -49,6 +64,10 @@ public class AppletAmountService {
//商户证书序列号 //商户证书序列号
@Value("${wechat-admin.merchantSerialNumber}") @Value("${wechat-admin.merchantSerialNumber}")
private String certiticateSerialNo; private String certiticateSerialNo;
@Value("${wechat.apiV3key}")
private String apiV3key;
@Value("${wechat.notifyUrlForTransfer}")
private String notifyUrlForTransfer;
/*************************************************************************************/ /*************************************************************************************/
/** /**
* 微信提现基础参数 * 微信提现基础参数
@ -81,6 +100,110 @@ public class AppletAmountService {
} }
public TransferDetailEntityNew wxPaySuccessCallback(HttpServletRequest request) {
String requestBody = getBodyString(request, "UTF-8");
//证书序列号微信平台 验签的微信支付平台证书所对应的平台证书序列号
String wechatPaySerial = request.getHeader("Wechatpay-Serial");
//微信传递过来的签名 验签的签名值
String wechatSignature = request.getHeader("Wechatpay-Signature");
//验签的时间戳
String wechatTimestamp = request.getHeader("Wechatpay-Timestamp");
//验签的随机字符串
String wechatpayNonce = request.getHeader("Wechatpay-Nonce");
// 1. 构造 RequestParam
RequestParam requestParam = new RequestParam.Builder()
.serialNumber(wechatPaySerial)
.nonce(wechatpayNonce)
.signature(wechatSignature)
.timestamp(wechatTimestamp)
.body(requestBody)
.build();
// 2. 构建Config RSAPublicKeyConfig
Config config =
new RSAPublicKeyConfig.Builder()
.merchantId(mchid) //微信支付的商户号
.privateKeyFromPath(privateKeyFilePath) // 商户API证书私钥的存放路径
.publicKeyFromPath(wechatPayPublicKeyFilePath) //微信支付公钥的存放路径
.publicKeyId(wechatPayPublicKeyId) //微信支付公钥ID
.merchantSerialNumber(certiticateSerialNo) //商户API证书序列号
.apiV3Key(apiV3key) //APIv3密钥
.build();
log.info("WxPayService.wxPaySuccessCallback request : wechatPaySerial is [{}] , wechatSignature is [{}] , wechatTimestamp is [{}] , wechatpayNonce is [{}] , requestBody is [{}]",wechatPaySerial,wechatSignature,wechatTimestamp,wechatpayNonce,requestBody);
// 3. 初始化 NotificationParser
NotificationParser parser = new NotificationParser((NotificationConfig) config);
try {
TransferDetailEntityNew entity = parser.parse(requestParam, TransferDetailEntityNew.class);
AppletAmountLog byId = appletAmountLogService.getById(entity.getOutBillNo());
// ACCEPTED单据已受理
// PROCESSING单据处理中转账结果尚未明确如一直处于此状态建议检查账户余额是否足够
// WAIT_USER_CONFIRM待收款用户确认可拉起微信收款确认页面进行收款确认
// TRANSFERING转账中转账结果尚未明确可拉起微信收款确认页面再次重试确认收款
// SUCCESS 转账成功
// FAIL 转账失败
// CANCELING 撤销中
// CANCELLED 已撤销
if (byId == null){
if ("SUCCESS".equals(entity.getState())){
log.info("微信提现成功:{}", entity);
}else if ("WAIT_USER_CONFIRM".equals(entity.getState())){
log.info("微信提现待收款用户确认,可拉起微信收款确认页面进行收款确认:{}", entity);
}else if ("TRANSFERING".equals(entity.getState())){
log.info("微信提现转账中,转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款:{}", entity);
}else if ("FAIL".equals(entity.getState())){
log.info("微信提现转账失败:{}", entity);
}else if ("CANCELING".equals(entity.getState())){
log.info("微信提现撤销中:{}", entity);
}else if ("CANCELLED".equals(entity.getState())){
log.info("微信提现已撤销:{}", entity);
}
}
log.info("WxPayService.wxPaySuccessCallback responseBody: {}", entity != null ? JSON.toJSONString(entity) : null);
return entity;
} catch (Exception e) {
log.error("Exception occurred while processing", e);
throw new ServiceException("系统内部错误");
}
}
/**
* 获取post请求中的Body
*
* @param request httpRequest
* @return body字符串
*/
public static String getBodyString(HttpServletRequest request, String charSet) {
StringBuilder sb = new StringBuilder();
InputStream inputStream = null;
BufferedReader reader = null;
try {
inputStream = request.getInputStream();
//读取流并将流写出去,避免数据流中断;
reader = new BufferedReader(new InputStreamReader(inputStream, charSet));
String line;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
} catch (IOException e) {
log.error("获取requestBody异常", e);
} finally {
IoUtil.close(inputStream);
IoUtil.close(reader);
}
return sb.toString();
}
public TransferToUser.TransferToUserResponse cashOut(AppletAmountLog appletAmountLog){ public TransferToUser.TransferToUserResponse cashOut(AppletAmountLog appletAmountLog){
AppUsers user = appUsersService.selectAppUsersByUserId(appletAmountLog.getUserId()); AppUsers user = appUsersService.selectAppUsersByUserId(appletAmountLog.getUserId());
@ -91,8 +214,6 @@ public class AppletAmountService {
map.put("openid", user.getOpenid());//用户openid(小程序) map.put("openid", user.getOpenid());//用户openid(小程序)
map.put("userName", appletAmountLog.getNameValue());//用户真实姓名 map.put("userName", appletAmountLog.getNameValue());//用户真实姓名
map.put("transferAmount", appletAmountLog.getAmount());//提现金额, 单位为 map.put("transferAmount", appletAmountLog.getAmount());//提现金额, 单位为
String idStr = "H" + IdWorker.getIdStr();
map.put("outBillNo", idStr);//商户单号
TransferToUser client = new TransferToUser( TransferToUser client = new TransferToUser(
map.get("mchid").toString(), // 商户号是由微信支付系统生成并分配给每个商户的唯一标识符商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756 map.get("mchid").toString(), // 商户号是由微信支付系统生成并分配给每个商户的唯一标识符商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756
@ -105,13 +226,13 @@ public class AppletAmountService {
//2场景信息 //2场景信息
TransferToUser.TransferToUserRequest request = new TransferToUser.TransferToUserRequest(); TransferToUser.TransferToUserRequest request = new TransferToUser.TransferToUserRequest();
request.appid = map.get("appid").toString(); request.appid = map.get("appid").toString();
request.outBillNo = map.get("outBillNo").toString();
request.outBillNo = appletAmountLog.getId().toString();
request.transferSceneId = map.get("transferSceneId").toString(); request.transferSceneId = map.get("transferSceneId").toString();
request.openid = map.get("openid").toString(); request.openid = map.get("openid").toString();
request.userName = client.encrypt(map.get("userName").toString()); request.userName = client.encrypt(map.get("userName").toString());
request.transferAmount = appletAmountLog.getAmount().multiply(new BigDecimal(100)).longValue();//单位为分 request.transferAmount = appletAmountLog.getAmount().multiply(new BigDecimal(100)).longValue();//单位为分
request.transferRemark = map.get("transferRemark").toString(); request.transferRemark = map.get("transferRemark").toString();
request.notifyUrl = map.get("notifyUrl").toString();
request.notifyUrl = notifyUrlForTransfer;
request.userRecvPerception = map.get("userRecvPerception").toString(); request.userRecvPerception = map.get("userRecvPerception").toString();
request.transferSceneReportInfos = new ArrayList<>(); request.transferSceneReportInfos = new ArrayList<>();
{ {
@ -223,6 +344,7 @@ public class AppletAmountService {
appletAmountLog.setAuditStatus(2); // 2-审核不通过 appletAmountLog.setAuditStatus(2); // 2-审核不通过
appletAmountLog.setState(2); // 2-已退回 appletAmountLog.setState(2); // 2-已退回
appletAmountLog.setRemark(auditRemark); // 设置审核备注 appletAmountLog.setRemark(auditRemark); // 设置审核备注
appletAmountLog.setAuditTime(LocalDateTime.now()); // 设置审核时间
appletAmountLogService.updateById(appletAmountLog); appletAmountLogService.updateById(appletAmountLog);
// 6. 记录退款流水 // 6. 记录退款流水
@ -257,6 +379,132 @@ public class AppletAmountService {
} }
} }
/**
* 批量处理超时提现申请
* 处理审核通过后超过48小时未领取的提现申请自动退回到用户账户
* @return 处理的记录数量
*/
@Transactional
public int processTimeoutWithdrawals() {
try {
// 查询审核通过后超过48小时未领取的提现记录
// 条件审核状态为通过(1)处理状态为处理中(0)审核时间超过48小时
LocalDateTime timeoutThreshold = LocalDateTime.now().minusHours(47).minusMinutes(50);
List<AppletAmountLog> timeoutLogs = appletAmountLogService.lambdaQuery()
.eq(AppletAmountLog::getAuditStatus, 1) // 审核通过
.eq(AppletAmountLog::getState, 0) // 处理中未领取
.eq(AppletAmountLog::getType, 1) // 支出类型提现
.isNotNull(AppletAmountLog::getAuditTime) // 审核时间不为空
.le(AppletAmountLog::getAuditTime, timeoutThreshold) // 审核时间超过47小时
.list();
if (timeoutLogs.isEmpty()) {
log.info("没有找到超时的提现记录");
return 0;
}
int processedCount = 0;
for (AppletAmountLog timeoutLog : timeoutLogs) {
try {
// 处理单个超时提现记录
boolean success = processTimeoutWithdrawal(timeoutLog);
if (success) {
processedCount++;
log.info("成功处理超时提现记录,ID: {}, 用户ID: {}, 金额: {}",
timeoutLog.getId(), timeoutLog.getUserId(), timeoutLog.getAmount());
} else {
log.error("处理超时提现记录失败,ID: {}, 用户ID: {}, 金额: {}",
timeoutLog.getId(), timeoutLog.getUserId(), timeoutLog.getAmount());
}
} catch (Exception e) {
log.error("处理单个超时提现记录异常,ID: {}, 用户ID: {}, 金额: {}",
timeoutLog.getId(), timeoutLog.getUserId(), timeoutLog.getAmount(), e);
}
}
log.info("批量处理超时提现完成,总共处理: {} 条记录", processedCount);
return processedCount;
} catch (Exception e) {
log.error("批量处理超时提现异常", e);
return 0;
}
}
/**
* 处理单个超时提现记录
* @param timeoutLog 超时的提现记录
* @return 处理结果
*/
@Transactional
public boolean processTimeoutWithdrawal(AppletAmountLog timeoutLog) {
try {
// 1. 查询用户信息
AppUsers user = appUsersService.selectAppUsersByUserId(timeoutLog.getUserId());
if (user == null) {
log.error("用户不存在,userId: {}", timeoutLog.getUserId());
return false;
}
// 2. 退还金额到用户账户
BigDecimal refundAmount = timeoutLog.getAmount();
if (timeoutLog.getMoneyType() == 0) {
// 合伙人钱包 - 退还金额
user.setMoney(user.getMoney().add(refundAmount));
log.info("合伙人钱包退还超时提现金额: {}, 用户ID: {}, 原余额: {}, 新余额: {}",
refundAmount, user.getUserId(), user.getMoney().subtract(refundAmount), user.getMoney());
} else if (timeoutLog.getMoneyType() == 1) {
// 伴宠师钱包 - 退还金额
user.setPrice(user.getPrice().add(refundAmount));
log.info("伴宠师钱包退还超时提现金额: {}, 用户ID: {}, 原余额: {}, 新余额: {}",
refundAmount, user.getUserId(), user.getPrice().subtract(refundAmount), user.getPrice());
} else if (timeoutLog.getMoneyType() == 2) {
// 保证金 - 退还金额
user.setBaoPrice(user.getBaoPrice().add(refundAmount));
log.info("保证金退还超时提现金额: {}, 用户ID: {}, 原余额: {}, 新余额: {}",
refundAmount, user.getUserId(), user.getBaoPrice().subtract(refundAmount), user.getBaoPrice());
}
// 3. 更新用户余额
appUsersService.updateAppUsers(user);
// 4. 更新提现记录状态为超时退回
timeoutLog.setState(2); // 2-失败/退回
timeoutLog.setRemark("审核通过后超过48小时未领取,系统自动退回");
timeoutLog.setErrorInfo("审核通过后超时未领取,系统自动退回到用户账户");
appletAmountLogService.updateById(timeoutLog);
// 5. 记录退款流水
AppletAmountLog refundLog = new AppletAmountLog();
refundLog.setUserId(user.getUserId());
if (timeoutLog.getMoneyType() == 0) {
refundLog.setTitle("合伙人钱包提现超时退款");
} else if (timeoutLog.getMoneyType() == 1) {
refundLog.setTitle("伴宠师钱包提现超时退款");
} else if (timeoutLog.getMoneyType() == 2) {
refundLog.setTitle("保证金提现超时退款");
}
refundLog.setAmount(refundAmount);
refundLog.setType(0); // 0-收入退款
refundLog.setState(1); // 1-成功
refundLog.setCreateTime(LocalDateTime.now());
refundLog.setMoneyType(timeoutLog.getMoneyType());
refundLog.setNameValue(timeoutLog.getNameValue());
refundLog.setAuditStatus(1); // 1-审核通过退款记录自动通过
appletAmountLogService.save(refundLog);
log.info("超时提现处理完成,退还金额: {}, 用户ID: {}", refundAmount, user.getUserId());
return true;
} catch (Exception e) {
log.error("处理超时提现失败,用户ID: {}, 金额: {}", timeoutLog.getUserId(), timeoutLog.getAmount(), e);
return false;
}
}
/** /**
* 审核通过更新提现记录状态并执行微信提现 * 审核通过更新提现记录状态并执行微信提现
* @param appletAmountLog 提现记录 * @param appletAmountLog 提现记录
@ -276,6 +524,7 @@ public class AppletAmountService {
appletAmountLog.setAuditStatus(1); // 1-审核通过 appletAmountLog.setAuditStatus(1); // 1-审核通过
appletAmountLog.setState(0); // 0-处理中 appletAmountLog.setState(0); // 0-处理中
appletAmountLog.setRemark(auditRemark); // 设置审核备注 appletAmountLog.setRemark(auditRemark); // 设置审核备注
appletAmountLog.setAuditTime(LocalDateTime.now()); // 设置审核时间
appletAmountLogService.updateById(appletAmountLog); appletAmountLogService.updateById(appletAmountLog);
// 3. 执行实际的微信提现操作 // 3. 执行实际的微信提现操作
@ -418,5 +667,4 @@ public class AppletAmountService {
log.error("处理微信失败退款异常,用户ID: {},金额: {}", appletAmountLog.getUserId(), appletAmountLog.getAmount(), ex); log.error("处理微信失败退款异常,用户ID: {},金额: {}", appletAmountLog.getUserId(), appletAmountLog.getAmount(), ex);
} }
} }
} }

+ 206
- 0
ruoyi-catdog/src/main/java/com/ruoyi/applet/transfer/TransferDetailEntityNew.java View File

@ -0,0 +1,206 @@
package com.ruoyi.applet.transfer;
import com.google.gson.annotations.SerializedName;
import com.wechat.pay.java.core.cipher.PrivacyDecryptor;
import lombok.Data;
import java.util.Objects;
@Data
public class TransferDetailEntityNew {
/** 商户号 Y 说明:微信支付分配的商户号 */
@SerializedName("mch_id")
private String mchId;
/** 商户单号 Y 说明:商户系统内部的商家单号,要求此参数只能由数字、大小写字母组成,在商户系统内部唯一 */
@SerializedName("out_bill_no")
private String outBillNo;
/** 商家转账订单号 Y 说明:商家转账订单的主键,唯一定义此资源的标识 */
@SerializedName("transfer_bill_no")
private String transferBillNo;
/** 商户appid Y 说明:申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) */
@SerializedName("appid")
private String appid;
/** 单据状态 Y 说明:单据状态 */
@SerializedName("state")
private String state;
/** 转账金额 Y 说明:转账金额单位为“分”。*/
@SerializedName("transfer_amount")
private Integer transferAmount;
/** 转账备注 Y 说明:转账备注,用户收款时可见该备注信息,UTF8编码,最多允许32个字符。*/
@SerializedName("transfer_remark")
private String transferRemark;
/** 失败原因 N 说明:订单已失败或者已退资金时,返回失败原因。 */
@SerializedName("fail_reason")
private String failReason;
/** 收款用户OpenID Y 说明:商户AppID下,某用户的OpenID */
@SerializedName("openid")
private String openid;
/** 收款用户姓名 N 说明收款方真实姓名需要加密传入支持标准RSA算法和国密算法公钥由微信侧提供
转账金额 >= 2,000元时该笔明细必须填写
若商户传入收款用户姓名微信支付会校验收款用户与输入姓名是否一致并提供电子回单 */
@SerializedName("user_name")
private String userName;
/** 单据创建时间 N 说明:单据受理成功时返回,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */
@SerializedName("create_time")
private String createTime;
/** 最后一次状态变更时间 N 说明:单据最后更新时间,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */
@SerializedName("update_time")
private String updateTime;
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getOutBillNo() {
return outBillNo;
}
public void setOutBillNo(String outBillNo) {
this.outBillNo = outBillNo;
}
public String getTransferBillNo() {
return transferBillNo;
}
public void setTransferBillNo(String transferBillNo) {
this.transferBillNo = transferBillNo;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public Integer getTransferAmount() {
return transferAmount;
}
public void setTransferAmount(Integer transferAmount) {
this.transferAmount = transferAmount;
}
public String getTransferRemark() {
return transferRemark;
}
public void setTransferRemark(String transferRemark) {
this.transferRemark = transferRemark;
}
public String getFailReason() {
return failReason;
}
public void setFailReason(String failReason) {
this.failReason = failReason;
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
@Override
public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
TransferDetailEntityNew that = (TransferDetailEntityNew) o;
return Objects.equals(mchId, that.mchId) && Objects.equals(outBillNo, that.outBillNo) && Objects.equals(transferBillNo, that.transferBillNo) && Objects.equals(appid, that.appid) && Objects.equals(state, that.state) && Objects.equals(transferAmount, that.transferAmount) && Objects.equals(transferRemark, that.transferRemark) && Objects.equals(failReason, that.failReason) && Objects.equals(openid, that.openid) && Objects.equals(userName, that.userName) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime);
}
@Override
public int hashCode() {
return Objects.hash(mchId, outBillNo, transferBillNo, appid, state, transferAmount, transferRemark, failReason, openid, userName, createTime, updateTime);
}
@Override
public String toString() {
return "TransferDetailEntityNew{" +
"mchId='" + mchId + '\'' +
", outBillNo='" + outBillNo + '\'' +
", transferBillNo='" + transferBillNo + '\'' +
", appid='" + appid + '\'' +
", state='" + state + '\'' +
", transferAmount=" + transferAmount +
", transferRemark='" + transferRemark + '\'' +
", failReason='" + failReason + '\'' +
", openid='" + openid + '\'' +
", userName='" + userName + '\'' +
", createTime='" + createTime + '\'' +
", updateTime='" + updateTime + '\'' +
'}';
}
public TransferDetailEntityNew cloneWithCipher(PrivacyDecryptor encryptor) {
TransferDetailEntityNew copy = new TransferDetailEntityNew();
copy.mchId = mchId;
copy.outBillNo = outBillNo;
copy.transferBillNo = transferBillNo;
copy.appid = appid;
copy.state = state;
copy.transferAmount = transferAmount;
copy.transferRemark = transferRemark;
copy.failReason = failReason;
copy.openid = openid;
if (userName != null && !userName.isEmpty()) {
copy.userName = encryptor.decrypt(userName);
}
copy.createTime = createTime;
copy.updateTime = updateTime;
return copy;
}
}

+ 40
- 0
ruoyi-catdog/src/main/java/com/ruoyi/job/AppletAmountTimeoutJob.java View File

@ -0,0 +1,40 @@
package com.ruoyi.job;
import com.ruoyi.applet.service.impl.AppletAmountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* 提现超时处理定时任务
* 处理超过48小时未领取的提现申请自动退回到用户账户
*
* @author ruoyi
* @date 2025-01-20
*/
@Component
@Slf4j
public class AppletAmountTimeoutJob {
@Autowired
private AppletAmountService appletAmountService;
/**
* 每10分钟检查一次超时的提现申请
* 处理超过48小时未领取的提现申请自动退回到用户账户
*/
@Async
@Scheduled(cron = "0 */10 * * * ?")
public void processTimeoutWithdrawals() {
log.info("定时任务[提现超时处理]开始执行");
try {
// 调用服务层方法处理超时提现
int processedCount = appletAmountService.processTimeoutWithdrawals();
log.info("定时任务[提现超时处理]执行完成,处理了 {} 条超时提现记录", processedCount);
} catch (Exception e) {
log.error("定时任务[提现超时处理]执行失败", e);
}
}
}

+ 46
- 0
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletUsersTeacherController.java View File

@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
@ -278,6 +279,51 @@ public class AppletUsersTeacherController extends BaseController
return toAjax(appletUsersTeacherService.updateAppletUsersTeacher(appletUsersTeacher)); return toAjax(appletUsersTeacherService.updateAppletUsersTeacher(appletUsersTeacher));
} }
/**
* 批量审核通过
*/
@PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:edit')")
@Log(title = "伴宠师认证批量审核", businessType = BusinessType.UPDATE)
@PutMapping("/batchApprove")
public AjaxResult batchApprove(
@RequestParam(value = "ids", required = false) List<Long> ids,
@RequestParam(value = "ids[]", required = false) List<Long> idsAlt,
@RequestBody(required = false) List<Long> idsBody)
{
// 兼容 axios 对数组参数可能使用的 ids[] 命名
if ((ids == null || ids.isEmpty()) && idsAlt != null) {
ids = idsAlt;
}
// 兼容通过请求体直接传递数组
if ((ids == null || ids.isEmpty()) && idsBody != null && !idsBody.isEmpty()) {
ids = idsBody;
}
if (ids == null || ids.isEmpty()) {
return AjaxResult.error("请选择要审核的数据");
}
int updated = 0;
for (Long id : ids) {
AppletUsersTeacher teacher = appletUsersTeacherService.selectAppletUsersTeacherById(id);
if (teacher == null) {
continue;
}
teacher.setStatus(1L);
teacher.setUpdateTime(java.time.LocalDateTime.now());
updated += appletUsersTeacherService.updateAppletUsersTeacher(teacher);
try {
if (teacher.getPhone() != null){
AliyunSmsUtils.sendBcshJoinSuccessSMS(teacher.getPhone());
}
}catch (Exception e){
}
}
return toAjax(updated);
}
/** /**
* 删除伴宠师认证 * 删除伴宠师认证
*/ */


+ 9
- 1
ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletAmountLog.java View File

@ -1,10 +1,12 @@
package com.ruoyi.model.domain; package com.ruoyi.model.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.cyl.manager.oms.domain.Order; import com.cyl.manager.oms.domain.Order;
import com.cyl.manager.ums.domain.Member; import com.cyl.manager.ums.domain.Member;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -44,7 +46,7 @@ public class AppletAmountLog extends BaseEntity
private Long userId; private Long userId;
/** 状态 */ /** 状态 */
@Excel(name = "状态")
@Excel(name = "状态 0未领取 1已领取 0失败")
private Integer state; private Integer state;
@ -78,4 +80,10 @@ public class AppletAmountLog extends BaseEntity
@Excel(name = "错误信息") @Excel(name = "错误信息")
@TableField("errorinfo") @TableField("errorinfo")
private String errorInfo; private String errorInfo;
/**
* 审核时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime auditTime;
} }

+ 1
- 1
ruoyi-catdog/src/main/resources/mapper/model/AppletAmountLogMapper.xml View File

@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectAppletAmountLogVo"> <sql id="selectAppletAmountLogVo">
select id, title, amount, type, del_flag, create_by, create_time, update_by, update_time, user_id, state , money_type, name_value select id, title, amount, type, del_flag, create_by, create_time, update_by, update_time, user_id, state , money_type, name_value
, package_info, audit_status
, package_info, audit_status, errorinfo
from applet_amount_log from applet_amount_log
</sql> </sql>


Loading…
Cancel
Save