Explorar o código

Merge branch 'zx_saas_vip_activity' of http://git.dayaedu.com/yonge/mec into master_saas

zouxuan hai 1 ano
pai
achega
0aea2495c5

+ 8 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -1303,7 +1303,7 @@ public class ExportServiceImpl implements ExportService {
     public void musicGroupRegister(HttpServletResponse response, ExportDto exportDto) throws IOException {
         String organIds = getParam(exportDto.getQueryInfo(), "organIds", String.class);
         SysUser sysUser = sysUserService.getUser();
-        organIds = organizationService.getEmployeeOrgan(sysUser.getId(), organIds, sysUser.getIsSuperAdmin());
+        organIds = organizationService.getEmployeeOrgan(sysUser.getId(), organIds, sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
         musicGroupStatusList.add(MusicGroupStatusEnum.APPLY);
         musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
@@ -1404,7 +1404,7 @@ public class ExportServiceImpl implements ExportService {
     public HttpResponseResult routeOrderList(Map<String, Object> info) {
         StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
         SysUser sysUser = sysUserService.getUser();
-        queryInfo.setRoutingOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getRoutingOrganId(), sysUser.getIsSuperAdmin()));
+        queryInfo.setRoutingOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getRoutingOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         if (StringUtils.isNotBlank(queryInfo.getSearch())) {
             List<BasicUserDto> users = studentPaymentOrderService.getDao().getUsers(queryInfo.getSearch());
             List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
@@ -1434,7 +1434,7 @@ public class ExportServiceImpl implements ExportService {
     public HttpResponseResult routeMallOrderList(Map<String, Object> info) {
         StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
         SysUser sysUser = sysUserService.getUser();
-        queryInfo.setRoutingOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getRoutingOrganId(), sysUser.getIsSuperAdmin()));
+        queryInfo.setRoutingOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getRoutingOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         if (StringUtils.isNotBlank(queryInfo.getSearch())) {
             List<BasicUserDto> users = studentPaymentOrderService.getDao().getUsers(queryInfo.getSearch());
             List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
@@ -1491,7 +1491,7 @@ public class ExportServiceImpl implements ExportService {
     @Override
     public HttpResponseResult exportVipStudentCourseManage(Map<String, Object> info) {
         SysUser sysUser = sysUserService.getUser();
-        String organId = organizationService.getEmployeeOrgan(sysUser.getId(), getParam(info, "organId", String.class), sysUser.getIsSuperAdmin());
+        String organId = organizationService.getEmployeeOrgan(sysUser.getId(), getParam(info, "organId", String.class), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         ManagerDownload managerDownload = saveManagerDownload(ExportTypeEnum.VIP_STUDENT_COURSE_MANAGE, sysUser.getId());
         Integer tenantId = TenantContextHolder.getTenantId();
         return this.asyncExport(() -> this.queryVipStudentCourseManage(organId, tenantId, managerDownload, ExportEnum.VIP_STUDENT_COURSE_MANAGE),
@@ -1501,7 +1501,7 @@ public class ExportServiceImpl implements ExportService {
     @Override
     public HttpResponseResult exportStudentSubCourse(Map<String, Object> info) {
         SysUser sysUser = sysUserService.getUser();
-        String organId = organizationService.getEmployeeOrgan(sysUser.getId(), getParam(info, "organId", String.class), sysUser.getIsSuperAdmin());
+        String organId = organizationService.getEmployeeOrgan(sysUser.getId(), getParam(info, "organId", String.class), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         Integer tenantId = TenantContextHolder.getTenantId();
         List<ExportStudentSubCourse> rows = activityUserMapperService.exportStudentSubCourse(organId, tenantId);
         this.checkRows(rows);
@@ -1667,7 +1667,7 @@ public class ExportServiceImpl implements ExportService {
     public HttpResponseResult orderList(Map<String, Object> info) {
         StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
         SysUser sysUser = sysUserService.getUser();
-        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()));
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         if (StringUtils.isNotBlank(queryInfo.getSearch())) {
             List<BasicUserDto> users = studentPaymentOrderService.getDao().getUsers(queryInfo.getSearch());
             List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
@@ -1695,7 +1695,7 @@ public class ExportServiceImpl implements ExportService {
     public HttpResponseResult mallOrderList(Map<String, Object> info) {
         StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
         SysUser sysUser = sysUserService.getUser();
-        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()));
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         if (StringUtils.isNotBlank(queryInfo.getSearch())) {
             List<BasicUserDto> users = studentPaymentOrderService.getDao().getUsers(queryInfo.getSearch());
             List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
@@ -1724,7 +1724,7 @@ public class ExportServiceImpl implements ExportService {
     public HttpResponseResult orderListSum(Map<String, Object> info) {
         StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
         SysUser sysUser = sysUserService.getUser();
-        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()));
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         if (StringUtils.isNotBlank(queryInfo.getSearch())) {
             List<BasicUserDto> users = studentPaymentOrderService.getDao().getUsers(queryInfo.getSearch());
             List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrganizationServiceImpl.java

@@ -165,7 +165,7 @@ public class OrganizationServiceImpl extends BaseServiceImpl<Integer, Organizati
 	@Override
     public <T extends EducationBaseQueryInfo> T onlyEducation(T queryInfo) {
 		SysUser sysUser = sysUserService.getUser();
-		queryInfo.setOrganIds(this.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIds(),sysUser.getIsSuperAdmin()));
+		queryInfo.setOrganIds(this.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIds(),sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
 		Boolean onlyForRole = employeePositionService.onlyForRole(EDUCATION, sysUser.getId(), sysUser.getIsSuperAdmin());
 		//如果当前用户只有教务老师角色,那么只能看到他所管理的课程组的信息
 		if (onlyForRole) {

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentRouteOrderServiceImpl.java

@@ -202,6 +202,7 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
             if(studentPaymentRouteOrder.getSchoolId() != null) {
                 studentPaymentOrder.setMusicGroupId(studentPaymentRouteOrder.getSchoolId() + "");
             }
+            studentPaymentOrder.setCalenderId(studentPaymentRouteOrder.getCalenderId());
             studentPaymentOrder.setType(studentPaymentRouteOrder.getType());
             studentPaymentOrder.setMerNos(studentPaymentRouteOrder.getMerNo());
             studentPaymentOrder.setOrderNo(studentPaymentRouteOrder.getOrderNo());

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1978,6 +1978,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             giveVipOfflineSalarySettlement = vipGroupSalarySettlementDto.getGiveVipOfflineSalarySettlement();
             if(vipGroupActivity.getFixedCourseNumFlag()){
                 totalPrice = vipGroupActivity.getMarketPrice();
+                vipGroup.setTotalPrice(totalPrice);
             }
             //是否是赠送课程
             ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), "VIP", null);
@@ -2109,6 +2110,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             giveVipOfflineSalarySettlement = vipGroupSalarySettlementDto.getGiveVipOfflineSalarySettlement();
             if(vipGroupActivity.getFixedCourseNumFlag()){
                 totalPrice = vipGroupActivity.getMarketPrice();
+                vipGroup.setTotalPrice(totalPrice);
             }
         }
         if(totalPrice == null){

+ 7 - 7
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -1870,7 +1870,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganIdList(), sysUser.getIsSuperAdmin()));
+        queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganIdList(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         Map<String, Object> params = new HashMap<>();
         MapUtil.populateMap(params, queryInfo);
         Integer tenantId = TenantContextHolder.getTenantId();
@@ -2009,7 +2009,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()));
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         PageInfo<MusicArrearageStudentDto> result = musicGroupPaymentCalenderDetailService.queryArrearageStudents(queryInfo);
@@ -2153,7 +2153,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        organId = organizationService.getEmployeeOrgan(sysUser.getId(), organId, sysUser.getIsSuperAdmin());
+        organId = organizationService.getEmployeeOrgan(sysUser.getId(), organId, sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         List<IndexErrorDataExportDto> result = indexService.exportIndexErrData(organId, errorType);
         if (CollectionUtils.isEmpty(result)) {
             throw new BizException("没有可导出的记录");
@@ -2237,7 +2237,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        queryInfo.setOrganIds(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganIds(), sysUser.getIsSuperAdmin()));
+        queryInfo.setOrganIds(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganIds(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         List<IndexErrorDataExportDto> result = indexErrDataRecordService.queryRecord(queryInfo).getRows();
@@ -2363,7 +2363,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin());
+        String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         if (StringUtils.isEmpty(organIds)) {
@@ -2411,7 +2411,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin());
+        String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         if (StringUtils.isEmpty(organIds)) {
@@ -2459,7 +2459,7 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin());
+        String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         if (StringUtils.isEmpty(organIds)) {

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/IndexController.java

@@ -115,7 +115,7 @@ public class IndexController extends BaseController {
 		RBucket<Map<String, Boolean>> bucket = redissonClient.getBucket("index:hasIndexErrData " + sysUser.getId());
 		Map<String, Boolean> map = bucket.get();
 		if(map == null || map.size() == 0){
-			organId = organizationService.getEmployeeOrgan(sysUser.getId(),organId,sysUser.getIsSuperAdmin());
+			organId = organizationService.getEmployeeOrgan(sysUser.getId(),organId,sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
 			map = indexService.hasIndexErrData(organId);
 			bucket.set(map,30, TimeUnit.MINUTES);
 		}

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/education/EduOnlineMusicGroupController.java

@@ -57,7 +57,7 @@ public class EduOnlineMusicGroupController extends BaseController {
 		if (onlyForRole) {
             queryInfo.setRepairUserId(sysUser.getId());
 		}else {
-            queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()));
+            queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1));
         }
         queryInfo.setStatus(MusicGroupStatusEnum.PROGRESS);
         return succeed(musicGroupService.findEduTeacherMusicGroups(queryInfo));

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/education/EduOrganizationController.java

@@ -38,7 +38,7 @@ public class EduOrganizationController extends BaseController {
 	    	Integer tenantId = 1;
 	        return succeed(organizationService.queryAllOrganWithNoAuth(tenantId));
 		}else{
-			String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin());
+			String organIds = organizationService.getEmployeeOrgan(sysUser.getId(), "", sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
 	        return succeed(organizationService.queryEmployeeOrgan(organIds));
 		}
     	

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/education/EduRegisterController.java

@@ -53,7 +53,7 @@ public class EduRegisterController extends BaseController {
         if (sysUser == null) {
             return failed("用户信息获取失败");
         }
-        organId = organizationService.getEmployeeOrgan(sysUser.getId(), organId, sysUser.getIsSuperAdmin());
+        organId = organizationService.getEmployeeOrgan(sysUser.getId(), organId, sysUser.getIsSuperAdmin()&&sysUser.getTenantId() == -1);
         //是乐团主管,不是分部经理
         List<Integer> cooperationOrganIds = null;
         Boolean onlyForRole = employeePositionService.onlyForRole(SysUserRoleEnum.EDUCATION, sysUser.getId(), sysUser.getIsSuperAdmin());