Browse Source

处理上架提示信息重复的问题。

yuj 7 years ago
parent
commit
0ecd4c6976

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/ReleaseProductByBatch.java

@@ -479,7 +479,7 @@ public class ReleaseProductByBatch implements Serializable {
 	/**
 	/**
 	 * 错误的信息
 	 * 错误的信息
 	 */
 	 */
-	@Column(name = "rel_errmsg", length = 4000)
+	@Column(name = "rel_errmsg", columnDefinition = "TEXT")
 	private String errmsg = "";
 	private String errmsg = "";
 
 
 	/**
 	/**

+ 5 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -362,9 +362,11 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				if (releaseProductByBatch.compareSameProductTagInfo(byBatch)) {
 				if (releaseProductByBatch.compareSameProductTagInfo(byBatch)) {
 					releaseProductByBatch.setTag("");
 					releaseProductByBatch.setTag("");
 					releaseProductByBatch.setTagstr("");
 					releaseProductByBatch.setTagstr("");
-					releaseProductByBatch.addErrmsg(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo());
-					releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
-					releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
+					if (!releaseProductByBatch.getErrmsg().contains(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo())) {
+						releaseProductByBatch.addErrmsg(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo());
+						releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
+						releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
+					}
 					if (releaseProductByBatch.getErrmsg().substring(0, 1).equals(",")) {
 					if (releaseProductByBatch.getErrmsg().substring(0, 1).equals(",")) {
 						releaseProductByBatch.setErrmsg(releaseProductByBatch.getErrmsg().substring(1));
 						releaseProductByBatch.setErrmsg(releaseProductByBatch.getErrmsg().substring(1));
 					}
 					}