fix(优惠券中心):用户查询优惠券逻辑优化,回调更新订单状态

This commit is contained in:
2025-09-02 03:05:12 +08:00
parent 451a6488e0
commit 41a471de37
3 changed files with 37 additions and 3 deletions
@@ -781,8 +781,20 @@ public class OrderController {
* @return
*/
private String appendPriceStr(String str){
// 参数验证
if (str == null || str.trim().isEmpty()) {
return "0.00";
}
// 获取字符串长度
int length = str.length();
// 处理长度小于2的情况
if (length == 1) {
return "0.0" + str;
} else if (length == 0) {
return "0.00";
}
// 获取除了最后两位字符之外的部分
String prefix = str.substring(0, length - 2);