yonge 5 lat temu
rodzic
commit
e98759a58b

+ 0 - 12
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupTeacherSalary.java

@@ -3,21 +3,9 @@ package com.ym.mec.biz.dal.entity;
 import java.math.BigDecimal;
 
 public class ClassGroupTeacherSalary extends ClassGroupTeacherMapper {
-    /**
-     * 课时长
-     */
-    private Integer duration;
     
     private BigDecimal onlineClassesSalary;
 
-    public Integer getDuration() {
-        return duration;
-    }
-
-    public void setDuration(Integer duration) {
-        this.duration = duration;
-    }
-
 	public BigDecimal getOnlineClassesSalary() {
 		return onlineClassesSalary;
 	}

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

@@ -176,7 +176,7 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
      * @return void
      * @describe 退课申请审核
      */
-    void applyRefundAudit(Long id,AuditStatusEnum status,String remark);
+    void applyRefundAudit(Long id,AuditStatusEnum status,String remark,BigDecimal amount);
 
     /**
      * @Author: Joburgess

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

@@ -711,7 +711,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 	@Transactional(rollbackFor = Exception.class)
 	@Override
-	public void applyRefundAudit(Long id, AuditStatusEnum status, String remark) {
+	public void applyRefundAudit(Long id, AuditStatusEnum status, String remark,BigDecimal amount) {
 
 		StudentApplyRefunds studentApplyRefunds = studentApplyRefundsDao.get(id);
 		if (studentApplyRefunds == null) {
@@ -725,7 +725,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		studentApplyRefunds.setStatus(status);
 		if (studentApplyRefunds.getStatus() == AuditStatusEnum.PASS) {
-			studentApplyRefunds.setActualAmount(studentApplyRefunds.getExpectAmount());
+			studentApplyRefunds.setActualAmount(amount);
 		} else {
 			studentApplyRefunds.setActualAmount(new BigDecimal(0));
 		}
@@ -739,7 +739,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			sysUserCashAccountDetail.setUserId(studentApplyRefunds.getUserId());
 			sysUserCashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.REFUNDS);
 			sysUserCashAccountDetail.setStatus(DealStatusEnum.SUCCESS);
-			sysUserCashAccountDetail.setAmount(studentApplyRefunds.getActualAmount());
+			sysUserCashAccountDetail.setAmount(amount);
 			sysUserCashAccountDetail.setBalance(sysUserCashAccount.getBalance());
 			sysUserCashAccountDetail.setAttribute(studentApplyRefunds.getId().toString());
 			sysUserCashAccountDetailDao.insert(sysUserCashAccountDetail);

+ 0 - 10
mec-biz/src/main/resources/config/mybatis/ClassGroupTeacherSalaryMapper.xml

@@ -7,7 +7,6 @@
     <result column="class_group_id_" jdbcType="INTEGER" property="classGroupId" />
     <result column="teacher_role_" jdbcType="VARCHAR" property="teacherRole" />
     <result column="user_id_" jdbcType="INTEGER" property="userId" />
-    <result column="duration_" jdbcType="INTEGER" property="duration" />
     <result column="salary_" jdbcType="DECIMAL" property="salary" />
     <result column="online_classes_salary_" jdbcType="DECIMAL" property="onlineClassesSalary" />
     <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
@@ -36,9 +35,6 @@
       <if test="userId != null">
         user_id_,
       </if>
-      <if test="duration != null">
-        duration_,
-      </if>
       <if test="salary != null">
         salary_,
       </if>
@@ -65,9 +61,6 @@
       <if test="userId != null">
         #{userId,jdbcType=INTEGER},
       </if>
-      <if test="duration != null">
-        #{duration,jdbcType=INTEGER},
-      </if>
       <if test="salary != null">
         #{salary,jdbcType=DECIMAL},
       </if>
@@ -98,9 +91,6 @@
       <if test="userId != null">
         user_id_ = #{userId,jdbcType=INTEGER},
       </if>
-      <if test="duration != null">
-        duration_ = #{duration,jdbcType=INTEGER},
-      </if>
       <if test="salary != null">
         salary_ = #{salary,jdbcType=DECIMAL},
       </if>

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

@@ -103,10 +103,10 @@
 		SELECT count(1) FROM student_apply_refunds sar left join student_payment_order spo on sar.orig_payment_order_id_ = spo.id_ 
 		where 1=1 
         <if test="startTime != null">
-            and sar.create_time_ = #{startTime}
+            and sar.create_time_ &gt;= #{startTime}
         </if>
         <if test="endTime != null">
-            and sar.create_time_ = #{endTime}
+            and sar.create_time_ &lt;= #{endTime}
         </if>
 	</select>
 </mapper>

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

@@ -159,10 +159,10 @@
     <sql id="queryPaymentOrder">
         <where>
             <if test="orderStartDate != null">
-                AND spo.pay_time_ &gt;= #{orderStartDate}
+                AND spo.create_time_ &gt;= #{orderStartDate}
             </if>
             <if test="orderEndDate != null">
-                AND spo.pay_time_ &lt;= #{orderEndDate}
+                AND spo.create_time_ &lt;= #{orderEndDate}
             </if>
             <if test="paymentType != null">
                 AND spo.type_ = #{paymentType}

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

@@ -14,14 +14,17 @@ import com.ym.mec.biz.dal.page.VipGroupTeachingRecordQueryInfo;
 import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
+
 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.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -95,10 +98,10 @@ public class VipGroupManageController extends BaseController {
     @ApiOperation(value = "退课申请审核")
     @PostMapping("/applyRefundAudit")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/applyRefundAudit')")
-	public Object applyRefundAudit(Long id, AuditStatusEnum status, String remark) {
-		vipGroupService.applyRefundAudit(id, status, remark);
-        return succeed();
-    }
+	public Object applyRefundAudit(Long id, AuditStatusEnum status, String remark, BigDecimal amount) {
+		vipGroupService.applyRefundAudit(id, status, remark, amount);
+		return succeed();
+	}
 
     @ApiOperation(value = "获取VIP课教学记录")
     @GetMapping("/findVipGroupTeachingRecord")