菜单优化
This commit is contained in:
@@ -761,7 +761,7 @@ public class JDUtil {
|
|||||||
content.append("\r" + "违规佣金:").append(getStreamForWeiGui(sevendayOrders).mapToDouble(orderRow -> orderRow.getEstimateCosPrice() * orderRow.getCommissionRate() * 0.01).sum());
|
content.append("\r" + "违规佣金:").append(getStreamForWeiGui(sevendayOrders).mapToDouble(orderRow -> orderRow.getEstimateCosPrice() * orderRow.getCommissionRate() * 0.01).sum());
|
||||||
|
|
||||||
if(!sevendayOrders.isEmpty()){
|
if(!sevendayOrders.isEmpty()){
|
||||||
orderUtil.orderToWxBatch(todayOrders);
|
orderUtil.orderToWxBatch(sevendayOrders);
|
||||||
}
|
}
|
||||||
|
|
||||||
contents.add(content);
|
contents.add(content);
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ public class OrderUtil {
|
|||||||
int i = 1;
|
int i = 1;
|
||||||
String wxId = getWxidFromJdid(orderRowList.get(0).getUnionId().toString());
|
String wxId = getWxidFromJdid(orderRowList.get(0).getUnionId().toString());
|
||||||
StringBuilder content = new StringBuilder();
|
StringBuilder content = new StringBuilder();
|
||||||
content.append("批量订单: ").append(orderRowList.size()).append("单 \r\n");
|
content.append("批量订单:\n\r ").append(" 共 ").append(orderRowList.size()).append("单 \n\r");
|
||||||
for (OrderRow orderRow : orderRowList) {
|
List<OrderRow> filterList = orderRowList.stream().filter(orderRow -> orderRow.getValidCode() != 16 && orderRow.getValidCode() != 17).toList();
|
||||||
|
content.append("移除取消的订单, 共 ").append(filterList.size()).append("单 \n\r");
|
||||||
|
for (OrderRow orderRow : filterList) {
|
||||||
String oldValidCode = redisTemplate.opsForValue().get(ORDER_ROW_KEY + orderRow.getId());
|
String oldValidCode = redisTemplate.opsForValue().get(ORDER_ROW_KEY + orderRow.getId());
|
||||||
|
|
||||||
// 检查Redis中是否有旧的状态码,没有的话赋予默认值
|
// 检查Redis中是否有旧的状态码,没有的话赋予默认值
|
||||||
@@ -92,38 +94,37 @@ public class OrderUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将数据库订单转化成微信所需要文本
|
||||||
|
*/
|
||||||
|
public String getFormattedOrderInfo(OrderRow orderRow, Integer oldValidCode) {
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
ValidCodeConverter converter = new ValidCodeConverter();
|
||||||
|
String orderInfo =
|
||||||
|
//+ "订单+sku:" + orderRow.getId() + "\r"
|
||||||
|
"订单:" + orderRow.getOrderId() + " (" + (orderRow.getPlus() == 1 ? "plus" : "非plus") + ")\r" +
|
||||||
|
|
||||||
/**
|
"状态:" + (converter.getCodeDescription(orderRow.getValidCode())) + "\r"
|
||||||
* 将数据库订单转化成微信所需要文本
|
|
||||||
*/
|
|
||||||
public String getFormattedOrderInfo(OrderRow orderRow, Integer oldValidCode) {
|
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
ValidCodeConverter converter = new ValidCodeConverter();
|
|
||||||
String orderInfo =
|
|
||||||
//+ "订单+sku:" + orderRow.getId() + "\r"
|
|
||||||
"订单:" + orderRow.getOrderId() + " (" + (orderRow.getPlus() == 1 ? "plus" : "非plus") + ")\r" +
|
|
||||||
|
|
||||||
"状态:" + (converter.getCodeDescription(orderRow.getValidCode())) + "\r"
|
+ "名称:" + orderRow.getSkuName() + "\r\n"
|
||||||
|
//+ "商品单价:" + orderRow.getPrice() + "\r"
|
||||||
|
//+ "商品数量:" + orderRow.getSkuNum() + "\r"
|
||||||
|
//+ "商品总价:" + (orderRow.getPrice() * orderRow.getSkuNum()) + "\r"
|
||||||
|
+ "计佣金额:" + orderRow.getEstimateCosPrice() + "\r"
|
||||||
|
|
||||||
+ "名称:" + orderRow.getSkuName() + "\r\n"
|
//+ "金额:" + orderRow.getActualCosPrice() + "\r"
|
||||||
//+ "商品单价:" + orderRow.getPrice() + "\r"
|
+ "比例:" + orderRow.getCommissionRate() + "\r"
|
||||||
//+ "商品数量:" + orderRow.getSkuNum() + "\r"
|
+ "佣金:" + orderRow.getEstimateFee() + "\r\n"
|
||||||
//+ "商品总价:" + (orderRow.getPrice() * orderRow.getSkuNum()) + "\r"
|
|
||||||
+ "计佣金额:" + orderRow.getEstimateCosPrice() + "\r"
|
|
||||||
|
|
||||||
//+ "金额:" + orderRow.getActualCosPrice() + "\r"
|
+ "下单:" + formatter.format(orderRow.getOrderTime()) + "\r"
|
||||||
+ "比例:" + orderRow.getCommissionRate() + "\r"
|
+ "完成:" + (orderRow.getFinishTime() != null ? formatter.format(orderRow.getFinishTime()) : "未完成") + "\r";
|
||||||
+ "佣金:" + orderRow.getEstimateFee() + "\r\n"
|
if (oldValidCode != -100) {
|
||||||
|
if (!oldValidCode.equals(orderRow.getValidCode()))
|
||||||
|
orderInfo = "从 :" + (converter.getCodeDescription(oldValidCode)) + "\r变成 " +
|
||||||
|
(converter.getCodeDescription(orderRow.getValidCode())) + "\r\n" + orderInfo;
|
||||||
|
}
|
||||||
|
|
||||||
+ "下单:" + formatter.format(orderRow.getOrderTime()) + "\r"
|
|
||||||
+ "完成:" + (orderRow.getFinishTime() != null ? formatter.format(orderRow.getFinishTime()) : "未完成") + "\r";
|
return orderInfo;
|
||||||
if (oldValidCode != -100) {
|
|
||||||
if (!oldValidCode.equals(orderRow.getValidCode()))
|
|
||||||
orderInfo = "从 :" + (converter.getCodeDescription(oldValidCode)) + "\r变成 " +
|
|
||||||
(converter.getCodeDescription(orderRow.getValidCode())) + "\r\n" + orderInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return orderInfo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user