Browse Source

调整代码规范

yuj 7 years ago
parent
commit
c235ed63b8

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

@@ -238,15 +238,16 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			if (colNum != UploadConstant.TOTAL_COLUMN_PERSON && colNum != UploadConstant.MAX_TOTAL_COLUMN_PERSON) {
 				throw new IllegalOperatorException("表格模板不正确!请重新下载最新模板");
 			}
-		} else if ((isPcb && colNum != UploadConstant.TOTAL_COLUMN_PCB && colNum != UploadConstant.MAX_TOTAL_COLUMN_PCB) || (!isPcb && colNum != UploadConstant.TOTAL_COLUMN && colNum != UploadConstant.MAX_TOTAL_COLUMN)) {
+		} else if ((isPcb && colNum != UploadConstant.TOTAL_COLUMN_PCB && colNum != UploadConstant.MAX_TOTAL_COLUMN_PCB) ||
+				(!isPcb && colNum != UploadConstant.TOTAL_COLUMN && colNum != UploadConstant.MAX_TOTAL_COLUMN)) {
 				throw new IllegalOperatorException("表格模板不正确!请重新下载最新模板");
 			}
 		int rowNum = SheetUtil.getSheetLastNum(sheet, isPcb ? UploadConstant.MAX_TOTAL_COLUMN_PCB : UploadConstant.MAX_TOTAL_COLUMN);
 		if (rowNum > 2002) {
-			throw new IllegalOperatorException ("您上传的信息超过2000条,请拆分成2000以下再上传");
+			throw new IllegalOperatorException("您上传的信息超过2000条,请拆分成2000以下再上传");
 		}
 		if (rowNum < 2) {
-			throw new IllegalOperatorException ("请填写上传信息");
+			throw new IllegalOperatorException("请填写上传信息");
 		}
 		List<ReleaseProductByBatch> releaseProductByBatchs = new ArrayList<>(rowNum);
 		String batch = createNumberService.getTimeNumber("product$goods", 8, rowNum);
@@ -2165,6 +2166,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 
 	/**
 	 * 批量发布之后,需要做的事情,内部使用线程,不需要让用户等结果
+	 * @param batchid 批次信息
+	 * @param productIds 物料ids
 	 */
 	public void afterPublishToGoodsDo(final List<Long> productIds, String batchid) {
         if (CollectionUtils.isEmpty(productIds) || StringUtils.isEmpty(batchid)) {

+ 4 - 5
src/main/java/com/uas/platform/b2c/trade/rate/task/RateTask.java

@@ -79,10 +79,9 @@ public class RateTask {
      */
     @Transactional
     public void autoRate() {
-
             User user = null;
             List<User> userUUs = userDao.findUserByUserUU(sysConf.getAdminUU());
-            if(CollectionUtils.isEmpty(userUUs)) {
+            if (CollectionUtils.isEmpty(userUUs)) {
                 throw new IllegalOperatorException("根据配置文件的adminUU 找不到对应的个人信息");
             }
             user = userUUs.get(0);
@@ -90,7 +89,7 @@ public class RateTask {
             user.setEnterprise(enterprise);
             SystemSession.setUser(user);
             String infoByType = tradeBasicPropertiesDao.findInfoByType(Type.B2C_AUTO_RECEVIED_TIME.value());
-            if(StringUtils.isEmpty(infoByType)) {
+            if (StringUtils.isEmpty(infoByType)) {
                 throw new IllegalOperatorException("买家自动初评时间为空,不能继续操作");
             }
             Integer automaticReceipt = null;
@@ -142,7 +141,7 @@ public class RateTask {
         try {
             User user = null;
             List<User> userUUs = userDao.findUserByUserUU(sysConf.getAdminUU());
-            if(CollectionUtils.isEmpty(userUUs)) {
+            if (CollectionUtils.isEmpty(userUUs)) {
                 throw new IllegalOperatorException("根据配置文件的adminUU 找不到对应的个人信息");
             }
             user = userUUs.get(0);
@@ -150,7 +149,7 @@ public class RateTask {
             user.setEnterprise(enterprise);
             SystemSession.setUser(user);
             String infoByType = tradeBasicPropertiesDao.findInfoByType(Type.B2C_AUTO_RECEVIED_TIME.value());
-            if(StringUtils.isEmpty(infoByType)) {
+            if (StringUtils.isEmpty(infoByType)) {
                 throw new IllegalOperatorException("买家自动追评时间为空,不能继续操作");
             }
             Integer automaticReceipt = null;