Jelajahi Sumber

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into mall_order_export

zouxuan 2 tahun lalu
induk
melakukan
4829897161
33 mengubah file dengan 183 tambahan dan 129 penghapusan
  1. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupActivityDao.java
  2. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/OrganDoubleEleven2021StatisDto.java
  3. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexErrorType.java
  4. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/OrderTypeEnum.java
  5. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/vo/StudentPaymentOrderVo.java
  6. 7 6
      mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java
  7. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupActivityService.java
  8. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ChildrenDayReserveServiceImpl.java
  9. 21 31
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java
  10. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EduPracticeGroupServiceImpl.java
  11. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MemberRankSettingServiceImpl.java
  12. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  13. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java
  14. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java
  15. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentActivityServiceImpl.java
  16. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SporadicChargeInfoImpl.java
  17. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentInstrumentServiceImpl.java
  18. 5 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  19. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  20. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java
  21. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java
  22. 19 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java
  23. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  24. 8 2
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  25. 4 10
      mec-biz/src/main/resources/config/mybatis/VipGroupActivityMapper.xml
  26. 4 2
      mec-student/src/main/java/com/ym/mec/student/controller/ContractsController.java
  27. 5 32
      mec-student/src/main/java/com/ym/mec/student/controller/LuckDrawController.java
  28. 5 2
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/EduContractsController.java
  29. 2 1
      mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java
  30. 3 0
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  31. 13 1
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupActivityController.java
  32. 17 1
      mec-web/src/main/java/com/ym/mec/web/controller/education/ActivityController.java
  33. 5 2
      mec-web/src/main/java/com/ym/mec/web/controller/education/EduContractsController.java

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupActivityDao.java

@@ -74,7 +74,7 @@ public interface VipGroupActivityDao extends BaseDAO<Integer, VipGroupActivity>
 	* @date 2021/10/25 13:46
 	*/
     List<DoubleEleven2021ActivityDto> countActivityStatis();
-    List<DoubleEleven2021ActivityDto> count2022ActivityStatis();
+    List<DoubleEleven2021ActivityDto> count2022ActivityStatis(@Param("organId") String organId);
 
 	/**
 	* @description: 双十一活动统计
@@ -95,7 +95,7 @@ public interface VipGroupActivityDao extends BaseDAO<Integer, VipGroupActivity>
     * @date 2021/10/25 15:44
     */
 	DoubleEleven2021Dto countDoubleEleven2021Statis();
-	DoubleEleven2021Dto countDoubleEleven2022Statis();
+	DoubleEleven2021Dto countDoubleEleven2022Statis(@Param("organId") String organId);
 
     /**
     * @description: 双十一活动统计
@@ -104,9 +104,9 @@ public interface VipGroupActivityDao extends BaseDAO<Integer, VipGroupActivity>
     * @author zx
     * @date 2021/10/25 15:44
     */
-	List<DoubleEleven2021Dto> countOrganDoubleEleven2021Statis(@Param("organId") Integer organId);
+	List<DoubleEleven2021Dto> countOrganDoubleEleven2021Statis(@Param("organId") String organId);
 
-	List<DoubleEleven2021Dto> countOrganDoubleEleven2022Statis(@Param("organId") Integer organId);
+	List<DoubleEleven2021Dto> countOrganDoubleEleven2022Statis(@Param("organId") String organId);
 
 	/**
 	* @description: 双十一活动统计

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/OrganDoubleEleven2021StatisDto.java

@@ -2,17 +2,17 @@ package com.ym.mec.biz.dal.dto;
 
 public class OrganDoubleEleven2021StatisDto{
 
-    private Integer organId;
+    private String organId;
 
     private String order = "DESC";
 
     private String sort = "totalBuyAmount";
 
-    public Integer getOrganId() {
+    public String getOrganId() {
         return organId;
     }
 
-    public void setOrganId(Integer organId) {
+    public void setOrganId(String organId) {
         this.organId = organId;
     }
 

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexErrorType.java

@@ -40,8 +40,8 @@ public enum IndexErrorType implements BaseEnum<String, IndexErrorType> {
     STUDENT_VISIT("STUDENT_VISIT", "回访任务未完成"),
 
     ATTENDANCE_SERVE("ATTENDANCE_SERVE", "考勤及服务"),
-    TEACHER_EXCEPTION_ATTENDANCE("TEACHER_EXCEPTION_ATTENDANCE", "老师课程考勤异常"),
-    STUDENT_EXCEPTION_ATTENDANCE("STUDENT_EXCEPTION_ATTENDANCE", "学员课程考勤异常"),
+    TEACHER_EXCEPTION_ATTENDANCE("TEACHER_EXCEPTION_ATTENDANCE", "老师考勤异常"),
+    STUDENT_EXCEPTION_ATTENDANCE("STUDENT_EXCEPTION_ATTENDANCE", "学员考勤异常"),
     TEACHER_NOT_A_CLASS("TEACHER_NOT_A_CLASS", "课程异常"),
     TEACHER_SERVE_ERROR("TEACHER_SERVE_ERROR", "服务指标异常"),
     HAS_FREE_COURSE_TIMES("HAS_FREE_COURSE_TIMES", "学员已排课时长未消耗完"),

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/OrderTypeEnum.java

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.dal.enums;
 
+import org.apache.commons.lang3.StringUtils;
+
 import com.ym.mec.common.enums.BaseEnum;
 
 /**
@@ -63,4 +65,14 @@ public enum OrderTypeEnum implements BaseEnum<String, OrderTypeEnum> {
     public String getCode() {
         return this.code;
     }
+    
+    public static OrderTypeEnum get(String code){
+    	for(OrderTypeEnum e : values()){
+    		if(StringUtils.equals(code, e.code)){
+    			return e;
+    		}
+    	}
+    	
+    	return null;
+    }
 }

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/StudentPaymentOrderVo.java

@@ -1,8 +1,10 @@
 package com.ym.mec.biz.dal.vo;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+
 import org.apache.commons.lang3.StringUtils;
 
 import java.math.BigDecimal;
@@ -21,6 +23,11 @@ public class StudentPaymentOrderVo {
      * 订单编号
      */
     private String orderNo;
+    
+    private DealStatusEnum status;
+    
+    private String memo;
+    
     /**
      * 订单类型
      */
@@ -179,4 +186,20 @@ public class StudentPaymentOrderVo {
     public void setTransNo(String transNo) {
         this.transNo = transNo;
     }
+
+	public DealStatusEnum getStatus() {
+		return status;
+	}
+
+	public void setStatus(DealStatusEnum status) {
+		this.status = status;
+	}
+
+	public String getMemo() {
+		return memo;
+	}
+
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
 }

+ 7 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java

@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.dto.OAFinancialDto;
 import com.ym.mec.biz.dal.entity.SysUserTsign;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 
 public interface ContractService {
 
@@ -43,7 +44,7 @@ public interface ContractService {
 	 * @param musicGroupId
 	 * @return
 	 */
-	boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId);
+	boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId, OrderTypeEnum orderType);
 
 	/**
 	 * 查询乐团课程协议
@@ -59,7 +60,7 @@ public interface ContractService {
 	 * @param vipGroupId
 	 * @return
 	 */
-	boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId);
+	boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId, OrderTypeEnum orderType);
 
 	/**
 	 * 查询VIP课程协议
@@ -77,7 +78,7 @@ public interface ContractService {
 	 * @param kitGroupPurchaseTypeEnum
 	 * @return
 	 */
-	boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, KitGroupPurchaseTypeEnum kitGroupPurchaseTypeEnum);
+	boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, OrderTypeEnum orderType);
 
 	/**
 	 * 查询商品协议
@@ -109,21 +110,21 @@ public interface ContractService {
 	 * @param fee
 	 * @return
 	 */
-	boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee);
+	boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee, OrderTypeEnum orderType);
 
 	/**
 	 * 传递产品协议
 	 * @param userId
 	 * @return
 	 */
-	void transferProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType);
+	void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType);
 
 	/**
 	 * 查询产品协议
 	 * @param userId
 	 * @return
 	 */
-	Map<String, Object> queryProductContract(Integer userId,String musicGroupId, CourseViewTypeEnum courseViewType);
+	Map<String, Object> queryProductContract(Integer userId,String musicGroupId, OrderTypeEnum orderType);
 
 
 	/**

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

@@ -97,7 +97,7 @@ public interface VipGroupActivityService extends BaseService<Integer, VipGroupAc
     * @author zx
     * @date 2021/10/25 12:07
     */
-    DoubleEleven2021Dto doubleEleven2022Statis();
+    DoubleEleven2021Dto doubleEleven2022Statis(String organId);
 
     /**
     * @description: 分部双11活动统计

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

@@ -413,7 +413,7 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
             }
 
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 21 - 31
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -62,6 +62,7 @@ import com.ym.mec.biz.dal.entity.TenantInfo;
 import com.ym.mec.biz.dal.entity.VipGroup;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.biz.service.MusicGroupService;
@@ -365,9 +366,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
-    public boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId) {
+    public boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         if (true) {
-            transferProduceContract(userId, musicGroupId, null);
+            transferProduceContract(userId, musicGroupId, orderType);
             return true;
         }
         SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
@@ -561,9 +562,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
-    public boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId) {
+    public boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId, OrderTypeEnum orderType) {
         if (true) {
-            transferProduceContract(userId, null, null);
+            transferProduceContract(userId, null, orderType);
             return true;
         }
 
@@ -705,9 +706,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
-    public boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, KitGroupPurchaseTypeEnum kitGroupPurchaseTypeEnum) {
+    public boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, OrderTypeEnum orderType) {
 
-        transferProduceContract(userId, musicGroupId, null);
+        transferProduceContract(userId, musicGroupId, orderType);
         return true;
     }
 
@@ -816,9 +817,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
     @Override
     @Async
-    public boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee) {
+    public boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee, OrderTypeEnum orderType) {
         if (true) {
-            transferProduceContract(userId, null, null);
+            transferProduceContract(userId, null, orderType);
             return true;
         }
 
@@ -898,7 +899,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     @Override
     @Async
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW)
-    public void transferProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         SysUser user = studentDao.lockUserReturnInfo(userId);
 
         if (user == null) {
@@ -943,14 +944,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
         params.put("isShowVisualSeal", false);
 
-        CourseViewTypeEnum ownershipType = CourseViewTypeEnum.COURSE_FEE;
-
         if (StringUtils.isBlank(musicGroupId)) {
             params.put("ownershipType", "OWN");
-            MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
-            if (Objects.nonNull(userLastNormalMusicGroup)) {
-                ownershipType = userLastNormalMusicGroup.getCourseViewType();
-            }
+            //MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
         } else {
             MusicGroup musicGroup = musicGroupService.get(musicGroupId);
             if (musicGroup == null) {
@@ -958,13 +954,8 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
                 return;
             }
             params.put("ownershipType", musicGroup.getOwnershipType().name());
-            ownershipType = musicGroup.getCourseViewType();
         }
 
-        if (Objects.nonNull(courseViewType)) {
-            ownershipType = courseViewType;
-        }
-		
         // 查询最新协议模板
 		TenantContractTemplate tenantContractTemplate = tenantContractTemplateService.queryLatestContractTemplate(user.getTenantId(), null, null);
 		if(tenantContractTemplate == null){
@@ -983,7 +974,10 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
         //如果分部有企业信息,就用分部上的企业信息,否则用机构上的企业信息
         String companyName = null;
         TenantInfo tenantInfo = tenantInfoService.get(studentInfo.getTenantId());;
-        Organization organizationDto = organizationService.get(user.getOrganId());
+        Organization organizationDto = null;
+        if(orderType != OrderTypeEnum.PRACTICE_GROUP_BUY && orderType != OrderTypeEnum.PRACTICE_GROUP_RENEW && orderType != OrderTypeEnum.SMALL_CLASS_TO_BUY){
+        	organizationDto = organizationService.get(studentInfo.getOrganId());
+        }
 		if (organizationDto == null || StringUtils.isBlank(organizationDto.getCorporateName()) || StringUtils.isBlank(organizationDto.getCorporateCode())) {
 			companyName = tenantInfo.getTsignName();
 		} else {
@@ -1011,7 +1005,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
             return;
         }
 
-        String organCode = StringUtils.isEmpty(organizationDto.getCorporateCode()) ? tenantInfo.getTsignCode() : organizationDto.getCorporateCode();
+        String organCode = StringUtils.equals(companyName, tenantInfo.getTsignName()) ? tenantInfo.getTsignCode() : organizationDto.getCorporateCode();
         
 		if (user.getTenantId() == 1) {
 			if (!OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
@@ -1049,7 +1043,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
     @Override
     @Transactional(isolation = Isolation.READ_COMMITTED)
-    public Map<String, Object> queryProductContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public Map<String, Object> queryProductContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         // 合成freemarker
         String srcPdfPath = contractBaseDir + "/product/" + userId + ".pdf";
 
@@ -1077,14 +1071,12 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
         Map<String, Object> result = new HashMap<>();
         result.put("courseViewType", CourseViewTypeEnum.COURSE_FEE);
-        CourseViewTypeEnum ownershipType = CourseViewTypeEnum.COURSE_FEE;
 		
         if (StringUtils.isBlank(musicGroupId)) {
             params.put("ownershipType", "OWN");
             MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
             if (Objects.nonNull(userLastNormalMusicGroup)) {
                 result.put("courseViewType", userLastNormalMusicGroup.getCourseViewType());
-                ownershipType = userLastNormalMusicGroup.getCourseViewType();
             }
         } else {
             MusicGroup musicGroup = musicGroupService.get(musicGroupId);
@@ -1093,17 +1085,15 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
             }
             params.put("ownershipType", musicGroup.getOwnershipType().name());
             result.put("courseViewType", musicGroup.getCourseViewType());
-            ownershipType = musicGroup.getCourseViewType();
         }
 
-        if (Objects.nonNull(courseViewType)) {
-            ownershipType = courseViewType;
-        }
-        
         //如果分部有企业信息,就用分部上的企业信息,否则用机构上的企业信息
         String companyName = null, sealPicture = null;
         TenantInfo tenantInfo = null;
-        Organization organizationDto = organizationService.get(studentInfo.getOrganId());
+        Organization organizationDto = null;
+        if(orderType != OrderTypeEnum.PRACTICE_GROUP_BUY && orderType != OrderTypeEnum.PRACTICE_GROUP_RENEW && orderType != OrderTypeEnum.SMALL_CLASS_TO_BUY){
+        	organizationDto = organizationService.get(studentInfo.getOrganId());
+        }
 		if (organizationDto == null || StringUtils.isBlank(organizationDto.getCorporateName()) || StringUtils.isBlank(organizationDto.getCorporateCode())) {
 
 			tenantInfo = tenantInfoService.get(studentInfo.getTenantId());

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

@@ -944,7 +944,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         practiceGroupDao.update(practiceGroup);
 
         try {
-            contractService.transferPracticeCoursesContract(order.getUserId(),classGroup.getTotalClassTimes(),practiceGroup.getCoursesStartDate(),practiceGroup.getCoursesExpireDate(),order.getExpectAmount());
+            contractService.transferPracticeCoursesContract(order.getUserId(),classGroup.getTotalClassTimes(),practiceGroup.getCoursesStartDate(),practiceGroup.getCoursesExpireDate(),order.getExpectAmount(),order.getType());
         } catch (Exception e) {
             LOGGER.error(MessageFormatter.arrayFormat("网管课[{}]购买协议错误:{}",order.getMusicGroupId(),e.getMessage()),e);
         }

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

@@ -750,7 +750,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
         // 插入交易明细
         sysUserCashAccountDetailService.saveSysUserCashAccountDetail(studentPaymentOrder, "直播购买云教练");
         try {
-            contractService.transferProduceContract(userId, null,null);
+            contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
         } catch (Exception e) {
             logger.error("产品协议生成失败", e);
         }
@@ -875,7 +875,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
             // 插入交易明细
             sysUserCashAccountDetailService.saveSysUserCashAccountDetail(studentPaymentOrder, "购买会员");
             try {
-                contractService.transferProduceContract(userId, null, CourseViewTypeEnum.MEMBER_FEE);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

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

@@ -3033,7 +3033,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             sysUserCashAccountDetailService.insert(paymentDetail);
 
             try {
-                contractService.transferProduceContract(userId, musicGroupId, null);
+                contractService.transferProduceContract(userId, musicGroupId, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -147,17 +147,17 @@ public class PayServiceImpl implements PayService {
 			
 			// 是否由平台收款
 			//String isPlatformCollection = sysConfigDao.findConfigValue(SysConfigService.IS_OPEN_SMALL_CLASS_INCOME_TO_PLATFORM);
-			String isPlatformCollection = "0";
+			String isPlatformCollection = "1";
 			
 			if (StringUtils.equals("1", isPlatformCollection) && !ignoreOrganList.contains(organId)) {
 	        	
-	        	String merNo = sysConfigDao.findConfigValue(SysConfigService.PLATFORM_PAYEE_ACCOUNT);
-	        	
+	        	//String merNo = sysConfigDao.findConfigValue(SysConfigService.PLATFORM_PAYEE_ACCOUNT);
+				String merNo = ConfigInit.merNo;
 	        	if(StringUtils.isBlank(merNo)){
 	        		throw new BizException("平台收款账户查询失败");
 	        	}
 	        	
-	        	Integer routeOrganId = 68;
+	        	Integer routeOrganId = 16;
 	        	
 	        	StudentPaymentRouteOrder studentPaymentRouteOrder = new StudentPaymentRouteOrder();
 	            studentPaymentRouteOrder.setOrderNo(orderNo);

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

@@ -3219,7 +3219,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         }
 
         try {
-            contractService.transferPracticeCoursesContract(order.getUserId(), classGroup.getTotalClassTimes(), practiceGroup.getCoursesStartDate(), practiceGroup.getCoursesExpireDate(), order.getExpectAmount());
+            contractService.transferPracticeCoursesContract(order.getUserId(), classGroup.getTotalClassTimes(), practiceGroup.getCoursesStartDate(), practiceGroup.getCoursesExpireDate(), order.getExpectAmount(), order.getType());
         } catch (Exception e) {
             LOGGER.error(MessageFormatter.arrayFormat("网管课[{}]购买协议错误:{}", order.getMusicGroupId(), e.getMessage()), e);
         }
@@ -4383,7 +4383,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
             sysUserCashAccountDetailService.insert(sysUserExpendCashAccountDetail);
 
             try {
-                contractService.transferProduceContract(userId, null, CourseViewTypeEnum.COURSE_FEE);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 LOGGER.error("产品协议生成失败", e);
             }

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

@@ -496,7 +496,7 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
             //添加sell_order
             this.addSellOrder(studentPaymentOrder, replacementInstrumentActivity);
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

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

@@ -79,7 +79,7 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
         map.put(userId, userId.toString());
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

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

@@ -220,7 +220,7 @@ public class StudentInstrumentServiceImpl extends BaseServiceImpl<Long, StudentI
         //支付成功
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 5 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -928,12 +928,12 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         if (payStatus == PayStatus.SUCCESSED) {
             throw new BizException("订单已支付成功,请勿重复支付");
         }
-        if (payStatus == PayStatus.PAYING) {
-            throw new BizException("有一笔支付中的订单,请勿重复支付");
+        if (repeatPay == false && payStatus == PayStatus.PAYING) {
+            return BaseController.failed(HttpStatus.CONTINUE, "您有支付中的订单,是否继续支付");
         }
-        if (!repeatPay) {
+        /*if (!repeatPay) {
             return BaseController.failed(HttpStatus.CONTINUE, "您有待支付的订单,是否继续支付");
-        }
+        }*/
         //处理关闭订单
         order.setStatus(DealStatusEnum.CLOSE);
         order.setMemo("关闭订单");
@@ -1283,7 +1283,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

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

@@ -1386,12 +1386,12 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             }
             try {
                 //生成课程协议
-                contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(), studentRegistration.getMusicGroupId());
+                contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), studentPaymentOrder.getType());
                 // 商品协议(租赁时候有)
                 StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
                 if (applyOrderMusical != null && applyOrderMusical.getKitGroupPurchaseType() != null && applyOrderMusical.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
                     contractService.transferGoodsContract(studentPaymentOrder.getUserId(), studentPaymentOrder.getMusicGroupId(),
-                            applyOrderMusical.getGoodsIdList(), applyOrderMusical.getKitGroupPurchaseType());
+                            applyOrderMusical.getGoodsIdList(), studentPaymentOrder.getType());
                 }
             } catch (Exception e) {
                 LOGGER.error("协议生成失败", e);

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

@@ -1093,7 +1093,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }
@@ -1462,7 +1462,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

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

@@ -999,7 +999,7 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, subjectChange.getMusicGroupId(), null);
+                contractService.transferProduceContract(userId, subjectChange.getMusicGroupId(), studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 19 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java

@@ -22,8 +22,13 @@ import com.ym.mec.common.tenant.TenantContextHolder;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+import com.ym.mec.util.string.MessageFormatter;
+
 import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
@@ -40,6 +45,8 @@ import static java.math.BigDecimal.ZERO;
 
 @Service
 public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGroupActivity>  implements VipGroupActivityService {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(VipGroupActivityServiceImpl.class);
 	
 	@Autowired
 	private VipGroupActivityDao vipGroupActivityDao;
@@ -85,6 +92,9 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 	private LuckDrawCountService luckDrawCountService;
 	@Autowired
 	private TempBuyDoubleElevenUserLogDao tempBuyDoubleElevenUserLogDao;
+    @Autowired
+    @Lazy
+    private ContractService contractService;
 
 	@Override
 	public BaseDAO<Integer, VipGroupActivity> getDAO() {
@@ -299,14 +309,14 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 	}
 
 	@Override
-	public DoubleEleven2021Dto doubleEleven2022Statis() {
-		DoubleEleven2021Dto doubleEleven2022Dto = vipGroupActivityDao.countDoubleEleven2022Statis();
+	public DoubleEleven2021Dto doubleEleven2022Statis(String organId) {
+		DoubleEleven2021Dto doubleEleven2022Dto = vipGroupActivityDao.countDoubleEleven2022Statis(organId);
 		if(doubleEleven2022Dto.getTotalBuyAmount().compareTo(ZERO) > 0){
 			doubleEleven2022Dto.setAvgBuyAmount(
 					doubleEleven2022Dto.getTotalBuyAmount().divide(new BigDecimal(doubleEleven2022Dto.getTotalBuyNum()),2,BigDecimal.ROUND_CEILING));
 		}
 		//获取活动成交数据
-		this.groupTypeConvert(vipGroupActivityDao.count2022ActivityStatis(),doubleEleven2022Dto);
+		this.groupTypeConvert(vipGroupActivityDao.count2022ActivityStatis(organId),doubleEleven2022Dto);
 		//获取赠送会员数
 		Integer giveMemberNum = tempBuyDoubleElevenUserLogDao.countGiveNum(null);
 		doubleEleven2022Dto.setGiveMemberNum(giveMemberNum==null?0l:giveMemberNum.longValue());
@@ -649,6 +659,11 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 			}
 			//保存账户信息
 			sysUserCashAccountDetailService.saveSysUserCashAccountDetail(studentPaymentOrder,studentPaymentOrder.getMemo());
+            try {
+                contractService.transferVipGroupCoursesContract(studentPaymentOrder.getUserId(), null, studentPaymentOrder.getType());
+            } catch (Exception e) {
+                LOGGER.error(MessageFormatter.arrayFormat("小课活动[{}]购买协议错误:{}", studentPaymentOrder.getActivityId(), e.getMessage()), e);
+            }
 			//发送短信
 			this.sendSuccessMsg(studentPaymentOrder);
 		}else {
@@ -792,7 +807,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 				studentPaymentOrder.getActualAmount(),
 				studentPaymentOrder.getBalancePaymentAmount(),
 				orderNo,
-				baseApiUrl + "/api-student/studentOrder/notify",
+				baseApiUrl + "/api-student/studentOrder/callback",
 				baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
 				orderSubject,
 				orderSubject,

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

@@ -2484,7 +2484,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                 vipGroup.setOrganIdList(organIdsString);
                 vipGroupDao.update(vipGroup);
                 try {
-                    contractService.transferVipGroupCoursesContract(userId, vipGroup.getId());
+                    contractService.transferVipGroupCoursesContract(userId, vipGroup.getId(), order.getType());
                 } catch (Exception e) {
                     LOGGER.error(MessageFormatter.arrayFormat("小课[{}]购买协议错误:{}", vipGroup.getId(), e.getMessage()), e);
                 }

+ 8 - 2
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -1108,6 +1108,8 @@
 
     <resultMap type="com.ym.mec.biz.dal.vo.StudentPaymentOrderVo" id="QueryOrderDetail">
         <result column="orderNo" property="orderNo"/>
+        <result column="memo_" property="memo"/>
+        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="orderType" property="orderType"/>
         <result column="orderTypeCode" property="orderTypeCode"/>
         <result column="totalAmount" property="totalAmount"/>
@@ -1127,20 +1129,24 @@
     <select id="queryStudentOrderPage" resultMap="QueryOrderDetail">
         select
             a.order_no_ as orderNo,
+            a.status_ ,a.memo_,
             a.type_                            as orderType,
             a.type_                            as orderTypeCode,
             ifnull(a.actual_amount_, 0) + ifnull(a.balance_payment_amount_, 0) as totalAmount,
             a.create_time_ as createTime
         from student_payment_order as a
-        where  status_ = 'SUCCESS'
-          and create_time_ >= #{param.startDate}
+        where  create_time_ >= #{param.startDate}
           and create_time_   <![CDATA[ < ]]> #{param.endDate}
           and user_id_ = #{param.userId}
+          <if test="param.status != null">
+          and status_ = #{param.status}
+          </if>
     </select>
 
     <select id="queryOrderDetail" resultMap="QueryOrderDetail">
         select
                a.order_no_ as orderNo,
+               a.status_ ,a.memo_,
                a.type_                            as orderType,
                ifnull(a.actual_amount_, 0) + ifnull(a.balance_payment_amount_, 0) + ifnull(a.remit_fee_, 0) +
                ifnull(a.coupon_remit_fee_, 0)     as totalAmount,

+ 4 - 10
mec-biz/src/main/resources/config/mybatis/VipGroupActivityMapper.xml

@@ -413,7 +413,7 @@
 				 LEFT JOIN activity_user_mapper aum ON spo.id_ = aum.payment_order_id_ AND spo.user_id_ = aum.user_id_
 				 LEFT JOIN vip_group_activity vga ON vga.id_ = aum.activity_id_
 		WHERE spo.group_type_ = 'ACTIVITY' AND spo.type_ = 'SMALL_CLASS_TO_BUY' AND spo.status_ = 'SUCCESS' AND spo.memo_ = '2022双十一活动购买'
-		  AND spo.organ_id_ IN (10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16,4)
+		  AND FIND_IN_SET(spo.organ_id_,#{organId})
 		GROUP BY aum.activity_id_,aum.user_id_) c GROUP BY c.type_
 	</select>
 	<resultMap id="DoubleEleven2021Dto" type="com.ym.mec.biz.dal.dto.DoubleEleven2021Dto">
@@ -430,7 +430,7 @@
 	<select id="countDoubleEleven2022Statis" resultMap="DoubleEleven2021Dto">
 		SELECT SUM(spo.expect_amount_) total_buy_amount_,COUNT(DISTINCT spo.user_id_) total_buy_num_ FROM student_payment_order spo
 		WHERE spo.group_type_ = 'ACTIVITY' AND spo.type_ = 'SMALL_CLASS_TO_BUY' AND spo.status_ = 'SUCCESS' AND spo.memo_ = '2022双十一活动购买'
-		AND spo.organ_id_ IN (10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16,4)
+		AND FIND_IN_SET(spo.organ_id_,#{organId})
 	</select>
 	<select id="countGiveMemberNum" resultType="java.lang.Integer">
 		SELECT COUNT(DISTINCT student_id_) FROM cloud_teacher_order WHERE remark_ = '双十一活动赠送会员'
@@ -475,10 +475,7 @@
 		SELECT SUM(spo.expect_amount_) total_buy_amount_,COUNT(DISTINCT spo.user_id_) total_buy_num_,o.name_ organ_name_,o.id_ organ_id_
 		FROM organization o
 		LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND spo.type_ = 'DOUBLE_ELEVEN2021' AND spo.status_ = 'SUCCESS'
-		WHERE o.id_ IN (10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16,4)
-		<if test="organId != null">
-			AND o.id_ = #{organId}
-		</if>
+		WHERE FIND_IN_SET(o.id_,#{organId})
 		GROUP BY o.id_
 	</select>
 	<select id="countOrganDoubleEleven2022Statis" resultMap="DoubleEleven2021Dto">
@@ -486,10 +483,7 @@
 		FROM organization o
 		LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_
 		AND spo.group_type_ = 'ACTIVITY' AND spo.type_ = 'SMALL_CLASS_TO_BUY' AND spo.status_ = 'SUCCESS' AND spo.memo_ = '2022双十一活动购买'
-		WHERE o.id_ IN (10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16,4)
-		<if test="organId != null">
-			AND o.id_ = #{organId}
-		</if>
+		WHERE FIND_IN_SET(o.id_,#{organId})
 		GROUP BY o.id_
 	</select>
 	<resultMap id="DoubleEleven2021OrderDetailDto" type="com.ym.mec.biz.dal.dto.DoubleEleven2021OrderDetailDto">

+ 4 - 2
mec-student/src/main/java/com/ym/mec/student/controller/ContractsController.java

@@ -20,6 +20,7 @@ import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.SysUserContracts;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.SysUserContractsService;
 import com.ym.mec.common.controller.BaseController;
@@ -91,7 +92,7 @@ public class ContractsController extends BaseController {
 
 	@ApiOperation("查询产品协议")
 	@GetMapping(value = "queryProduceContract")
-	public Object queryProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+	public Object queryProduceContract(Integer userId, String musicGroupId, String orderType) {
 		if(Objects.isNull(userId)){
 			SysUser sysUser = sysUserFeignService.queryUserInfo();
 			if (sysUser == null) {
@@ -99,7 +100,8 @@ public class ContractsController extends BaseController {
 			}
 			userId = sysUser.getId();
 		}
-		return succeed(contractService.queryProductContract(userId,musicGroupId, courseViewType));
+		OrderTypeEnum type = OrderTypeEnum.get(orderType);
+		return succeed(contractService.queryProductContract(userId,musicGroupId, type));
 	}
 
 	@ApiOperation(value = "查询学生最新协议")

+ 5 - 32
mec-student/src/main/java/com/ym/mec/student/controller/LuckDrawController.java

@@ -116,38 +116,11 @@ public class LuckDrawController extends BaseController {
 	}
 
 	private static String str = "[\n" +
-			"    {\"user\": {\"username\": \"陈昊然\"},\"luckDrawPrize\":{\"name\": \"瑞士双肩背带\"}},\n" +
-			"    {\"user\": {\"username\": \"王木槿\"},\"luckDrawPrize\":{\"name\": \"镀金号嘴\"}},\n" +
-			"    {\"user\": {\"username\": \"刘天钧\"},\"luckDrawPrize\":{\"name\": \"乐器清洁套装\"}},\n" +
-			"    {\"user\": {\"username\": \"刘天宇\"},\"luckDrawPrize\":{\"name\": \"精美长笛包\"}},\n" +
-			"    {\"user\": {\"username\": \"刘润玉\"},\"luckDrawPrize\":{\"name\": \"瑞夫纳帽卡\"}},\n" +
-			"    {\"user\": {\"username\": \"李暮词\"},\"luckDrawPrize\":{\"name\": \"弯得林优选笛头\"}},\n" +
-			"    {\"user\": {\"username\": \"陈叶开\"},\"luckDrawPrize\":{\"name\": \"瑞士双肩背带\"}},\n" +
-			"    {\"user\": {\"username\": \"赵崇光\"},\"luckDrawPrize\":{\"name\": \"镀金号嘴\"}},\n" +
-			"    {\"user\": {\"username\": \"赵绮年\"},\"luckDrawPrize\":{\"name\": \"乐器清洁套装\"}},\n" +
-			"    {\"user\": {\"username\": \"吴玉堂\"},\"luckDrawPrize\":{\"name\": \"瑞夫纳帽卡\"}},\n" +
-			"    {\"user\": {\"username\": \"吴勇师\"},\"luckDrawPrize\":{\"name\": \"弯得林优选笛头\"}},\n" +
-			"    {\"user\": {\"username\": \"陈康文\"},\"luckDrawPrize\":{\"name\": \"瑞士双肩背带\"}},\n" +
-			"    {\"user\": {\"username\": \"赵康健\"},\"luckDrawPrize\":{\"name\": \"镀金号嘴\"}},\n" +
-			"    {\"user\": {\"username\": \"赵高轩\"},\"luckDrawPrize\":{\"name\": \"乐器清洁套装\"}},\n" +
-			"    {\"user\": {\"username\": \"赵玉书\"},\"luckDrawPrize\":{\"name\": \"瑞夫纳帽卡\"}},\n" +
-			"    {\"user\": {\"username\": \"赵叶欢\"},\"luckDrawPrize\":{\"name\": \"弯得林优选笛头\"}},\n" +
-			"    {\"user\": {\"username\": \"李高兴\"},\"luckDrawPrize\":{\"name\": \"瑞士双肩背带\"}},\n" +
-			"    {\"user\": {\"username\": \"吴文瑞\"},\"luckDrawPrize\":{\"name\": \"镀金号嘴\"}},\n" +
-			"    {\"user\": {\"username\": \"高勇\"},\"luckDrawPrize\":{\"name\": \"乐器清洁套装\"}},\n" +
-			"    {\"user\": {\"username\": \"李艺彤\"},\"luckDrawPrize\":{\"name\": \"精美长笛包\"}},\n" +
-			"    {\"user\": {\"username\": \"邹辰悦\"},\"luckDrawPrize\":{\"name\": \"瑞夫纳帽卡\"}},\n" +
-			"    {\"user\": {\"username\": \"王笑笑\"},\"luckDrawPrize\":{\"name\": \"弯得林优选笛头\"}},\n" +
-			"    {\"user\": {\"username\": \"肖国庆\"},\"luckDrawPrize\":{\"name\": \"瑞士双肩背带\"}},\n" +
-			"    {\"user\": {\"username\": \"李红旗\"},\"luckDrawPrize\":{\"name\": \"镀金号嘴\"}},\n" +
-			"    {\"user\": {\"username\": \"王乐乐\"},\"luckDrawPrize\":{\"name\": \"乐器清洁套装\"}},\n" +
-			"    {\"user\": {\"username\": \"孙朵朵\"},\"luckDrawPrize\":{\"name\": \"瑞夫纳帽卡\"}},\n" +
-			"    {\"user\": {\"username\": \"孙雨轩\"},\"luckDrawPrize\":{\"name\": \"弯得林优选笛头\"}},\n" +
-			"    {\"user\": {\"username\": \"孙文睿\"},\"luckDrawPrize\":{\"name\": \"瑞士双肩背带\"}},\n" +
-			"    {\"user\": {\"username\": \"高可心\"},\"luckDrawPrize\":{\"name\": \"镀金号嘴\"}},\n" +
-			"    {\"user\": {\"username\": \"高可云\"},\"luckDrawPrize\":{\"name\": \"乐器清洁套装\"}},\n" +
-			"    {\"user\": {\"username\": \"王胜利\"},\"luckDrawPrize\":{\"name\": \"瑞夫纳帽卡\"}},\n" +
-			"    {\"user\": {\"username\": \"李木子\"},\"luckDrawPrize\":{\"name\": \"弯得林优选笛头\"}}\n" +
+			"    {\"user\": {\"username\": \"吴文瑞\"},\"luckDrawPrize\":{\"name\": \"三等奖\"}},\n" +
+			"    {\"user\": {\"username\": \"高勇\"},\"luckDrawPrize\":{\"name\": \"三等奖\"}},\n" +
+			"    {\"user\": {\"username\": \"李艺彤\"},\"luckDrawPrize\":{\"name\": \"二等奖\"}},\n" +
+			"    {\"user\": {\"username\": \"邹辰悦\"},\"luckDrawPrize\":{\"name\": \"三等奖\"}},\n" +
+			"    {\"user\": {\"username\": \"王笑笑\"},\"luckDrawPrize\":{\"name\": \"三等奖\"}},\n" +
 			"]";
 	private static String str2 = "[\n" +
 			"    {\"user\": {\"username\": \"陈昊然\"},\"luckDrawPrize\":{\"name\": \"SoonyAngle盲盒\"}},\n" +

+ 5 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/EduContractsController.java

@@ -3,10 +3,13 @@ package com.ym.mec.teacher.controller;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.common.controller.BaseController;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,7 +33,7 @@ public class EduContractsController extends BaseController {
 
     @ApiOperation("查询产品协议")
     @GetMapping(value = "queryProduceContract")
-    public Object queryProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public Object queryProduceContract(Integer userId, String musicGroupId, String orderType) {
         if(Objects.isNull(userId)){
             SysUser sysUser = sysUserFeignService.queryUserInfo();
             if (sysUser == null) {
@@ -38,6 +41,6 @@ public class EduContractsController extends BaseController {
             }
             userId = sysUser.getId();
         }
-        return succeed(contractService.queryProductContract(userId,musicGroupId, courseViewType));
+        return succeed(contractService.queryProductContract(userId,musicGroupId, OrderTypeEnum.get(orderType)));
     }
 }

+ 2 - 1
mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java

@@ -37,7 +37,8 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                         "/replacementInstrumentActivity/queryReplacementsStat", "/eduStudentRegistration/queryPreApplyList",
                         "/eduSubject/findSubSubjects", "/eduFinancialExpenditure/batchAdd", "/eduSendNotice/*",
                         "/oaContracts/*", "/eduStudent/organStudentOverView", "/activity/countCloudTeacherActive",
-                        "/activity/organDoubleEleven2021Statis", "/activity/doubleEleven2021Statis", "/activity/organDoubleEleven2022Statis", "/activity/doubleEleven2022Statis",
+                        "/activity/organDoubleEleven2021Statis", "/activity/doubleEleven2021Statis",
+                        "/activity/organDoubleEleven2022Statis", "/activity/doubleEleven2022Statis","/activity/organDoubleEleven2022Statis1", "/activity/doubleEleven2022Statis1",
                         "/questionnaireTopic/getDetail", "/questionnaireUserResult/add",
                         "/tenantInfo/info/*", "/tenantInfo/checkInfo/*", "/tenantInfo/pay/*","/tenantInfo/testCheck", "/tenantInfo/getContract/*",
                         "/tenantPreJoin/add","/imLiveBroadcastRoom/queryRoomInfo","/imLiveBroadcastRoom/test",

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

@@ -552,6 +552,9 @@ public class ExportController extends BaseController {
     @RequestMapping("export/organDoubleEleven2022Statis")
     @PreAuthorize("@pcs.hasPermissions('export/organDoubleEleven2022Statis')")
     public void organDoubleEleven2022Statis(HttpServletResponse response, OrganDoubleEleven2021StatisDto statisDto) throws IOException {
+        if(StringUtils.isEmpty(statisDto.getOrganId())){
+            statisDto.setOrganId("10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16");
+        }
         List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2022Statis(statisDto);
         if (rows.size() < 1) {
             throw new BizException("没有可导出数据");

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

@@ -18,6 +18,7 @@ import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.CollectionUtils;
@@ -60,6 +61,9 @@ public class VipGroupActivityController extends BaseController {
     @GetMapping("/organDoubleEleven2022Statis")
     @PreAuthorize("@pcs.hasPermissions('vipGroupActivity/organDoubleEleven2022Statis')")
     public HttpResponseResult organDoubleEleven2022Statis(OrganDoubleEleven2021StatisDto queryInfo){
+        if(StringUtils.isEmpty(queryInfo.getOrganId())){
+            queryInfo.setOrganId("10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16");
+        }
         return succeed(vipGroupActivityService.organDoubleEleven2022Statis(queryInfo));
     }
 
@@ -80,7 +84,15 @@ public class VipGroupActivityController extends BaseController {
     @GetMapping("/doubleEleven2022Statis")
     @PreAuthorize("@pcs.hasPermissions('vipGroupActivity/doubleEleven2022Statis')")
     public HttpResponseResult doubleEleven2022Statis(){
-        return succeed(vipGroupActivityService.doubleEleven2022Statis());
+        String organId = "10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16";
+        return succeed(vipGroupActivityService.doubleEleven2022Statis(organId));
+    }
+    @ApiOperation(value = "双11活动统计")
+    @GetMapping("/doubleEleven2022Statis1")
+    @PreAuthorize("@pcs.hasPermissions('vipGroupActivity/doubleEleven2022Statis1')")
+    public HttpResponseResult doubleEleven2022Statis1(){
+        String organId = "4";
+        return succeed(vipGroupActivityService.doubleEleven2022Statis(organId));
     }
 
     @ApiOperation(value = "新增vip课活动方案")

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

@@ -86,15 +86,31 @@ public class ActivityController extends BaseController {
     }
 
     @ApiOperation(value = "分部双11活动统计")
+    @GetMapping("/organDoubleEleven2022Statis1(杭州)")
+    public HttpResponseResult organDoubleEleven2022Statis1(OrganDoubleEleven2021StatisDto queryInfo){
+        queryInfo.setOrganId("4");
+        return succeed(vipGroupActivityService.organDoubleEleven2022Statis(queryInfo));
+    }
+
+    @ApiOperation(value = "分部双11活动统计")
     @GetMapping("/organDoubleEleven2022Statis")
     public HttpResponseResult organDoubleEleven2022Statis(OrganDoubleEleven2021StatisDto queryInfo){
+        if(StringUtils.isEmpty(queryInfo.getOrganId())){
+            queryInfo.setOrganId("10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16");
+        }
         return succeed(vipGroupActivityService.organDoubleEleven2022Statis(queryInfo));
     }
 
     @ApiOperation(value = "双11活动统计")
     @GetMapping("/doubleEleven2022Statis")
     public HttpResponseResult doubleEleven2022Statis(){
-        return succeed(vipGroupActivityService.doubleEleven2022Statis());
+        String organId = "10,11,12,13,14,19,21,23,26,28,34,1,7,9,17,20,37,40,6,3,57,58,8,15,16";
+        return succeed(vipGroupActivityService.doubleEleven2022Statis(organId));
+    }
+    @ApiOperation(value = "双11活动统计(杭州)")
+    @GetMapping("/doubleEleven2022Statis1")
+    public HttpResponseResult doubleEleven2022Statis1(){
+        return succeed(vipGroupActivityService.doubleEleven2022Statis("4"));
     }
 
     @ApiOperation(value = "分部双11活动统计")

+ 5 - 2
mec-web/src/main/java/com/ym/mec/web/controller/education/EduContractsController.java

@@ -3,10 +3,13 @@ package com.ym.mec.web.controller.education;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.common.controller.BaseController;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,7 +33,7 @@ public class EduContractsController extends BaseController {
 
     @ApiOperation("查询产品协议")
     @GetMapping(value = "queryProduceContract")
-    public Object queryProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public Object queryProduceContract(Integer userId, String musicGroupId, String orderType) {
         if(Objects.isNull(userId)){
             SysUser sysUser = sysUserFeignService.queryUserInfo();
             if (sysUser == null) {
@@ -38,6 +41,6 @@ public class EduContractsController extends BaseController {
             }
             userId = sysUser.getId();
         }
-        return succeed(contractService.queryProductContract(userId,musicGroupId, courseViewType));
+        return succeed(contractService.queryProductContract(userId,musicGroupId, OrderTypeEnum.get(orderType)));
     }
 }