| | |
| | | import com.flow.mapper.CardMapper; |
| | | import com.flow.mapper.TbFuwuqiMapper; |
| | | import com.flow.pojo.Card; |
| | | import com.flow.pojo.OperationLog; |
| | | import com.flow.pojo.TbFuwuqi; |
| | | import com.flow.service.OperationLogService; |
| | | import com.flow.service.TbFuwuqiService; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | @Autowired |
| | | TbFuwuqiMapper tbFuwuqiMapper; |
| | | |
| | | @Autowired |
| | | OperationLogService operationLogService; |
| | | |
| | | @Override |
| | | public PageInfo<TbFuwuqi> FindTbFuwuqi(Integer page, Integer limit) { |
| | | PageHelper.startPage(page, limit); |
| | |
| | | } |
| | | |
| | | public int addTbFuwuqi(TbFuwuqi tbFuwuqi) { |
| | | OperationLog operationLog = new OperationLog(); |
| | | operationLog.setCaozuotype("新增"); |
| | | operationLog.setCaozuocontent("新增服务器:"+tbFuwuqi.getServername()); |
| | | operationLog.setCaozuoname(tbFuwuqi.getCaozuoname()); |
| | | |
| | | operationLogService.addOperationLog(operationLog); |
| | | return ((TbFuwuqiMapper) this.baseMapper).insert(tbFuwuqi); |
| | | } |
| | | |
| | | public int UpdateTbFuwuqi(TbFuwuqi tbFuwuqi) { |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("id", tbFuwuqi.getId()); |
| | | TbFuwuqi tbFuwuqi1 = (TbFuwuqi)((TbFuwuqiMapper)this.baseMapper).selectOne(queryWrapper); |
| | | // OperationLog operationLog = new OperationLog(); |
| | | // operationLog.setCaozuotype("修改"); |
| | | // operationLog.setCaozuocontent("修改服务器:"+tbFuwuqi1.getServername()); |
| | | // operationLogService.addOperationLog(operationLog); |
| | | |
| | | return ((TbFuwuqiMapper) this.baseMapper).update(tbFuwuqi, queryWrapper); |
| | | } |
| | | |
| | | public int DeleteTbFuwuqi(String id) { |
| | | public int DeleteTbFuwuqi(String id ,String caozuoname) { |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("id", id); |
| | | TbFuwuqi tbFuwuqi = new TbFuwuqi(); |
| | | tbFuwuqi.setNone("1"); |
| | | TbFuwuqi tbFuwuqi1 = (TbFuwuqi)((TbFuwuqiMapper)this.baseMapper).selectOne(queryWrapper); |
| | | OperationLog operationLog = new OperationLog(); |
| | | operationLog.setCaozuotype("删除"); |
| | | operationLog.setCaozuocontent("删除服务器:"+tbFuwuqi1.getServername()); |
| | | operationLog.setCaozuoname(caozuoname); |
| | | |
| | | operationLogService.addOperationLog(operationLog); |
| | | return ((TbFuwuqiMapper) this.baseMapper).update(tbFuwuqi, queryWrapper); |
| | | } |
| | | |