用户名取真实姓名字段

master
rong.liu 2 years ago
parent 5121af4fb5
commit 3d168c196e
  1. 16
      src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml
  2. 8
      src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml

@ -33,8 +33,8 @@
<select id="filter" resultType="com.huoran.iasf.entity.SysColumn">
SELECT
*,
( SELECT u.username FROM sys_user u WHERE u.id = s.founder_id ) AS creteUser,
( SELECT u.username FROM sys_user u WHERE u.id = s.editor_id ) AS editorUser,
( SELECT u.real_name FROM sys_user u WHERE u.id = s.founder_id ) AS creteUser,
( SELECT u.real_name FROM sys_user u WHERE u.id = s.editor_id ) AS editorUser,
( SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id ) AS templateName,
( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS listStyle,
( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id ) AS detailStyle,
@ -61,8 +61,8 @@
<select id="longPageColumnList" resultType="com.huoran.iasf.vo.resp.PageContentRespVO">
SELECT (SELECT u.username FROM sys_user u WHERE u.id = c.founder_id) AS founderName,
(SELECT u.username FROM sys_user u WHERE u.id = c.editor_id) AS editorName,
SELECT (SELECT u.real_name FROM sys_user u WHERE u.id = c.founder_id) AS founderName,
(SELECT u.real_name FROM sys_user u WHERE u.id = c.editor_id) AS editorName,
c.*
FROM sys_column c
WHERE deleted = 1
@ -93,8 +93,8 @@
<select id="filterMenuVisible" resultType="com.huoran.iasf.entity.SysColumn">
SELECT
*,
( SELECT u.username FROM sys_user u WHERE u.id = s.founder_id ) AS creteUser,
( SELECT u.username FROM sys_user u WHERE u.id = s.editor_id ) AS editorUser,
( SELECT u.real_name FROM sys_user u WHERE u.id = s.founder_id ) AS creteUser,
( SELECT u.real_name FROM sys_user u WHERE u.id = s.editor_id ) AS editorUser,
( SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id ) AS templateName,
( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id ) AS listStyle,
( SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id ) AS detailStyle,
@ -148,8 +148,8 @@
</select>-->
<select id="getsTheSubColumn" resultType="com.huoran.iasf.entity.SysColumn">
SELECT *,
(SELECT u.username FROM sys_user u WHERE u.id = s.founder_id) AS creteUser,
(SELECT u.username FROM sys_user u WHERE u.id = s.editor_id) AS editorUser,
(SELECT u.real_name FROM sys_user u WHERE u.id = s.founder_id) AS creteUser,
(SELECT u.real_name FROM sys_user u WHERE u.id = s.editor_id) AS editorUser,
(SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id) AS templateName,
(SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id) AS listStyle,
(SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id) AS detailStyle,

@ -4,8 +4,8 @@
<select id="articlePaginationList" resultType="com.huoran.iasf.vo.resp.PageContentRespVO">
SELECT c.*,
(SELECT sys_column.column_name FROM sys_column WHERE sys_column.id = c.column_id) AS columnName,
(SELECT u.username FROM sys_user u WHERE u.id = c.founder_id) AS founderName,
(SELECT u.username FROM sys_user u WHERE u.id = c.editor_id) AS editorName,
(SELECT u.real_name FROM sys_user u WHERE u.id = c.founder_id) AS founderName,
(SELECT u.real_name FROM sys_user u WHERE u.id = c.editor_id) AS editorName,
(SELECT type_id from sys_column WHERE sys_column.id = c.column_id) as typeId
FROM sys_content c
WHERE c.deleted = 1 and site_id = #{req.siteId}
@ -22,13 +22,13 @@
and title LIKE CONCAT('%',#{req.title},'%')
</if>
<if test="req.founder != null and req.founder != ''">
AND ( SELECT u.username FROM sys_user u WHERE u.id = c.founder_id ) LIKE
AND ( SELECT u.real_name FROM sys_user u WHERE u.id = c.founder_id ) LIKE
CONCAT('%',#{req.founder},'%')
</if>
<if test="req.editor != null and req.editor != ''">
AND ( SELECT u.username FROM sys_user u WHERE u.id = c.editor_id ) LIKE CONCAT('%',#{req.editor},'%')
AND ( SELECT u.real_name FROM sys_user u WHERE u.id = c.editor_id ) LIKE CONCAT('%',#{req.editor},'%')
</if>
<if test="req.column != null and req.column != ''">

Loading…
Cancel
Save