| | |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.config.TenantContext; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.RedisUtil; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.config.mybatis.MybatisPlusSaasConfig; |
| | | import org.jeecg.modules.dry.common.CacheConstants; |
| | | import org.jeecg.modules.dry.entity.DryEquipment; |
| | | import org.jeecg.modules.dry.service.IDryEqpTypeService; |
| | | import org.jeecg.modules.dry.service.IDryEquipmentService; |
| | |
| | | @Autowired |
| | | private IDryEqpTypeService dryEqpTypeService; |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | /** |
| | | * 分页列表查询 |
| | | * |
| | |
| | | @RequiresPermissions("dry:dry_equipment:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody DryEquipment dryEquipment) { |
| | | redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode()); |
| | | dryEquipmentService.updateById(dryEquipment); |
| | | |
| | | return Result.OK("编辑成功!"); |
| | | } |
| | | |
| | |
| | | @RequiresPermissions("dry:dry_equipment:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode()); |
| | | dryEquipmentService.removeById(id); |
| | | return Result.OK("删除成功!"); |
| | | } |
| | |
| | | @RequiresPermissions("dry:dry_equipment:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode()); |
| | | this.dryEquipmentService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("批量删除成功!"); |
| | | } |