|
|
@@ -6,9 +6,9 @@ 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.support.log.UsageBufferedLogger;
|
|
|
import com.uas.platform.b2c.core.utils.NumberUtil;
|
|
|
import com.uas.platform.b2c.core.utils.RegexConstant;
|
|
|
import com.uas.platform.b2c.core.utils.StringUtilB2C;
|
|
|
@@ -31,13 +31,13 @@ import com.uas.platform.b2c.prod.store.service.StoreInService;
|
|
|
import com.uas.platform.b2c.trade.order.StringConstant.Currency;
|
|
|
import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
-import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.persistence.criteria.CriterionExpression;
|
|
|
import com.uas.platform.core.persistence.criteria.PredicateUtils;
|
|
|
import com.uas.platform.core.persistence.criteria.SimpleExpression;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCell;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
@@ -134,7 +134,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
@Value("#{sys.productServiceIp}")
|
|
|
private String productServiceIp;
|
|
|
|
|
|
- private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
|
|
|
+ private final Logger logger = Logger.getLogger(getClass());
|
|
|
|
|
|
@Override
|
|
|
public ReleaseProductByBatch save(ReleaseProductByBatch releaseProductByBatch) {
|
|
|
@@ -273,45 +273,33 @@ 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.log("test", "这是测试--------------" + rs);
|
|
|
if (null != rs) {
|
|
|
rs.next();
|
|
|
- logger.log("test", "这是测试--------------" + 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);
|