فهرست منبع

Merge branch 'master' of http://git.dayaedu.com/yonge/mec into zouxuan

zouxuan 5 سال پیش
والد
کامیت
7a3261052b
28فایلهای تغییر یافته به همراه256 افزوده شده و 73 حذف شده
  1. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherHomeworkListDto.java
  2. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ExtracurricularExercises.java
  3. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ExtracurricularExercisesReply.java
  4. 13 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysAccount.java
  5. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtraExercilseQueryInfo.java
  6. 43 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtraExercilseReplyQueryInfo.java
  7. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java
  8. 11 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseHomeworkServiceImpl.java
  9. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CoursesGroupServiceImpl.java
  10. 5 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesMessageServiceImpl.java
  11. 11 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesServiceImpl.java
  12. 5 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  13. 25 22
      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. 5 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkReplyServiceImpl.java
  16. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  17. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  18. 3 3
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  19. 13 5
      mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml
  20. 25 8
      mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesReplyMapper.xml
  21. 2 0
      mec-biz/src/main/resources/config/mybatis/SysAccountMapper.xml
  22. 2 2
      mec-common/common-core/src/main/java/com/ym/mec/common/filters/EmojiEncodingFilter.java
  23. 1 1
      mec-student/src/main/java/com/ym/mec/student/StudentApplication.java
  24. 1 1
      mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java
  25. 6 6
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseHomeworkController.java
  26. 10 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java
  27. 1 1
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java
  28. 1 1
      mec-web/src/main/java/com/ym/mec/web/WebApplication.java

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherHomeworkListDto.java

@@ -50,6 +50,16 @@ public class TeacherHomeworkListDto {
 
     private int isSubmit;
 
+    private int status;
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
     public Date getStartClassTime() {
         return startClassTime;
     }

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ExtracurricularExercises.java

@@ -51,6 +51,18 @@ public class ExtracurricularExercises {
 
 	private int isSubmit;
 
+	private int status;
+	
+	private String organName;
+
+	public int getStatus() {
+		return status;
+	}
+
+	public void setStatus(int status) {
+		this.status = status;
+	}
+
 	public int getIsReplied() {
 		return isReplied;
 	}
@@ -171,6 +183,14 @@ public class ExtracurricularExercises {
 		this.teacher = teacher;
 	}
 
+	public String getOrganName() {
+		return organName;
+	}
+
+	public void setOrganName(String organName) {
+		this.organName = organName;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ExtracurricularExercisesReply.java

@@ -43,6 +43,8 @@ public class ExtracurricularExercisesReply {
 	/** 是否已查看 */
 	private Integer isView;
 	
+	private String organName;
+	
 	public ExtracurricularExercises getExtracurricularExercises() {
 		return extracurricularExercises;
 	}
@@ -139,6 +141,14 @@ public class ExtracurricularExercisesReply {
 		this.user = user;
 	}
 
+	public String getOrganName() {
+		return organName;
+	}
+
+	public void setOrganName(String organName) {
+		this.organName = organName;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 13 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysAccount.java

@@ -26,6 +26,11 @@ public class SysAccount {
     private String routingMerNo;
 
     /**
+     * 分佣分部
+     */
+    private Integer routingOrganId;
+
+    /**
     * 最大收款金额
     */
     private BigDecimal maxReceipt;
@@ -143,4 +148,12 @@ public class SysAccount {
     public void setRoutingFee(BigDecimal routingFee) {
         this.routingFee = routingFee;
     }
+
+    public Integer getRoutingOrganId() {
+        return routingOrganId;
+    }
+
+    public void setRoutingOrganId(Integer routingOrganId) {
+        this.routingOrganId = routingOrganId;
+    }
 }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtraExercilseQueryInfo.java

@@ -19,6 +19,8 @@ public class ExtraExercilseQueryInfo extends QueryInfo {
 	private Date createTime;
 
 	private String title;// 作业标题
+	
+	private Integer organId;
 
 	private Date assignStartTime;// 布置作业的开始时间
 
@@ -64,6 +66,14 @@ public class ExtraExercilseQueryInfo extends QueryInfo {
 		this.title = title;
 	}
 
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
 	public Date getAssignStartTime() {
 		return assignStartTime;
 	}

+ 43 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtraExercilseReplyQueryInfo.java

@@ -18,6 +18,17 @@ public class ExtraExercilseReplyQueryInfo extends QueryInfo {
 
 	private String title;
 
+	/** 提交状态 */
+	private Integer status;
+	
+	/** 是否回复 */
+	private Integer isReplied;
+	
+	/** 是否已查看 */
+	private Integer isView;
+	
+	private Integer organId;
+	
 	private Date submitStartTime;// 提交作业的开始时间
 
 	private Date submitEndTime;// 提交作业的结束时间
@@ -46,6 +57,14 @@ public class ExtraExercilseReplyQueryInfo extends QueryInfo {
 		this.studentId = studentId;
 	}
 
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
 	public Date getSubmitStartTime() {
 		return submitStartTime;
 	}
@@ -69,4 +88,28 @@ public class ExtraExercilseReplyQueryInfo extends QueryInfo {
 	public void setTitle(String title) {
 		this.title = title;
 	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	public Integer getIsReplied() {
+		return isReplied;
+	}
+
+	public void setIsReplied(Integer isReplied) {
+		this.isReplied = isReplied;
+	}
+
+	public Integer getIsView() {
+		return isView;
+	}
+
+	public void setIsView(Integer isView) {
+		this.isView = isView;
+	}
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java

@@ -71,6 +71,14 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
     List<BasicUserDto> queryGroupStudents(Integer id, String search);
 
     /**
+     * 获取教师通讯录学员列表
+     * @param id
+     * @param search
+     * @return
+     */
+    List<BasicUserDto> queryGroupStudentList(Integer id, String search);
+
+    /**
      * 查询分部所有老师
      * @param organId
      * @return

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

@@ -59,14 +59,21 @@ public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomew
 				if(CollectionUtils.isEmpty(studentCourseHomeworks)){
 					continue;
 				}
-				Map<YesOrNoEnum, List<StudentCourseHomework>> replyStudentsMap = studentCourseHomeworks.stream().collect(Collectors.groupingBy(StudentCourseHomework::getIsReplied));
-				if(CollectionUtils.isEmpty(replyStudentsMap.get(YesOrNoEnum.NO))){
+				long noRepliedNum=studentCourseHomeworks.stream().filter(e -> e.getStatus().equals(YesOrNoEnum.YES)&&e.getIsReplied().equals(YesOrNoEnum.NO)).count();
+				if(noRepliedNum<=0){
 					teacherHomeworkListDto.setIsReplied(YesOrNoEnum.YES.getCode());
 				}
-				List<StudentCourseHomework> collect = studentCourseHomeworks.stream().filter(e -> Objects.nonNull(e.getAttachments())).collect(Collectors.toList());
-				if(!CollectionUtils.isEmpty(collect)&&collect.size()>0){
+				long notSubmitNum = studentCourseHomeworks.stream().filter(e -> e.getStatus().equals(YesOrNoEnum.NO)).count();
+				if(notSubmitNum<=0){
 					teacherHomeworkListDto.setIsSubmit(1);
 				}
+				if(noRepliedNum>0){
+					teacherHomeworkListDto.setStatus(1);
+				}else if(noRepliedNum<=0&&notSubmitNum>0){
+					teacherHomeworkListDto.setStatus(2);
+				}else if(noRepliedNum<=0&&notSubmitNum<=0){
+					teacherHomeworkListDto.setStatus(3);
+				}
 			}
 		}
 		if (count != 0) {
@@ -90,7 +97,6 @@ public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomew
 	@Override
 	public void homeworkNoReplyRemind() {
 		List<Mapper> list = courseHomeworkDao.queryTeacerNoReplyNum();
-
 		for (Mapper mapper : list) {
 			Map<Integer, String> receivers = new HashMap<>();
 			Integer userId = (Integer) mapper.getKey();

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

@@ -470,7 +470,7 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
                 );
 
                 Map<String,BigDecimal> routingFee = (Map<String,BigDecimal>)payMap.get("routingFee");
-                studentPaymentOrder.setRoutingOrganId(42);
+                studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
                 studentPaymentOrder.setComAmount(routingFee.get("COM"));
                 studentPaymentOrder.setPerAmount(routingFee.get("PER"));
                 studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));

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

@@ -60,9 +60,11 @@ public class ExtracurricularExercisesMessageServiceImpl extends BaseServiceImpl<
 			throw new BizException("课外训练不存在");
 		}
 		ExtracurricularExercises extracurricularExercises = extracurricularExercisesDao.get(extracurricularExercisesReply.getExtracurricularExercisesId());
-		if("TEACHER".equals(extracurricularExercisesMessage.getRole())&&Objects.nonNull(extracurricularExercisesReply.getAttachments())){
-			extracurricularExercisesReply.setIsReplied(1);
-			extracurricularExercisesReplyDao.update(extracurricularExercisesReply);
+		if("TEACHER".equals(extracurricularExercisesMessage.getRole())){
+			if(extracurricularExercisesReply.getIsReplied()==0&&Objects.nonNull(extracurricularExercisesReply.getAttachments())){
+				extracurricularExercisesReply.setIsReplied(1);
+				extracurricularExercisesReplyDao.update(extracurricularExercisesReply);
+			}
 
 			Map<Integer, String> userMap = new HashMap<>();
 			userMap.put(extracurricularExercisesReply.getUserId(),extracurricularExercisesReply.getUserId().toString());

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

@@ -106,14 +106,21 @@ public class ExtracurricularExercisesServiceImpl extends BaseServiceImpl<Long, E
 				if(CollectionUtils.isEmpty(extracurricularExercisesReplies)){
 					continue;
 				}
-				long repliedNum = extracurricularExercisesReplies.stream().filter(e -> e.getIsReplied() == 0).count();
-				if(repliedNum<=0){
+				long noRepliedNum = extracurricularExercisesReplies.stream().filter(e -> e.getStatus()==1&&e.getIsReplied() == 0).count();
+				if(noRepliedNum<=0){
 					extracurricularExercises.setIsReplied(1);
 				}
-				long submitNum = extracurricularExercisesReplies.stream().filter(e -> e.getIsView() == 1).count();
-				if(submitNum>0){
+				long notSubmitNum = extracurricularExercisesReplies.stream().filter(e -> e.getStatus() == 0).count();
+				if(notSubmitNum<=0){
 					extracurricularExercises.setIsSubmit(1);
 				}
+				if(noRepliedNum>0){
+					extracurricularExercises.setStatus(1);
+				}else if(noRepliedNum<=0&&notSubmitNum>0){
+					extracurricularExercises.setStatus(2);
+				}else if(noRepliedNum<=0&&notSubmitNum<=0){
+					extracurricularExercises.setStatus(3);
+				}
 			}
 
 			Map<String, List<ExtracurricularExercises>> collect = dataList.stream().collect(Collectors.groupingBy(e -> DateUtil.dateToString(e.getCreateTime(), "yyyy-MM-dd")));

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

@@ -359,7 +359,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
         Map<String, BigDecimal> routingFee = (Map<String, BigDecimal>) payMap.get("routingFee");
         studentPaymentOrder.setOrganId(chargeInfo.getOrganId());
-        studentPaymentOrder.setRoutingOrganId(chargeInfo.getOrganId());
+        //studentPaymentOrder.setRoutingOrganId(chargeInfo.getOrganId());
+        studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
         studentPaymentOrder.setComAmount(routingFee.get("COM"));
         studentPaymentOrder.setPerAmount(routingFee.get("PER"));
         studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
@@ -593,7 +594,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
         Map<String, BigDecimal> routingFee = (Map<String, BigDecimal>) payMap.get("routingFee");
         studentPaymentOrder.setOrganId(musicGroup.getOrganId());
-        studentPaymentOrder.setRoutingOrganId(42);
+        studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
         studentPaymentOrder.setComAmount(routingFee.get("COM"));
         studentPaymentOrder.setPerAmount(routingFee.get("PER"));
         studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
@@ -831,7 +832,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
         Map<String, BigDecimal> routingFee = (Map<String, BigDecimal>) payMap.get("routingFee");
         studentPaymentOrder.setOrganId(musicGroup.getOrganId());
-        studentPaymentOrder.setRoutingOrganId(42);
+        studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
         studentPaymentOrder.setComAmount(routingFee.get("COM"));
         studentPaymentOrder.setPerAmount(routingFee.get("PER"));
         studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
@@ -1672,7 +1673,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
             Map<String, BigDecimal> routingFee = (Map<String, BigDecimal>) payMap.get("routingFee");
             studentPaymentOrder.setOrganId(musicGroup.getOrganId());
-            studentPaymentOrder.setRoutingOrganId(42);
+            studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
             studentPaymentOrder.setComAmount(routingFee.get("COM"));
             studentPaymentOrder.setPerAmount(routingFee.get("PER"));
             studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));

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

@@ -64,18 +64,18 @@ public class PayServiceImpl implements PayService {
         if (userId != null) {
             MusicGroup musicGroup = musicGroupDao.findUserMusicGroup(userId);
             if (musicGroup != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
-                company = "yadie";
+                company = "yaming";
             }
         }
 
         //支付通道决策
-        Map unionPay = new HashMap();
+        Map<String,Object> unionPay = new HashMap<>();
         SysAccount routingAccount = getRoutingAccount(company, amount);
         PaymentChannelTypeEnum paymentChannelType = PaymentChannelTypeEnum.COM;
         if (routingAccount.getType().equals("PER")) {
             paymentChannelType = PaymentChannelTypeEnum.PER;
         }
-        Map payMap = null;
+        Map<String,Object> payMap = null;
         String type = null;
         if (routingAccount.getChannel().equals("YQPAY")) {
             payMap = YqPayUtil.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody, routingAccount.getMerNo(), routingAccount.getRoutingMerNo());
@@ -98,20 +98,20 @@ public class PayServiceImpl implements PayService {
         if (userId != null) {
             MusicGroup musicGroup = musicGroupDao.findUserMusicGroup(userId);
             if (musicGroup != null && musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
-                company = "yadie";
+                company = "yaming";
             }
         }
 
         //支付通道决策
-        Map unionPay = new HashMap();
+        Map<String,Object> unionPay = new HashMap<>();
         Map<String, BigDecimal> routingFee = getRoutingFee(company, amount, fee, organId);
         List<SysAccount> accounts = getRoutingAccount(routingFee, company);
         SysAccount routingAccount = accounts.get(0);
 
-        Map payMap = null;
+        Map<String,Object> payMap = null;
         String type = null;
         if (routingAccount.getChannel().equals("YQPAY")) {
-            List<Map> tempRoutingList = new ArrayList();
+            List<Map<String,Object>> tempRoutingList = new ArrayList();
             for (SysAccount account : accounts) {
                 Map<String, Object> routingList = new HashMap<>();
                 routingList.put("routingMerNo", account.getRoutingMerNo());//分佣账户
@@ -136,6 +136,7 @@ public class PayServiceImpl implements PayService {
         unionPay.put("payMap", payMap);
         unionPay.put("routingFee", routingFee);
         unionPay.put("routingMerNos", routingMerNos);
+        unionPay.put("routingOrganId",accounts.get(0).getRoutingOrganId());
         return unionPay;
     }
 
@@ -145,20 +146,20 @@ public class PayServiceImpl implements PayService {
         if (userId != null) {
             MusicGroup musicGroup = musicGroupDao.findUserMusicGroup(userId);
             if (musicGroup != null && musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
-                company = "yadie";
+                company = "yaming";
             }
         }
 
         //支付通道决策
-        Map unionPay = new HashMap();
+        Map<String,Object> unionPay = new HashMap<>();
         Map<String, BigDecimal> routingFee = getRoutingFee(company, amount, fee, organId, receiver);
         List<SysAccount> accounts = getRoutingAccount(routingFee, company);
         SysAccount routingAccount = accounts.get(0);
 
-        Map payMap = null;
+        Map<String,Object> payMap = null;
         String type = null;
         if (routingAccount.getChannel().equals("YQPAY")) {
-            List<Map> tempRoutingList = new ArrayList();
+            List<Map<String, Object>> tempRoutingList = new ArrayList();
             for (SysAccount account : accounts) {
                 Map<String, Object> routingList = new HashMap<>();
                 routingList.put("routingMerNo", account.getRoutingMerNo());//分佣账户
@@ -183,6 +184,7 @@ public class PayServiceImpl implements PayService {
         unionPay.put("payMap", payMap);
         unionPay.put("routingFee", routingFee);
         unionPay.put("routingMerNos", routingMerNos);
+        unionPay.put("routingOrganId",accounts.get(0).getRoutingOrganId());
         return unionPay;
     }
 
@@ -202,7 +204,7 @@ public class PayServiceImpl implements PayService {
         SysAccount routingAccount = null;
         int payOrderNums = studentPaymentOrderService.findPayOrderNum(); //获取支付中和成功的订单数
         //前几笔收入私户
-        Integer nums = Integer.parseInt(sysConfigDao.findConfigValue("per_account_nums"));
+        int nums = Integer.parseInt(sysConfigDao.findConfigValue("per_account_nums"));
 
         String type = null;
         String channel = null;
@@ -214,7 +216,7 @@ public class PayServiceImpl implements PayService {
             channel = sysConfigDao.findConfigValue("com_account_channel");
             type = "COM";
         }
-        if (company.equals("yadie")) {
+        if (company.equals("yaming")) {
             type = "PER";
         }
         SysAccount account = sysAccountService.getOneAccount(company, channel, type, null);
@@ -249,13 +251,14 @@ public class PayServiceImpl implements PayService {
             if (account.getType().equals("COM")) {
                 account.setRoutingFee(routingFee.get("COM"));
             } else {
-                SysAccount perAccount = sysAccountService.getPerAccount(channel, account);
-                if (perAccount != null) {
-                    account.setRoutingMerNo(perAccount.getRoutingMerNo());
-                    if (!account.getCompany().equals("daya")) {
-                        account.setMerNo(perAccount.getRoutingMerNo());
-                    }
-                }
+                //私有账户根据金额切换账户
+//                SysAccount perAccount = sysAccountService.getPerAccount(channel, account);
+//                if (perAccount != null) {
+//                    account.setRoutingMerNo(perAccount.getRoutingMerNo());
+//                    if (!account.getCompany().equals("daya")) {
+//                        account.setMerNo(perAccount.getRoutingMerNo());
+//                    }
+//                }
                 account.setRoutingFee(routingFee.get("PER"));
             }
         }
@@ -273,7 +276,7 @@ public class PayServiceImpl implements PayService {
         Map<String, BigDecimal> routingFee = new HashMap<>(2);
         routingFee.put("COM", BigDecimal.ZERO);
         routingFee.put("PER", BigDecimal.ZERO);
-        if (company.equals("yadie")) {
+        if (company.equals("yaming")) {
             routingFee.put("PER", amount);
             return routingFee;
         }
@@ -323,7 +326,7 @@ public class PayServiceImpl implements PayService {
         Map<String, BigDecimal> routingFee = new HashMap<>(2);
         routingFee.put("COM", BigDecimal.ZERO);
         routingFee.put("PER", BigDecimal.ZERO);
-        if (company.equals("yadie")) {
+        if (company.equals("yaming")) {
             routingFee.put("PER", amount);
             return routingFee;
         }

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

@@ -3018,7 +3018,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 
             Map<String,BigDecimal> routingFee = (Map<String,BigDecimal>)payMap.get("routingFee");
             studentPaymentOrder.setOrganId(practiceGroupBuyParams.getOrganId());
-            studentPaymentOrder.setRoutingOrganId(42);
+            studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
             studentPaymentOrder.setComAmount(routingFee.get("COM"));
             studentPaymentOrder.setPerAmount(routingFee.get("PER"));
             studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
@@ -3385,7 +3385,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
             Map<String,BigDecimal> routingFee = (Map<String,BigDecimal>)payMap.get("routingFee");
             newOrder.setStatus(DealStatusEnum.ING);
             newOrder.setOrganId(practiceGroup.getOrganId());
-            newOrder.setRoutingOrganId(42);
+            newOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
             newOrder.setComAmount(routingFee.get("COM"));
             newOrder.setPerAmount(routingFee.get("PER"));
             newOrder.setMerNos((String) payMap.get("routingMerNos"));

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

@@ -78,9 +78,11 @@ public class StudentCourseHomeworkReplyServiceImpl extends BaseServiceImpl<Long,
 		if(Objects.isNull(studentCourseHomework)){
 			throw new BizException("请指定需要回复的作业");
 		}
-		studentCourseHomeworkService.updateReplyStatus(bean.getUserId(),
-				studentCourseHomework.getCourseHomeworkId(),
-				studentCourseHomework.getUserId());
+		if(Objects.nonNull(studentCourseHomework.getAttachments())){
+			studentCourseHomeworkService.updateReplyStatus(bean.getUserId(),
+					studentCourseHomework.getCourseHomeworkId(),
+					studentCourseHomework.getUserId());
+		}
 
 		CourseSchedule courseSchedule = courseScheduleDao.get(studentCourseHomework.getCourseScheduleId());
 		Map<Integer, String> userMap = new HashMap<>();

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -151,6 +151,17 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	}
 
 	@Override
+	public List<BasicUserDto> queryGroupStudentList(Integer teacherId, String search) {
+		//获取关联的学员列表
+		Set<Integer> studentIds = teacherDao.queryCourseClassStudentIds(teacherId);
+		List<BasicUserDto> teachers = new ArrayList<>();
+		if(studentIds.size() > 0){
+			teachers.addAll(teacherDao.queryTeacherBaseInfo(studentIds,search));
+		}
+		return teachers.stream().distinct().collect(Collectors.toList());
+	}
+
+	@Override
 	public List<BasicUserDto> queryGroupStudents(Integer teacherId, String search) {
 		//获取关联的学员列表
 		Set<Integer> studentIds = teacherDao.queryCourseClassStudentIds(teacherId);

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

@@ -1252,7 +1252,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 			Map<String,BigDecimal> routingFee = (Map<String,BigDecimal>)payMap.get("routingFee");
 			studentPaymentOrder.setOrganId(vipGroup.getOrganId());
-			studentPaymentOrder.setRoutingOrganId(42);
+			studentPaymentOrder.setRoutingOrganId((Integer) payMap.get("routingOrganId"));
 			studentPaymentOrder.setComAmount(routingFee.get("COM"));
 			studentPaymentOrder.setPerAmount(routingFee.get("PER"));
 			studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -428,10 +428,10 @@
         LEFT JOIN vip_group vg ON vg.id_ = cg.music_group_id_ AND cg.group_type_ = 'VIP'
         LEFT JOIN courses_group csg ON csg.id_ = cg.music_group_id_ AND cg.group_type_ = 'COMM'
         WHERE (cgtm.user_id_ = #{userId} OR mg.team_teacher_id_ = #{userId} OR mg.educational_teacher_id_ = #{userId} OR mg.director_user_id_ = #{userId})
-        AND cg.del_flag_ = 0 AND (mg.status_ = 'PROGRESS' OR vg.group_status_ = 2 OR csg.status_ = 'NORMAL')
-        OR (vg.group_status_ = 2 AND vg.educational_teacher_id_ =  #{userId}) OR (csg.status_ = 'NORMAL' AND csg.educational_teacher_id_ =  #{userId})
+        AND cg.del_flag_ = 0 AND ((mg.status_ = 'PROGRESS' OR vg.group_status_ = 2 OR csg.status_ = 'NORMAL')
+        OR (vg.group_status_ = 2 AND vg.educational_teacher_id_ =  #{userId}) OR (csg.status_ = 'NORMAL' AND csg.educational_teacher_id_ =  #{userId}))
         <if test="search != null">
-            AND cg.name_ LIKE CONCAT('%',#{search},'%')
+            AND (cg.name_ LIKE CONCAT('%',#{search},'%') OR cg.group_name_ LIKE CONCAT('%',#{search},'%'))
         </if>
         GROUP BY cg.id_
     </select>

+ 13 - 5
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml

@@ -20,6 +20,7 @@
 		<result column="expect_num_" property="expectNum" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
+		<result column="organ_name_" property="organName" />
 	</resultMap>
 
 	<sql id="queryPageCondition">
@@ -28,16 +29,19 @@
 				and teacher_id_ = #{teacherId}
 			</if>
 			<if test="title != null">
-				and title_ = #{title}
+				and title_ like '%' #{title} '%'
 			</if>
 			<if test="batchNo != null">
 				and batch_no_ = #{batchNo}
 			</if>
+			<if test="organId != null">
+				AND o.id_ = #{organId}
+			</if>
 			<if test="assignStartTime != null">
-				AND ee.create_time_ &gt;= #{assignStartTime}
+				AND date(ee.create_time_) &gt;= #{assignStartTime}
 			</if>
 			<if test="assignEndTime != null">
-				AND ee.create_time_ &lt;= #{assignEndTime}
+				AND date(ee.create_time_) &lt;= #{assignEndTime}
 			</if>
 		</where>
 	</sql>
@@ -108,14 +112,18 @@
 	
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="ExtracurricularExercises" parameterType="map">
-		SELECT ee.*,u.username_ FROM extracurricular_exercises ee left join sys_user u on ee.teacher_id_ = u.id_
+		SELECT ee.*,u.username_,o.name_ organ_name_ FROM extracurricular_exercises ee left join sys_user u on ee.teacher_id_ = u.id_
+		left join teacher t on t.id_ = ee.teacher_id_
+		left join organization o on o.id_ = t.organ_id_
 		<include refid="queryPageCondition"/>
 		ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(ee.id_) FROM extracurricular_exercises ee
+		SELECT COUNT(ee.id_) FROM extracurricular_exercises ee left join sys_user u on ee.teacher_id_ = u.id_
+		left join teacher t on t.id_ = ee.teacher_id_
+		left join organization o on o.id_ = t.organ_id_
 		<include refid="queryPageCondition"/>
 	</select>
 

+ 25 - 8
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesReplyMapper.xml

@@ -19,6 +19,7 @@
 		<result column="status_" property="status" />
 		<result column="is_replied_" property="isReplied" />
 		<result column="is_view_" property="isView" />
+		<result column="organ_name_" property="organName" />
 	</resultMap>
 
 	<resultMap id="ExtraExerciseStudentsDto" type="com.ym.mec.biz.dal.dto.ExtraExerciseStudentsDto" extends="ExtracurricularExercisesReply">
@@ -33,25 +34,37 @@
 	<sql id="queryPageCondition">
 		<where>
 			<if test="extracurricularExercisesId != null">
-				extracurricular_exercises_id_ = #{extracurricularExercisesId}
+				AND extracurricular_exercises_id_ = #{extracurricularExercisesId}
 			</if>
 			<if test="teacherId != null">
-				teacher_id_ = #{teacherId}
+				AND teacher_id_ = #{teacherId}
+			</if>
+			<if test="organId != null">
+				AND o.id_ = #{organId}
 			</if>
 			<if test="studentId != null">
-				user_id_ = #{studentId}
+				AND user_id_ = #{studentId}
 			</if>
 			<if test="title != null">
-				title_ = #{title}
+				AND title_ like '%' #{title} '%'
+			</if>
+			<if test="status != null">
+				AND eer.status_ = #{status}
+			</if>
+			<if test="isReplied != null">
+				AND is_replied_ = #{isReplied}
+			</if>
+			<if test="isView != null">
+				AND is_view_ = #{isView}
 			</if>
 			<if test="search != null">
-				title_ like concat('%',#{search},'%') or u.username_ like concat('%',#{search},'%')
+				AND title_ like concat('%',#{search},'%') or u.username_ like concat('%',#{search},'%')
 			</if>
 			<if test="submitStartTime != null">
-				AND eer.create_time_ &gt;= #{submitStartTime}
+				AND date(eer.create_time_) &gt;= #{submitStartTime}
 			</if>
 			<if test="submitEndTime != null">
-				AND eer.create_time_ &lt;= #{submitEndTime}
+				AND date(eer.create_time_) &lt;= #{submitEndTime}
 			</if>
 		</where>
 	</sql>
@@ -125,8 +138,10 @@
 	
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="ExtracurricularExercisesReply" parameterType="map">
-		SELECT eer.*,u.username_,ee.title_ FROM extracurricular_exercises_reply eer left join extracurricular_exercises ee on eer.extracurricular_exercises_id_ = ee.id_
+		SELECT eer.*,u.username_,ee.title_,o.name_ organ_name_ FROM extracurricular_exercises_reply eer left join extracurricular_exercises ee on eer.extracurricular_exercises_id_ = ee.id_
 		left join sys_user u on eer.user_id_ = u.id_
+		left join teacher t on t.id_ = ee.teacher_id_
+		left join organization o on o.id_ = t.organ_id_
 		<include refid="queryPageCondition"/>
 		 ORDER BY eer.id_ <include refid="global.limit"/>
 	</select>
@@ -135,6 +150,8 @@
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(eer.id_) FROM extracurricular_exercises_reply eer left join extracurricular_exercises ee on eer.extracurricular_exercises_id_ = ee.id_
 		left join sys_user u on eer.user_id_ = u.id_
+		left join teacher t on t.id_ = ee.teacher_id_
+		left join organization o on o.id_ = t.organ_id_
 		<include refid="queryPageCondition"/>
 	</select>
 	

+ 2 - 0
mec-biz/src/main/resources/config/mybatis/SysAccountMapper.xml

@@ -7,6 +7,7 @@
         <result column="company_" jdbcType="VARCHAR" property="company"/>
         <result column="mer_no_" jdbcType="VARCHAR" property="merNo"/>
         <result column="routing_mer_no_" jdbcType="VARCHAR" property="routingMerNo"/>
+        <result column="routing_organ_id_" jdbcType="INTEGER" property="routingOrganId"/>
         <result column="max_receipt_" jdbcType="DECIMAL" property="maxReceipt"/>
         <result column="has_receipt_" jdbcType="DECIMAL" property="hasReceipt"/>
         <result column="channel_" jdbcType="VARCHAR" property="channel"/>
@@ -19,6 +20,7 @@
             company_,
             mer_no_,
             routing_mer_no_,
+            routing_organ_id_,
             max_receipt_,
             has_receipt_,
             channel_,

+ 2 - 2
mec-common/common-core/src/main/java/com/ym/mec/common/filters/EmojiEncodingFilter.java

@@ -32,7 +32,7 @@ public class EmojiEncodingFilter implements Filter {
 				String value = super.getParameter(name);
 				if (StringUtils.isNotBlank(value)) {
 					// 返回值之前 先进行 Emoji 转化
-					return EmojiParser.parseToAliases(value);
+					return EmojiParser.removeAllEmojis(value);
 				}
 				return value;
 			}
@@ -44,7 +44,7 @@ public class EmojiEncodingFilter implements Filter {
 				String[] values = super.getParameterValues(name);
 				if (values != null) {
 					for (int i = 0; i < values.length; i++) {
-						values[i] = EmojiParser.parseToAliases(values[i]);
+						values[i] = EmojiParser.removeAllEmojis(values[i]);
 					}
 				}
 				return values;

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/StudentApplication.java

@@ -42,7 +42,7 @@ public class StudentApplication {
 	 * 注册filter
 	 * @return
 	 */
-	//@Bean
+	@Bean
 	public FilterRegistrationBean<Filter> filterRegistrationBean() {
 		FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<Filter>();
 		// 注入过滤器

+ 1 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java

@@ -42,7 +42,7 @@ public class TeacherApplication {
 	 * 注册filter
 	 * @return
 	 */
-	//@Bean
+	@Bean
 	public FilterRegistrationBean<Filter> filterRegistrationBean() {
 		FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<Filter>();
 		// 注入过滤器

+ 6 - 6
mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseHomeworkController.java

@@ -86,13 +86,13 @@ public class CourseHomeworkController extends BaseController {
     @ApiOperation(value = "获取学生作业界面详细信息-公用")
     @GetMapping(value = "/findCourseHomeworkStudentDetailPublic")
     public Object findCourseHomeworkStudentDetailPublic(Long courseScheduleID,Long userId, boolean extra){
-        StudentCourseHomework studentCourseHomework1 = studentCourseHomeworkService.get(courseScheduleID);
-        if(Objects.isNull(studentCourseHomework1)){
-            return failed("作业不存在");
-        }
         if(!extra){
+            StudentCourseHomework studentCourseHomework1 = studentCourseHomeworkService.get(courseScheduleID);
+            if(Objects.isNull(studentCourseHomework1)){
+                return failed("作业不存在");
+            }
             CourseHomeworkStudentDetailDto courseHomeworkStudentDetail = studentCourseHomeworkService.findCourseHomeworkStudentDetail(studentCourseHomework1.getCourseScheduleId(), userId);
-            if(Objects.nonNull(courseHomeworkStudentDetail)){
+            if(Objects.nonNull(courseHomeworkStudentDetail)&&Objects.nonNull(courseHomeworkStudentDetail.getAttachments())){
                 StudentCourseHomework studentCourseHomework=new StudentCourseHomework();
                 studentCourseHomework.setId(studentCourseHomework1.getId());
                 studentCourseHomework.setIsView(YesOrNoEnum.YES);
@@ -104,7 +104,7 @@ public class CourseHomeworkController extends BaseController {
             if(Objects.isNull(studentExtraExerciseDetail)){
                 return failed("作业不存在");
             }
-            if(Objects.nonNull(studentExtraExerciseDetail.getAttachments())){
+            if(Objects.nonNull(studentExtraExerciseDetail.getAttachments())&&studentExtraExerciseDetail.getStatus().equals(YesOrNoEnum.YES)){
                 ExtracurricularExercisesReply extracurricularExercisesReply=new ExtracurricularExercisesReply();
                 extracurricularExercisesReply.setId(studentExtraExerciseDetail.getCourseHomeworkId());
                 extracurricularExercisesReply.setIsView(1);

+ 10 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java

@@ -126,6 +126,16 @@ public class TeacherController extends BaseController {
         return succeed(teacherService.queryGroupStudents(sysUser.getId(),search));
     }
 
+    @ApiOperation(value = "获取当前教师通讯录学员列表")
+    @GetMapping("/queryGroupStudentList")
+    public Object queryGroupStudentList(String search){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null){
+            return failed("获取用户信息失败");
+        }
+        return succeed(teacherService.queryGroupStudentList(sysUser.getId(),search));
+    }
+
     @ApiOperation(value = "分页查询群公告列表")
     @GetMapping(value = "/queryNoticePage")
     public Object queryNoticePage(QueryInfo queryInfo){

+ 1 - 1
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java

@@ -79,7 +79,7 @@ public class YqPayUtil {
      * @return
      * @throws Exception
      */
-    public static Map<String, Object> getPayMap(BigDecimal amount, String orderNo, String notifyUrl, String returnUrl, String orderSubject, String orderBody, String sellerNo, List<Map> tempRoutingList) throws Exception {
+    public static Map<String, Object> getPayMap(BigDecimal amount, String orderNo, String notifyUrl, String returnUrl, String orderSubject, String orderBody, String sellerNo, List<Map<String, Object>> tempRoutingList) throws Exception {
         Map<String, Object> contentMap = new LinkedHashMap<>();
         contentMap.put("sellerNo", sellerNo); //收款商户号
         contentMap.put("payChannels", payChannels); //支付方式

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

@@ -42,7 +42,7 @@ public class WebApplication {
 	 * 注册filter
 	 * @return
 	 */
-	//@Bean
+	@Bean
 	public FilterRegistrationBean<Filter> filterRegistrationBean() {
 		FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<Filter>();
 		// 注入过滤器