|
@@ -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);
|
|
|
}
|
|
|
}
|
|
|
}
|