提交 3d64022a 作者: 余乾开

Merge branch 'develop'

......@@ -61,4 +61,11 @@ public class FlyerTrainingController {
public ResultBody licenseOrSkillQueryCurriculum(@ApiParam(value = "考证/技能 0:考证 1:技能") @RequestParam(value = "type") Integer type) {
return flyerTrainingService.licenseOrSkillQueryCurriculum(type);
}
@ApiOperation(value = "课程视频详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CurriculumInfoVO.class)})
@GetMapping("/curriculumDetails")
public ResultBody curriculumDetails(@ApiParam(value = "课程id") @RequestParam(value = "id") Integer id) {
return flyerTrainingService.curriculumDetails(id);
}
}
......@@ -5,7 +5,6 @@ import com.mmc.csf.release.entity.FlightSkillsDO;
import com.mmc.csf.release.entity.PilotRegistrationDO;
import com.mmc.csf.release.flyer.qo.CurriculumQo;
import com.mmc.csf.release.flyer.vo.DronePilotLicenseVO;
import com.mmc.csf.release.task.qo.TaskServiceQo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......@@ -58,4 +57,6 @@ public interface FlyerTrainingDao {
* @return {@link List}<{@link CurriculumInfoDO}>
*/
List<CurriculumInfoDO> selectSkillCurriculum(Integer type);
CurriculumInfoDO curriculumDetails(Integer id);
}
......@@ -48,4 +48,6 @@ public interface FlyerTrainingService {
* @return {@link ResultBody}
*/
ResultBody licenseOrSkillQueryCurriculum(Integer type);
ResultBody curriculumDetails(Integer id);
}
......@@ -105,4 +105,14 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
return ResultBody.success(curriculumInfoList == null ? null : curriculumInfoList.stream()
.map(CurriculumInfoDO::buildCurriculumInfoVO).collect(Collectors.toList()));
}
@Override
public ResultBody curriculumDetails(Integer id) {
CurriculumInfoDO curriculumInfoDO = flyerTrainingDao.curriculumDetails(id);
if (curriculumInfoDO == null) {
return ResultBody.error("课程不存在或已下架!");
}else {
return ResultBody.success(curriculumInfoDO.buildCurriculumInfoVO());
}
}
}
......@@ -7,9 +7,10 @@
<insert id="insertPilotRegistrationInfo" parameterType="com.mmc.csf.release.entity.PilotRegistrationDO"
useGeneratedKeys="true" keyProperty="id">
INSERT INTO pilot_registration(apply_user_id, `name`, city, telephone, driving_license, province,
uav_license, industry_app_auth, remark)
VALUES (#{applyUserId}, #{name}, #{city}, #{telephone}, #{drivingLicense}, #{province}, #{uavLicense},
#{industryAppAuth}, #{remark})
uav_license_level_1, uav_license_level_2, uav_license_level_3, industry_app_auth,
remark)
VALUES (#{applyUserId}, #{name}, #{city}, #{telephone}, #{drivingLicense}, #{province}, #{uavLicenseLevelOne},
#{uavLicenseLevelTwo}, #{uavLicenseLevelThree}, #{industryAppAuth}, #{remark})
</insert>
<select id="selectAllLicenses" resultType="com.mmc.csf.release.flyer.vo.DronePilotLicenseVO">
select id,
......@@ -92,4 +93,19 @@
INNER JOIN curriculum_video cv ON ci.id = cv.curriculum_info_id
where ci.flight_skills is not null
</select>
<select id="curriculumDetails" resultType="com.mmc.csf.release.entity.CurriculumInfoDO">
SELECT ci.id,
ci.curriculum_name,
ci.supplier_id,
ci.curriculum_price,
ci.curriculum_desc,
ci.is_free free,
ci.drone_pilot_license_id,
ci.flight_skills,
cv.curriculum_url videoUrl
from curriculum_info ci
INNER JOIN curriculum_video cv ON ci.id = cv.curriculum_info_id
where ci.id = #{id}
and ci.is_deleted = 0
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论