|
|
|
@@ -14,6 +14,7 @@ import com.iformall.service.WxCUserService; |
|
|
|
import com.iformall.service.WxOrderService; |
|
|
|
import com.iformall.service.WxPayOrderService; |
|
|
|
import com.iformall.utils.RedisLock; |
|
|
|
import com.iformall.utils.Utility; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -231,7 +232,15 @@ public class WxOrderServiceImpl implements WxOrderService { |
|
|
|
|
|
|
|
// body |
|
|
|
// tenant_id + merchant_id + title + subtitle |
|
|
|
String bodyStr = coupon.getTitle() + "-" + coupon.getSubTitle(); |
|
|
|
String bodyStr = ""; |
|
|
|
try { |
|
|
|
bodyStr = Utility.substring(wxMerchant.getName(), Math.min(64, wxMerchant.getName().getBytes().length), "utf-8") + |
|
|
|
Utility.substring(coupon.getTitle(), Math.min(62, coupon.getTitle().getBytes().length), "utf-8"); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("body:" + e.getMessage()); |
|
|
|
bodyStr = wxMerchant.getName() + "-" + EnumCouponType.getEnum(coupon.getType()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxOrder record = new WxOrder(); |
|
|
|
record.setId(orderNumber); |
|
|
|
|