|
|
@@ -6,6 +6,7 @@ import com.uas.platform.b2c.common.base.dao.CommonDao;
|
|
|
import com.uas.platform.b2c.core.config.SysConf;
|
|
|
import com.uas.platform.b2c.core.constant.IntegerConstant;
|
|
|
import com.uas.platform.b2c.core.constant.ReleaseStatus;
|
|
|
+import com.uas.platform.b2c.core.constant.SplitChar;
|
|
|
import com.uas.platform.b2c.core.constant.Status;
|
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
import com.uas.platform.b2c.core.utils.NumberUtil;
|
|
|
@@ -272,47 +273,32 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
// final Object[] obj = new Object[]{enUU, batch};
|
|
|
// final Object[] obj = new Object[]{enUU, batch};
|
|
|
final Object[] obj = new Object[]{enUU, batch};
|
|
|
- String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @batch = '%s'; call PRODUCT_RELEASE_VALID_V4(@enuu, @batch, @out); select @out";
|
|
|
+ String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @batch = '%s'; call PRODUCT_RELEASE_VALID_V5(@enuu, @batch, @out); select @out";
|
|
|
final String updateSql = String.format(sql, obj);
|
|
|
- String num = jdbcTemplate.execute(new StatementCallback<String>() {
|
|
|
+ strCount = jdbcTemplate.execute(new StatementCallback<String>() {
|
|
|
|
|
|
@Override
|
|
|
public String doInStatement(Statement stmt) throws SQLException, DataAccessException {
|
|
|
stmt.executeQuery(updateSql);
|
|
|
ResultSet rs = stmt.getResultSet();
|
|
|
- logger.info("这是测试--------------" + rs);
|
|
|
- System.err.println("这是测试--------------" + rs);
|
|
|
if (null != rs) {
|
|
|
rs.next();
|
|
|
- logger.info("这是测试--------------" + rs.getString(1));
|
|
|
- System.err.println("这是测试--------------" + rs.getString(1));
|
|
|
return rs.getString(1);
|
|
|
}
|
|
|
return "0";
|
|
|
}
|
|
|
});
|
|
|
- String result = releaseProductByBatchDao.callValidProcedure(enUU, batch);
|
|
|
l4 = System.currentTimeMillis();
|
|
|
System.err.println("l4--------------l3 testyuj" + (l4 - l3));
|
|
|
}
|
|
|
Integer filter = 0, failure = 0, success = 0;
|
|
|
-// if (!StringUtilB2C.isEmpty(strCount)) {
|
|
|
-// String[] split = strCount.split(SplitChar.HYPHEN);
|
|
|
-// filter = Integer.valueOf(split[0]);
|
|
|
-// failure = Integer.valueOf(split[1]);
|
|
|
-// success = Integer.valueOf(split[2]);
|
|
|
-// }
|
|
|
+ if (!StringUtilB2C.isEmpty(strCount)) {
|
|
|
+ String[] split = strCount.split(SplitChar.HYPHEN);
|
|
|
+ filter = Integer.valueOf(split[0]);
|
|
|
+ failure = Integer.valueOf(split[1]);
|
|
|
+ success = Integer.valueOf(split[2]);
|
|
|
+ }
|
|
|
|
|
|
- filter = releaseProductByBatchDao.getCountOfImportFail(userUU, batch, failCode);
|
|
|
- long l5 = System.currentTimeMillis();
|
|
|
- System.out.print("l5-l4---------testyuj" + (l5-l4));
|
|
|
- failure = releaseProductByBatchDao.getCountPublisherUuAndBatchAndReleaseCode(userUU, batch, ReleaseStatus.failure.value());
|
|
|
- long l6 = System.currentTimeMillis();
|
|
|
- System.out.print("l6-l5---------testyuj" + (l6-l5));
|
|
|
- success = releaseProductByBatchDao.getCountPublisherUuAndBatchAndReleaseCode(userUU, batch, ReleaseStatus.success.value());
|
|
|
- long l7 = System.currentTimeMillis();
|
|
|
- System.out.print("l7-l6---------testyuj" + (l7-l6));
|
|
|
- modelMap.put("total", total);
|
|
|
modelMap.put("total", total);
|
|
|
modelMap.put("success", success);
|
|
|
modelMap.put("failure", failure);
|