| | |
| | | |
| | | @Override |
| | | public R<Agreement> dataInfo(Integer type) { |
| | | if (Constants.ZERO.equals(type) || Constants.ONE.equals(type) || Constants.TWO.equals(type)) { |
| | | if (!Constants.ZERO.equals(type) && !Constants.ONE.equals(type) && !Constants.TWO.equals(type)) { |
| | | return R.fail("查询类型异常!(0注册协议;1:隐私政策;2:司机操作指导)"); |
| | | } |
| | | return R.ok(lambdaQuery().eq(Agreement::getContentType, type).one()); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R<String> saveData(Agreement agreement) { |
| | | Integer type = agreement.getContentType(); |
| | | if (Constants.ZERO.equals(type) || Constants.ONE.equals(type) || Constants.TWO.equals(type)) { |
| | | if (!Constants.ZERO.equals(type) && !Constants.ONE.equals(type) && !Constants.TWO.equals(type)) { |
| | | return R.fail("保存类型异常!(0注册协议;1:隐私政策;2:司机操作指导)"); |
| | | } |
| | | Agreement dbDate = lambdaQuery().eq(Agreement::getContentType, type).one(); |