入驻信息转成店铺接口开发

This commit is contained in:
Jack 2025-03-25 00:26:02 +08:00
parent 3a06d4db4c
commit 9cfe4bee0c
2 changed files with 21 additions and 1 deletions

View File

@ -34,6 +34,7 @@ import com.suisung.mall.shop.esign.utils.enums.EsignRequestType;
import com.suisung.mall.shop.esign.utils.exception.EsignDemoException;
import com.suisung.mall.shop.page.service.OssService;
import com.suisung.mall.shop.store.service.ShopMerchEntryService;
import com.suisung.mall.shop.store.service.ShopStoreBaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -88,6 +89,9 @@ public class EsignContractServiceImpl extends BaseServiceImpl<EsignContractMappe
@Resource
private EsignPlatformInfoService esignPlatformInfoService;
@Resource
private ShopStoreBaseService shopStoreBaseService;
@Resource
private OssService ossService;
@ -284,6 +288,23 @@ public class EsignContractServiceImpl extends BaseServiceImpl<EsignContractMappe
// 更新合同流程状态和文件地址
boolean success = updateContractFlowStatusAndFileUrlBySignFlowId(signFlowId, CommonConstant.CONTRACT_SIGN_STA_FINISH, downloadUrl);
if (success && StrUtil.isNotBlank(downloadUrl)) {
// 新建一个正式的已审核通过的店铺
taskService.executeTask(() -> {
try {
Pair<Integer, String> retPair = shopStoreBaseService.merchEntryInfo2StoreInfo(esignContract.getMch_mobile());
if (retPair.getFirst() > 0) {
// 更改合同记录表的店铺id
UpdateWrapper<EsignContract> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("sign_flow_id", signFlowId);
updateWrapper.set("store_id", retPair.getSecond());
update(updateWrapper);
}
} catch (Exception e) {
log.error("店铺创建失败:", e);
}
});
return new ResponseEntity<>(new JSONObject().put("code", 200).put("msg", "success").toString(), HttpStatus.OK);
}
} else if (action.equals("SIGN_MISSON_COMPLETE") && ObjectUtil.isNotEmpty(signResult)) {// 签署方-签署结果含拒签通知

View File

@ -3017,7 +3017,6 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
// 保存后店铺Id
storeId = shopStoreBase.getStore_id();
// shop_store_info
ShopStoreInfo shopStoreInfo = new ShopStoreInfo();
shopStoreInfo.setStore_id(storeId);