智慧保安后台管理-外网项目备份
Administrator
2021-12-08 932e65260d607834c08813750dd4256caea2d96e
制证申请修改
3 files modified
6 ■■■■ changed files
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.java
@@ -66,5 +66,5 @@
     * @param id 用户id
     * @return
     */
    int getAccreditationRecordsByUserIdAuditCount(@Param("userId") String id);
    int getAccreditationRecordsByUserIdAuditCount(@Param("userId") String id,@Param("type") Integer type);
}
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -414,6 +414,6 @@
    <!--根据用户 id 查询当前人员是否有待审核和审核通过的记录数-->
    <select id="getAccreditationRecordsByUserIdAuditCount" resultType="java.lang.Integer">
        select count(*) from sys_accreditation_records where (audit_status = 1 or audit_status = 3) and user_id = #{userId} and type = 2
        select count(*) from sys_accreditation_records where (audit_status = 1 or audit_status = 2) and user_id = #{userId} and type = #{type}
    </select>
</mapper>
src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java
@@ -84,7 +84,7 @@
            //判断类型,如果是证书的,审核未通过的可以再次申请,审核通过的,暂时不给于新增记录
            if (accreditationRecords.getType()==2){
                //查询当前人员是否有待审核和审核通过的记录数
                int count  = baseMapper.getAccreditationRecordsByUserIdAuditCount(id);
                int count  = baseMapper.getAccreditationRecordsByUserIdAuditCount(id,2);
                if (count<1){
                    //新增
                    this.save(records);