|
|
|
@ -50,7 +50,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyAccessoriesService> { |
|
|
|
|
@Autowired |
|
|
|
|
private IZyAccessoriesService zyAccessoriesService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
@ -73,7 +73,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA |
|
|
|
|
IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
@ -93,7 +93,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA |
|
|
|
|
zyAccessoriesService.save(zyAccessories); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
* |
|
|
|
@ -106,6 +106,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA |
|
|
|
|
public Result<?> edit(@RequestBody ZyAccessories zyAccessories) { |
|
|
|
|
QueryWrapper queryWrapper=new QueryWrapper(); |
|
|
|
|
queryWrapper.eq("contents",zyAccessories.getContents()); |
|
|
|
|
queryWrapper.ne("id",zyAccessories.getId()); |
|
|
|
|
int a= zyAccessoriesService.count(queryWrapper); |
|
|
|
|
if(a>=1){ |
|
|
|
|
return Result.error("名称重复,请修改后重试!!"); |
|
|
|
@ -113,7 +114,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA |
|
|
|
|
zyAccessoriesService.updateById(zyAccessories); |
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
@ -127,7 +128,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA |
|
|
|
|
zyAccessoriesService.removeById(id); |
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除 |
|
|
|
|
* |
|
|
|
@ -141,7 +142,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA |
|
|
|
|
this.zyAccessoriesService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
|