| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time", false); |
| | | wrapper.orderBy("settle").orderBy("create_time", false); |
| | | } |
| | | return R.ok(packService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | pack.setCreateBy(getUserId()); |
| | | pack.setCreateTime(now); |
| | | if (!packService.insert(pack)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("数据添加失败"); |
| | | } |
| | | Mat mat = new Mat(); |
| | | mat.setTagId(tagService.getTop().getId()); |
| | |
| | | mat.setUpdateTime(now); |
| | | mat.setMemo("打包上线"); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("打包上线失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth |
| | | public R update(Pack pack){ |
| | | if (Cools.isEmpty(pack) || null==pack.getId()){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | pack.setUpdateBy(getUserId()); |
| | | pack.setUpdateTime(new Date()); |