bug:订餐配置信息

This commit is contained in:
czx 2020-12-28 14:17:04 +08:00
parent 08864e17b9
commit 43350ad40b

View File

@ -33,12 +33,10 @@ public class FtStaffDemandDaoServiceImpl extends ServiceImpl<FtStaffDemandDaoMap
@Override
public AjaxResult setDemandMode(Long id, Integer type, Boolean demandMode) {
FtStaffDemandDao dao = new FtStaffDemandDao();
dao.setId(id);
FtStaffDemandDao dao = this.baseMapper.selectById(id);
dao.setDemandMode(demandMode);
QueryWrapper<FtStaffDemandDao> wrapper = new QueryWrapper<>();
wrapper.eq("type", type);
int ret = this.baseMapper.update(dao, wrapper);
int ret = this.baseMapper.updateById(dao);
if (ret == 0)
return AjaxResult.error("更新订餐状态失败");
return AjaxResult.success();