|
@@ -1,7 +1,7 @@
|
|
|
<?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.workclientinfo.dao.WorkClientInfoDao">
|
|
|
-
|
|
|
+
|
|
|
<sql id="workClientInfoColumnsJoinLink">
|
|
|
a.id AS "id",
|
|
|
a.create_by AS "createBy.id",
|
|
@@ -68,7 +68,7 @@
|
|
|
a.usc_code AS "uscCode",
|
|
|
a.number AS "number"
|
|
|
</sql>
|
|
|
-
|
|
|
+
|
|
|
<sql id="workClientInfoJoins">
|
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
|
</sql>
|
|
@@ -100,13 +100,13 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="get" resultType="WorkClientInfo" >
|
|
|
- SELECT
|
|
|
+ SELECT
|
|
|
<include refid="workClientInfoColumns"/>
|
|
|
FROM work_client_info a
|
|
|
<include refid="workClientInfoJoins"/>
|
|
|
WHERE a.id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findList" resultType="WorkClientInfo" >
|
|
|
SELECT
|
|
|
su.name as "userName",
|
|
@@ -125,7 +125,7 @@
|
|
|
<!--and b.id = #{workClientLinkman.id}-->
|
|
|
<!--</if>-->
|
|
|
<if test="name != null and name != ''">
|
|
|
- AND a.name LIKE
|
|
|
+ AND a.name LIKE
|
|
|
<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
|
|
|
<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
|
|
|
<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
|
|
@@ -146,7 +146,7 @@
|
|
|
AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
|
|
|
</if>
|
|
|
<if test="address != null and address != ''">
|
|
|
- AND a.address LIKE
|
|
|
+ AND a.address LIKE
|
|
|
<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
|
|
|
<if test="dbName == 'mssql'">'%'+#{address}+'%'</if>
|
|
|
<if test="dbName == 'mysql'">concat('%',#{address},'%')</if>
|
|
@@ -173,7 +173,7 @@
|
|
|
AND c.job_type_id = #{jobTypeShow}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- AND c.job_type_id = "1"
|
|
|
+
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</where>
|
|
@@ -247,14 +247,14 @@
|
|
|
AND c.job_type_id = #{jobTypeShow}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- AND c.job_type_id = "1"
|
|
|
+
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findAllList" resultType="WorkClientInfo" >
|
|
|
- SELECT
|
|
|
+ SELECT
|
|
|
<include refid="workClientInfoColumns"/>
|
|
|
FROM work_client_info a
|
|
|
<include refid="workClientInfoJoins"/>
|
|
@@ -270,7 +270,7 @@
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insert">
|
|
|
INSERT INTO work_client_info(
|
|
|
id,
|
|
@@ -340,9 +340,9 @@
|
|
|
#{number}
|
|
|
)
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
<update id="update">
|
|
|
- UPDATE work_client_info SET
|
|
|
+ UPDATE work_client_info SET
|
|
|
update_by = #{updateBy.id},
|
|
|
update_date = #{updateDate},
|
|
|
name = #{name},
|
|
@@ -372,27 +372,27 @@
|
|
|
usc_code = #{uscCode}
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<!--物理删除-->
|
|
|
<update id="delete">
|
|
|
DELETE FROM work_client_info
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<!--逻辑删除-->
|
|
|
<update id="deleteByLogic">
|
|
|
- UPDATE work_client_info SET
|
|
|
+ UPDATE work_client_info SET
|
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
|
|
|
<select id="findUniqueByProperty" resultType="WorkClientInfo" statementType="STATEMENT">
|
|
|
select * FROM work_client_info where ${propertyName} = '${value}'
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="countByUscCode" resultType="int">
|
|
|
SELECT count(1) from work_client_info WHERE usc_code = #{uscCode}
|
|
|
</select>
|
|
@@ -579,4 +579,4 @@
|
|
|
where md.del_flag = 0 and c.type_name = 'job_type' and a.work_client_id = #{clientId}
|
|
|
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|