643aa698 刘嘉

1.菠萝派接口-库存同步逻辑修改

2.开启前端事务
1 个父辈 0716a07e
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
30 p:basePackage="com.sibu.orderHelper.hotel.dao" p:sqlSessionFactoryBeanName="sqlSessionFactory"/> 30 p:basePackage="com.sibu.orderHelper.hotel.dao" p:sqlSessionFactoryBeanName="sqlSessionFactory"/>
31 31
32 <!-- 对数据源进行事务管理 --> 32 <!-- 对数据源进行事务管理 -->
33 <!--<bean id="transactionManager"--> 33 <bean id="transactionManager"
34 <!--class="org.springframework.jdbc.datasource.DataSourceTransactionManager"--> 34 class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
35 <!--p:dataSource-ref="dynamicDataSource"/>--> 35 p:dataSource-ref="dynamicDataSource"/>
36 36
37 <!-- 事务注解驱动,标注@Transactional的类和方法将具有事务性 --> 37 <!-- 事务注解驱动,标注@Transactional的类和方法将具有事务性 -->
38 <!--<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" mode="proxy"/>--> 38 <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" mode="proxy"/>
39 39
40 <!-- 配置事务的传播特性 --> 40 <!-- 配置事务的传播特性 -->
41 <!--<tx:advice id="txAdvice" transaction-manager="transactionManager">--> 41 <!--<tx:advice id="txAdvice" transaction-manager="transactionManager">-->
......
...@@ -59,7 +59,7 @@ public class SyncStockBizServiceImpl extends AbstractBizService<PineappleSyncSto ...@@ -59,7 +59,7 @@ public class SyncStockBizServiceImpl extends AbstractBizService<PineappleSyncSto
59 if(pineappleDao.updateSku(skuBean) > 0){ 59 if(pineappleDao.updateSku(skuBean) > 0){
60 //根据产品ID获取所有SKU总数 60 //根据产品ID获取所有SKU总数
61 List<SkuApiResponse> skuBeanList = pineappleDao.getSkuBeanListByMap(callRequest.getBizModel().getPlatProductID()); 61 List<SkuApiResponse> skuBeanList = pineappleDao.getSkuBeanListByMap(callRequest.getBizModel().getPlatProductID());
62 if(!StringUtil.isNull(skuBeanList)){ 62 if(StringUtil.isNull(skuBeanList)){
63 log.error(String.format("菠萝派商城appkey[%s]更新库存失败,查询不到该SKU集合",callRequest.getRequest().getAppkey())); 63 log.error(String.format("菠萝派商城appkey[%s]更新库存失败,查询不到该SKU集合",callRequest.getRequest().getAppkey()));
64 throw new BizException((String.format("菠萝派商城appkey[%s]更新库存失败,查询不到该SKU集合",callRequest.getRequest().getAppkey()))); 64 throw new BizException((String.format("菠萝派商城appkey[%s]更新库存失败,查询不到该SKU集合",callRequest.getRequest().getAppkey())));
65 } 65 }
...@@ -113,6 +113,9 @@ public class SyncStockBizServiceImpl extends AbstractBizService<PineappleSyncSto ...@@ -113,6 +113,9 @@ public class SyncStockBizServiceImpl extends AbstractBizService<PineappleSyncSto
113 pineappleSyncStockResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); 113 pineappleSyncStockResponse.setMessage(PineappleEnum.SUCCESS.getMsg());
114 pineappleSyncStockResponse.setCode(PineappleEnum.SUCCESS.getCode()); 114 pineappleSyncStockResponse.setCode(PineappleEnum.SUCCESS.getCode());
115 return pineappleSyncStockResponse; 115 return pineappleSyncStockResponse;
116 }else{
117 log.error(String.format("菠萝派商城appkey[%s]更新库存失败", callRequest.getRequest().getAppkey()));
118 throw new BizException((String.format("菠萝派商城更新sku库存失败", callRequest.getRequest().getAppkey())));
116 } 119 }
117 } 120 }
118 } 121 }
......