|
|
|
@ -28,26 +28,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
create_by, create_time, update_by, update_time, factory_code, del_flag from qc_user_material
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectUserList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|
|
<select id="selectUserList" parameterType="QcUserMaterial" resultType="com.op.quality.domain.QcUserMaterial">
|
|
|
|
|
SELECT
|
|
|
|
|
t.user_id,
|
|
|
|
|
t.user_name as user_code,
|
|
|
|
|
t.nick_name as user_name,
|
|
|
|
|
t.phonenumber,
|
|
|
|
|
t.email,
|
|
|
|
|
STRING_AGG(bp.product_desc_zh, ',') materialNames,
|
|
|
|
|
t.status,
|
|
|
|
|
t.create_time
|
|
|
|
|
FROM
|
|
|
|
|
sys_user t
|
|
|
|
|
LEFT JOIN lanju_op_xiaolan_ds.dbo.qc_user_material um ON um.user_code = t.user_name
|
|
|
|
|
LEFT JOIN lanju_op_xiaolan_ds.dbo.base_product bp ON bp.product_code = um.material_code
|
|
|
|
|
WHERE t.del_flag = '0'
|
|
|
|
|
<if test="userName != null and userName != ''"> and t.nick_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
<if test="phonenumber != null and phonenumber != ''"> and t.phonenumber like concat('%', #{phonenumber}, '%')</if>
|
|
|
|
|
GROUP BY t.user_id,t.user_name,t.nick_name,t.phonenumber,t.email,t.status,t.create_time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
user_id as userId,
|
|
|
|
|
user_name as userCode,
|
|
|
|
|
nick_name as userName,
|
|
|
|
|
phonenumber,
|
|
|
|
|
email,
|
|
|
|
|
status,
|
|
|
|
|
create_time
|
|
|
|
|
FROM sys_user
|
|
|
|
|
WHERE del_flag = '0'
|
|
|
|
|
<if test="userName != null and userName != ''"> and nick_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
<if test="phonenumber != null and phonenumber != ''"> and phonenumber like concat('%', #{phonenumber}, '%')</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcUserMaterialList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|
@ -57,12 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</where>-->
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectUserByUserCode" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|
|