| | |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: ${tableComments}接口api |
| | | * @description: ${tableComments}接口api |
| | | * @title: ${tableComments}接口api-web端 |
| | | * @description: ${tableComments}接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: ${author} |
| | | * @time: ${createTime} |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个/批量删除 |
| | | * @url {ctx}/api/web<#if classPath??>/${classPath}</#if>/deleteByIds |
| | | * @param ids 主键编号 |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web<#if classPath??>/${classPath}</#if>/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteByIds") |
| | | public Object deleteByIds(@RequestParam(value = "ids") String ids) { |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | if (ids.indexOf(",") != -1) { |
| | | service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList())); |
| | | }else{ |
| | | service.removeById(ids); |
| | | } |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |