“djh”
2026-02-02 63264fe00b684bfec91ca5888f640971dabc0ed2
修改模版,新增置顶
6 files modified
47 ■■■■ changed files
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java 15 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/StandardizedTemplate.java 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/SysCompany.java 12 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/StandardizedTemplateService.java 2 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java 9 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml 6 ●●●●● patch | view | raw | blame | history
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java
@@ -58,6 +58,21 @@
    /**
     * 企业花名册修改
     * @param id
     * @return
     */
    @ApiOperation(value = "标准化模版置顶")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "id", dataType = "int", required = true, value = "数据id"),
    })
    @GetMapping("/standardizedTemplate/top")
    public CommonResult topCompanyIndustryTemplate(Integer id){
        return standardizedTemplateService.topStandardizedTemplate(id);
    }
    /**
     * 企业花名册修改
     * @param standardizedTemplate
     * @return
     */
multi-system/src/main/java/com/gkhy/exam/system/domain/StandardizedTemplate.java
@@ -97,4 +97,7 @@
    @TableField(exist = false)
    private Integer sort;
    @TableField("top_time")
    private LocalDateTime topTime;
}
multi-system/src/main/java/com/gkhy/exam/system/domain/SysCompany.java
@@ -49,15 +49,15 @@
    @TableField("credit_code")
    private String creditCode;
    @NotBlank(message = "负责人不能为空")
    @ApiModelProperty(value = "负责人",required = true)
//    @NotBlank(message = "负责人不能为空")
//    @ApiModelProperty(value = "负责人",required = true)
    @TableField("major")
    private String major;
    @NotBlank(message = "联系电话不能为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$",message = "手机号码有误!")
    @ApiModelProperty(value = "联系电话",required = true)
//    @NotBlank(message = "联系电话不能为空")
//    @Length(min = 11, max = 11, message = "手机号只能为11位")
//    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$",message = "手机号码有误!")
//    @ApiModelProperty(value = "联系电话",required = true)
    @TableField("phone")
    private String phone;
multi-system/src/main/java/com/gkhy/exam/system/service/StandardizedTemplateService.java
@@ -25,4 +25,6 @@
    CommonResult deletedStandardizedQuality(Integer id);
    CommonResult getStandardizedQualityByCompanyId(Integer id);
    CommonResult topStandardizedTemplate(Integer id);
}
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java
@@ -255,4 +255,13 @@
        }
        return CommonResult.success(map);
    }
    @Override
    public CommonResult topStandardizedTemplate(Integer id) {
        StandardizedTemplate standardizedTemplate = new StandardizedTemplate();
        standardizedTemplate.setId(id);
        standardizedTemplate.setTopTime(LocalDateTime.now());
        standardizedTemplateMapper.updateById(standardizedTemplate);
        return CommonResult.success();
    }
}
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml
@@ -88,14 +88,17 @@
        </if>
        <if test="sort!=null and sort==1">
            ORDER BY
            st.top_time desc,
            st.template_name asc
        </if>
        <if test="sort!=null and sort==2">
            ORDER BY
            st.top_time desc,
            st.template_name desc
        </if>
        <if test="sort ==null or sort== '' or sort == 0">
            ORDER BY
            st.top_time desc,
            st.create_time desc
        </if>
@@ -142,14 +145,17 @@
        </if>
        <if test="sort!=null and sort==1">
            ORDER BY
            st.top_time desc,
            st.template_name asc
        </if>
        <if test="sort!=null and sort==2">
            ORDER BY
            st.top_time desc,
            st.template_name desc
        </if>
        <if test="sort ==null or sort== '' or sort == 0">
            ORDER BY
            st.top_time desc,
            st.create_time desc
        </if>
    </select>