|
|
@@ -35,7 +35,6 @@ import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
@@ -237,7 +236,7 @@ public class ProdServiceImpl implements ProdService {
|
|
|
List<V_ProductPrivate> content = productPrivates.getContent();
|
|
|
List<Prod> content1 = new ArrayList<>();
|
|
|
for (V_ProductPrivate v_productPrivate : content) {
|
|
|
- Prod prod = ModelConvertUtil.vProductPrivateConvertProd(v_productPrivate);
|
|
|
+ Prod prod = ModelConvertUtil.vProductPrivateConvertProd(v_productPrivate);
|
|
|
if (prod != null) {
|
|
|
content1.add(prod);
|
|
|
}
|
|
|
@@ -246,12 +245,11 @@ public class ProdServiceImpl implements ProdService {
|
|
|
return page;
|
|
|
}
|
|
|
|
|
|
- @Transactional
|
|
|
@Override
|
|
|
public void updateNewProdDowned(final List<String> list) {
|
|
|
if (!CollectionUtils.isEmpty(list)) {
|
|
|
- String sql = "update products set pr_erpdown = '已上传' where pr_pcmpcode = ? and pr_pbranden = ?;";
|
|
|
- jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {
|
|
|
+ final String sql = "update products set pr_erpdown = '已上传' where pr_pcmpcode = ? and pr_pbranden = ?";
|
|
|
+ int[] batchUpdate = jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {
|
|
|
@Override
|
|
|
public void setValues(PreparedStatement ps, int i) throws SQLException {
|
|
|
String str = list.get(i);
|
|
|
@@ -265,6 +263,7 @@ public class ProdServiceImpl implements ProdService {
|
|
|
return list.size();
|
|
|
}
|
|
|
});
|
|
|
+ System.out.println(batchUpdate.length);
|
|
|
}
|
|
|
}
|
|
|
}
|