|
|
@@ -103,7 +103,7 @@ public class MealApplicationsServiceImpl extends ServiceImpl<MealApplicationsMap
|
|
|
if (mealApplications == null) {
|
|
|
msg.setError("预定码不存在,无法核销");
|
|
|
return msg;
|
|
|
- } else if (mealApplications.getFactoryId().equals(factoryItem.getId())) {
|
|
|
+ } else if (!mealApplications.getFactoryId().equals(factoryItem.getId())) {
|
|
|
msg.setError("预定码不属于当前厂区,无法核销");
|
|
|
return msg;
|
|
|
} else if (!mealApplications.getStatus().equals(0)) {
|
|
|
@@ -122,6 +122,11 @@ public class MealApplicationsServiceImpl extends ServiceImpl<MealApplicationsMap
|
|
|
mealApplications.setUsedAt(LocalDateTime.now());
|
|
|
mealApplications.setStatus(1);
|
|
|
mealApplicationsMapper.updateById(mealApplications);
|
|
|
+ String userId = mealApplications.getUserId();
|
|
|
+ String userName = userMapper.selectById(userId).getName();
|
|
|
+ String mealTypeName = mealTypesMapper.selectById(mealApplications.getMealTypeId()).getName();
|
|
|
+ String content = "已核销"+userName+"预定的"+mealTypeName;
|
|
|
+ msg.setMsg(content);
|
|
|
return msg;
|
|
|
}
|
|
|
|