|  | @@ -5,22 +5,29 @@ import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.TempLiveTeacherCardDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.ImGroup;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.Student;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.Subject;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.TempLiveTeacherCard;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.ImGroupService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiImplicitParam;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiImplicitParams;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  |  import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestBody;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | +import springfox.documentation.annotations.ApiIgnore;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  | +import java.util.HashMap;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.Map;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 直播临时活动
 | 
	
	
		
			
				|  | @@ -36,18 +43,37 @@ public class TempLiveActivityController extends BaseController {
 | 
	
		
			
				|  |  |      @Resource
 | 
	
		
			
				|  |  |      private TempLiveTeacherCardDao tempLiveTeacherCardDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation("查询声部上课老师名片信息列表")
 | 
	
		
			
				|  |  | -    @PostMapping(value = "/listTeacherCard",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 | 
	
		
			
				|  |  | -    public HttpResponseResult<List<TempLiveTeacherCard>> listTeacherCard() {
 | 
	
		
			
				|  |  | +    @ApiOperation("查询声部")
 | 
	
		
			
				|  |  | +    @PostMapping(value = "/querySubjectOption",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 | 
	
		
			
				|  |  | +    public HttpResponseResult<Map<String,Object>> querySubjectOption() {
 | 
	
		
			
				|  |  |          SysUser user = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |          if (user == null || user.getId() == null) {
 | 
	
		
			
				|  |  |              return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        Map<String,Object> res = new HashMap<>();
 | 
	
		
			
				|  |  | +        List<Subject> options = tempLiveTeacherCardDao.querySubjectOption();
 | 
	
		
			
				|  |  | +        res.put("options",options);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          Student student = studentService.get(user.getId());
 | 
	
		
			
				|  |  | +        res.put("subjectId",student.getSubjectIdList());
 | 
	
		
			
				|  |  | +        return succeed(res);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        TempLiveTeacherCard param = new TempLiveTeacherCard();
 | 
	
		
			
				|  |  | +    @ApiImplicitParams({
 | 
	
		
			
				|  |  | +            @ApiImplicitParam(
 | 
	
		
			
				|  |  | +                    name = "subjectId",
 | 
	
		
			
				|  |  | +                    value = "声部id",
 | 
	
		
			
				|  |  | +                    paramType = "query", dataType = "String", required = true
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    @ApiOperation("查询声部上课老师名片信息列表")
 | 
	
		
			
				|  |  | +    @PostMapping(value = "/listTeacherCard",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 | 
	
		
			
				|  |  | +    public HttpResponseResult<List<TempLiveTeacherCard>> listTeacherCard(@ApiIgnore @RequestBody TempLiveTeacherCard param) {
 | 
	
		
			
				|  |  | +        SysUser user = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if (user == null || user.getId() == null) {
 | 
	
		
			
				|  |  | +            return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          param.setStudentId(user.getId());
 | 
	
		
			
				|  |  | -        param.setSubjectId(student.getSubjectIdList());
 | 
	
		
			
				|  |  |          List<TempLiveTeacherCard> list = tempLiveTeacherCardDao.list(param);
 | 
	
		
			
				|  |  |          return succeed(list);
 | 
	
		
			
				|  |  |      }
 |