Selaa lähdekoodia

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

高敬炎 1 vuosi sitten
vanhempi
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());
 		CommonUserInfo commonUserInfo=commonUserInfoMapper.selectById(foodInfo.getCommonId());
 		if (commonUserInfo!=null){
 		if (commonUserInfo!=null){
 			commonUserInfo.setFoodEntry(commonUserInfo.getFoodEntry()+1);
 			commonUserInfo.setFoodEntry(commonUserInfo.getFoodEntry()+1);
+			commonUserInfoMapper.updateById(commonUserInfo);
 		}
 		}
 		return foodInfoMapper.insert(foodInfo)>0;
 		return foodInfoMapper.insert(foodInfo)>0;
 	}
 	}
@@ -296,6 +297,7 @@ public class FoodInfoServiceImpl implements IFoodInfoService {
 				CommonUserInfo commonUserInfo=commonUserInfoMapper.selectById(tmp.getCommonId());
 				CommonUserInfo commonUserInfo=commonUserInfoMapper.selectById(tmp.getCommonId());
 				if (commonUserInfo!=null){
 				if (commonUserInfo!=null){
 					commonUserInfo.setFoodEntry(commonUserInfo.getFoodEntry()-1);
 					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 {
 			else {
 				commonUserInfo.setHotelEntry(commonUserInfo.getHotelEntry()+1);
 				commonUserInfo.setHotelEntry(commonUserInfo.getHotelEntry()+1);
 			}
 			}
+			commonUserInfoMapper.updateById(commonUserInfo);
 		}
 		}
 		return homestayInfoMapper.insert(homestayInfo)>0;
 		return homestayInfoMapper.insert(homestayInfo)>0;
 	}
 	}
@@ -109,6 +110,7 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
 					else {
 					else {
 						commonUserInfo.setHotelEntry(commonUserInfo.getHotelEntry()-1);
 						commonUserInfo.setHotelEntry(commonUserInfo.getHotelEntry()-1);
 					}
 					}
+					commonUserInfoMapper.updateById(commonUserInfo);
 				}
 				}
 			}
 			}
 		}
 		}