瀏覽代碼

课表详情bug修改,登录新增register参数,零星收费修改

zouxuan 5 年之前
父節點
當前提交
2850fafd2f

+ 3 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/filter/PhoneLoginAuthenticationFilter.java

@@ -25,6 +25,7 @@ public class PhoneLoginAuthenticationFilter extends AbstractAuthenticationProces
 	private static final String SPRING_SECURITY_RESTFUL_PHONE_KEY = "phone";
 	private static final String SPRING_SECURITY_RESTFUL_VERIFY_CODE_KEY = "smsCode";
 	private static final String clientIdParameter = "clientId";
+	private static final String IS_REGISTER_PARAMETER = "register";
 
 	private static final String SPRING_SECURITY_RESTFUL_LOGIN_URL = "/smsLogin";
 	private boolean postOnly = true;
@@ -45,12 +46,13 @@ public class PhoneLoginAuthenticationFilter extends AbstractAuthenticationProces
 		// 手机验证码登陆
 		String principal = obtainParameter(request, SPRING_SECURITY_RESTFUL_PHONE_KEY);
 		String credentials = obtainParameter(request, SPRING_SECURITY_RESTFUL_VERIFY_CODE_KEY);
+		String isRegister = obtainParameter(request, IS_REGISTER_PARAMETER);
 
 		SysUserInfo userInfo = sysUserService.queryUserInfoByPhone(principal);
 
 		String clientId = request.getParameter(clientIdParameter);
 		if (userInfo == null) {
-			userInfo = sysUserService.initUser(principal,clientId);
+			userInfo = sysUserService.initUser(principal,clientId,isRegister);
 		}
 	
 		if (userInfo.getSysUser().getUserType() != SysUserType.SYSTEM && !StringUtils.equalsIgnoreCase(clientId, userInfo.getSysUser().getUserType().getCode())) {

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/SysUserService.java

@@ -82,5 +82,5 @@ public interface SysUserService extends BaseService<Integer, SysUser> {
 	 * @param clientId
 	 * @return
 	 */
-	SysUserInfo initUser(String phone,String clientId);
+	SysUserInfo initUser(String phone,String clientId,String isRegister);
 }

+ 4 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserServiceImpl.java

@@ -147,7 +147,10 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
 
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public SysUserInfo initUser(String phone, String clientId) {
+	public SysUserInfo initUser(String phone, String clientId,String isRegister) {
+		if("register".equals(isRegister)){
+			return null;
+		}
 		if(autoRegister){
 			if(StringUtils.equalsIgnoreCase(clientId,"STUDENT")){
 				SysUser sysUser = new SysUser();

+ 46 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/UpdateStudentFeeDto.java

@@ -0,0 +1,46 @@
+package com.ym.mec.biz.dal.dto;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public class UpdateStudentFeeDto {
+    private Integer studentId;
+
+    private List<Integer> month;
+
+    private Integer isLock;
+
+    private BigDecimal amount;
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public List<Integer> getMonth() {
+        return month;
+    }
+
+    public void setMonth(List<Integer> month) {
+        this.month = month;
+    }
+
+    public Integer getIsLock() {
+        return isLock;
+    }
+
+    public void setIsLock(Integer isLock) {
+        this.isLock = isLock;
+    }
+
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+}

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupStudentFeeService.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.service;
 
+import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
 import com.ym.mec.common.service.BaseService;
 
@@ -11,4 +12,9 @@ public interface MusicGroupStudentFeeService extends BaseService<Long, MusicGrou
 	 */
 	boolean refreshPaymentFeeStatus();
 
+	/**
+	 * 修改学员的缴费金额和缴费周期
+	 * @param studentFeeDto
+	 */
+    void updateStudentFee(UpdateStudentFeeDto studentFeeDto);
 }

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

@@ -80,7 +80,6 @@ public interface StudentPaymentOrderService extends BaseService<Long, StudentPay
 	 */
 	Integer findOrderByGroupType(Integer userId, Integer sporadicId, String sporadic, DealStatusEnum status);
 
-
 	List<StudentPaymentOrderExportDto> ExportQueryPage(Map<String, Object> params);
 
 	/**

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupStudentFeeServiceImpl.java

@@ -6,6 +6,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -80,4 +81,9 @@ public class MusicGroupStudentFeeServiceImpl extends BaseServiceImpl<Long, Music
 		return true;
 	}
 
+	@Override
+	public void updateStudentFee(UpdateStudentFeeDto studentFeeDto) {
+
+	}
+
 }

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

@@ -541,7 +541,7 @@
 
     <sql id="queryMusicGroupCourseScheduleSql">
         <where>
-            cg.group_type_ = 'MUSIC' AND cs.del_flag_ = 0
+            cs.group_type_ = 'MUSIC' AND cs.del_flag_ = 0
             <if test="startTime != null">
                 AND cs.class_date_ &gt;= #{startTime}
             </if>
@@ -556,7 +556,7 @@
 
     <sql id="queryMusicGroupCourseScheduleDetailSql">
         <where>
-            (ta.teacher_id_ = cs.actual_teacher_id_ OR ta.id_ IS NULL) AND cg.group_type_ = 'MUSIC' AND cs.del_flag_ = 0
+            (ta.teacher_id_ = cs.actual_teacher_id_ OR ta.id_ IS NULL) AND cs.group_type_ = 'MUSIC' AND cs.del_flag_ = 0
             <if test="classScheduleType != null">
                 AND cs.type_ = #{classScheduleType}
             </if>

+ 6 - 0
mec-web/src/main/java/com/ym/mec/web/controller/SporadicChargeInfoController.java

@@ -73,6 +73,12 @@ public class SporadicChargeInfoController extends BaseController {
 			return failed("用户信息获取失败");
 		}
 		sporadicChargeInfo.setOperatorId(sysUser.getId());
+		if(sporadicChargeInfo.getUserId() != null){
+			SysUser user = sysUserFeignService.queryUserById(sporadicChargeInfo.getUserId());
+			if(user == null){
+				return failed("学员信息不存在");
+			}
+		}
 		return succeed(sporadicChargeInfoService.insert(sporadicChargeInfo));
 	}
 

+ 25 - 25
mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -1,37 +1,24 @@
 package com.ym.mec.web.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.EmployeeDao;
+import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import com.ym.mec.biz.dal.entity.Employee;
-import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
-import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
-import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
-import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
-import com.ym.mec.biz.dal.page.StudentManageVipClassQueryInfo;
-import com.ym.mec.biz.dal.page.StudentSignQueryInfo;
-import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
+import com.ym.mec.biz.dal.page.*;
+import com.ym.mec.biz.service.MusicGroupStudentFeeService;
 import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.*;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
 
 @Api(tags = "学生管理")
 @RequestMapping("studentManage")
@@ -45,6 +32,8 @@ public class StudentManageController extends BaseController {
     @Autowired
     private StudentRegistrationService studentRegistrationService;
     @Autowired
+    private MusicGroupStudentFeeService musicGroupStudentFeeService;
+    @Autowired
     private EmployeeDao employeeDao;
 
     @ApiOperation(value = "获取学生列表")
@@ -192,4 +181,15 @@ public class StudentManageController extends BaseController {
     public Object queryUserByPhone(String mobile) {
         return succeed(studentRegistrationService.queryUserByPhone(mobile));
     }
+
+    /**
+     * 修改学员缴费金额和缴费周期
+     * @return
+     */
+    @GetMapping(value = "/updateStudentFee")
+    @PreAuthorize("@pcs.hasPermissions('studentManage/updateStudentFee')")
+    public Object updateStudentFee(@RequestBody UpdateStudentFeeDto studentFeeDto) {
+        musicGroupStudentFeeService.updateStudentFee(studentFeeDto);
+        return succeed();
+    }
 }