修复支付证书上传bug、余额充值的bug
This commit is contained in:
@@ -83,13 +83,14 @@ public class FileController extends BaseController {
|
|||||||
}
|
}
|
||||||
result.setDownloadUrl(config.getFileServer() + "/download" + path);
|
result.setDownloadUrl(config.getFileServer() + "/download" + path);
|
||||||
// 云存储配置
|
// 云存储配置
|
||||||
final String s = redisUtil.get("setting:upload:" + getTenantId());
|
// final String s = redisUtil.get("setting:upload:" + getTenantId());
|
||||||
final JSONObject jsonObject = JSONObject.parseObject(s);
|
//
|
||||||
final String uploadMethod = jsonObject.getString("uploadMethod");
|
// final JSONObject jsonObject = JSONObject.parseObject(s);
|
||||||
final String bucketDomain = jsonObject.getString("bucketDomain");
|
// final String uploadMethod = jsonObject.getString("uploadMethod");
|
||||||
if(!uploadMethod.equals("file")){
|
// final String bucketDomain = jsonObject.getString("bucketDomain");
|
||||||
path = bucketDomain + path;
|
// if(!uploadMethod.equals("file")){
|
||||||
}
|
// path = bucketDomain + path;
|
||||||
|
// }
|
||||||
result.setUrl(path);
|
result.setUrl(path);
|
||||||
fileRecordService.save(result);
|
fileRecordService.save(result);
|
||||||
return success(result);
|
return success(result);
|
||||||
|
|||||||
@@ -132,27 +132,29 @@ public class RechargeOrderController extends BaseController {
|
|||||||
@PostMapping("/batchRecharge")
|
@PostMapping("/batchRecharge")
|
||||||
@Transactional(rollbackFor = {Exception.class})
|
@Transactional(rollbackFor = {Exception.class})
|
||||||
public ApiResult<?> batchRecharge(@RequestBody List<RechargeOrder> list) {
|
public ApiResult<?> batchRecharge(@RequestBody List<RechargeOrder> list) {
|
||||||
|
String nickname = getLoginUser().getNickname();
|
||||||
|
String realName = getLoginUser().getRealName();
|
||||||
|
ArrayList<User> users = new ArrayList<>(list.size());
|
||||||
|
ArrayList<UserBalanceLog> logs = new ArrayList<>(list.size());
|
||||||
|
|
||||||
|
list.forEach(d -> {
|
||||||
|
User user = userService.getByIdRel(d.getUserId());
|
||||||
|
BigDecimal balance = user.getBalance().add(d.getPayPrice());
|
||||||
|
user.setBalance(balance);
|
||||||
|
users.add(user);
|
||||||
|
UserBalanceLog userBalanceLog = new UserBalanceLog();
|
||||||
|
userBalanceLog.setUserId(d.getUserId());
|
||||||
|
userBalanceLog.setScene(BALANCE_ADMIN);
|
||||||
|
userBalanceLog.setMoney(d.getPayPrice());
|
||||||
|
userBalanceLog.setBalance(balance);
|
||||||
|
userBalanceLog.setComments("操作员:" + realName);
|
||||||
|
userBalanceLog.setRemark(d.getComments());
|
||||||
|
userBalanceLog.setMerchantCode(d.getMerchantCode());
|
||||||
|
d.setOperator(realName);
|
||||||
|
logs.add(userBalanceLog);
|
||||||
|
});
|
||||||
|
|
||||||
if (rechargeOrderService.saveBatch(list)) {
|
if (rechargeOrderService.saveBatch(list)) {
|
||||||
String nickname = getLoginUser().getNickname();
|
|
||||||
ArrayList<User> users = new ArrayList<>(list.size());
|
|
||||||
ArrayList<UserBalanceLog> logs = new ArrayList<>(list.size());
|
|
||||||
|
|
||||||
list.forEach(d -> {
|
|
||||||
User user = userService.getByIdRel(d.getUserId());
|
|
||||||
BigDecimal balance = user.getBalance().add(d.getPayPrice());
|
|
||||||
user.setBalance(balance);
|
|
||||||
users.add(user);
|
|
||||||
UserBalanceLog userBalanceLog = new UserBalanceLog();
|
|
||||||
userBalanceLog.setUserId(d.getUserId());
|
|
||||||
userBalanceLog.setScene(BALANCE_ADMIN);
|
|
||||||
userBalanceLog.setMoney(d.getPayPrice());
|
|
||||||
userBalanceLog.setBalance(balance);
|
|
||||||
userBalanceLog.setComments("操作人:" + nickname);
|
|
||||||
userBalanceLog.setRemark(d.getComments());
|
|
||||||
userBalanceLog.setMerchantCode(d.getMerchantCode());
|
|
||||||
logs.add(userBalanceLog);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 批量充值
|
// 批量充值
|
||||||
userService.updateBatchById(users);
|
userService.updateBatchById(users);
|
||||||
// 记录余额明细
|
// 记录余额明细
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.gxwebsoft.common.system.entity;
|
package com.gxwebsoft.common.system.entity;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.DesensitizedUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -72,6 +73,9 @@ public class RechargeOrder implements Serializable {
|
|||||||
@ApiModelProperty(value = "所属门店ID")
|
@ApiModelProperty(value = "所属门店ID")
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作员")
|
||||||
|
private String operator;
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
private Integer sortNumber;
|
private Integer sortNumber;
|
||||||
|
|
||||||
@@ -109,8 +113,19 @@ public class RechargeOrder implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String realName;
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号码")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号码(脱敏)")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
@ApiModelProperty(value = "部门名称")
|
@ApiModelProperty(value = "部门名称")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String organizationName;
|
private String organizationName;
|
||||||
|
|
||||||
|
public String getMobile(){
|
||||||
|
return DesensitizedUtil.mobilePhone(this.phone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
<if test="param.keywords != null">
|
<if test="param.keywords != null">
|
||||||
AND (
|
AND (
|
||||||
b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
OR a.user_id LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
OR b.alias LIKE CONCAT('%', #{param.keywords}, '%')
|
OR b.alias LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
OR b.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
OR b.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
OR b.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
OR b.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
|||||||
Reference in New Issue
Block a user