Browse Source

老师管理页面接口编写,学生管理代码生成

weifanli 3 years ago
parent
commit
264e913027
48 changed files with 2254 additions and 121 deletions
  1. 13 5
      cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/SysUserFeignService.java
  2. 13 1
      cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/fallback/SysUserFeignServiceFallback.java
  3. 1 1
      cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/dto/RealnameAuthReq.java
  4. 0 3
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/config/ResourceServerConfig.java
  5. 0 1
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java
  6. 6 7
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/web/controller/UserController.java
  7. 6 2
      cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysUserMapper.xml
  8. 9 34
      cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/TeacherController.java
  9. 5 0
      cooleshow-user/user-biz/pom.xml
  10. 16 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentAttendanceDao.java
  11. 16 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentCourseHomeworkDao.java
  12. 16 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentDao.java
  13. 16 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentStarDao.java
  14. 12 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/TeacherDao.java
  15. 16 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/VipCardRecordDao.java
  16. 99 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/req/TeacherSubmitReq.java
  17. 32 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/TeacherSearch.java
  18. 174 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Student.java
  19. 169 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/StudentAttendance.java
  20. 197 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/StudentCourseHomework.java
  21. 69 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/StudentStar.java
  22. 18 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Teacher.java
  23. 154 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/VipCardRecord.java
  24. 27 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/TeacherTypeEnum.java
  25. 21 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentAttendanceService.java
  26. 21 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentCourseHomeworkService.java
  27. 21 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentService.java
  28. 21 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentStarService.java
  29. 20 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TeacherService.java
  30. 21 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VipCardRecordService.java
  31. 22 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentAttendanceServiceImpl.java
  32. 22 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentCourseHomeworkServiceImpl.java
  33. 22 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java
  34. 22 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentStarServiceImpl.java
  35. 138 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java
  36. 22 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VipCardRecordServiceImpl.java
  37. 31 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherVo.java
  38. 35 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml
  39. 39 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentCourseHomeworkMapper.xml
  40. 37 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml
  41. 23 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentStarMapper.xml
  42. 99 62
      cooleshow-user/user-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  43. 33 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/VipCardRecordMapper.xml
  44. 100 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentAttendanceController.java
  45. 100 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentController.java
  46. 100 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentCourseHomeworkController.java
  47. 100 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentStarController.java
  48. 100 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/VipCardRecordController.java

+ 13 - 5
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/SysUserFeignService.java

@@ -2,18 +2,20 @@ package com.yonge.cooleshow.auth.api.client;
 
 import java.util.List;
 
+import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
+import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
 
 import com.yonge.cooleshow.auth.api.client.fallback.SysUserFeignServiceFallback;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.common.config.FeignConfiguration;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 
+import javax.validation.Valid;
+
 @FeignClient(contextId = "sysUserFeignService", name = "auth-server", configuration = { FeignConfiguration.class }, fallback = SysUserFeignServiceFallback.class)
 public interface SysUserFeignService {
 
@@ -24,7 +26,10 @@ public interface SysUserFeignService {
 	public SysUser queryUserByMobile(@RequestParam("mobile") String mobile);
 
 	@PostMapping(value = "user/add", consumes = MediaType.APPLICATION_JSON_VALUE)
-	public HttpResponseResult<Integer> addUser(SysUser user);
+	public HttpResponseResult<Integer> add(SysUser user);
+
+	@PostMapping(value = "user/update", consumes = MediaType.APPLICATION_JSON_VALUE)
+	public HttpResponseResult<Integer> update(SysUser user);
 
 	@GetMapping(value = "queryUserInfo")
 	public SysUser queryUserInfo();
@@ -37,4 +42,7 @@ public interface SysUserFeignService {
 
 	@PostMapping(value = "exit/{clientId}/{phone}", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
 	public HttpResponseResult<String> exitByPhone(@PathVariable("clientId") String clientId, @PathVariable("phone") String phone);
+
+	@PostMapping(value = "user/realNameAuth", consumes = MediaType.APPLICATION_JSON_VALUE)
+	public HttpResponseResult<IdcardInfoExtractor> realNameAuth(RealnameAuthReq realNameAuthDto);
 }

+ 13 - 1
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/fallback/SysUserFeignServiceFallback.java

@@ -2,6 +2,8 @@ package com.yonge.cooleshow.auth.api.client.fallback;
 
 import java.util.List;
 
+import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
+import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
 import org.springframework.stereotype.Component;
 
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
@@ -26,7 +28,12 @@ public class SysUserFeignServiceFallback implements SysUserFeignService {
 		return null;
 	}
 
-	public HttpResponseResult<Integer> addUser(SysUser user){
+	public HttpResponseResult<Integer> add(SysUser user){
+		return null;
+	}
+
+	@Override
+	public HttpResponseResult<Integer> update(SysUser user) {
 		return null;
 	}
 
@@ -44,4 +51,9 @@ public class SysUserFeignServiceFallback implements SysUserFeignService {
 	public HttpResponseResult<String> exitByPhone(String clientId, String phone) {
 		return null;
 	}
+
+	@Override
+	public HttpResponseResult<IdcardInfoExtractor> realNameAuth(RealnameAuthReq realNameAuthDto) {
+		return null;
+	}
 }

+ 1 - 1
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/dto/RealnameAuthReq.java

@@ -24,7 +24,7 @@ public class RealnameAuthReq implements Serializable {
     @ApiModelProperty(value = "用户身份证号", required = true)
     private String idCardNo;
 
-    @NotNull(message = "是否修改用户信息")
+    @NotNull(message = "缺少是否修改用户信息")
     @ApiModelProperty(value = "是否修改用户信息", required = true)
     private Boolean isSave;
 

+ 0 - 3
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/config/ResourceServerConfig.java

@@ -32,9 +32,6 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 				"/user/noAuth/queryUserByPhone",
 				"/user/queryUserByPhone",
 				"/user/add",
-				"/user/updatePasswordByOldPassword",
-				"/user/updatePhone",
-				"/user/realNameAuth",
 				"/user/queryUserById/*").hasIpAddress("0.0.0.0/0")
 				.anyRequest().authenticated().and().httpBasic();
 	}

+ 0 - 1
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java

@@ -121,7 +121,6 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
     @Override
     public Long add(SysUser sysUser) {
         sysUserDao.insert(sysUser);
-        sysUserDao.update(sysUser);
         return sysUser.getId();
     }
 

+ 6 - 7
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/web/controller/UserController.java

@@ -370,7 +370,7 @@ public class UserController extends BaseController {
     @ResponseBody
     public HttpResponseResult<IdcardInfoExtractor> realNameAuth(@Valid @RequestBody RealnameAuthReq realNameAuthDto) {
         AuthUser authUser = SecurityUtils.getUser();
-        if (authUser != null) {
+        if (authUser == null) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
         SysUser user = sysUserService.get(authUser.getUserId());
@@ -386,14 +386,13 @@ public class UserController extends BaseController {
         //通过身份证号获取身份信息
         IdcardInfoExtractor idcardInfoExtractor = new IdcardInfoExtractor(realNameAuthDto.getIdCardNo(), validatedAllIdcard);
         boolean verify = realnameAuthenticationPlugin.verify(realNameAuthDto.getRealName(), realNameAuthDto.getIdCardNo());
-        if (verify && realNameAuthDto.getSave()) {
+        if (!verify) {
+            return failed("未通过实名认证");
+        }
+        if (realNameAuthDto.getSave()) {
             //实名认证通过后立刻保存
             sysUserService.updateUserCard(realNameAuthDto, idcardInfoExtractor);
-            return succeed(idcardInfoExtractor);
-        } else {
-            return failed("未通过实名认证");
         }
+        return succeed(idcardInfoExtractor);
     }
-
-
 }

+ 6 - 2
cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -60,9 +60,13 @@
     <insert id="insert" parameterType="com.yonge.cooleshow.auth.api.entity.SysUser" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
         INSERT INTO sys_user
-        (is_super_admin_,im_token_,id_,username_,salt_,phone_,avatar_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,
+        (
+        <if test="id != null">id_, </if>
+        is_super_admin_,im_token_,id_,username_,salt_,phone_,avatar_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,
         gender_,nation_,birthdate_,email_,id_card_no_,wechat_id_,real_name_,certificate_type_)
-        VALUES(#{isSuperAdmin},#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},now(),now(),#{wxOpenid},#{qqOpenid},#{userType},
+        VALUES(
+        <if test="id != null">#{id}, </if>
+        #{isSuperAdmin},#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},now(),now(),#{wxOpenid},#{qqOpenid},#{userType},
         #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName},#{certificateType})
     </insert>
     <insert id="insertTeacher">

+ 9 - 34
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/TeacherController.java

@@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dao.SubjectDao;
+import com.yonge.cooleshow.biz.dal.dto.req.TeacherSubmitReq;
+import com.yonge.cooleshow.biz.dal.dto.search.TeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.service.TeacherService;
 import com.yonge.cooleshow.biz.dal.support.Condition;
 import com.yonge.cooleshow.biz.dal.support.Query;
 import com.yonge.cooleshow.biz.dal.vo.TeacherHomeVo;
+import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.toolset.utils.string.StringUtil;
@@ -35,56 +38,28 @@ public class TeacherController extends BaseController {
      */
     @GetMapping("/detail")
     @ApiOperation(value = "详情", notes = "传入teacher")
-    public HttpResponseResult<Teacher> detail(Teacher teacher) {
-        Teacher detail = teacherService.getOne(Condition.getQueryWrapper(teacher));
+    public HttpResponseResult<TeacherVo> detail(Teacher teacher) {
+        TeacherVo detail = teacherService.detail(teacher.getUserId());
         return succeed(detail);
     }
 
     /**
-     * 查询集合
-     */
-    @GetMapping("/list")
-    @ApiOperation(value = "查询集合", notes = "传入teacher")
-    public HttpResponseResult<List<Teacher>> list(Teacher teacher) {
-        List<Teacher> list = teacherService.list();
-        return succeed(list);
-    }
-
-    /**
      * 查询分页
      */
     @GetMapping("/page")
     @ApiOperation(value = "查询分页", notes = "传入teacher")
-    public HttpResponseResult<IPage<Teacher>> page(Teacher teacher, Query query) {
-        IPage<Teacher> pages = teacherService.selectPage(Condition.getPage(query), teacher);
+    public HttpResponseResult<IPage<TeacherVo>> page(TeacherSearch teacher, Query query) {
+        IPage<TeacherVo> pages = teacherService.selectPage(Condition.getPage(query), teacher);
         return succeed(pages);
     }
 
     /**
-     * 新增
-     */
-    @PostMapping("/save")
-    @ApiOperation(value = "新增", notes = "传入teacher")
-    public HttpResponseResult save(@Valid @RequestBody Teacher teacher) {
-        return status(teacherService.save(teacher));
-    }
-
-    /**
-     * 修改
-     */
-    @PostMapping("/update")
-    @ApiOperation(value = "修改", notes = "传入teacher")
-    public HttpResponseResult update(@Valid @RequestBody Teacher teacher) {
-        return status(teacherService.updateById(teacher));
-    }
-
-    /**
      * 新增或修改
      */
     @PostMapping("/submit")
     @ApiOperation(value = "新增或修改", notes = "传入teacher")
-    public HttpResponseResult submit(@RequestBody Teacher teacher) {
-        return status(teacherService.saveOrUpdate(teacher));
+    public HttpResponseResult<Boolean> submit(@RequestBody TeacherSubmitReq teacherSubmitReq) {
+        return teacherService.submit(teacherSubmitReq);
     }
 
     /**

+ 5 - 0
cooleshow-user/user-biz/pom.xml

@@ -56,6 +56,11 @@
             <version>${redisson.version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.yonge.cooleshow</groupId>
+            <artifactId>auth-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 16 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentAttendanceDao.java

@@ -0,0 +1,16 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.biz.dal.entity.StudentAttendance;
+
+public interface StudentAttendanceDao extends BaseMapper<StudentAttendance>{
+
+	/**
+	 * 自定义分页
+	 */
+	List<StudentAttendance> selectPage(IPage page, StudentAttendance studentAttendance);
+	
+}

+ 16 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentCourseHomeworkDao.java

@@ -0,0 +1,16 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.biz.dal.entity.StudentCourseHomework;
+
+public interface StudentCourseHomeworkDao extends BaseMapper<StudentCourseHomework>{
+
+	/**
+	 * 自定义分页
+	 */
+	List<StudentCourseHomework> selectPage(IPage page, StudentCourseHomework studentCourseHomework);
+	
+}

+ 16 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentDao.java

@@ -0,0 +1,16 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.biz.dal.entity.Student;
+
+public interface StudentDao extends BaseMapper<Student>{
+
+	/**
+	 * 自定义分页
+	 */
+	List<Student> selectPage(IPage page, Student student);
+	
+}

+ 16 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentStarDao.java

@@ -0,0 +1,16 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.biz.dal.entity.StudentStar;
+
+public interface StudentStarDao extends BaseMapper<StudentStar>{
+
+	/**
+	 * 自定义分页
+	 */
+	List<StudentStar> selectPage(IPage page, StudentStar studentStar);
+	
+}

+ 12 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/TeacherDao.java

@@ -4,10 +4,13 @@ import java.util.List;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dto.BasicUserInfo;
 import com.yonge.cooleshow.biz.dal.dto.req.TeacherSetReq;
+import com.yonge.cooleshow.biz.dal.dto.search.TeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
+import io.swagger.models.auth.In;
 import org.apache.ibatis.annotations.Param;
 
 public interface TeacherDao extends BaseMapper<Teacher> {
@@ -15,7 +18,7 @@ public interface TeacherDao extends BaseMapper<Teacher> {
     /**
      * 自定义分页
      */
-    List<Teacher> selectPage(@Param("page") IPage page, @Param("param") Teacher teacher);
+    List<TeacherVo> selectPage(@Param("page") IPage page, @Param("param") TeacherSearch teacher);
 
     /***
      * 查询老师设置详情
@@ -42,4 +45,12 @@ public interface TeacherDao extends BaseMapper<Teacher> {
     * @date 2022/3/22 13:52
     */
     BasicUserInfo getBasicUserInfo(@Param("userId") Long userId);
+    /***
+     * 查询老师详情
+     * @author liweifan
+     * @param: id
+     * @updateTime 2022/3/23 17:50
+     * @return: com.yonge.cooleshow.biz.dal.vo.TeacherVo
+     */
+    TeacherVo detail(@Param("userId") Long userId);
 }

+ 16 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/VipCardRecordDao.java

@@ -0,0 +1,16 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.biz.dal.entity.VipCardRecord;
+
+public interface VipCardRecordDao extends BaseMapper<VipCardRecord>{
+
+	/**
+	 * 自定义分页
+	 */
+	List<VipCardRecord> selectPage(IPage page, VipCardRecord vipCardRecord);
+	
+}

+ 99 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/req/TeacherSubmitReq.java

@@ -0,0 +1,99 @@
+package com.yonge.cooleshow.biz.dal.dto.req;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author: liweifan
+ * @Data: 2022/3/18 14:56
+ */
+@ApiModel(value = "TeacherSubmitReq对象", description = "新增/修改老师对象")
+public class TeacherSubmitReq implements Serializable {
+
+    @ApiModelProperty(value = "用户id")
+    private Long userId;
+
+    @ApiModelProperty(value = "老师昵称", required = true)
+    private String username;
+
+    @NotBlank(message = "手机号不能为空")
+    @ApiModelProperty(value = "手机号",required = false)
+    private String phone;
+
+    @NotBlank(message = "用户真实姓名不能为空")
+    @ApiModelProperty(value = "用户真实姓名", required = true)
+    private String realName;
+
+    @NotBlank(message = "用户身份证号不能为空")
+    @ApiModelProperty(value = "用户身份证号", required = true)
+    private String idCardNo;
+
+    @NotBlank(message = "老师类型不能为空")
+    @ApiModelProperty(value = "老师类型 tourist 游客 entry 认证老师 musician 音乐人 ", required = true)
+    private String teacherType;
+
+    @NotBlank(message = "专业技能不能为空")
+    @ApiModelProperty(value = "专业技能(支持多个,用逗号分隔),对应乐器表id ", required = true)
+    private String subjectId;
+
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+
+    public String getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(String subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public String getRealName() {
+        return realName;
+    }
+
+    public void setRealName(String realName) {
+        this.realName = realName;
+    }
+
+    public String getIdCardNo() {
+        return idCardNo;
+    }
+
+    public void setIdCardNo(String idCardNo) {
+        this.idCardNo = idCardNo;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getTeacherType() {
+        return teacherType;
+    }
+
+    public void setTeacherType(String teacherType) {
+        this.teacherType = teacherType;
+    }
+}

+ 32 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/TeacherSearch.java

@@ -0,0 +1,32 @@
+package com.yonge.cooleshow.biz.dal.dto.search;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Author: liweifan
+ * @Data: 2022/3/21 15:26
+ */
+@ApiModel(value = "TeacherSearch", description = "老师管理查询")
+public class TeacherSearch {
+    @ApiModelProperty(value = "老师编号/昵称/电话")
+    private String search;
+    @ApiModelProperty(value = "老师类型")
+    private String teacherType;
+
+    public String getSearch() {
+        return search;
+    }
+
+    public void setSearch(String search) {
+        this.search = search;
+    }
+
+    public String getTeacherType() {
+        return teacherType;
+    }
+
+    public void setTeacherType(String teacherType) {
+        this.teacherType = teacherType;
+    }
+}

+ 174 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Student.java

@@ -0,0 +1,174 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 学生表
+ */
+@TableName("student")
+@ApiModel(value = "Student对象", description = "学生表")
+public class Student implements Serializable {
+	private static final long serialVersionUID = 1L;
+    @TableId(value = "user_id_", type = IdType.AUTO)
+    private Long userId;
+    /** 
+    * 学员声部 
+    */
+    @ApiModelProperty("学员声部 ")
+	@TableField(value = "subject_id_list_")
+    private String subjectIdList;
+    /** 
+    * 年级 
+    */
+    @ApiModelProperty("年级 ")
+	@TableField(value = "current_grade_num_")
+    private Integer currentGradeNum;
+    /** 
+    * 会员等级 
+    */
+    @ApiModelProperty("会员等级 ")
+	@TableField(value = "member_rank_setting_id_")
+    private Long memberRankSettingId;
+    /** 
+    * 有效期开始时间 
+    */
+    @ApiModelProperty("有效期开始时间 ")
+	@TableField(value = "membership_start_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date membershipStartTime;
+    /** 
+    * 有效期结束时间 
+    */
+    @ApiModelProperty("有效期结束时间 ")
+	@TableField(value = "membership_end_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date membershipEndTime;
+    /** 
+    * 云教练连续使用天数 
+    */
+    @ApiModelProperty("云教练连续使用天数 ")
+	@TableField(value = "cloud_study_sequence_days_")
+    private Integer cloudStudySequenceDays;
+    /** 
+    * 云教练最后使用日期 
+    */
+    @ApiModelProperty("云教练最后使用日期 ")
+	@TableField(value = "cloud_study_use_last_day_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date cloudStudyUseLastDay;
+	@TableField(value = "create_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date createTime;
+	@TableField(value = "update_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date updateTime;
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getSubjectIdList() {
+        return subjectIdList;
+    }
+
+    public void setSubjectIdList(String subjectIdList) {
+        this.subjectIdList = subjectIdList;
+    }
+
+    public Integer getCurrentGradeNum() {
+        return currentGradeNum;
+    }
+
+    public void setCurrentGradeNum(Integer currentGradeNum) {
+        this.currentGradeNum = currentGradeNum;
+    }
+
+    public Long getMemberRankSettingId() {
+        return memberRankSettingId;
+    }
+
+    public void setMemberRankSettingId(Long memberRankSettingId) {
+        this.memberRankSettingId = memberRankSettingId;
+    }
+
+    public Date getMembershipStartTime() {
+        return membershipStartTime;
+    }
+
+    public void setMembershipStartTime(Date membershipStartTime) {
+        this.membershipStartTime = membershipStartTime;
+    }
+
+    public Date getMembershipEndTime() {
+        return membershipEndTime;
+    }
+
+    public void setMembershipEndTime(Date membershipEndTime) {
+        this.membershipEndTime = membershipEndTime;
+    }
+
+    public Integer getCloudStudySequenceDays() {
+        return cloudStudySequenceDays;
+    }
+
+    public void setCloudStudySequenceDays(Integer cloudStudySequenceDays) {
+        this.cloudStudySequenceDays = cloudStudySequenceDays;
+    }
+
+    public Date getCloudStudyUseLastDay() {
+        return cloudStudyUseLastDay;
+    }
+
+    public void setCloudStudyUseLastDay(Date cloudStudyUseLastDay) {
+        this.cloudStudyUseLastDay = cloudStudyUseLastDay;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return "Student{" +
+				"userId=" + userId +
+						",subjectIdList='" + subjectIdList + "'" + 
+						",currentGradeNum='" + currentGradeNum + "'" + 
+						",memberRankSettingId='" + memberRankSettingId + "'" + 
+						",membershipStartTime='" + membershipStartTime + "'" + 
+						",membershipEndTime='" + membershipEndTime + "'" + 
+						",cloudStudySequenceDays='" + cloudStudySequenceDays + "'" + 
+						",cloudStudyUseLastDay='" + cloudStudyUseLastDay + "'" + 
+						",createTime='" + createTime + "'" + 
+						",updateTime='" + updateTime + "'" + 
+		                '}';
+    }
+	
+}

+ 169 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/StudentAttendance.java

@@ -0,0 +1,169 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 学生考勤表
+ */
+@TableName("student_attendance")
+@ApiModel(value = "StudentAttendance对象", description = "学生考勤表")
+public class StudentAttendance implements Serializable {
+	private static final long serialVersionUID = 1L;
+    /** 
+    * 主键; 
+    */
+    @ApiModelProperty("主键; ")
+    @TableId(value = "id_", type = IdType.AUTO)
+    private Long id;
+    /** 
+    * 课程组类型PRACTICE、LIVE; 
+    */
+    @ApiModelProperty("课程组类型PRACTICE、LIVE; ")
+	@TableField(value = "course_group_type_")
+    private String courseGroupType;
+    /** 
+    * 课程组编号 
+    */
+    @ApiModelProperty("课程组编号 ")
+	@TableField(value = "course_group_id_")
+    private Long courseGroupId;
+    /** 
+    * 课程编号 
+    */
+    @ApiModelProperty("课程编号 ")
+	@TableField(value = "course_schedule_id_")
+    private Long courseScheduleId;
+    /** 
+    * 学员编号; 
+    */
+    @ApiModelProperty("学员编号; ")
+	@TableField(value = "student_id_")
+    private Long studentId;
+    /** 
+    * 签到时间; 
+    */
+    @ApiModelProperty("签到时间; ")
+	@TableField(value = "sign_in_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date signInTime;
+    /** 
+    * 签退时间; 
+    */
+    @ApiModelProperty("签退时间; ")
+	@TableField(value = "sign_out_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date signOutTime;
+    /** 
+    * 创建时间; 
+    */
+    @ApiModelProperty("创建时间; ")
+	@TableField(value = "create_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date createTime;
+    /** 
+    * 修改时间; 
+    */
+    @ApiModelProperty("修改时间; ")
+	@TableField(value = "update_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCourseGroupType() {
+        return courseGroupType;
+    }
+
+    public void setCourseGroupType(String courseGroupType) {
+        this.courseGroupType = courseGroupType;
+    }
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Long getCourseScheduleId() {
+        return courseScheduleId;
+    }
+
+    public void setCourseScheduleId(Long courseScheduleId) {
+        this.courseScheduleId = courseScheduleId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public Date getSignInTime() {
+        return signInTime;
+    }
+
+    public void setSignInTime(Date signInTime) {
+        this.signInTime = signInTime;
+    }
+
+    public Date getSignOutTime() {
+        return signOutTime;
+    }
+
+    public void setSignOutTime(Date signOutTime) {
+        this.signOutTime = signOutTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return "StudentAttendance{" +
+				"id=" + id +
+						",courseGroupType='" + courseGroupType + "'" + 
+						",courseGroupId='" + courseGroupId + "'" + 
+						",courseScheduleId='" + courseScheduleId + "'" + 
+						",studentId='" + studentId + "'" + 
+						",signInTime='" + signInTime + "'" + 
+						",signOutTime='" + signOutTime + "'" + 
+						",createTime='" + createTime + "'" + 
+						",updateTime='" + updateTime + "'" + 
+		                '}';
+    }
+	
+}

+ 197 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/StudentCourseHomework.java

@@ -0,0 +1,197 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 学生课程作业
+ */
+@TableName("student_course_homework")
+@ApiModel(value = "StudentCourseHomework对象", description = "学生课程作业")
+public class StudentCourseHomework implements Serializable {
+	private static final long serialVersionUID = 1L;
+    /** 
+    * 主键; 
+    */
+    @ApiModelProperty("主键; ")
+    @TableId(value = "id_", type = IdType.AUTO)
+    private Long id;
+    /** 
+    * 作业编号; 
+    */
+    @ApiModelProperty("作业编号; ")
+	@TableField(value = "course_homework_id_")
+    private Long courseHomeworkId;
+    /** 
+    * 课程组类型PRACTICE、LIVE; 
+    */
+    @ApiModelProperty("课程组类型PRACTICE、LIVE; ")
+	@TableField(value = "course_group_type_")
+    private String courseGroupType;
+    /** 
+    * 课程组编号 
+    */
+    @ApiModelProperty("课程组编号 ")
+	@TableField(value = "course_group_id_")
+    private Long courseGroupId;
+    /** 
+    * 课程编号 
+    */
+    @ApiModelProperty("课程编号 ")
+	@TableField(value = "course_schedule_id_")
+    private Long courseScheduleId;
+    /** 
+    * 学员编号; 
+    */
+    @ApiModelProperty("学员编号; ")
+	@TableField(value = "student_id_")
+    private Long studentId;
+    /** 
+    * 学员提交的作品附件 
+    */
+    @ApiModelProperty("学员提交的作品附件 ")
+	@TableField(value = "attachments_")
+    private String attachments;
+    /** 
+    * 老师的作业点评 
+    */
+    @ApiModelProperty("老师的作业点评 ")
+	@TableField(value = "teacher_replied_")
+    private String teacherReplied;
+    /** 
+    * 作业提交时间 
+    */
+    @ApiModelProperty("作业提交时间 ")
+	@TableField(value = "submit_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date submitTime;
+    /** 
+    * 创建时间; 
+    */
+    @ApiModelProperty("创建时间; ")
+	@TableField(value = "create_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date createTime;
+    /** 
+    * 修改时间; 
+    */
+    @ApiModelProperty("修改时间; ")
+	@TableField(value = "update_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCourseHomeworkId() {
+        return courseHomeworkId;
+    }
+
+    public void setCourseHomeworkId(Long courseHomeworkId) {
+        this.courseHomeworkId = courseHomeworkId;
+    }
+
+    public String getCourseGroupType() {
+        return courseGroupType;
+    }
+
+    public void setCourseGroupType(String courseGroupType) {
+        this.courseGroupType = courseGroupType;
+    }
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Long getCourseScheduleId() {
+        return courseScheduleId;
+    }
+
+    public void setCourseScheduleId(Long courseScheduleId) {
+        this.courseScheduleId = courseScheduleId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getAttachments() {
+        return attachments;
+    }
+
+    public void setAttachments(String attachments) {
+        this.attachments = attachments;
+    }
+
+    public String getTeacherReplied() {
+        return teacherReplied;
+    }
+
+    public void setTeacherReplied(String teacherReplied) {
+        this.teacherReplied = teacherReplied;
+    }
+
+    public Date getSubmitTime() {
+        return submitTime;
+    }
+
+    public void setSubmitTime(Date submitTime) {
+        this.submitTime = submitTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return "StudentCourseHomework{" +
+				"id=" + id +
+						",courseHomeworkId='" + courseHomeworkId + "'" + 
+						",courseGroupType='" + courseGroupType + "'" + 
+						",courseGroupId='" + courseGroupId + "'" + 
+						",courseScheduleId='" + courseScheduleId + "'" + 
+						",studentId='" + studentId + "'" + 
+						",attachments='" + attachments + "'" + 
+						",teacherReplied='" + teacherReplied + "'" + 
+						",submitTime='" + submitTime + "'" + 
+						",createTime='" + createTime + "'" + 
+						",updateTime='" + updateTime + "'" + 
+		                '}';
+    }
+	
+}

+ 69 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/StudentStar.java

@@ -0,0 +1,69 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 学生关注教师表
+ */
+@TableName("student_star")
+@ApiModel(value = "StudentStar对象", description = "学生关注教师表")
+public class StudentStar implements Serializable {
+	private static final long serialVersionUID = 1L;
+    /** 
+    * 老师id 
+    */
+    @ApiModelProperty("老师id ")
+    @TableId(value = "teacher_id_", type = IdType.AUTO)
+    private Long teacherId;
+    /** 
+    * 学生id 
+    */
+    @ApiModelProperty("学生id ")
+    @TableId(value = "student_id_", type = IdType.AUTO)
+    private Long studentId;
+	@TableField(value = "create_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date createTime;
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String toString() {
+        return "StudentStar{" +
+				"teacherId=" + teacherId +
+						",studentId='" + studentId + "'" + 
+						",createTime='" + createTime + "'" + 
+		                '}';
+    }
+	
+}

+ 18 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Teacher.java

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -27,6 +29,7 @@ public class Teacher implements Serializable {
     */
     @ApiModelProperty("对应user表用户编号 ")
     @TableId(value = "user_id_", type = IdType.AUTO)
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long userId;
     /** 
     * 学历 
@@ -58,6 +61,13 @@ public class Teacher implements Serializable {
     @ApiModelProperty("专业技能(支持多个,用逗号分隔),对应科目表编号 ")
 	@TableField(value = "subject_id_")
     private String subjectId;
+    /**
+     * 老师类型 tourist 游客 entry 认证老师 musician 音乐人
+     */
+    @ApiModelProperty("老师类型 tourist 游客 entry 认证老师 musician 音乐人 ")
+    @TableField(value = "teacher_type_")
+    private String teacherType;
+
     /** 
     * 老师入驻状态  1、审核中 2、通过 3、不通过 
     */
@@ -289,4 +299,12 @@ public class Teacher implements Serializable {
     public void setLiveFlag(Integer liveFlag) {
         this.liveFlag = liveFlag;
     }
+
+    public String getTeacherType() {
+        return teacherType;
+    }
+
+    public void setTeacherType(String teacherType) {
+        this.teacherType = teacherType;
+    }
 }

+ 154 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/VipCardRecord.java

@@ -0,0 +1,154 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 购买会员卡记录表
+ */
+@TableName("vip_card_record")
+@ApiModel(value = "VipCardRecord对象", description = "购买会员卡记录表")
+public class VipCardRecord implements Serializable {
+	private static final long serialVersionUID = 1L;
+    /** 
+    * 会员卡id 
+    */
+    @ApiModelProperty("会员卡id ")
+    @TableId(value = "id_", type = IdType.AUTO)
+    private Long id;
+    /** 
+    * 用户id 
+    */
+    @ApiModelProperty("用户id ")
+	@TableField(value = "user_id_")
+    private Long userId;
+    /** 
+    * 订单id 
+    */
+    @ApiModelProperty("订单id ")
+	@TableField(value = "order_id_")
+    private Long orderId;
+    /** 
+    * 时长类型:1、月卡 2、季卡 3、年卡 
+    */
+    @ApiModelProperty("时长类型:1、月卡 2、季卡 3、年卡 ")
+	@TableField(value = "time_type_")
+    private Integer timeType;
+    /** 
+    * 会员卡开始时间 
+    */
+    @ApiModelProperty("会员卡开始时间 ")
+	@TableField(value = "start_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date startTime;
+    /** 
+    * 创建时间 
+    */
+    @ApiModelProperty("创建时间 ")
+	@TableField(value = "create_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date createTime;
+    /** 
+    * 更新时间 
+    */
+    @ApiModelProperty("更新时间 ")
+	@TableField(value = "update_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date updateTime;
+    /** 
+    * 会员卡结束时间 
+    */
+    @ApiModelProperty("会员卡结束时间 ")
+	@TableField(value = "end_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date endTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(Long orderId) {
+        this.orderId = orderId;
+    }
+
+    public Integer getTimeType() {
+        return timeType;
+    }
+
+    public void setTimeType(Integer timeType) {
+        this.timeType = timeType;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    @Override
+    public String toString() {
+        return "VipCardRecord{" +
+				"id=" + id +
+						",userId='" + userId + "'" + 
+						",orderId='" + orderId + "'" + 
+						",timeType='" + timeType + "'" + 
+						",startTime='" + startTime + "'" + 
+						",createTime='" + createTime + "'" + 
+						",updateTime='" + updateTime + "'" + 
+						",endTime='" + endTime + "'" + 
+		                '}';
+    }
+	
+}

+ 27 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/TeacherTypeEnum.java

@@ -0,0 +1,27 @@
+package com.yonge.cooleshow.biz.dal.enums;
+
+import com.yonge.cooleshow.common.enums.BaseEnum;
+
+/***
+ * 老师类型枚举
+ * @author liweifan
+ * @updateTime 2022/3/23 17:01
+ */
+public enum TeacherTypeEnum implements BaseEnum<String, TeacherTypeEnum> {
+    TOURIST("游客"), ENTRY("认证老师"), MUSICIAN("平台音乐人");
+
+    private String msg;
+
+    TeacherTypeEnum(String msg) {
+        this.msg = msg;
+    }
+
+    @Override
+    public String getCode() {
+        return this.name();
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+}

+ 21 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentAttendanceService.java

@@ -0,0 +1,21 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.entity.StudentAttendance;
+
+/**
+ * 学生考勤表 服务类
+ * @author liweifan
+ * @date 2022-03-23
+ */
+public interface StudentAttendanceService extends IService<StudentAttendance>  {
+
+
+    /**
+     * 自定义分页
+     * @author liweifan
+ 	 * @date 2022-03-23
+     */
+    IPage<StudentAttendance> selectPage(IPage<StudentAttendance> page, StudentAttendance studentAttendance);
+}

+ 21 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentCourseHomeworkService.java

@@ -0,0 +1,21 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.entity.StudentCourseHomework;
+
+/**
+ * 学生课程作业 服务类
+ * @author liweifan
+ * @date 2022-03-23
+ */
+public interface StudentCourseHomeworkService extends IService<StudentCourseHomework>  {
+
+
+    /**
+     * 自定义分页
+     * @author liweifan
+ 	 * @date 2022-03-23
+     */
+    IPage<StudentCourseHomework> selectPage(IPage<StudentCourseHomework> page, StudentCourseHomework studentCourseHomework);
+}

+ 21 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentService.java

@@ -0,0 +1,21 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.entity.Student;
+
+/**
+ * 学生表 服务类
+ * @author liweifan
+ * @date 2022-03-23
+ */
+public interface StudentService extends IService<Student>  {
+
+
+    /**
+     * 自定义分页
+     * @author liweifan
+ 	 * @date 2022-03-23
+     */
+    IPage<Student> selectPage(IPage<Student> page, Student student);
+}

+ 21 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentStarService.java

@@ -0,0 +1,21 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.entity.StudentStar;
+
+/**
+ * 学生关注教师表 服务类
+ * @author liweifan
+ * @date 2022-03-23
+ */
+public interface StudentStarService extends IService<StudentStar>  {
+
+
+    /**
+     * 自定义分页
+     * @author liweifan
+ 	 * @date 2022-03-23
+     */
+    IPage<StudentStar> selectPage(IPage<StudentStar> page, StudentStar studentStar);
+}

+ 20 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/TeacherService.java

@@ -3,6 +3,8 @@ package com.yonge.cooleshow.biz.dal.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.yonge.cooleshow.biz.dal.dto.req.TeacherSetReq;
+import com.yonge.cooleshow.biz.dal.dto.req.TeacherSubmitReq;
+import com.yonge.cooleshow.biz.dal.dto.search.TeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
@@ -20,7 +22,7 @@ public interface TeacherService extends IService<Teacher>  {
      * @author liweifan
  	 * @date 2022-03-18
      */
-    IPage<Teacher> selectPage(IPage<Teacher> page, Teacher teacher);
+    IPage<TeacherVo> selectPage(IPage<TeacherVo> page, TeacherSearch teacher);
     /***
      * 查询老师设置页面详情
      * @author liweifan
@@ -45,4 +47,21 @@ public interface TeacherService extends IService<Teacher>  {
      * @updateTime 2022/3/22 11:04
      */
     HttpResponseResult<Boolean> openLive(Long id);
+    /***
+     * 管理端新增、修改老师信息
+     * @author liweifan
+     * @param: teacherSubmitReq
+     * @updateTime 2022/3/23 14:30
+     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<java.lang.Boolean>
+     */
+    HttpResponseResult<Boolean> submit(TeacherSubmitReq teacherSubmitReq);
+    /***
+     * 查询老师详情
+     * @author liweifan
+     * @param: userId
+     * @updateTime 2022/3/23 17:49
+     * @return: com.yonge.cooleshow.biz.dal.vo.TeacherVo
+     */
+    TeacherVo detail(Long userId);
+
 }

+ 21 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VipCardRecordService.java

@@ -0,0 +1,21 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.entity.VipCardRecord;
+
+/**
+ * 购买会员卡记录表 服务类
+ * @author liweifan
+ * @date 2022-03-23
+ */
+public interface VipCardRecordService extends IService<VipCardRecord>  {
+
+
+    /**
+     * 自定义分页
+     * @author liweifan
+ 	 * @date 2022-03-23
+     */
+    IPage<VipCardRecord> selectPage(IPage<VipCardRecord> page, VipCardRecord vipCardRecord);
+}

+ 22 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentAttendanceServiceImpl.java

@@ -0,0 +1,22 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.yonge.cooleshow.biz.dal.entity.StudentAttendance;
+import com.yonge.cooleshow.biz.dal.dao.StudentAttendanceDao;
+import com.yonge.cooleshow.biz.dal.service.StudentAttendanceService;
+
+
+@Service
+public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceDao, StudentAttendance> implements StudentAttendanceService {
+
+    /**
+     * 分页查询
+     */
+     @Override
+    public IPage<StudentAttendance> selectPage(IPage<StudentAttendance> page, StudentAttendance studentAttendance){
+        return page.setRecords(baseMapper.selectPage(page, studentAttendance));
+    }
+	
+}

+ 22 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -0,0 +1,22 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.yonge.cooleshow.biz.dal.entity.StudentCourseHomework;
+import com.yonge.cooleshow.biz.dal.dao.StudentCourseHomeworkDao;
+import com.yonge.cooleshow.biz.dal.service.StudentCourseHomeworkService;
+
+
+@Service
+public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseHomeworkDao, StudentCourseHomework> implements StudentCourseHomeworkService {
+
+    /**
+     * 分页查询
+     */
+     @Override
+    public IPage<StudentCourseHomework> selectPage(IPage<StudentCourseHomework> page, StudentCourseHomework studentCourseHomework){
+        return page.setRecords(baseMapper.selectPage(page, studentCourseHomework));
+    }
+	
+}

+ 22 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -0,0 +1,22 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.yonge.cooleshow.biz.dal.entity.Student;
+import com.yonge.cooleshow.biz.dal.dao.StudentDao;
+import com.yonge.cooleshow.biz.dal.service.StudentService;
+
+
+@Service
+public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> implements StudentService {
+
+    /**
+     * 分页查询
+     */
+     @Override
+    public IPage<Student> selectPage(IPage<Student> page, Student student){
+        return page.setRecords(baseMapper.selectPage(page, student));
+    }
+	
+}

+ 22 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentStarServiceImpl.java

@@ -0,0 +1,22 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.yonge.cooleshow.biz.dal.entity.StudentStar;
+import com.yonge.cooleshow.biz.dal.dao.StudentStarDao;
+import com.yonge.cooleshow.biz.dal.service.StudentStarService;
+
+
+@Service
+public class StudentStarServiceImpl extends ServiceImpl<StudentStarDao, StudentStar> implements StudentStarService {
+
+    /**
+     * 分页查询
+     */
+     @Override
+    public IPage<StudentStar> selectPage(IPage<StudentStar> page, StudentStar studentStar){
+        return page.setRecords(baseMapper.selectPage(page, studentStar));
+    }
+	
+}

+ 138 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java

@@ -2,28 +2,45 @@ package com.yonge.cooleshow.biz.dal.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
+import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.cooleshow.auth.api.enums.SysUserType;
 import com.yonge.cooleshow.biz.dal.dao.SubjectDao;
 import com.yonge.cooleshow.biz.dal.dto.req.TeacherSetReq;
+import com.yonge.cooleshow.biz.dal.dto.req.TeacherSubmitReq;
+import com.yonge.cooleshow.biz.dal.dto.search.TeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.Subject;
+import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
+import com.yonge.cooleshow.biz.dal.enums.TeacherTypeEnum;
 import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.exception.BizException;
+import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.stereotype.Service;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.dao.TeacherDao;
 import com.yonge.cooleshow.biz.dal.service.TeacherService;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 
 @Service
 public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> implements TeacherService {
+    @Autowired
+    private SysUserFeignService userFeignService;
+
     /**
      * 分页查询
      */
     @Override
-    public IPage<Teacher> selectPage(IPage<Teacher> page, Teacher teacher) {
+
+    public IPage<TeacherVo> selectPage(IPage<TeacherVo> page, TeacherSearch teacher) {
         return page.setRecords(baseMapper.selectPage(page, teacher));
     }
 
@@ -40,7 +57,7 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
     @Override
     public HttpResponseResult<Boolean> openLive(Long id) {
         //todo 根据老师规则,判断老师直播权限
-        if(true){
+        if (true) {
             Teacher teacher = new Teacher();
             teacher.setUserId(id);
             teacher.setLiveFlag(1);
@@ -49,4 +66,123 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
         return HttpResponseResult.status(true);
     }
 
+    @Override
+    @Transactional(rollbackFor = BizException.class)
+    public HttpResponseResult<Boolean> submit(TeacherSubmitReq teacherSubmitReq) throws BizException {
+        if (null == teacherSubmitReq.getUserId()) {
+            //创建
+            return doCreate(teacherSubmitReq);
+        } else {
+            //修改
+            return doUpdate(teacherSubmitReq);
+        }
+    }
+
+    @Override
+    public TeacherVo detail(Long userId) {
+        return baseMapper.detail(userId);
+    }
+
+    private HttpResponseResult<Boolean> doCreate(TeacherSubmitReq teacherSubmitReq) throws BizException {
+        //判断手机号
+        SysUser sysUser = userFeignService.queryUserByMobile(teacherSubmitReq.getPhone());
+        if (null != sysUser) {
+            return HttpResponseResult.failed("该手机号已经被注册");
+        }
+        sysUser = new SysUser();
+        sysUser = getUserDetil(sysUser, teacherSubmitReq);
+        //初始密码,手机号后6位
+        String password = sysUser.getPhone().substring(sysUser.getPhone().length() - 6);
+        sysUser.setPassword(new BCryptPasswordEncoder().encode(password));
+
+        //插入老师表
+        Teacher teacher = new Teacher();
+        teacher = getTeacherDetil(teacher, teacherSubmitReq);
+        baseMapper.insert(teacher);
+
+        sysUser.setId(teacher.getUserId());
+        //插入
+        HttpResponseResult<Integer> re = userFeignService.add(sysUser);
+        if (!re.getStatus()) {
+            throw new BizException("插入用户信息失败");
+        }
+        return HttpResponseResult.succeed(true);
+    }
+
+    private HttpResponseResult<Boolean> doUpdate(TeacherSubmitReq teacherSubmitReq) {
+        //判断手机号
+        SysUser sysUser = userFeignService.queryUserByMobile(teacherSubmitReq.getPhone());
+        if (null != sysUser && !teacherSubmitReq.getUserId().equals(sysUser.getId())) {
+            return HttpResponseResult.failed("该手机号已经被注册");
+        }
+        sysUser = getUserDetil(sysUser, teacherSubmitReq);
+
+        Teacher teacher = baseMapper.selectById(teacherSubmitReq.getUserId());
+        teacher = getTeacherDetil(teacher, teacherSubmitReq);
+        baseMapper.updateById(teacher);
+
+        HttpResponseResult<Integer> re = userFeignService.update(sysUser);
+        if (!re.getStatus()) {
+            throw new BizException("更新用户信息失败");
+        }
+        return HttpResponseResult.succeed(true);
+    }
+
+    /***
+     * 封装用户信息
+     * @author liweifan
+     * @updateTime 2022/3/23 17:23
+     */
+    private SysUser getUserDetil(SysUser sysUser, TeacherSubmitReq teacherSubmitReq) throws BizException {
+        //实名信息
+        RealnameAuthReq realNameAuthDto = new RealnameAuthReq();
+        realNameAuthDto.setIdCardNo(teacherSubmitReq.getIdCardNo());
+        realNameAuthDto.setRealName(teacherSubmitReq.getRealName());
+        realNameAuthDto.setSave(false);
+        HttpResponseResult<IdcardInfoExtractor> idcardInfoExtractorResult = userFeignService.realNameAuth(realNameAuthDto);
+        if (!idcardInfoExtractorResult.getStatus() || null == idcardInfoExtractorResult.getData()) {
+            throw new BizException("实名认证未通过");
+        }
+        //插入用户表
+        sysUser = new SysUser();
+        String phone = teacherSubmitReq.getPhone();
+        sysUser.setUsername(teacherSubmitReq.getUsername());
+        sysUser.setPhone(phone);
+        sysUser.setUserType(SysUserType.TEACHER.getCode());
+
+        //身份证解析信息
+        IdcardInfoExtractor idcardInfo = idcardInfoExtractorResult.getData();
+        sysUser.setGender(idcardInfo.getGender());
+        sysUser.setBirthdate(idcardInfo.getBirthday());
+        sysUser.setRealName(teacherSubmitReq.getRealName());
+        sysUser.setIdCardNo(teacherSubmitReq.getIdCardNo());
+        return sysUser;
+    }
+
+    /***
+     * 封装老师信息
+     * @author liweifan
+     * @param: teacherSubmitReq
+     * @updateTime 2022/3/23 17:27
+     * @return: com.yonge.cooleshow.biz.dal.entity.Teacher
+     */
+    private Teacher getTeacherDetil(Teacher teacher, TeacherSubmitReq teacherSubmitReq) {
+        teacher.setSubjectId(teacherSubmitReq.getSubjectId());
+        teacher.setTeacherType(teacherSubmitReq.getTeacherType());
+
+        String[] teacherTypes = teacherSubmitReq.getTeacherType().split(",");
+        for (String teacherType : teacherTypes) {
+            if (TeacherTypeEnum.ENTRY.getCode().equals(teacherType)) {
+                teacher.setEntryStatus(AuthStatusEnum.PASS.getCode());
+                teacher.setEntryAuthDate(new Date());
+            }
+            if (TeacherTypeEnum.MUSICIAN.getCode().equals(teacherType)) {
+                teacher.setMusicianAuthStatus(AuthStatusEnum.PASS.getCode());
+                teacher.setMusicianDate(new Date());
+            }
+        }
+        return teacher;
+    }
+
+
 }

+ 22 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VipCardRecordServiceImpl.java

@@ -0,0 +1,22 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.yonge.cooleshow.biz.dal.entity.VipCardRecord;
+import com.yonge.cooleshow.biz.dal.dao.VipCardRecordDao;
+import com.yonge.cooleshow.biz.dal.service.VipCardRecordService;
+
+
+@Service
+public class VipCardRecordServiceImpl extends ServiceImpl<VipCardRecordDao, VipCardRecord> implements VipCardRecordService {
+
+    /**
+     * 分页查询
+     */
+     @Override
+    public IPage<VipCardRecord> selectPage(IPage<VipCardRecord> page, VipCardRecord vipCardRecord){
+        return page.setRecords(baseMapper.selectPage(page, vipCardRecord));
+    }
+	
+}

+ 31 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherVo.java

@@ -12,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
 public class TeacherVo extends Teacher {
     @ApiModelProperty("头像地址")
     private String avatar;
-    @ApiModelProperty("老师姓名")
+    @ApiModelProperty("老师昵称")
     private String username;
     @ApiModelProperty(value = "性别0女1男")
     private Integer gender;
@@ -20,6 +20,12 @@ public class TeacherVo extends Teacher {
     private String phone;
     @ApiModelProperty(value = "是否实名 0否 1是")
     private Boolean isReal;
+    @ApiModelProperty(value = "是否绑卡 0否 1是")
+    private Boolean isBank;
+    @ApiModelProperty(value = "真实姓名")
+    private String realName;
+    @ApiModelProperty(value = "身份证号码")
+    private String idCardNo;
 
     public String getAvatar() {
         return avatar;
@@ -60,4 +66,28 @@ public class TeacherVo extends Teacher {
     public void setReal(Boolean real) {
         isReal = real;
     }
+
+    public String getRealName() {
+        return realName;
+    }
+
+    public void setRealName(String realName) {
+        this.realName = realName;
+    }
+
+    public String getIdCardNo() {
+        return idCardNo;
+    }
+
+    public void setIdCardNo(String idCardNo) {
+        this.idCardNo = idCardNo;
+    }
+
+    public Boolean getBank() {
+        return isBank;
+    }
+
+    public void setBank(Boolean bank) {
+        isBank = bank;
+    }
 }

+ 35 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.StudentAttendanceDao">
+	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.StudentAttendance">
+            <result column="id_" property="id" />
+	        <result column="course_group_type_" property="courseGroupType" />
+	        <result column="course_group_id_" property="courseGroupId" />
+	        <result column="course_schedule_id_" property="courseScheduleId" />
+	        <result column="student_id_" property="studentId" />
+	        <result column="sign_in_time_" property="signInTime" />
+	        <result column="sign_out_time_" property="signOutTime" />
+	        <result column="create_time_" property="createTime" />
+	        <result column="update_time_" property="updateTime" />
+		</resultMap>  
+    
+    <!-- 表字段 -->
+    <sql id="baseColumns">
+         t.id_ as "id"
+        , t.course_group_type_ as "courseGroupType"
+        , t.course_group_id_ as "courseGroupId"
+        , t.course_schedule_id_ as "courseScheduleId"
+        , t.student_id_ as "studentId"
+        , t.sign_in_time_ as "signInTime"
+        , t.sign_out_time_ as "signOutTime"
+        , t.create_time_ as "createTime"
+        , t.update_time_ as "updateTime"
+        </sql> 
+    
+    <!-- 分页查询 -->
+    <select id="selectPage" resultMap="BaseResultMap">
+		SELECT         
+        	<include refid="baseColumns" />
+		FROM student_attendance t
+	</select>
+</mapper>

+ 39 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentCourseHomeworkMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.StudentCourseHomeworkDao">
+	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.StudentCourseHomework">
+            <result column="id_" property="id" />
+	        <result column="course_homework_id_" property="courseHomeworkId" />
+	        <result column="course_group_type_" property="courseGroupType" />
+	        <result column="course_group_id_" property="courseGroupId" />
+	        <result column="course_schedule_id_" property="courseScheduleId" />
+	        <result column="student_id_" property="studentId" />
+	        <result column="attachments_" property="attachments" />
+	        <result column="teacher_replied_" property="teacherReplied" />
+	        <result column="submit_time_" property="submitTime" />
+	        <result column="create_time_" property="createTime" />
+	        <result column="update_time_" property="updateTime" />
+		</resultMap>  
+    
+    <!-- 表字段 -->
+    <sql id="baseColumns">
+         t.id_ as "id"
+        , t.course_homework_id_ as "courseHomeworkId"
+        , t.course_group_type_ as "courseGroupType"
+        , t.course_group_id_ as "courseGroupId"
+        , t.course_schedule_id_ as "courseScheduleId"
+        , t.student_id_ as "studentId"
+        , t.attachments_ as "attachments"
+        , t.teacher_replied_ as "teacherReplied"
+        , t.submit_time_ as "submitTime"
+        , t.create_time_ as "createTime"
+        , t.update_time_ as "updateTime"
+        </sql> 
+    
+    <!-- 分页查询 -->
+    <select id="selectPage" resultMap="BaseResultMap">
+		SELECT         
+        	<include refid="baseColumns" />
+		FROM student_course_homework t
+	</select>
+</mapper>

+ 37 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.StudentDao">
+	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.Student">
+            <result column="user_id_" property="userId" />
+	        <result column="subject_id_list_" property="subjectIdList" />
+	        <result column="current_grade_num_" property="currentGradeNum" />
+	        <result column="member_rank_setting_id_" property="memberRankSettingId" />
+	        <result column="membership_start_time_" property="membershipStartTime" />
+	        <result column="membership_end_time_" property="membershipEndTime" />
+	        <result column="cloud_study_sequence_days_" property="cloudStudySequenceDays" />
+	        <result column="cloud_study_use_last_day_" property="cloudStudyUseLastDay" />
+	        <result column="create_time_" property="createTime" />
+	        <result column="update_time_" property="updateTime" />
+		</resultMap>  
+    
+    <!-- 表字段 -->
+    <sql id="baseColumns">
+         t.user_id_ as "userId"
+        , t.subject_id_list_ as "subjectIdList"
+        , t.current_grade_num_ as "currentGradeNum"
+        , t.member_rank_setting_id_ as "memberRankSettingId"
+        , t.membership_start_time_ as "membershipStartTime"
+        , t.membership_end_time_ as "membershipEndTime"
+        , t.cloud_study_sequence_days_ as "cloudStudySequenceDays"
+        , t.cloud_study_use_last_day_ as "cloudStudyUseLastDay"
+        , t.create_time_ as "createTime"
+        , t.update_time_ as "updateTime"
+        </sql> 
+    
+    <!-- 分页查询 -->
+    <select id="selectPage" resultMap="BaseResultMap">
+		SELECT         
+        	<include refid="baseColumns" />
+		FROM student t
+	</select>
+</mapper>

+ 23 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentStarMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.StudentStarDao">
+	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.StudentStar">
+            <result column="teacher_id_" property="teacherId" />
+	        <result column="student_id_" property="studentId" />
+	        <result column="create_time_" property="createTime" />
+		</resultMap>  
+    
+    <!-- 表字段 -->
+    <sql id="baseColumns">
+         t.teacher_id_ as "teacherId"
+        , t.student_id_ as "studentId"
+        , t.create_time_ as "createTime"
+        </sql> 
+    
+    <!-- 分页查询 -->
+    <select id="selectPage" resultMap="BaseResultMap">
+		SELECT         
+        	<include refid="baseColumns" />
+		FROM student_star t
+	</select>
+</mapper>

+ 99 - 62
cooleshow-user/user-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -1,36 +1,38 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.yonge.cooleshow.biz.dal.dao.TeacherDao">
-	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.Teacher">
-            <result column="user_id_" property="userId" />
-	        <result column="education_background_" property="educationBackground" />
-	        <result column="graduate_school_" property="graduateSchool" />
-	        <result column="technical_titles_" property="technicalTitles" />
-	        <result column="work_unit_" property="workUnit" />
-	        <result column="subject_id_" property="subjectId" />
-	        <result column="entry_status_" property="entryStatus" />
-	        <result column="entry_auth_date_" property="entryAuthDate" />
-	        <result column="introduction_" property="introduction" />
-	        <result column="musician_auth_status_" property="musicianAuthStatus" />
-	        <result column="musician_date_" property="musicianDate" />
-	        <result column="subject_" property="subject" />
-	        <result column="grad_certificate_" property="gradCertificate" />
-	        <result column="degree__certificate_" property="degreeCertificate" />
-	        <result column="teacher__certificate_" property="teacherCertificate" />
-	        <result column="memo_" property="memo" />
-	        <result column="create_time_" property="createTime" />
-	        <result column="update_time_" property="updateTime" />
-		</resultMap>  
-    
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.Teacher">
+        <result column="user_id_" property="userId"/>
+        <result column="education_background_" property="educationBackground"/>
+        <result column="graduate_school_" property="graduateSchool"/>
+        <result column="technical_titles_" property="technicalTitles"/>
+        <result column="work_unit_" property="workUnit"/>
+        <result column="subject_id_" property="subjectId"/>
+        <result column="teacher_type_" property="teacherType"/>
+        <result column="entry_status_" property="entryStatus"/>
+        <result column="entry_auth_date_" property="entryAuthDate"/>
+        <result column="introduction_" property="introduction"/>
+        <result column="musician_auth_status_" property="musicianAuthStatus"/>
+        <result column="musician_date_" property="musicianDate"/>
+        <result column="subject_" property="subject"/>
+        <result column="grad_certificate_" property="gradCertificate"/>
+        <result column="degree__certificate_" property="degreeCertificate"/>
+        <result column="teacher__certificate_" property="teacherCertificate"/>
+        <result column="memo_" property="memo"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="update_time_" property="updateTime"/>
+    </resultMap>
+
     <!-- 表字段 -->
-	<sql id="baseColumns">
+    <sql id="baseColumns">
          t.user_id_ as "userId"
         , t.education_background_ as "educationBackground"
         , t.graduate_school_ as "graduateSchool"
         , t.technical_titles_ as "technicalTitles"
         , t.work_unit_ as "workUnit"
         , t.subject_id_ as "subjectId"
-        , t.entry_status_ as "entryStatus"
+		, t.teacher_type_ as "teacherType"
+		, t.entry_status_ as "entryStatus"
         , t.entry_auth_date_ as "entryAuthDate"
         , t.introduction_ as "introduction"
         , t.musician_auth_status_ as "musicianAuthStatus"
@@ -44,48 +46,83 @@
         , t.update_time_ as "updateTime"
         </sql>
 
-	<!-- 分页查询 -->
-    <select id="selectPage" resultMap="BaseResultMap">
-		SELECT         
-        	<include refid="baseColumns" />
-		FROM teacher t
-	</select>
+    <!-- 分页查询 -->
+    <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherVo">
+        SELECT
+            <include refid="baseColumns"/>,
+            u.username_ as username,
+            u.phone_ as phone,
+            (case when isnull(u.id_card_no_) then 0 else 1 end) as isReal,
+            (case when isnull(b.user_id_) then 0 else 1 end) as isBank
+        FROM teacher t
+        left join sys_user u on t.user_id_ = u.id
+        left join (
+            select distinct user_id_ from user_bank_card where del_flag_ = 0
+        ) b on t.user_id_ = b.user_id_
+        <where>
+            <if test="null != param.search and '' != param.search">
+                AND (
+                t.user_id_ LIKE CONCAT('%', #{param.search}, '%') or
+                u.username_ LIKE CONCAT('%', #{param.search}, '%') or
+                u.phone_ LIKE CONCAT('%', #{param.search}, '%')
+                )
+            </if>
+            <if test="null != param.teacherType and '' != param.teacherType">
+                and find_in_set(#{teacherType},t.teacher_type_)
+            </if>
+        </where>
+    </select>
 
-	<select id="getSetDetail" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherVo">
-		SELECT
-			<include refid="baseColumns" />,
-			u.avatar_ as avatar,
-			u.username_ as username,
-			u.gender_ as gender,
-			u.phone_ as phone,
-			(case when isnull(u.id_card_no_) then 0 else 1 end) as isReal
-		FROM teacher t
-		left join sys_user u on t.user_id_ = u.id_
-		where t.user_id_ = #{id}
-	</select>
+    <select id="getSetDetail" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherVo">
+        SELECT
+        <include refid="baseColumns"/>,
+        u.avatar_ as avatar,
+        u.username_ as username,
+        u.gender_ as gender,
+        u.phone_ as phone,
+        (case when isnull(u.id_card_no_) then 0 else 1 end) as isReal
+        FROM teacher t
+        left join sys_user u on t.user_id_ = u.id_
+        where t.user_id_ = #{id}
+    </select>
 
-	<update id="updatetSetDetail">
-		UPDATE sys_user
-		<set>
-			<if test="param.avatar != null and param.avatar != ''">
-				avatar_ = #{param.avatar},
-			</if>
-			<if test="param.username != null and param.username != ''">
-				username_ = #{param.username},
-			</if>
-			<if test="param.gender != null">
-				gender_ = #{param.gender},
-			</if>
-		</set>
-		WHERE id_ = #{id}
-	</update>
+    <update id="updatetSetDetail">
+        UPDATE sys_user
+        <set>
+            <if test="param.avatar != null and param.avatar != ''">
+                avatar_ = #{param.avatar},
+            </if>
+            <if test="param.username != null and param.username != ''">
+                username_ = #{param.username},
+            </if>
+            <if test="param.gender != null">
+                gender_ = #{param.gender},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
 
-	<resultMap id="BasicUserInfo" type="com.yonge.cooleshow.biz.dal.dto.BasicUserInfo">
-		<result property="userId" column="user_id_"/>
-		<result property="username" column="username_"/>
-		<result property="realName" column="real_name_"/>
-	</resultMap>
-	<select id="getBasicUserInfo" resultMap="BasicUserInfo">
+    <resultMap id="BasicUserInfo" type="com.yonge.cooleshow.biz.dal.dto.BasicUserInfo">
+        <result property="userId" column="user_id_"/>
+        <result property="username" column="username_"/>
+        <result property="realName" column="real_name_"/>
+    </resultMap>
+    <select id="getBasicUserInfo" resultMap="BasicUserInfo">
 		SELECT id_ user_id_,username_,real_name_ FROM sys_user WHERE id_ = #{userId} LIMIT 1
 	</select>
+
+    <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherVo">
+        SELECT
+            <include refid="baseColumns"/>,
+            u.avatar_ as avatar,
+            u.username_ as username,
+            u.gender_ as gender,
+            u.phone_ as phone,
+            (case when isnull(u.id_card_no_) then 0 else 1 end) as isReal,
+            u.real_name_ as realName,
+            id_card_no_ as idCardNo
+        FROM teacher t
+        left join sys_user u on t.user_id_ = u.id_
+        where t.user_id_ = #{userId}
+    </select>
 </mapper>

+ 33 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/VipCardRecordMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.VipCardRecordDao">
+	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.VipCardRecord">
+            <result column="id_" property="id" />
+	        <result column="user_id_" property="userId" />
+	        <result column="order_id_" property="orderId" />
+	        <result column="time_type_" property="timeType" />
+	        <result column="start_time_" property="startTime" />
+	        <result column="create_time_" property="createTime" />
+	        <result column="update_time_" property="updateTime" />
+	        <result column="end_time_" property="endTime" />
+		</resultMap>  
+    
+    <!-- 表字段 -->
+    <sql id="baseColumns">
+         t.id_ as "id"
+        , t.user_id_ as "userId"
+        , t.order_id_ as "orderId"
+        , t.time_type_ as "timeType"
+        , t.start_time_ as "startTime"
+        , t.create_time_ as "createTime"
+        , t.update_time_ as "updateTime"
+        , t.end_time_ as "endTime"
+        </sql> 
+    
+    <!-- 分页查询 -->
+    <select id="selectPage" resultMap="BaseResultMap">
+		SELECT         
+        	<include refid="baseColumns" />
+		FROM vip_card_record t
+	</select>
+</mapper>

+ 100 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentAttendanceController.java

@@ -0,0 +1,100 @@
+package com.yonge.cooleshow.student.controller;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import com.yonge.cooleshow.biz.dal.support.Condition;
+import com.yonge.cooleshow.biz.dal.support.Query;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.page.PageInfo;
+import com.yonge.toolset.utils.string.StringUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import com.yonge.cooleshow.biz.dal.entity.StudentAttendance;
+import com.yonge.cooleshow.biz.dal.service.StudentAttendanceService;
+
+@RestController
+@RequestMapping("/StudentAttendance")
+@Api(value = "学生考勤表", tags = "学生考勤表")
+public class StudentAttendanceController extends BaseController {
+
+    @Autowired
+    private StudentAttendanceService studentAttendanceService;
+
+	/**
+     * 查询单条
+     */
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情", notes = "传入studentAttendance")
+    public HttpResponseResult<StudentAttendance> detail(StudentAttendance studentAttendance) {
+		StudentAttendance detail = studentAttendanceService.getOne(Condition.getQueryWrapper(studentAttendance));
+		return succeed(detail);
+	}
+    
+    
+    /**
+     * 查询集合
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询集合", notes = "传入studentAttendance")
+    public HttpResponseResult<List<StudentAttendance>> list(StudentAttendance studentAttendance) {
+		List<StudentAttendance> list = studentAttendanceService.list();
+		return succeed(list);
+	}
+    
+    /**
+     * 查询分页
+     */
+    @GetMapping("/page")
+    @ApiOperation(value = "查询分页", notes = "传入studentAttendance")
+    public HttpResponseResult<PageInfo<StudentAttendance>> page(StudentAttendance studentAttendance, Query query) {
+		IPage<StudentAttendance> pages = studentAttendanceService.selectPage(Condition.getPage(query), studentAttendance);
+        return succeed(Condition.pageInfo(pages));
+	}
+    
+    /**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperation(value = "新增", notes = "传入studentAttendance")
+	public HttpResponseResult save(@Valid @RequestBody StudentAttendance studentAttendance) {
+    	return status(studentAttendanceService.save(studentAttendance));
+	}
+    
+    /**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperation(value = "修改", notes = "传入studentAttendance")
+	public HttpResponseResult update(@Valid @RequestBody StudentAttendance studentAttendance) {
+        return status(studentAttendanceService.updateById(studentAttendance));
+	}
+    
+    /**
+	 * 新增或修改
+	 */
+    @PostMapping("/submit")
+    @ApiOperation(value = "新增或修改", notes = "传入studentAttendance")
+	public HttpResponseResult submit(@RequestBody StudentAttendance studentAttendance) {
+        return status(studentAttendanceService.saveOrUpdate(studentAttendance));
+    }
+
+ 	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public HttpResponseResult remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        if (StringUtil.isEmpty(ids)) {
+			return failed("参数不能为空");
+		}
+		return status(studentAttendanceService.removeByIds(StringUtil.toLongList(ids)));
+	}
+}

+ 100 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentController.java

@@ -0,0 +1,100 @@
+package com.yonge.cooleshow.student.controller;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import com.yonge.cooleshow.biz.dal.support.Condition;
+import com.yonge.cooleshow.biz.dal.support.Query;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.page.PageInfo;
+import com.yonge.toolset.utils.string.StringUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import com.yonge.cooleshow.biz.dal.entity.Student;
+import com.yonge.cooleshow.biz.dal.service.StudentService;
+
+@RestController
+@RequestMapping("/Student")
+@Api(value = "学生表", tags = "学生表")
+public class StudentController extends BaseController {
+
+    @Autowired
+    private StudentService studentService;
+
+	/**
+     * 查询单条
+     */
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情", notes = "传入student")
+    public HttpResponseResult<Student> detail(Student student) {
+		Student detail = studentService.getOne(Condition.getQueryWrapper(student));
+		return succeed(detail);
+	}
+    
+    
+    /**
+     * 查询集合
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询集合", notes = "传入student")
+    public HttpResponseResult<List<Student>> list(Student student) {
+		List<Student> list = studentService.list();
+		return succeed(list);
+	}
+    
+    /**
+     * 查询分页
+     */
+    @GetMapping("/page")
+    @ApiOperation(value = "查询分页", notes = "传入student")
+    public HttpResponseResult<PageInfo<Student>> page(Student student, Query query) {
+		IPage<Student> pages = studentService.selectPage(Condition.getPage(query), student);
+        return succeed(Condition.pageInfo(pages));
+	}
+    
+    /**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperation(value = "新增", notes = "传入student")
+	public HttpResponseResult save(@Valid @RequestBody Student student) {
+    	return status(studentService.save(student));
+	}
+    
+    /**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperation(value = "修改", notes = "传入student")
+	public HttpResponseResult update(@Valid @RequestBody Student student) {
+        return status(studentService.updateById(student));
+	}
+    
+    /**
+	 * 新增或修改
+	 */
+    @PostMapping("/submit")
+    @ApiOperation(value = "新增或修改", notes = "传入student")
+	public HttpResponseResult submit(@RequestBody Student student) {
+        return status(studentService.saveOrUpdate(student));
+    }
+
+ 	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public HttpResponseResult remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        if (StringUtil.isEmpty(ids)) {
+			return failed("参数不能为空");
+		}
+		return status(studentService.removeByIds(StringUtil.toLongList(ids)));
+	}
+}

+ 100 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentCourseHomeworkController.java

@@ -0,0 +1,100 @@
+package com.yonge.cooleshow.student.controller;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import com.yonge.cooleshow.biz.dal.support.Condition;
+import com.yonge.cooleshow.biz.dal.support.Query;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.page.PageInfo;
+import com.yonge.toolset.utils.string.StringUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import com.yonge.cooleshow.biz.dal.entity.StudentCourseHomework;
+import com.yonge.cooleshow.biz.dal.service.StudentCourseHomeworkService;
+
+@RestController
+@RequestMapping("/StudentCourseHomework")
+@Api(value = "学生课程作业", tags = "学生课程作业")
+public class StudentCourseHomeworkController extends BaseController {
+
+    @Autowired
+    private StudentCourseHomeworkService studentCourseHomeworkService;
+
+	/**
+     * 查询单条
+     */
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情", notes = "传入studentCourseHomework")
+    public HttpResponseResult<StudentCourseHomework> detail(StudentCourseHomework studentCourseHomework) {
+		StudentCourseHomework detail = studentCourseHomeworkService.getOne(Condition.getQueryWrapper(studentCourseHomework));
+		return succeed(detail);
+	}
+    
+    
+    /**
+     * 查询集合
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询集合", notes = "传入studentCourseHomework")
+    public HttpResponseResult<List<StudentCourseHomework>> list(StudentCourseHomework studentCourseHomework) {
+		List<StudentCourseHomework> list = studentCourseHomeworkService.list();
+		return succeed(list);
+	}
+    
+    /**
+     * 查询分页
+     */
+    @GetMapping("/page")
+    @ApiOperation(value = "查询分页", notes = "传入studentCourseHomework")
+    public HttpResponseResult<PageInfo<StudentCourseHomework>> page(StudentCourseHomework studentCourseHomework, Query query) {
+		IPage<StudentCourseHomework> pages = studentCourseHomeworkService.selectPage(Condition.getPage(query), studentCourseHomework);
+        return succeed(Condition.pageInfo(pages));
+	}
+    
+    /**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperation(value = "新增", notes = "传入studentCourseHomework")
+	public HttpResponseResult save(@Valid @RequestBody StudentCourseHomework studentCourseHomework) {
+    	return status(studentCourseHomeworkService.save(studentCourseHomework));
+	}
+    
+    /**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperation(value = "修改", notes = "传入studentCourseHomework")
+	public HttpResponseResult update(@Valid @RequestBody StudentCourseHomework studentCourseHomework) {
+        return status(studentCourseHomeworkService.updateById(studentCourseHomework));
+	}
+    
+    /**
+	 * 新增或修改
+	 */
+    @PostMapping("/submit")
+    @ApiOperation(value = "新增或修改", notes = "传入studentCourseHomework")
+	public HttpResponseResult submit(@RequestBody StudentCourseHomework studentCourseHomework) {
+        return status(studentCourseHomeworkService.saveOrUpdate(studentCourseHomework));
+    }
+
+ 	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public HttpResponseResult remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        if (StringUtil.isEmpty(ids)) {
+			return failed("参数不能为空");
+		}
+		return status(studentCourseHomeworkService.removeByIds(StringUtil.toLongList(ids)));
+	}
+}

+ 100 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentStarController.java

@@ -0,0 +1,100 @@
+package com.yonge.cooleshow.student.controller;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import com.yonge.cooleshow.biz.dal.support.Condition;
+import com.yonge.cooleshow.biz.dal.support.Query;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.page.PageInfo;
+import com.yonge.toolset.utils.string.StringUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import com.yonge.cooleshow.biz.dal.entity.StudentStar;
+import com.yonge.cooleshow.biz.dal.service.StudentStarService;
+
+@RestController
+@RequestMapping("/StudentStar")
+@Api(value = "学生关注教师表", tags = "学生关注教师表")
+public class StudentStarController extends BaseController {
+
+    @Autowired
+    private StudentStarService studentStarService;
+
+	/**
+     * 查询单条
+     */
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情", notes = "传入studentStar")
+    public HttpResponseResult<StudentStar> detail(StudentStar studentStar) {
+		StudentStar detail = studentStarService.getOne(Condition.getQueryWrapper(studentStar));
+		return succeed(detail);
+	}
+    
+    
+    /**
+     * 查询集合
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询集合", notes = "传入studentStar")
+    public HttpResponseResult<List<StudentStar>> list(StudentStar studentStar) {
+		List<StudentStar> list = studentStarService.list();
+		return succeed(list);
+	}
+    
+    /**
+     * 查询分页
+     */
+    @GetMapping("/page")
+    @ApiOperation(value = "查询分页", notes = "传入studentStar")
+    public HttpResponseResult<PageInfo<StudentStar>> page(StudentStar studentStar, Query query) {
+		IPage<StudentStar> pages = studentStarService.selectPage(Condition.getPage(query), studentStar);
+        return succeed(Condition.pageInfo(pages));
+	}
+    
+    /**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperation(value = "新增", notes = "传入studentStar")
+	public HttpResponseResult save(@Valid @RequestBody StudentStar studentStar) {
+    	return status(studentStarService.save(studentStar));
+	}
+    
+    /**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperation(value = "修改", notes = "传入studentStar")
+	public HttpResponseResult update(@Valid @RequestBody StudentStar studentStar) {
+        return status(studentStarService.updateById(studentStar));
+	}
+    
+    /**
+	 * 新增或修改
+	 */
+    @PostMapping("/submit")
+    @ApiOperation(value = "新增或修改", notes = "传入studentStar")
+	public HttpResponseResult submit(@RequestBody StudentStar studentStar) {
+        return status(studentStarService.saveOrUpdate(studentStar));
+    }
+
+ 	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public HttpResponseResult remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        if (StringUtil.isEmpty(ids)) {
+			return failed("参数不能为空");
+		}
+		return status(studentStarService.removeByIds(StringUtil.toLongList(ids)));
+	}
+}

+ 100 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/VipCardRecordController.java

@@ -0,0 +1,100 @@
+package com.yonge.cooleshow.student.controller;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import com.yonge.cooleshow.biz.dal.support.Condition;
+import com.yonge.cooleshow.biz.dal.support.Query;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.common.page.PageInfo;
+import com.yonge.toolset.utils.string.StringUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import com.yonge.cooleshow.biz.dal.entity.VipCardRecord;
+import com.yonge.cooleshow.biz.dal.service.VipCardRecordService;
+
+@RestController
+@RequestMapping("/VipCardRecord")
+@Api(value = "购买会员卡记录表", tags = "购买会员卡记录表")
+public class VipCardRecordController extends BaseController {
+
+    @Autowired
+    private VipCardRecordService vipCardRecordService;
+
+	/**
+     * 查询单条
+     */
+    @GetMapping("/detail")
+    @ApiOperation(value = "详情", notes = "传入vipCardRecord")
+    public HttpResponseResult<VipCardRecord> detail(VipCardRecord vipCardRecord) {
+		VipCardRecord detail = vipCardRecordService.getOne(Condition.getQueryWrapper(vipCardRecord));
+		return succeed(detail);
+	}
+    
+    
+    /**
+     * 查询集合
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询集合", notes = "传入vipCardRecord")
+    public HttpResponseResult<List<VipCardRecord>> list(VipCardRecord vipCardRecord) {
+		List<VipCardRecord> list = vipCardRecordService.list();
+		return succeed(list);
+	}
+    
+    /**
+     * 查询分页
+     */
+    @GetMapping("/page")
+    @ApiOperation(value = "查询分页", notes = "传入vipCardRecord")
+    public HttpResponseResult<PageInfo<VipCardRecord>> page(VipCardRecord vipCardRecord, Query query) {
+		IPage<VipCardRecord> pages = vipCardRecordService.selectPage(Condition.getPage(query), vipCardRecord);
+        return succeed(Condition.pageInfo(pages));
+	}
+    
+    /**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperation(value = "新增", notes = "传入vipCardRecord")
+	public HttpResponseResult save(@Valid @RequestBody VipCardRecord vipCardRecord) {
+    	return status(vipCardRecordService.save(vipCardRecord));
+	}
+    
+    /**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperation(value = "修改", notes = "传入vipCardRecord")
+	public HttpResponseResult update(@Valid @RequestBody VipCardRecord vipCardRecord) {
+        return status(vipCardRecordService.updateById(vipCardRecord));
+	}
+    
+    /**
+	 * 新增或修改
+	 */
+    @PostMapping("/submit")
+    @ApiOperation(value = "新增或修改", notes = "传入vipCardRecord")
+	public HttpResponseResult submit(@RequestBody VipCardRecord vipCardRecord) {
+        return status(vipCardRecordService.saveOrUpdate(vipCardRecord));
+    }
+
+ 	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public HttpResponseResult remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        if (StringUtil.isEmpty(ids)) {
+			return failed("参数不能为空");
+		}
+		return status(vipCardRecordService.removeByIds(StringUtil.toLongList(ids)));
+	}
+}