菜单优化
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,11 +94,10 @@ public class OrderUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
|
||||||
* 将数据库订单转化成微信所需要文本
|
* 将数据库订单转化成微信所需要文本
|
||||||
*/
|
*/
|
||||||
public String getFormattedOrderInfo(OrderRow orderRow, Integer oldValidCode) {
|
public String getFormattedOrderInfo(OrderRow orderRow, Integer oldValidCode) {
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
ValidCodeConverter converter = new ValidCodeConverter();
|
ValidCodeConverter converter = new ValidCodeConverter();
|
||||||
String orderInfo =
|
String orderInfo =
|
||||||
@@ -125,5 +126,5 @@ public String getFormattedOrderInfo(OrderRow orderRow, Integer oldValidCode) {
|
|||||||
|
|
||||||
|
|
||||||
return orderInfo;
|
return orderInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user