| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.DataNeedMapper; |
| | | import com.kidgrow.oprationcenter.model.DataNeed; |
| | | import com.kidgrow.oprationcenter.service.IDataNeedService; |
| | | import com.kidgrow.oprationcenter.vo.DataNeedExcel; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.cglib.beans.BeanCopier; |
| | | import org.springframework.stereotype.Service; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import com.kidgrow.oprationcenter.model.DataNeed; |
| | | import com.kidgrow.oprationcenter.mapper.DataNeedMapper; |
| | | import com.kidgrow.oprationcenter.service.IDataNeedService; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | return ResultBody.ok(); |
| | | } |
| | | } |
| | | @Override |
| | | public ResultBody updateDelete(Long id,SysUser sysUser) { |
| | | if(id==null){ |
| | | return ResultBody.failed("请选择一条数据"); |
| | | }else { |
| | | DataNeed dataNeed = baseMapper.selectById(id); |
| | | if (dataNeed != null) { |
| | | dataNeed.setIsDel(true); |
| | | dataNeed.setUpdateTime(new Date()); |
| | | dataNeed.setUpdateUserId(sysUser.getId()); |
| | | dataNeed.setUpdateUserName(sysUser.getUsername()); |
| | | int u=baseMapper.updateById(dataNeed); |
| | | return ResultBody.ok().data(u>0); |
| | | }else { |
| | | return ResultBody.failed("查找数据失败"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ResultBody FindAllByHId(Map<String, Object> map, SysUser sysUser) { |
| | | if (sysUser != null&&sysUser.isHAdminUser()) { |
| | | List<DataNeed> dataNeedList=baseMapper.findHList(map); |
| | | return ResultBody.ok().data(dataNeedList); |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed("非管理用户无权查看"); |
| | | } |
| | | } |
| | | } |