|
@@ -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>
|
|
|
|
|
|
<!-- 获得用户 -->
|