充值赠送问题

This commit is contained in:
2026-04-17 13:57:33 +08:00
parent 513baf34cd
commit b22b92c877
3 changed files with 51 additions and 50 deletions

View File

@@ -76,17 +76,6 @@ public interface PrinterImpl {
}
return "";
}
/**
* @param num 最小1最大127不设置则为默认
*/
public String getRs(int num) {
if (StrUtil.isNotBlank(rs)) {
return StrUtil.format("<{}:{}>", rs, num);
}
return "";
}
}
@@ -721,13 +710,13 @@ public interface PrinterImpl {
PrintSignLabel signLabelInfo = getSignLabelInfo();
StringBuilder builder = new StringBuilder();
// 标题:店铺名称 + 充值凭证
builder.append(getFormatLabel(record.getShopName(), signLabelInfo.center)).append(signLabelInfo.br);
builder.append(getFormatLabel("充值凭证", signLabelInfo.center)).append(signLabelInfo.br);
builder.append(getFormatLabel(record.getShopName(), signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br);
builder.append(getFormatLabel("充值凭证", signLabelInfo.s, signLabelInfo.center)).append(signLabelInfo.br);
// 用户信息
builder.append(getFormatLabel(StrUtil.format("充值用户: {}", record.getUserName(), signLabelInfo.s))).append(signLabelInfo.br);
builder.append(getFormatLabel(StrUtil.format("手机号: {}", record.getUserPhone()), signLabelInfo.s)).append(signLabelInfo.br);
builder.append(getFormatLabel(StrUtil.format("支付时间: {}", DateUtil.format(record.getPayTime(), "yyyy/MM/dd HH:mm:ss")), signLabelInfo.s)).append(signLabelInfo.br);
builder.append(getFormatLabel("充值用户:" + record.getUserName(), signLabelInfo.s)).append(signLabelInfo.br);
builder.append(getFormatLabel("手机号:" + record.getUserPhone(), signLabelInfo.s)).append(signLabelInfo.br);
builder.append(getFormatLabel("支付时间:" + DateUtil.format(record.getPayTime(), "yyyy/MM/dd HH:mm:ss"), signLabelInfo.s)).append(signLabelInfo.br);
// 充值明细
builder.append(getDividingLine()).append(signLabelInfo.br);
builder.append(getFormatLabel(leftRightAlign("充值金额:", record.getRechargeAmount().stripTrailingZeros().toPlainString(), 16), signLabelInfo.f)).append(signLabelInfo.br);