Parcourir la source

Merge branch 'master' of http://git.zthymaoyi.com/zyw/tourism

高敬炎 il y a 1 an
Parent
commit
3d99559072

+ 2 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodInfoServiceImpl.java

@@ -66,6 +66,7 @@ public class FoodInfoServiceImpl implements IFoodInfoService {
 		CommonUserInfo commonUserInfo=commonUserInfoMapper.selectById(foodInfo.getCommonId());
 		if (commonUserInfo!=null){
 			commonUserInfo.setFoodEntry(commonUserInfo.getFoodEntry()+1);
+			commonUserInfoMapper.updateById(commonUserInfo);
 		}
 		return foodInfoMapper.insert(foodInfo)>0;
 	}
@@ -296,6 +297,7 @@ public class FoodInfoServiceImpl implements IFoodInfoService {
 				CommonUserInfo commonUserInfo=commonUserInfoMapper.selectById(tmp.getCommonId());
 				if (commonUserInfo!=null){
 					commonUserInfo.setFoodEntry(commonUserInfo.getFoodEntry()-1);
+					commonUserInfoMapper.updateById(commonUserInfo);
 				}
 			}
 		}

+ 2 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/HomestayInfoServiceImpl.java

@@ -49,6 +49,7 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
 			else {
 				commonUserInfo.setHotelEntry(commonUserInfo.getHotelEntry()+1);
 			}
+			commonUserInfoMapper.updateById(commonUserInfo);
 		}
 		return homestayInfoMapper.insert(homestayInfo)>0;
 	}
@@ -109,6 +110,7 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
 					else {
 						commonUserInfo.setHotelEntry(commonUserInfo.getHotelEntry()-1);
 					}
+					commonUserInfoMapper.updateById(commonUserInfo);
 				}
 			}
 		}