| | |
| | | @RequestMapping(value = "/staDesc/add/auth") |
| | | @ManagerAuth(memo = "站点路径添加") |
| | | public R add(StaDesc staDesc) { |
| | | int sameRes = staDescService.selectCount(new EntityWrapper<StaDesc>() |
| | | .eq("type_no", staDesc.getTypeNo()) |
| | | .eq("stn_no", staDesc.getStnNo()) |
| | | .eq("crn_no", staDesc.getCrnNo()) |
| | | .eq("crn_stn", staDesc.getCrnStn())); |
| | | if (sameRes > 0) { |
| | | return R.error("路径已存在"); |
| | | } |
| | | staDesc.setModiUser(getUserId()); |
| | | staDesc.setModiTime(new Date()); |
| | | staDesc.setAppeUser(getUserId()); |
| | |
| | | @ManagerAuth(memo = "站点路径修改") |
| | | public R update(StaDesc staDesc){ |
| | | if (Cools.isEmpty(staDesc) || null==staDesc.getTypeId()){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | staDesc.setModiUser(getUserId()); |
| | | staDesc.setModiTime(new Date()); |
| | |
| | | public R delete(@RequestParam String param){ |
| | | List<StaDesc> list = JSONArray.parseArray(param, StaDesc.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | for (StaDesc entity : list){ |
| | | staDescService.delete(new EntityWrapper<>(entity)); |