yanite 3 年 前
コミット
ac2db4c34a

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java

@@ -324,7 +324,7 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
      *
      * @return
      */
-    List<StudentRegisterPerDto> queryStudentPer1(String month);
+    List<StudentRegisterPerDto> queryStudentPer1(@Param("teantId") Integer tenantId, @Param("month")String month);
 
     /**
      * 获取乐团报名信息和学校信息

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

@@ -159,7 +159,7 @@ public interface StudentManageService {
      * 获取激活比例
      * @return
      */
-    List<StudentRegisterPerDto> queryStudentPer();
+    List<StudentRegisterPerDto> queryStudentPer(Integer tenantId);
 
     /**
      * 获取有课没有激活的列表(变更为所有有课学生)

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

@@ -115,7 +115,10 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 				throw new BizException("员工已存在");
 			}
 		}
-		employee.setPassword(new BCryptPasswordEncoder().encode(ParamEnum.INIT_PASSWORD.getCode().toString()));
+		// 修改 gym + 联系人手机后4位
+		int phoneStrLen = employee.getPhone().length();
+		employee.setPassword(new BCryptPasswordEncoder().encode("gym" + employee.getPhone().substring(phoneStrLen - 4, phoneStrLen)));
+		// employee.setPassword(new BCryptPasswordEncoder().encode(ParamEnum.INIT_PASSWORD.getCode().toString()));
 		employee.setUserType("SYSTEM");
 		teacherDao.addSysUser(employee);
 		employee.setUserId(employee.getId());

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

@@ -760,9 +760,9 @@ public class StudentManageServiceImpl implements StudentManageService {
     }
 
     @Override
-    public List<StudentRegisterPerDto> queryStudentPer() {
+    public List<StudentRegisterPerDto> queryStudentPer(Integer tenantId) {
         String format = DateUtil.format(DateUtil.addDays(new Date(), -1), DateUtil.ISO_EXPANDED_DATE_FORMAT);
-        return studentRegistrationDao.queryStudentPer1(format);
+        return studentRegistrationDao.queryStudentPer1(tenantId, format);
     }
 
     @Override

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -909,7 +909,7 @@
         SELECT o.name_ organ_name_, md.total_num_ student_num_, md.activate_num_ per_num_, md.percent_ per_
         FROM index_base_month_data md
         LEFT JOIN organization o ON o.id_ = md.organ_id_
-        WHERE data_type_ = 'ACTIVATION_RATE'
+        WHERE data_type_ = 'ACTIVATION_RATE' and md.tenant_id_ = #{tenantId}
         AND month_ = #{month}
         ORDER BY md.percent_ DESC, o.id_
     </select>

+ 4 - 7
mec-student/src/main/java/com/ym/mec/student/controller/StudentManageController.java

@@ -16,10 +16,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
@@ -319,9 +316,9 @@ public class StudentManageController extends BaseController {
      * 学员注册激活比例列表
      * @return
      */
-    @GetMapping(value = "studentManage/queryStudentPer")
-    public Object queryStudentPer() {
-        return succeed(studentManageService.queryStudentPer());
+    @GetMapping(value = "studentManage/queryStudentPer/{tenantId}")
+    public Object queryStudentPer(@ApiParam(value = "机构Id", required = true) @PathVariable("tenantId") Integer tenantId) {
+        return succeed(studentManageService.queryStudentPer(tenantId));
     }