fuliqi
2024-06-18 d485687a5c6d3b3d91db56354d77d81b02197712
教学资源
3个文件已修改
32 ■■■■ 已修改文件
src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/EducationResourceMapper.xml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java
@@ -20,8 +20,8 @@
    /** 文件地址 */
    private String contentUrl;
    /** 所属分类 */
    private Integer belongType;
    /** 所属学科 */
    private Integer subjectId;
    /** 主题简介 */
    private String introduction;
src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java
@@ -30,9 +30,9 @@
    private UploadFile contentUrl;
    private String contentUrlString;
    /** 所属分类 */
    @NotNull(message = "请选择分类")
    private Integer belongType;
    /** 所属学科 */
    @NotNull(message = "请选择学科")
    private Integer subjectId;
    private String typeName;
src/main/resources/mapper/EducationResourceMapper.xml
@@ -9,7 +9,7 @@
            ter.id,
            ter.content_type,
            ter.content_url as contentUrlString,
            ter.belong_type,
            ter.subject_id,
            ter.introduction,
            ter.create_time,
            ter.update_time,
@@ -17,14 +17,14 @@
            ts.name as typeName
        FROM
        t_education_resource ter
                INNER JOIN t_subject ts ON ts.id = ter.belong_type
                INNER JOIN t_subject ts ON ts.id = ter.subject_id
        <where>
            AND ter.deleted = 0
            <if test="query.introduction != null and query.introduction != ''">
                AND ter.introduction like concat('%', #{query.subject}, '%')
            </if>
            <if test="query.belongType != null">
                AND ts.id = #{query.belongType}
            <if test="query.subjectId != null">
                AND ts.id = #{query.subjectId}
            </if>
        </where>
        ORDER BY
@@ -36,21 +36,21 @@
            ter.id,
            ter.content_type,
            ter.content_url as contentUrlString,
            ter.belong_type,
            ter.subject_id,
            ter.introduction,
            ter.create_time,
            ter.update_time,
            ter.attachment as attachmentString
        FROM
            t_education_resource ter
                INNER JOIN t_subject ts ON ts.id = tos.belong_type
                INNER JOIN t_subject ts ON ts.id = ter.subject_id
        <where>
            AND ter.deleted = 0
            <if test="query.introduction != null and query.introduction != ''">
                AND ter.introduction like concat('%', #{query.subject}, '%')
            </if>
            <if test="query.belongType != null">
                AND ts.id = #{query.belongType}
            <if test="query.subjectId != null">
                AND ts.id = #{query.subjectId}
            </if>
        </where>
        ORDER BY
@@ -58,9 +58,9 @@
    </select>
    <insert id="add" keyColumn="id" useGeneratedKeys="true">
        INSERT INTO t_education_resource(content_type, content_url, belong_type, introduction, create_time, update_time,
        INSERT INTO t_education_resource(content_type, content_url, subject_id, introduction, create_time, update_time,
                                   attachment)
            value (#{form.contentType}, #{form.contentUrl}, #{form.belongType}, #{form.introduction}, #{form.createTime}, #{form.updateTime}, #{form.attachment})
            value (#{form.contentType}, #{form.contentUrl}, #{form.subjectId}, #{form.introduction}, #{form.createTime}, #{form.updateTime}, #{form.attachment})
    </insert>
    <update id="update">
@@ -69,7 +69,7 @@
        <set>
            <if test="form.contentType != null and form.contentType != ''">content_type = #{form.contentType},</if>
            <if test="form.contentUrl != null and form.contentUrl != ''">content_url = #{form.contentUrl},</if>
            <if test="form.belongType != null">belong_type = #{form.belongType},</if>
            <if test="form.subjectId != null">subject_id = #{form.subjectId},</if>
            <if test="form.introduction != null and form.introduction != ''">introduction = #{form.introduction},</if>
            <if test="form.updateTime != null">update_time = #{form.updateTime},</if>
            attachment = #{form.attachment}