|
|
@@ -3,6 +3,7 @@ package com.fs.handwrite.service.impl;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
+import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.fastgptApi.param.ChatImgParam;
|
|
|
import com.fs.fastgptApi.result.ChatDetailTStreamFResult;
|
|
|
import com.fs.fastgptApi.service.ChatService;
|
|
|
@@ -77,6 +78,28 @@ public class HandwriteCollectionServiceImpl implements IHandwriteCollectionServi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public int addCollectionAndUpdateOrderStatus(HandwriteCollection handwriteCollection)
|
|
|
+ {
|
|
|
+ Date currentTime = DateUtils.getNowDate();
|
|
|
+ handwriteCollection.setCreateTime(currentTime);
|
|
|
+ handwriteCollection.setUpdateTime(currentTime);
|
|
|
+ handwriteCollection.setCreateBy(handwriteCollection.getCompanyUserId());
|
|
|
+ handwriteCollection.setUpdateBy(handwriteCollection.getCompanyUserId());
|
|
|
+ try {
|
|
|
+ handwriteCollectionMapper.insertHandwriteCollection(handwriteCollection);
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
+ throw new CustomException("订单号已存在,请勿重复添加");
|
|
|
+ }
|
|
|
+ // 修改商城订单状态并设置手写信息采集主键id
|
|
|
+ FsStoreOrderScrm fsStoreOrder=new FsStoreOrderScrm();
|
|
|
+ fsStoreOrder.setOrderCode(handwriteCollection.getOrderCode());
|
|
|
+ fsStoreOrder.setHandleCollectionId(handwriteCollection.getId());
|
|
|
+ //TODO 需要设置推送订单表的状态为已绑定信息采集标识
|
|
|
+ return storeOrderScrmMapper.updateFsStoreOrderByOrderCode(fsStoreOrder);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public int updateHandwriteCollection(HandwriteCollection handwriteCollection)
|
|
|
{
|