| | |
| | | @ManagerAuth |
| | | public R add(RowLastnoType rowLastnoType) { |
| | | rowLastnoTypeService.insert(rowLastnoType); |
| | | return R.ok(); |
| | | return R.ok("response.save_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rowLastnoType/update/auth") |
| | | @ManagerAuth |
| | | public R update(RowLastnoType rowLastnoType){ |
| | | if (Cools.isEmpty(rowLastnoType) || null==rowLastnoType.getId()){ |
| | | return R.error(); |
| | | return R.error("response.param_error"); |
| | | } |
| | | rowLastnoTypeService.updateById(rowLastnoType); |
| | | return R.ok(); |
| | | return R.ok("response.update_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rowLastnoType/delete/auth") |
| | |
| | | for (Long id : ids){ |
| | | rowLastnoTypeService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.delete_success"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rowLastnoType/export/auth") |
| | |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<RowLastnoType> wrapper = new EntityWrapper<RowLastnoType>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != rowLastnoTypeService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(RowLastnoType.class, String.valueOf(param.get("key")))); |
| | | R r = R.parse(BaseRes.REPEAT); |
| | | r.put("data", getComment(RowLastnoType.class, String.valueOf(param.get("key")))); |
| | | return r; |
| | | } |
| | | return R.ok(); |
| | | } |