Commit d378fba1 authored by shiyu's avatar shiyu

消息跳转,商品名称长度限制

parent 74ba1531
...@@ -203,7 +203,7 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -203,7 +203,7 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
long itemId = userConsignSale.getItemId(); long itemId = userConsignSale.getItemId();
Item item = itemDao.findById(itemId); Item item = itemDao.findById(itemId);
String itemName = item.getName(); String itemName = item.getName();
String content = itemName.substring(0, 5) + "," + price; String content = itemName.length() > 5 ? itemName.substring(0, 5) : itemName + "," + price;
ConsignSaleSubscribeMsg consignSaleSubscribeMsg = ConsignSaleSubscribeMsg.of(saleId, content, new Date()); ConsignSaleSubscribeMsg consignSaleSubscribeMsg = ConsignSaleSubscribeMsg.of(saleId, content, new Date());
officialAccountApi.sendModelMsg(openId, consignSaleSubscribeMsg); officialAccountApi.sendModelMsg(openId, consignSaleSubscribeMsg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment