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

Commit 40056c15 authored by 胡佳晨's avatar 胡佳晨

pre 数据迁移 正式

parent f3c5843a
...@@ -49,6 +49,14 @@ public class MongoSlimeUtils { ...@@ -49,6 +49,14 @@ public class MongoSlimeUtils {
@Autowired @Autowired
private SlimeRdmService slimeRdmService; private SlimeRdmService slimeRdmService;
private List<String> initPerList = new ArrayList<String>() {{
add(SlimeAuthorizationConst.PerformancePermission.READ.getId());
add(SlimeAuthorizationConst.PerformancePermission.EDIT.getId());
add(SlimeAuthorizationConst.PerformancePermission.LINE.getId());
add(SlimeAuthorizationConst.PerformancePermission.SALES.getId());
add(SlimeAuthorizationConst.PerformancePermission.CHECK.getId());
add(SlimeAuthorizationConst.PerformancePermission.GRANT.getId());
}};
public PerformancePartnerVo getPerformancePartnerVo(String performanceId) { public PerformancePartnerVo getPerformancePartnerVo(String performanceId) {
return mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName()); return mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName());
...@@ -371,26 +379,12 @@ public class MongoSlimeUtils { ...@@ -371,26 +379,12 @@ public class MongoSlimeUtils {
dao.setTimeStop(timeStop); dao.setTimeStop(timeStop);
if (item.getMerchantId().equals(performancePartnerListParam.getMerchantId()) || isSuperAccount) { if (item.getMerchantId().equals(performancePartnerListParam.getMerchantId()) || isSuperAccount) {
dao.setPermissionId(new ArrayList<String>() {{ dao.setPermissionId(initPerList);
add(SlimeAuthorizationConst.PerformancePermission.READ.getId());
add(SlimeAuthorizationConst.PerformancePermission.EDIT.getId());
add(SlimeAuthorizationConst.PerformancePermission.LINE.getId());
add(SlimeAuthorizationConst.PerformancePermission.SALES.getId());
add(SlimeAuthorizationConst.PerformancePermission.CHECK.getId());
add(SlimeAuthorizationConst.PerformancePermission.GRANT.getId());
}});
} }
for (SlimeAuthorizationPerformanceVo permission : permissionVoList) { for (SlimeAuthorizationPerformanceVo permission : permissionVoList) {
if (item.getMerchantId().equals(performancePartnerListParam.getMerchantId()) || isSuperAccount) { if (item.getMerchantId().equals(performancePartnerListParam.getMerchantId()) || isSuperAccount) {
dao.setPermissionId(new ArrayList<String>() {{ dao.setPermissionId(initPerList);
add(SlimeAuthorizationConst.PerformancePermission.READ.getId());
add(SlimeAuthorizationConst.PerformancePermission.EDIT.getId());
add(SlimeAuthorizationConst.PerformancePermission.LINE.getId());
add(SlimeAuthorizationConst.PerformancePermission.SALES.getId());
add(SlimeAuthorizationConst.PerformancePermission.CHECK.getId());
add(SlimeAuthorizationConst.PerformancePermission.GRANT.getId());
}});
break; break;
} }
if (permission.getPerformanceId().equals(item.getPerformancesId())) { if (permission.getPerformanceId().equals(item.getPerformancesId())) {
......
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