123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.jeeplus.modules.wexintheorder.dao.TheLeadershipDao">
- <sql id="userColumns">
- a.id,
- a.com_id AS "comId",
- a.company_id AS "company.id",
- a.office_id AS "office.id",
- a.login_name,
- a.password,
- a.password_remake AS "passwordRemake",
- a.no,
- a.name,
- a.sex,
- a.email,
- a.phone,
- a.mobile,
- a.ishide,
- a.user_type,
- a.login_ip,
- a.login_date,
- a.remarks,
- a.login_flag,
- a.photo,
- a.default_photo,
- a.qrcode,
- a.sign,
- a.create_by AS "createBy.id",
- a.create_date,
- a.update_by AS "updateBy.id",
- a.update_date,
- a.del_flag,
- a.first_flag AS "firstFlag",
- s.name AS "company.name",
- s.parent_id AS "company.parent.id",
- s.parent_ids AS "company.parentIds",
- s.group_id AS "company.groupId",
- s.group_name AS "company.groupName",
- s.useable AS "company.useable",
- o.name AS "office.name",
- o.top_company AS "office.topCompany",
- o.parent_id AS "office.parent.id",
- o.parent_ids AS "office.parentIds",
- bo.id AS "branchOffice.id",
- bo.name AS "branchOffice.name",
- bo.parent_ids AS "branchOffice.parentIds",
- bo.parent_id AS "branchOffice.parent.id"
- </sql>
- <sql id="leaderShipColumns">
- a.id AS "id",
- a.create_by AS "createBy.id",
- a.create_date AS "createDate",
- a.update_by AS "updateBy.id",
- a.update_date AS "updateDate",
- a.remarks AS "remarks",
- a.team AS "team",
- a.department AS "department",
- a.specific AS "specific",
- a.correlationId AS "correlationId"
- </sql>
- <select id="findListUserId" resultType="com.jeeplus.modules.wexintheorder.entity.TheLeadership">
- select
- <include refid="leaderShipColumns"/>
- from the_order_information a
- WHERE a.correlationId = #{correlationId}
- </select>
- <insert id="insertLeaderShip">
- INSERT INTO the_order_information(
- id,
- create_by,
- create_date,
- update_by,
- update_date,
- remarks,
- team,
- department,
- `specific`,
- correlationId
- ) VALUES (
- #{id},
- #{createBy.id},
- #{createDate},
- #{updateBy.id},
- #{updateDate},
- #{remarks},
- #{team},
- #{department},
- #{specific},
- #{correlationId}
- )
- </insert>
- <update id="updateLeaderShip">
- UPDATE the_order_information SET
- update_date = #{updateDate},
- team = #{team},
- department = #{department},
- `specific` = #{specific}
- WHERE correlationId = #{correlationId}
- </update>
- <select id="findUser" resultType="com.jeeplus.modules.sys.entity.User">
- SELECT a.id,a.name from sys_user a WHERE a.name = #{name}
- </select>
- <!-- 根据id查找部门分管领导信息 -->
- <!--<select id="findUser" resultType="com.jeeplus.modules.sys.entity.User">-->
- <!--SELECT-->
- <!--<include refid="userColumns"/>-->
- <!--FROM sys_user a-->
- <!--LEFT JOIN sys_user_office uo ON uo.user_id = a.id AND uo.company_id = #{companyId} AND uo.status = '3' AND uo.del_flag = '0'-->
- <!--LEFT JOIN sys_office s ON s.id = uo.company_id-->
- <!--LEFT JOIN sys_office o ON o.id = uo.office_id-->
- <!--LEFT JOIN sys_office bo ON bo.id = o.branch_office-->
- <!--WHERE a.name = #{name}-->
- <!--</select>-->
- <select id="findOffice" resultType="java.lang.String">
- select o.name from sys_office o where id = #{id}
- </select>
- </mapper>
|