Browse Source

资质管理-证书类型

sangwenwei 1 year ago
parent
commit
3d023afc29

+ 4 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/CertDTO.java

@@ -81,4 +81,8 @@ public class CertDTO extends BaseDTO {
     private String fileLsUrl;
 
     private static final long serialVersionUID = 1L;
+
+
+
+    private String certType;
 }

+ 14 - 3
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -101,10 +101,21 @@
     </sql>
 
     <select id="getCertListByUserId" resultType="com.jeeplus.sys.service.dto.CertDTO">
-        select
-        <include refid="Cert_Column_List"></include>
+        select distinct
+        <include refid="Cert_Column_List"></include>,
+        (select
+        group_concat(dv.label)
+        from sys_cert sc
+        left join sys_dict_value dv on sc.type=dv.value
+        LEFT JOIN sys_dict_type dt on dv.dict_type_id=dt.id and dt.type='sys_cert_type'
+        where dv.dict_type_id=(SELECT id FROM sys_dict_type where type='sys_cert_type')
+        and sc.del_flag = '0'
+        and su.id = sc.user_id
+        ) as certType
         from sys_cert cert
-        where cert.del_flag = '0' and cert.user_id = #{id}
+        left join sys_dict_value dv on cert.type=dv.value and dv.del_flag = '0'
+        left join sys_user su on su.id=cert.user_id and cert.del_flag = '0'
+        where cert.del_flag = '0' and cert.user_id = #{id} and dv.dict_type_id=(SELECT id FROM sys_dict_type where type='sys_cert_type')
     </select>
 
     <!-- 获得用户 -->