|
|
@ -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
|
|
|
|
create_by, create_time, update_by, update_time, factory_code, del_flag from qc_user_material
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectUserList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|
<select id="selectUserList" parameterType="QcUserMaterial" resultType="com.op.quality.domain.QcUserMaterial">
|
|
|
|
SELECT
|
|
|
|
SELECT
|
|
|
|
t.user_id,
|
|
|
|
user_id as userId,
|
|
|
|
t.user_name as user_code,
|
|
|
|
user_name as userCode,
|
|
|
|
t.nick_name as user_name,
|
|
|
|
nick_name as userName,
|
|
|
|
t.phonenumber,
|
|
|
|
phonenumber,
|
|
|
|
t.email,
|
|
|
|
email,
|
|
|
|
STRING_AGG(bp.product_desc_zh, ',') materialNames,
|
|
|
|
status,
|
|
|
|
t.status,
|
|
|
|
create_time
|
|
|
|
t.create_time
|
|
|
|
FROM sys_user
|
|
|
|
FROM
|
|
|
|
WHERE del_flag = '0'
|
|
|
|
sys_user t
|
|
|
|
<if test="userName != null and userName != ''"> and nick_name like concat('%', #{userName}, '%')</if>
|
|
|
|
LEFT JOIN lanju_op_xiaolan_ds.dbo.qc_user_material um ON um.user_code = t.user_name
|
|
|
|
<if test="phonenumber != null and phonenumber != ''"> and phonenumber like concat('%', #{phonenumber}, '%')</if>
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectQcUserMaterialList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|
<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="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</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="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>
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
</where>
|
|
|
|
</where>-->
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectUserByUserCode" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|
<select id="selectUserByUserCode" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
|
|
|
|