|
|
@@ -756,8 +756,17 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
public void uploadToB2B() {
|
|
|
boolean enable = ConfigsCache.current().enableB2B();
|
|
|
if (enable) {
|
|
|
+ //生成消息
|
|
|
MessageInfo messageInfo = new MessageInfo(BaseContextHolder.getUserId(), BillCodeSeq.PRODUCT.name(), "", BaseContextHolder.getCompanyId());
|
|
|
sendMessageApi.sendMsg(messageInfo);
|
|
|
+ //更新状态为 上传中
|
|
|
+ List<ProductUploadDTO> productUploadDTOList = getMapper().selectUploadProdByCompanyId(BaseContextHolder.getCompanyId());
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ Iterator<ProductUploadDTO> it = productUploadDTOList.iterator();
|
|
|
+ while (it.hasNext()){
|
|
|
+ sb.append(it.next().getPr_id() + ",");
|
|
|
+ }
|
|
|
+ updateB2BStatus(sb.substring(0, sb.length() - 1), "上传中");
|
|
|
}else {
|
|
|
throw new BizException(BizExceptionCode.BIZ_ENABLE_B2B);
|
|
|
}
|