| | |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/v1<#if classPath??>/${classPath}</#if>/listQuery |
| | | * @url {ctx}/api/wechat<#if classPath??>/${classPath}</#if>/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/v1<#if classPath??>/${classPath}</#if>/pageQuery |
| | | * @url {ctx}/api/wechat<#if classPath??>/${classPath}</#if>/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/v1<#if classPath??>/${classPath}</#if>/getById |
| | | * @url {ctx}/api/wechat<#if classPath??>/${classPath}</#if>/getById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个/批量删除 |
| | | * @url {ctx}/api/v1<#if classPath??>/${classPath}</#if>/removeByIds |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/wechat<#if classPath??>/${classPath}</#if>/deleteById |
| | | * @param ids 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/removeByIds") |
| | | public Object removeByIds(@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.deleteById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/v1<#if classPath??>/${classPath}</#if>/save${className} |
| | | * @url {ctx}/api/wechat<#if classPath??>/${classPath}</#if>/save${className} |
| | | * @param ${lowerName} 实体对象 |
| | | * @return Object |
| | | */ |