| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.vo.DataNeedExcel; |
| | | import org.springframework.cglib.beans.BeanCopier; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | }); |
| | | return voList; |
| | | } |
| | | |
| | | @Override |
| | | public ResultBody updateEnabled(Map<String, Object> map) { |
| | | Long id = MapUtils.getLong(map, "id"); |
| | | if(id==null){ |
| | | return ResultBody.failed("请选择一条数据"); |
| | | }else { |
| | | DataNeed dataNeed = baseMapper.selectById(id); |
| | | if (dataNeed != null) { |
| | | Boolean enabled = MapUtils.getBoolean(map, "enabled"); |
| | | String dataFile = MapUtils.getString(map, "dataFile"); |
| | | dataNeed.setDataFile(dataFile); |
| | | dataNeed.setEnabled(enabled); |
| | | baseMapper.updateById(dataNeed); |
| | | }else { |
| | | return ResultBody.failed("查找数据失败"); |
| | | } |
| | | return ResultBody.ok(); |
| | | } |
| | | } |
| | | } |