|
|
@@ -1051,13 +1051,16 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
productPrivate = new ProductPrivate();
|
|
|
}
|
|
|
productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
|
|
|
+ // 统计现在有多少在售信息
|
|
|
+ int batchCount = goodsDao.findCountByProductid(prId);
|
|
|
+ productPrivate.setBatchCount(batchCount);
|
|
|
}
|
|
|
productPrivateDao.save(productPrivates);
|
|
|
}
|
|
|
|
|
|
Enterprise enterprise = SystemSession.getUser().getEnterprise();
|
|
|
final Object[] obj = new Object[]{enterprise.getUu(), enterprise.getEnName(), batch};
|
|
|
- String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @enName = '%s'; set @batch = '%s'; call RELEASE_TO_GOODS_V1(@enuu, @enName, @batch, @out); select @out";
|
|
|
+ String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @enName = '%s'; set @batch = '%s'; call RELEASE_TO_GOODS_V2(@enuu, @enName, @batch, @out); select @out";
|
|
|
final String updateSql = String.format(sql, obj);
|
|
|
String num = jdbcTemplate.execute(new StatementCallback<String>() {
|
|
|
|