mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 19:53:26 +09:00
account read update 관련
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
<result column="telephone" property="telephone"/>
|
||||
<result column="address" property="address"/>
|
||||
<result column="activation" property="activation"/>
|
||||
<result column="personal_authority_id" property="personalAuthorityId" />
|
||||
<result column="group_authority_id" property="groupAuthorityId" />
|
||||
<association property="groupAuthorityDto" javaType="authorityDto">
|
||||
<id column="auth2.id" property="id" />
|
||||
<result column="group_auth_name" property="name" />
|
||||
@@ -21,12 +23,12 @@
|
||||
<id column="auth.id" property="id" />
|
||||
<result column="personal_auth_name" property="name" />
|
||||
</association>
|
||||
<association property="departmentDto" javaType="deptPositionDto">
|
||||
<id column="dept.id" property="id" />
|
||||
<association property="departmentDto" javaType="departmentDto">
|
||||
<id column="dept_id" property="id" />
|
||||
<result column="dept_name" property="name" />
|
||||
</association>
|
||||
<association property="positionDto" javaType="deptPositionDto">
|
||||
<id column="pos.id" property="id" />
|
||||
<association property="positionDto" javaType="positionDto">
|
||||
<id column="pos_id" property="id" />
|
||||
<result column="pos_name" property="name" />
|
||||
</association>
|
||||
</resultMap>
|
||||
@@ -35,12 +37,14 @@
|
||||
acc.id, acc.name,
|
||||
acc.employee_number, acc.password, acc.email, acc.gender,
|
||||
acc.birth, acc.telephone, acc.address, acc.activation,
|
||||
acc.personal_authority_id , acc.group_authority_id,
|
||||
acc.department_id, acc.position_id,
|
||||
auth2.name group_auth_name, auth.name personal_auth_name,
|
||||
dept.name dept_name, pos.name pos_name
|
||||
from account acc join authority auth join authority auth2 join department dept join position pos
|
||||
on acc.personal_authority_id = auth.id and acc.group_authority_id = auth2.id
|
||||
and dept.id = acc.department_id and acc.position_id = pos.id
|
||||
where acc.name like concat('%',#{search},'%')
|
||||
where acc.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultMap="accountResultMap" parameterType="map">
|
||||
@@ -62,11 +66,55 @@
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
UUID(), #{employeeNumber}, #{password},
|
||||
UUID(), #{employeeNumber}, #{employeeNumber},
|
||||
#{email}, #{groupAuthorityId},
|
||||
#{personalAuthorityId},#{name},#{gender},
|
||||
#{birth},#{stelephone}, #{address},
|
||||
#{birth},#{telephone}, #{address},
|
||||
#{departmentId},#{positionId},#{activation}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertToAuthority" parameterType="AuthorityDto">
|
||||
insert into authority
|
||||
(
|
||||
id, name, account, authority, product_category,
|
||||
product, prices, vendor, warehouse, stock, plan_in,
|
||||
product_in, product_out, board, activation, is_group_authority)
|
||||
VALUES (
|
||||
#{id}, #{name}, #{account},
|
||||
#{authority}, #{productCategory},
|
||||
#{product},#{prices},#{vendor},
|
||||
#{warehouse},#{stock}, #{planIn},
|
||||
#{productIn},#{productOut},#{board},
|
||||
#{activation}, #{isGroupAuthority}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="selectDeptAll" resultType="departmentDto" parameterType="map">
|
||||
select * from department
|
||||
where name like concat('%',#{search},'%')
|
||||
order by name limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="selectPosAll" resultType="positionDto" parameterType="map">
|
||||
select * from position
|
||||
where name like concat('%',#{search},'%')
|
||||
order by name limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="accountDto">
|
||||
update account SET
|
||||
name = #{name},
|
||||
employee_number = #{employeeNumber},
|
||||
email = #{email},
|
||||
personal_authority_id = #{personalAuthorityId},
|
||||
gender = #{gender},
|
||||
birth = #{birth},
|
||||
telephone = #{telephone},
|
||||
address = #{address},
|
||||
department_id = #{departmentId},
|
||||
position_id = #{positionId},
|
||||
activation = #{activation}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user