记得上下班打卡 | git大法好,push需谨慎

Commit ef6398de authored by Tice's avatar Tice

update

parent 691aafc9
...@@ -67,7 +67,7 @@ public class MerchantFieldAppliesController extends BaseController { ...@@ -67,7 +67,7 @@ public class MerchantFieldAppliesController extends BaseController {
MerchantFieldApplies fieldApplies = merchantFieldAppliesAdminService.getOne(fieldAppliesLambdaQueryWrapper); MerchantFieldApplies fieldApplies = merchantFieldAppliesAdminService.getOne(fieldAppliesLambdaQueryWrapper);
mmap.put("fieldApplyInfo", fieldApplies); mmap.put("fieldApplyInfo", fieldApplies);
return prefix + "/details"; return prefix + "/applyDetail";
} }
@ApiOperation(value = "审核通过") @ApiOperation(value = "审核通过")
......
...@@ -63,7 +63,7 @@ public class MerchantSponsorAppliesController extends BaseController { ...@@ -63,7 +63,7 @@ public class MerchantSponsorAppliesController extends BaseController {
MerchantSponsorApplies sponsorApplies = merchantSponsorAppliesAdminService.getOne(sponsorAppliesLambdaQueryWrapper); MerchantSponsorApplies sponsorApplies = merchantSponsorAppliesAdminService.getOne(sponsorAppliesLambdaQueryWrapper);
mmap.put("sponsorApplyInfo", sponsorApplies); mmap.put("sponsorApplyInfo", sponsorApplies);
return prefix + "/details"; return prefix + "/applyDetail";
} }
@ApiOperation(value = "审核通过") @ApiOperation(value = "审核通过")
......
...@@ -68,6 +68,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me ...@@ -68,6 +68,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
} }
} }
// 授权场地方 // 授权场地方
...@@ -86,9 +87,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me ...@@ -86,9 +87,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 是否已存在权限 // 是否已存在权限
if (null != authorizationRecords) { if (null != authorizationRecords) {
// 已存在权限 if (1 == fieldsVo.getClaimStatus() && authorizationRecords.getUid().equals(fieldsVo.getUid())) {
if (authorizationRecords.getUid().equals(fieldsVo.getUid())) {
// 前后 场地方一致 不处理 // 前后 场地方一致 不处理
return true; return true;
} }
...@@ -97,6 +96,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me ...@@ -97,6 +96,7 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
authorizationRecords.setUpdatedAt(now); authorizationRecords.setUpdatedAt(now);
authorizationRecords.setDeletedAt(now); authorizationRecords.setDeletedAt(now);
// mysql
LambdaUpdateWrapper<MerchantAuthorizationRecords> authorizationRecordsLambdaUpdateWrapper = Wrappers.lambdaUpdate(MerchantAuthorizationRecords.class); LambdaUpdateWrapper<MerchantAuthorizationRecords> authorizationRecordsLambdaUpdateWrapper = Wrappers.lambdaUpdate(MerchantAuthorizationRecords.class);
authorizationRecordsLambdaUpdateWrapper authorizationRecordsLambdaUpdateWrapper
.eq(MerchantAuthorizationRecords::getPerformanceId, performanceId) .eq(MerchantAuthorizationRecords::getPerformanceId, performanceId)
...@@ -114,6 +114,8 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me ...@@ -114,6 +114,8 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// todo error // todo error
throw new LiquidnetServiceException(); throw new LiquidnetServiceException();
} }
// mongo
} }
// 是否添加权限 // 是否添加权限
...@@ -185,17 +187,17 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me ...@@ -185,17 +187,17 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
authorizationPermissionsArrayList.add(checkerAuthorizationPermissions); authorizationPermissionsArrayList.add(checkerAuthorizationPermissions);
} }
} }
saveBatch(authorizationRecordsArrayList);
authorizationPermissionsAdminService.saveBatch(authorizationPermissionsArrayList);
} }
saveBatch(authorizationRecordsArrayList);
authorizationPermissionsAdminService.saveBatch(authorizationPermissionsArrayList);
} }
return true; return true;
} }
// 授权主办方 // 授权主办方
private void performanceSponsor(String performanceId, String cuid, String sponsorId) { private boolean performanceSponsor(String performanceId, String cuid, String sponsorId) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
// 查询已有权限 // 查询已有权限
...@@ -208,6 +210,40 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me ...@@ -208,6 +210,40 @@ public class MerchantAuthorizationRecordsAdminServiceImpl extends ServiceImpl<Me
// 查询主办方 // 查询主办方
MerchantSponsorsVo sponsorsVo = merchantRedisUtil.getSponsorsVoBySponsorId(sponsorId); MerchantSponsorsVo sponsorsVo = merchantRedisUtil.getSponsorsVoBySponsorId(sponsorId);
// 是否已存在权限
if (null != authorizationRecords) {
if (authorizationRecords.getUid().equals(sponsorsVo.getUid())) {
// 前后 主办方一致 不处理
return true;
}
// 前后 主办方不一致 删除旧权限 及 我的授权
authorizationRecords.setUpdatedAt(now);
authorizationRecords.setDeletedAt(now);
// mysql
LambdaUpdateWrapper<MerchantAuthorizationRecords> authorizationRecordsLambdaUpdateWrapper = Wrappers.lambdaUpdate(MerchantAuthorizationRecords.class);
authorizationRecordsLambdaUpdateWrapper
.eq(MerchantAuthorizationRecords::getPerformanceId, performanceId)
.eq(MerchantAuthorizationRecords::getDeletedAt, null);
authorizationRecordsLambdaUpdateWrapper.and(wrapper -> wrapper
.eq(MerchantAuthorizationRecords::getAuthorizationRecordId, authorizationRecords.getAuthorizationRecordId())
.or(wrapper1 -> wrapper1
.eq(MerchantAuthorizationRecords::getCuid, authorizationRecords.getUid())
.eq(MerchantAuthorizationRecords::getCuidRole, "sponsor"))
);
authorizationRecordsLambdaUpdateWrapper.set(MerchantAuthorizationRecords::getUpdatedAt, authorizationRecords.getUpdatedAt());
authorizationRecordsLambdaUpdateWrapper.set(MerchantAuthorizationRecords::getDeletedAt, authorizationRecords.getDeletedAt());
boolean success = update(authorizationRecordsLambdaUpdateWrapper);
if (!success) {
// todo error
throw new LiquidnetServiceException();
}
// mongo
}
return false;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment