1
This commit is contained in:
@@ -5,8 +5,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Leo
|
||||
* @version 1.0
|
||||
* @create 2024/11/9 下午3:08
|
||||
* @create 2024/11/9 下午3:08
|
||||
* @description:
|
||||
*/
|
||||
public class ValidCodeConverter {
|
||||
|
||||
@@ -145,7 +145,7 @@ private StringBuilder buildStatsContent(String title, OrderStats stats) {
|
||||
.append("[Packet] 完成佣金:").append(String.format("%.2f", stats.getCompletedCommission())).append("\n") // [信用卡]
|
||||
.append("────────────\n")
|
||||
.append("[Emm] 违规订单:").append(stats.getViolations()).append("\n") // [警告]
|
||||
.append("[Broken 违规佣金:").append(String.format("%.2f", stats.getViolationCommission())).append("\n") // [炸弹]
|
||||
.append("[Broken] 违规佣金:").append(String.format("%.2f", stats.getViolationCommission())).append("\n") // [炸弹]
|
||||
.append("━━━━━━━━━━━━");
|
||||
return content;
|
||||
}
|
||||
|
||||
@@ -98,12 +98,13 @@ public class OrderUtil {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
ValidCodeConverter converter = new ValidCodeConverter();
|
||||
String orderInfo =
|
||||
"状态:" +getEmjoy(orderRow.getValidCode())+" "+ (converter.getCodeDescription(orderRow.getValidCode())) + "\r" +
|
||||
|
||||
//+ "订单+sku:" + orderRow.getId() + "\r"
|
||||
"订单:" + orderRow.getOrderId() + " (" + (orderRow.getPlus() == 1 ? "plus" : "非plus") + ")\r" +
|
||||
|
||||
"状态:" + (converter.getCodeDescription(orderRow.getValidCode())) + "\r"
|
||||
|
||||
+ "名称:" + orderRow.getSkuName() + "\r\n"
|
||||
"名称:" + orderRow.getSkuName() + "\r\n"
|
||||
//+ "商品单价:" + orderRow.getPrice() + "\r"
|
||||
//+ "商品数量:" + orderRow.getSkuNum() + "\r"
|
||||
//+ "商品总价:" + (orderRow.getPrice() * orderRow.getSkuNum()) + "\r"
|
||||
@@ -125,6 +126,29 @@ public class OrderUtil {
|
||||
return orderInfo;
|
||||
}
|
||||
|
||||
public String getEmjoy(Integer status){
|
||||
switch (status) {
|
||||
//[爱心]已付款
|
||||
case 16:
|
||||
return "[爱心]";
|
||||
//[Wow] 待付款
|
||||
case 15:
|
||||
return "[Wow]";
|
||||
//[心碎]已取消
|
||||
case 2, 3:
|
||||
return "[心碎]";
|
||||
//[亲亲] 已完成
|
||||
case 17:
|
||||
//[Broken] 违规
|
||||
return "[亲亲]";
|
||||
case 27,28:
|
||||
return "[Broken]";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 将数据库订单转化成微信所需要文本 简洁版
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user