From e021e32a6ff0ec216f69c24f7ea929798bdce4c5 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 05 十一月 2019 11:37:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
index 057259e..780ec09 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
@@ -118,8 +118,11 @@
 			} else {
 				record.setIcon(resultObj.getIcon());
 			}
-			
-			record.setGoodsTotal(resultObj.getGoodsTotal());
+			if (state == 0){
+				record.setGoodsTotal(0);
+			} else {
+				record.setGoodsTotal(resultObj.getGoodsTotal());
+			}
 			record.setCreateTime(resultObj.getCreateTime());
 			record.setUpdateTime(new Date());
 			brandInfoMapper.updateByPrimaryKey(record);
@@ -260,8 +263,8 @@
 		if (count == 0)
 			return;
 
-		for (int page = 1; page < (count / 100) + 1; page++) {
-			updateTotalGoods((page - 1) * 100, 100);
+		for (int page = 0; page < (count / 100) + 1; page++) {
+			updateTotalGoods(page * 100, 100);
 		}
 	}
 

--
Gitblit v1.8.0