diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/validation/ValidationUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/validation/ValidationUtils.java index 7e6f89d5a..24922e18f 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/validation/ValidationUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/validation/ValidationUtils.java @@ -18,6 +18,8 @@ public class ValidationUtils { private static final Pattern PATTERN_MOBILE = Pattern.compile("^(?:(?:\\+|00)86)?1(?:(?:3[\\d])|(?:4[0,1,4-9])|(?:5[0-3,5-9])|(?:6[2,5-7])|(?:7[0-8])|(?:8[\\d])|(?:9[0-3,5-9]))\\d{8}$"); + + private static final Pattern PATTERN_URL = Pattern.compile("^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"); private static final Pattern PATTERN_XML_NCNAME = Pattern.compile("[a-zA-Z_][\\-_.0-9_a-zA-Z$]*"); diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java index 67d558f6b..cff0493fe 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/util/ExcelUtils.java @@ -1,13 +1,23 @@ package cn.iocoder.yudao.framework.excel.core.util; import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.Head; +import com.alibaba.excel.metadata.data.WriteCellData; +import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; +import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy; import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; +import lombok.NonNull; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.poi.ss.usermodel.Cell; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.URLEncoder; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Excel 工具类 @@ -32,7 +42,7 @@ public class ExcelUtils { // 输出 Excel EasyExcel.write(response.getOutputStream(), head) .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理 - .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // 基于 column 长度,自动适配。最大 255 宽度 + .registerWriteHandler(new AutoColumnWidthWriteHandler()) // 基于 column 长度,自动适配。最大 255 宽度 .sheet(sheetName).doWrite(data); // 设置 header 和 contentType。写在最后的原因是,避免报错时,响应 contentType 已经被修改了 response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); @@ -44,5 +54,63 @@ public class ExcelUtils { .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理 .doReadAllSync(); } + /** + * 宽度自适应 + */ + public static class AutoColumnWidthWriteHandler extends AbstractColumnWidthStyleStrategy { + private static final int MAX_COLUMN_WIDTH = 255; + + // 因为在自动列宽的过程中,有些设置地方让列宽显得紧凑,所以做出了个判断 + private static final int COLUMN_WIDTH = 30; + + private final Map> CACHE = new HashMap<>(); + + @Override + protected void setColumnWidth(@NonNull WriteSheetHolder writeSheetHolder, List> cellDataList, @NonNull Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) { + boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList); + if (needSetWidth) { + Map maxColumnWidthMap = CACHE.computeIfAbsent(writeSheetHolder.getSheetNo(), k -> new HashMap<>()); + + Integer columnWidth = this.dataLength(cellDataList, cell, isHead); + if (columnWidth >= 0) { + if (columnWidth > MAX_COLUMN_WIDTH) { + columnWidth = MAX_COLUMN_WIDTH; + } else { + if (columnWidth < COLUMN_WIDTH) { + columnWidth = columnWidth * 2; + } + } + Integer maxColumnWidth = maxColumnWidthMap.get(cell.getColumnIndex()); + if (maxColumnWidth == null || columnWidth > maxColumnWidth) { + maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth); + writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 256); + } + } + } + } + + private Integer dataLength(List> cellDataList, Cell cell, @NonNull Boolean isHead) { + if (isHead) { + return cell.getStringCellValue().getBytes().length; + } else { + WriteCellData cellData = cellDataList.get(0); + CellDataTypeEnum type = cellData.getType(); + if (type == null) { + return -1; + } else { + switch (type) { + case STRING: + return cellData.getStringValue().getBytes().length; + case BOOLEAN: + return cellData.getBooleanValue().toString().getBytes().length; + case NUMBER: + return cellData.getNumberValue().toString().getBytes().length; + default: + return -1; + } + } + } + } + } } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/PhoneRecordController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/PhoneRecordController.java index 034945bcd..8dbb5d18b 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/PhoneRecordController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/PhoneRecordController.java @@ -83,8 +83,8 @@ public class PhoneRecordController { @Operation(summary = "获得充值档位记录分页") @PreAuthorize("@ss.hasPermission('shop:phone-record:query')") public CommonResult> getPhoneRecordPage(@Valid PhoneRecordPageReqVO pageVO) { - PageResult pageResult = phoneRecordService.getPhoneRecordPage(pageVO); - return success(PhoneRecordConvert.INSTANCE.convertPage(pageResult)); + PageResult pageResult = phoneRecordService.getPhoneRecordPage(pageVO); + return success(pageResult); } @GetMapping("/export-excel") diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java index 53d43b741..c970237ea 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/RechargeOrderController.java @@ -118,7 +118,7 @@ public class RechargeOrderController { List list = rechargeOrderService.findListExcel(exportReqVO); ArrayList s = new ArrayList<>(); list.forEach(x -> { - s.add(x.getId()); + s.add(Long.parseLong(x.getId())); }); List infoList = rechargeOrderInfoService.getRechargeOrderInfoListExcel(s); // 导出 Excel diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/method/Excel.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/method/Excel.java index 0b9ebffdd..01244c9c6 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/method/Excel.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/method/Excel.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.shop.controller.admin.recharge.method; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderExcelVO; import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderInfoExcelVO; import com.alibaba.excel.EasyExcel; @@ -32,7 +33,7 @@ public class Excel { ExcelWriterBuilder writerBuilder = EasyExcel.write(response.getOutputStream()) - .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()); + .registerWriteHandler(new ExcelUtils.AutoColumnWidthWriteHandler()); ExcelWriter excelWriter = writerBuilder.build(); WriteSheet writeSheet1 = EasyExcel.writerSheet(0, "订单列表").head(RechargeOrderExcelVO.class).build(); diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordBaseVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordBaseVO.java index c7f1ebae7..816eb7ca7 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordBaseVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordBaseVO.java @@ -37,7 +37,8 @@ public class PhoneRecordBaseVO { @Schema(description = "充值档位", required = true, example = "25455") @NotNull(message = "充值档位不能为空") private BigDecimal rechargeGearId; - + @Schema(description = "充值档位", required = true, example = "25455") + private String rechargeGearName; @Schema(description = "返费结束日期", required = true) @NotNull(message = "返费结束日期不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @@ -45,6 +46,6 @@ public class PhoneRecordBaseVO { @Schema(description = "返费期数", required = true) @NotNull(message = "返费期数不能为空") - private String refundFeeNumber; + private Integer refundFeeNumber; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExcelVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExcelVO.java index 12685c292..428c410a8 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExcelVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExcelVO.java @@ -41,7 +41,7 @@ public class PhoneRecordExcelVO { private LocalDateTime refundFeeEndDate; @ExcelProperty("返费期数") - private String refundFeeNumber; + private Integer refundFeeNumber; @ExcelProperty("创建时间") private LocalDateTime createTime; diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExportReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExportReqVO.java index 8c86ec0a9..62a791530 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExportReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordExportReqVO.java @@ -35,7 +35,7 @@ public class PhoneRecordExportReqVO { private LocalDateTime[] refundFeeEndDate; @Schema(description = "返费期数") - private String refundFeeNumber; + private Integer refundFeeNumber; @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordPageReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordPageReqVO.java index 0f6d3d9fe..d1f72ba6a 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordPageReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/PhoneRecordPageReqVO.java @@ -37,7 +37,7 @@ public class PhoneRecordPageReqVO extends PageParam { private LocalDateTime[] refundFeeEndDate; @Schema(description = "返费期数") - private String refundFeeNumber; + private Integer refundFeeNumber; @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExcelVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExcelVO.java index 6ded77f0b..ba5d9ea1a 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExcelVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderExcelVO.java @@ -1,5 +1,9 @@ package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; +import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -15,8 +19,8 @@ import java.time.LocalDateTime; public class RechargeOrderExcelVO { - @ExcelProperty("订单id") - private Long id; + @ExcelIgnore + private String id; @ExcelProperty("订单编号") private String orderId; @@ -59,7 +63,8 @@ public class RechargeOrderExcelVO { @ExcelProperty("自提地址") private String SelfPickupAddr; - @ExcelProperty("支付方式") + @ExcelProperty(value = "支付方式",converter = DictConvert.class) + @DictFormat(DictTypeConstants.PYT_TYPE) private String payType; @ExcelProperty("订单备注") @@ -69,7 +74,7 @@ public class RechargeOrderExcelVO { private BigDecimal totalPrice; @ExcelProperty("运费") - private BigDecimal shipPrice; + private BigDecimal shipPrice=new BigDecimal(0); @ExcelProperty("会员账号") private String vipAccount; diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderInfoExcelVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderInfoExcelVO.java index cd216ffe8..117047462 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderInfoExcelVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderInfoExcelVO.java @@ -1,5 +1,8 @@ package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -46,7 +49,8 @@ public class RechargeOrderInfoExcelVO { @ExcelProperty("实付金额") private BigDecimal payPrice; - @ExcelProperty("售后状态") + @ExcelProperty(value = "售后状态",converter = DictConvert.class) + @DictFormat(DictTypeConstants.PYT_STATUS) private String afterStatus; @ExcelProperty("退款金额") @@ -68,20 +72,4 @@ public class RechargeOrderInfoExcelVO { private String mark; - - - - - @ExcelProperty("赠送积分") - private Integer giveIntegral; - - @ExcelProperty("是否单独分佣,0-否,1-是") - private Boolean isSub; - - @ExcelProperty("会员价") - private BigDecimal vipPrice; - - @ExcelProperty("商品类型:0-会员充值") - private Integer productType; - } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java index 6df2e0ff5..42b1cdd75 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/recharge/vo/RechargeOrderPageReqVO.java @@ -49,7 +49,7 @@ public class RechargeOrderPageReqVO extends PageParam { private BigDecimal payPrice; @Schema(description = "支付状态", example = "17413") - private Byte paid; + private Integer paid; @Schema(description = "支付截止时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @@ -70,7 +70,7 @@ public class RechargeOrderPageReqVO extends PageParam { private Boolean status; @Schema(description = "0 未退款 1 申请中 2 已退款 3 退款中", example = "2") - private Byte refundStatus; + private Integer refundStatus; @Schema(description = "退款图片") private String refundReasonWapImg; @@ -104,7 +104,7 @@ public class RechargeOrderPageReqVO extends PageParam { private Byte isChannel; @Schema(description = "消息提醒") - private Byte isRemind; + private Integer isRemind; @Schema(description = "后台是否删除") private Boolean isSystemDel; diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java index 5282f6aa6..d8ba080d3 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/member/MemberController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.shop.controller.app.member; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; +import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeGearRespVO; import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO; import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert; @@ -42,6 +43,7 @@ public class MemberController { @Operation(summary = "会员档次信息") @RequestMapping(value = "/memberGradeInfo", method = RequestMethod.GET) @PreAuthenticated + @TenantIgnore public CommonResult> memberGradeInfo() { return CommonResult.success(rechargeGearService.getGradeInfo()); } @@ -50,12 +52,14 @@ public class MemberController { @Operation(summary = "获取当前登录账号的充值记录") @RequestMapping(value = "/memberOrderInfo", method = RequestMethod.GET) @PreAuthenticated + @TenantIgnore public CommonResult> memberOrderInfo() { return CommonResult.success(rechargeOrderService.memberOrderInfo()); } @Operation(summary = "会员头部信息") @RequestMapping(value = "/memberHeadInfo", method = RequestMethod.GET) @PreAuthenticated + @TenantIgnore public CommonResult memberHeadInfo() { return CommonResult.success(rechargeOrderService.memberHeadInfo()); } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/PhoneRecordDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/PhoneRecordDO.java index cbf3205b7..baed8dd7c 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/PhoneRecordDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/recharge/PhoneRecordDO.java @@ -57,6 +57,6 @@ public class PhoneRecordDO extends BaseDO { /** * 返费期数 */ - private String refundFeeNumber; + private Integer refundFeeNumber; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/recharge/PhoneRecordMapper.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/recharge/PhoneRecordMapper.java index 34ad1ef10..ce20b382b 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/recharge/PhoneRecordMapper.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/recharge/PhoneRecordMapper.java @@ -6,8 +6,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.PhoneRecordDO; +import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*; +import org.apache.ibatis.annotations.Param; /** * 充值档位记录 Mapper @@ -29,7 +31,7 @@ public interface PhoneRecordMapper extends BaseMapperX { .betweenIfPresent(PhoneRecordDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(PhoneRecordDO::getId)); } - + IPage findListPage(IPage page, @Param("data") PhoneRecordPageReqVO data); default List selectList(PhoneRecordExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() .eqIfPresent(PhoneRecordDO::getUserId, reqVO.getUserId()) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java index 981a0a3a6..b276db42f 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.shop.service.order.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.PhoneUtil; @@ -11,6 +13,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.DateLimitUtilVo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.util.date.DateUtils; +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; import cn.iocoder.yudao.framework.pay.properties.AliPayProperties; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; @@ -79,6 +82,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.math.BigDecimal; import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -1236,9 +1240,9 @@ public class StoreOrderServiceImpl extends ServiceImpl getPhoneRecordPage(PhoneRecordPageReqVO pageReqVO); + PageResult getPhoneRecordPage(PhoneRecordPageReqVO pageReqVO); /** * 获得充值档位记录列表, 用于 Excel 导出 diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java index 4f56359bc..e20b2ba97 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.shop.service.recharge; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -70,8 +71,10 @@ public class PhoneRecordServiceImpl implements PhoneRecordService { } @Override - public PageResult getPhoneRecordPage(PhoneRecordPageReqVO pageReqVO) { - return phoneRecordMapper.selectPage(pageReqVO); + public PageResult getPhoneRecordPage(PhoneRecordPageReqVO pageReqVO) { + Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + phoneRecordMapper.findListPage(page,pageReqVO); + return new PageResult<>(page.getRecords(), page.getTotal()); } @Override diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeGearServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeGearServiceImpl.java index 13c89394c..db01cb0b0 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeGearServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/RechargeGearServiceImpl.java @@ -107,7 +107,9 @@ public class RechargeGearServiceImpl implements RechargeGearService { List rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.lambdaQuery() .eq(RechargeGearDO::getDeleted, 0)); List rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS); - RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.lambdaQuery().eq(RechargeOrderDO::getUid, loginUser.getId()).last("LIMIT 1")); + RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.lambdaQuery().eq(RechargeOrderDO::getUid, loginUser.getId()) + .eq(RechargeOrderDO::getPaid,1) + .last("LIMIT 1")); if (Objects.nonNull(orderDO)) { List infoDOS = phoneRecordMapper.selectList(Wrappers.lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderDO.getId())); Map> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId)); diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/AliPayStrategy.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/AliPayStrategy.java index ffd6cfaeb..f914d2784 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/AliPayStrategy.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/support/pay/AliPayStrategy.java @@ -56,7 +56,7 @@ public class AliPayStrategy implements IPayStrategy { request.setBizContent(bizContent.toString()); AlipayTradeWapPayResponse response = null; try { - response = alipayClient.pageExecute(request); + response = alipayClient.pageExecute(request,"get"); orderResponse.setBody(response.getBody()); } catch (AlipayApiException e) { e.printStackTrace(); diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/PhoneRecordMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/PhoneRecordMapper.xml index 1630755e1..f56f69ba0 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/PhoneRecordMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/PhoneRecordMapper.xml @@ -9,4 +9,28 @@ 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> + + diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderInfoMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderInfoMapper.xml index db6c2be2d..70e37e6f3 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderInfoMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/recharge/RechargeOrderInfoMapper.xml @@ -11,13 +11,13 @@ @@ -88,6 +61,7 @@ a.id, a.order_id, a.pay_serial_number, + a.tenant_id, e.name as tenantName, a.pay_time, a.pay_time as payCompleteTime, @@ -100,21 +74,23 @@ a.uid, a.real_name as vipName, a.out_trade_no, - b.nickname as promoter, - d.parent_organization_name as 'depName' + if(b.nickname=null,d.parent_organization_name,CONCAT(d.parent_organization_name,'-',b.nickname)) as promoter, + d.parent_organization_name from cy_recharge_order a left join member_user b on a.promoter_id = b.id left join system_dept d on d.id = a.dept_id - left join system_tenant e on a.promoter_id = b.id + left join system_tenant e on e.id = a.tenant_id - and a.paid=1 and a.order_id like CONCAT('%',#{data.orderId},'%') + + and a.paid =#{data.paid} + and a.tenant_id =#{data.tenantId} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java index 4421d09b0..c66ffb5e6 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.member.controller.app.auth.vo; import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.Mobile; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; @@ -28,7 +29,7 @@ public class AppAuthSmsLoginReqVO { @Schema(description = "手机号", required = true, example = "15601691300") @NotEmpty(message = "手机号不能为空") - @Mobile + @Pattern(regexp = "^[1][3,4,5,7,8][0,1,2,4,5,6,7,8,9][0-9]{8}$",message = "手机号不正确") private String mobile; /** * 推广员id diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java index c0e342383..f4cef9569 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java @@ -25,5 +25,8 @@ public interface DictTypeConstants { String SMS_TEMPLATE_TYPE = "system_sms_template_type"; // 短信模板类型 String SMS_SEND_STATUS = "system_sms_send_status"; // 短信发送状态 String SMS_RECEIVE_STATUS = "system_sms_receive_status"; // 短信接收状态 + String PYT_TYPE = "pay_type"; // 支付类型 + + String PYT_STATUS = "pay_status"; // 支付状态 } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index d9714b674..175b1c047 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -209,8 +209,8 @@ ali: merchantPrivateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCAhydIKD244uxHaCAE8N4KA0kfK2UkhXayUwarvc09s/JHC7WkrtwgmeHx+JyFA/QQA1WHQREJ8jyS9HrgasmmA+BaE0vGwbu/c0R4Cde5dLeITZb4w4X1RlH+xjtF34pKLH3oVi29q9jUTRii41eCBeztL/XcbJDsxAnCNnuxcak0gk4cl8j9aoMBP/opIc5sTDSqYFSSTDSMPGh90M6KowFtCHyVZxEszcIRX9cRIuf9KtfGvBzljJMjNGshIMuaHVCFpy72E0s50HmMxC4Kodhp6HEdLV1GUBZy87PYiKTqp9WVn0CndzcfmmdUUXVUvqWPKzRN3YSxExJ0Z5KFAgMBAAECggEABovbulciXaphMnnhN581D/l+3fGN40BQ/WAxNMokDAKAUpIMHGkzmQ19bp+lCTlcUvx4fL0ZqxIFd86v+4I05xnHcY8OCv+PGn86e4q0zCNfvbeF+wGqbwW342whVLvABWsitpS9G64HCzkqChHeQScgHCyXLzTwZL7PaG7x+eWnQ3WyA5KlCpUQWOz6OBPD7flkaflVRbDDZqmhcpEwwSXC9vSQb5+E0BZ118+5nJA65Wi/EPtqCzWX4k6ioiQcN5OeJrScZ4fnQm4h4j+TRLeKqkAKCZFpAZcB7RERxA/4Mzz9mEzHOBzSbrUU+miJ3oSkd4S4ldrOZU4EVkI1AQKBgQDe5t+Qij0hOPQaMpiM2hiQnMAI3TzHRbrYf6JUlMqdzad9oasY2ap+iit60TD9OLwjRGzjy7S9WL2bUgmmU4/sOjR0NMl8z3iUTYun6EubNoMUiu9UhQXBThxBCZv/H2agJ4Uswq2lBjUuGyp383lj9qSkScngGknYgrUd/pUa5QKBgQCTnNzCsIU/1N3fhzpvh1RmUwz8JalcmPNxQqrxE53Je+hVQ4BoeVMCov8U62TjBrxmHFEDVwXqAlRUUOWsWu4ac7V/VvFlwQoqPjkjNteOW6aO+BMDAlb2FVg5GzFy/MvLw4EUtU/Sx8EmWZpyaIzjRV4IUHx4WzJoORKEUIH/IQKBgQCh+9F37p3h6Murxh0KLuwvG1qKlow2nDveXVKQeNiNuQgAyl3WX0gBUVOrmx4oxvQiBPXEzSJ5f2W62/FbR9qNZvb7g+jwpK0RyRC2Yp+fGgxD/3tRRqIaCjOKJ/uPeThRJqcnEgqypEI9UUyZgvwyYuje4yirjS8hAkuwknO06QKBgHH4tnbX5jovuBPDjHnaSm8rBqaUyZxGOAimCehTVgvgULWshbOkoVQy17KmQWIMrGBG0sI6acWRgN0NDRgzqQ3hcyxby8zd7GRLYMBwsqQm3YYbwkobf1tHhbOp7Fc1GoE8dSixCW3cb6SVoGtfkBBWWdEfm8st1tCj6EkjBAwhAoGAShd1PY/QOEJ6Cj9IDXvD25DAh0dKs54PRxENetbIxPgYpH7db6n/smmbwM69U4TXZyFfqme1Bc0JwM2J7D6gs4OV88AhXJvfj091eJQhYC5e80Eo8dySserwLp8/ka6FV/EFUplg/DD4JR/jbVzO2fbOPCLm6I+sZqG3K7mg6IM= alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4AmKmcg8NImIDHlY1dz/DgBlIB1EVXv5gI2S17/Ddt7kDEdY2Uq0TV5NmVxf1RQ6EXQCDpBm83IOkduMeGsnD3zad6Vpit6hdjfvMJ4au9pAaoe4nYAy0CoMVTKDIR7XunSJZqfOZTihLXD8GbqMFTMPRyuh/JNCHoeDfDhca2nD6hyVOLE7XqZK8gVq9WgUM8uVkXDHJJfPHFmQaU8jJt3pyuItsVi1id8vJvHdng/rFy0USPwSq9kVv9DaIxI2197UBvjtyt4iTTYE5esOiJeulUggwmpWoss7Cx2fbN0pLVors+DybJGZjEW3GdwL+R6FStvQNAVcIf2Ty/NgKwIDAQAB gatewayUrl: https://openapi.alipay.com/gateway.do - notify-url: http://yuxy.perrymake.com/admin-api/notify/ali/pay_notify - refund-notify: http://yuxy.perrymake.com/admin-api/notify/ali/refund_notify + notify-url: http://api.cyywl.top/admin-api/notify/ali/pay_notify + refund-notify: http://api.cyywl.top/admin-api/notify/ali/refund_notify # 芋道配置项,设置当前项目所有自定义的配置 yudao: captcha: diff --git a/yudao-server/src/main/resources/application-prod.yaml b/yudao-server/src/main/resources/application-prod.yaml new file mode 100644 index 000000000..1a093b012 --- /dev/null +++ b/yudao-server/src/main/resources/application-prod.yaml @@ -0,0 +1,234 @@ +server: + port: 48080 + servlet: + context-path: / + +--- #################### 数据库相关配置 #################### + +spring: + # 数据源配置项 + autoconfigure: + exclude: + - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 + - org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration # 排除积木报表带来的 MongoDB 的自动配置 + datasource: + druid: # Druid 【监控】相关的全局配置 + web-stat-filter: + enabled: true + stat-view-servlet: + enabled: true + allow: # 设置白名单,不填则允许所有访问 + url-pattern: /druid/* + login-username: # 控制台管理用户名和密码 + login-password: + filter: + stat: + enabled: true + log-slow-sql: true # 慢 SQL 记录 + slow-sql-millis: 100 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: # 多数据源配置 + druid: # Druid 【连接池】相关的全局配置 + initial-size: 5 # 初始连接数 + min-idle: 10 # 最小连接池数量 + max-active: 20 # 最大连接池数量 + max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 + time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 + min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 + max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 + validation-query: SELECT 1 # 配置检测连接是否有效 + test-while-idle: true + test-on-borrow: false + test-on-return: false + primary: master + datasource: + master: + name: cyywl + url: jdbc:mysql://117.33.142.185:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true + driver-class-name: com.mysql.jdbc.Driver + username: root + password: axzsd110 + # slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 + # name: ruoyi-vue-pro + # url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true + # driver-class-name: com.mysql.jdbc.Driver + # username: root + # password: 3WLiVUBEwTbvAfsh + + # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 + redis: + host: 117.33.142.185 # 地址 + port: 6369 # 端口 + database: 6 # 数据库索引 + password: 20221122@dev # 密码,建议生产环境开启 + +--- #################### 定时任务相关配置 #################### + +# Quartz 配置项,对应 QuartzProperties 配置类 +spring: + quartz: + auto-startup: true # 测试环境,需要开启 Job + scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName + job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。 + wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true + properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档 + org: + quartz: + # Scheduler 相关配置 + scheduler: + instanceName: schedulerName + instanceId: AUTO # 自动生成 instance ID + # JobStore 相关配置 + jobStore: + # JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162 + class: org.springframework.scheduling.quartz.LocalDataSourceJobStore + isClustered: true # 是集群模式 + clusterCheckinInterval: 15000 # 集群检查频率,单位:毫秒。默认为 15000,即 15 秒 + misfireThreshold: 60000 # misfire 阀值,单位:毫秒。 + # 线程池相关配置 + threadPool: + threadCount: 25 # 线程池大小。默认为 10 。 + threadPriority: 5 # 线程优先级 + class: org.quartz.simpl.SimpleThreadPool # 线程池类型 + jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置 + initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。 + +--- #################### 服务保障相关配置 #################### + +# Lock4j 配置项 +lock4j: + acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 + expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 + +# Resilience4j 配置项 +resilience4j: + ratelimiter: + instances: + backendA: + limit-for-period: 1 # 每个周期内,允许的请求数。默认为 50 + limit-refresh-period: 60s # 每个周期的时长,单位:微秒。默认为 500 + timeout-duration: 1s # 被限流时,阻塞等待的时长,单位:微秒。默认为 5s + register-health-indicator: true # 是否注册到健康监测 + +--- #################### 监控相关配置 #################### + +# Actuator 监控端点的配置项 +management: + endpoints: + web: + base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator + exposure: + include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 + +# Spring Boot Admin 配置项 +spring: + boot: + admin: + # Spring Boot Admin Client 客户端的相关配置 + client: + url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址 + instance: + service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] + # Spring Boot Admin Server 服务端的相关配置 + context-path: /admin # 配置 Spring + +# 日志文件配置 +logging: + file: + name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 + +--- #################### 微信公众号相关配置 #################### +wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档 + mp: + # 公众号配置(必填) + app-id: wx041349c6f39b268b + secret: 5abee519483bc9f8cb37ce280e814bd0 + # 存储配置,解决 AccessToken 的跨节点的共享 + config-storage: + type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 + key-prefix: wx # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置 + http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台 + miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档 + appid: wx63c280fe3248a3e7 + secret: 6f270509224a7ae1296bbf1c8cb97aed + config-storage: + type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 + key-prefix: wa # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置 + http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台 + pay: + one: + enabled: true + app-id: wxb1826c88da21d81e + mch-id: 1641993417 + mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM + apiv3-key: cyywl666666cyywl888888cyywl66666 + private-cert-path: classpath:/1/apiclient_cert.pem + private-key-path: classpath:/1/apiclient_key.pem + key-path: classpath:/1/apiclient_cert.p12 + cert-serial-no: 58FDB503F92B6C0E258C9940BB726C2BF6022E56 + notify-url: http://api.cyywl.top/app-api/pay/wxpay/pay_notify + refund-notify-url: http://api.cyywl.top/app-api/pay/wxpay/refund_notify + two: + enabled: true + app-id: wxb1826c88da21d81e + mch-id: 1642042589 + mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM + apiv3-key: cyywl666666cyywl888888cyywl66666 + private-cert-path: classpath:/2/apiclient_cert.pem + private-key-path: classpath:/2/apiclient_key.pem + key-path: classpath:/2/apiclient_cert.p12 + cert-serial-no: 47F04D51F958FFEF56A6DFC25BDE83CF89353E19 + notify-url: http://api.cyywl.top/app-api/pay/wxpay/pay_notify + refund-notify-url: http://api.cyywl.top/app-api/pay/wxpay/refund_notify + + +--- #################### 芋道相关配置 #################### +ali: + pay: + one: + appId: 2021003196623046 + merchantPrivateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCAhydIKD244uxHaCAE8N4KA0kfK2UkhXayUwarvc09s/JHC7WkrtwgmeHx+JyFA/QQA1WHQREJ8jyS9HrgasmmA+BaE0vGwbu/c0R4Cde5dLeITZb4w4X1RlH+xjtF34pKLH3oVi29q9jUTRii41eCBeztL/XcbJDsxAnCNnuxcak0gk4cl8j9aoMBP/opIc5sTDSqYFSSTDSMPGh90M6KowFtCHyVZxEszcIRX9cRIuf9KtfGvBzljJMjNGshIMuaHVCFpy72E0s50HmMxC4Kodhp6HEdLV1GUBZy87PYiKTqp9WVn0CndzcfmmdUUXVUvqWPKzRN3YSxExJ0Z5KFAgMBAAECggEABovbulciXaphMnnhN581D/l+3fGN40BQ/WAxNMokDAKAUpIMHGkzmQ19bp+lCTlcUvx4fL0ZqxIFd86v+4I05xnHcY8OCv+PGn86e4q0zCNfvbeF+wGqbwW342whVLvABWsitpS9G64HCzkqChHeQScgHCyXLzTwZL7PaG7x+eWnQ3WyA5KlCpUQWOz6OBPD7flkaflVRbDDZqmhcpEwwSXC9vSQb5+E0BZ118+5nJA65Wi/EPtqCzWX4k6ioiQcN5OeJrScZ4fnQm4h4j+TRLeKqkAKCZFpAZcB7RERxA/4Mzz9mEzHOBzSbrUU+miJ3oSkd4S4ldrOZU4EVkI1AQKBgQDe5t+Qij0hOPQaMpiM2hiQnMAI3TzHRbrYf6JUlMqdzad9oasY2ap+iit60TD9OLwjRGzjy7S9WL2bUgmmU4/sOjR0NMl8z3iUTYun6EubNoMUiu9UhQXBThxBCZv/H2agJ4Uswq2lBjUuGyp383lj9qSkScngGknYgrUd/pUa5QKBgQCTnNzCsIU/1N3fhzpvh1RmUwz8JalcmPNxQqrxE53Je+hVQ4BoeVMCov8U62TjBrxmHFEDVwXqAlRUUOWsWu4ac7V/VvFlwQoqPjkjNteOW6aO+BMDAlb2FVg5GzFy/MvLw4EUtU/Sx8EmWZpyaIzjRV4IUHx4WzJoORKEUIH/IQKBgQCh+9F37p3h6Murxh0KLuwvG1qKlow2nDveXVKQeNiNuQgAyl3WX0gBUVOrmx4oxvQiBPXEzSJ5f2W62/FbR9qNZvb7g+jwpK0RyRC2Yp+fGgxD/3tRRqIaCjOKJ/uPeThRJqcnEgqypEI9UUyZgvwyYuje4yirjS8hAkuwknO06QKBgHH4tnbX5jovuBPDjHnaSm8rBqaUyZxGOAimCehTVgvgULWshbOkoVQy17KmQWIMrGBG0sI6acWRgN0NDRgzqQ3hcyxby8zd7GRLYMBwsqQm3YYbwkobf1tHhbOp7Fc1GoE8dSixCW3cb6SVoGtfkBBWWdEfm8st1tCj6EkjBAwhAoGAShd1PY/QOEJ6Cj9IDXvD25DAh0dKs54PRxENetbIxPgYpH7db6n/smmbwM69U4TXZyFfqme1Bc0JwM2J7D6gs4OV88AhXJvfj091eJQhYC5e80Eo8dySserwLp8/ka6FV/EFUplg/DD4JR/jbVzO2fbOPCLm6I+sZqG3K7mg6IM= + alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4AmKmcg8NImIDHlY1dz/DgBlIB1EVXv5gI2S17/Ddt7kDEdY2Uq0TV5NmVxf1RQ6EXQCDpBm83IOkduMeGsnD3zad6Vpit6hdjfvMJ4au9pAaoe4nYAy0CoMVTKDIR7XunSJZqfOZTihLXD8GbqMFTMPRyuh/JNCHoeDfDhca2nD6hyVOLE7XqZK8gVq9WgUM8uVkXDHJJfPHFmQaU8jJt3pyuItsVi1id8vJvHdng/rFy0USPwSq9kVv9DaIxI2197UBvjtyt4iTTYE5esOiJeulUggwmpWoss7Cx2fbN0pLVors+DybJGZjEW3GdwL+R6FStvQNAVcIf2Ty/NgKwIDAQAB + gatewayUrl: https://openapi.alipay.com/gateway.do + notify-url: http://api.cyywl.top/admin-api/notify/ali/pay_notify + refund-notify: http://api.cyywl.top/admin-api/notify/ali/refund_notify +# 芋道配置项,设置当前项目所有自定义的配置 +yudao: + xss: + enable: false + exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 + - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 + - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 + pay: + callback-url: http://yunai.natapp1.cc/admin-api/pay/notify/callback + return-url: http://yunai.natapp1.cc/admin-api/pay/notify/return + demo: false # 开启演示模式 + +justauth: + enabled: true + type: + DINGTALK: # 钉钉 + client-id: dingvrnreaje3yqvzhxg + client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI + ignore-check-redirect-uri: true + WECHAT_ENTERPRISE: # 企业微信 + client-id: wwd411c69a39ad2e54 + client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw + agent-id: 1000004 + ignore-check-redirect-uri: true + cache: + type: REDIS + prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: + timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 +wx: + mp: + useRedis: false + defaultContent: \u60A8\u597D\uFF0C\u6709\u4EC0\u4E48\u95EE\u9898\uFF1F + redisConfig: + host: 117.33.142.185 # 地址 + port: 6369 # 端口 + database: 16 # 数据库索引 + password: 20221122@dev # 密码,建议生产环境开启 diff --git a/yudao-ui-admin/src/utils/dict.js b/yudao-ui-admin/src/utils/dict.js index 3b60b35b0..7457e8f04 100644 --- a/yudao-ui-admin/src/utils/dict.js +++ b/yudao-ui-admin/src/utils/dict.js @@ -86,7 +86,8 @@ export const DICT_TYPE = { PROMOTION_CONDITION_TYPE: 'promotion_condition_type', // 营销的条件类型枚举 - PAY_TYPE:'pay_type' + PAY_TYPE:'pay_type', + PAY_STATUS:'pay_status' } /** diff --git a/yudao-ui-admin/src/views/shop/phoneRecord/index.vue b/yudao-ui-admin/src/views/shop/phoneRecord/index.vue index 37d5d04d2..9a708d5d3 100644 --- a/yudao-ui-admin/src/views/shop/phoneRecord/index.vue +++ b/yudao-ui-admin/src/views/shop/phoneRecord/index.vue @@ -3,32 +3,11 @@ - - - - - - + - - - - - - - - - - - - - - - + 搜索 重置 @@ -41,6 +20,10 @@ 新增 + + 导入 + 导出 @@ -50,12 +33,9 @@ - - - - + - - - + + + + + 搜索 重置 @@ -52,7 +57,8 @@ @@ -66,9 +72,9 @@ - + @@ -88,7 +94,7 @@ 拒绝退款 - 发起退款 @@ -111,7 +117,8 @@ import { exportRechargeOrderExcel, refundRechargeOrder } from '@/api/shop/rechargeOrder'; -import {DICT_TYPE} from "@/utils/dict"; +import {DICT_TYPE, getDictDatas} from "@/utils/dict"; +import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue"; export default { name: "RechargeOrder", @@ -121,6 +128,7 @@ export default { } }, components: { + ElementForm }, data() { return { @@ -177,6 +185,7 @@ export default { outTradeNo: null, paySerialNumber: null, }, + statusDictDatas: getDictDatas(DICT_TYPE.PAY_STATUS), // 表单参数 form: {}, // 表单校验