|
@@ -4,164 +4,138 @@
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.caimei365.manager.dao.providers.CmProvidersMapper">
|
|
|
|
|
|
- <resultMap type="CmProviders" id="CmProvidersResult">
|
|
|
- <result property="id" column="id"/>
|
|
|
- <result property="name" column="name"/>
|
|
|
- <result property="serviceLevel" column="serviceLevel"/>
|
|
|
- <result property="serviceCategory" column="serviceCategory"/>
|
|
|
- <result property="address" column="address"/>
|
|
|
- <result property="linkMan" column="linkMan"/>
|
|
|
- <result property="mobile" column="mobile"/>
|
|
|
- <result property="text" column="text"/>
|
|
|
- <result property="qrCodeImage" column="qrCodeImage"/>
|
|
|
- <result property="qualificationImage" column="qualificationImage"/>
|
|
|
- <result property="qualificationId" column="qualificationId"/>
|
|
|
- <result property="contractStartDate" column="contractStartDate"/>
|
|
|
- <result property="contractEntDate" column="contractEntDate"/>
|
|
|
- <result property="createBy" column="createBy"/>
|
|
|
- <result property="updateTime" column="updateTime"/>
|
|
|
- <result property="createTime" column="createTime"/>
|
|
|
- <result property="userId" column="userId"/>
|
|
|
- <result property="status" column="status"/>
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="selectCmProvidersVo">
|
|
|
- select cm_providers.id,
|
|
|
- cm_providers.name,
|
|
|
- cm_providers.serviceLevel,
|
|
|
- cm_providers.serviceCategory,
|
|
|
- cm_providers.status,
|
|
|
- cm_providers.userId,
|
|
|
- cm_providers.address,
|
|
|
- cm_providers.linkMan,
|
|
|
- cm_providers.mobile,
|
|
|
- cm_providers.text,
|
|
|
- cm_providers.brandName,
|
|
|
- cm_providers.qrCodeImage,
|
|
|
- cm_providers.qualificationImage,
|
|
|
- cm_providers.qualificationId,
|
|
|
- cm_providers.createBy,
|
|
|
- cm_providers.updateTime,
|
|
|
- cm_providers.createTime,
|
|
|
- cm_providers.splitCode
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="getByCmProviders" parameterType="CmProviders" resultMap="CmProvidersResult">
|
|
|
- <include refid="selectCmProvidersVo"/>
|
|
|
- from cm_providers AS cm_providers
|
|
|
+ <select id="getByCmProviders" parameterType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel"
|
|
|
+ resultType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel">
|
|
|
+ select
|
|
|
+ serviceProviderId,
|
|
|
+ name,
|
|
|
+ serviceLevel,
|
|
|
+ serviceCategory,
|
|
|
+ status,
|
|
|
+ userId,
|
|
|
+ address,
|
|
|
+ linkMan,
|
|
|
+ contractMobile as mobile,
|
|
|
+ text,
|
|
|
+ brandName,
|
|
|
+ qrCodeImage,
|
|
|
+ qualificationImage,
|
|
|
+ qualificationId,
|
|
|
+ createBy,
|
|
|
+ addTime,
|
|
|
+ splitCode
|
|
|
+ from serviceprovider
|
|
|
<where>
|
|
|
- <if test="id != null and id != ''">and cm_providers.id = #{id}</if>
|
|
|
- <if test="name != null and name != ''">and cm_providers.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="serviceLevel != null ">and cm_providers.serviceLevel = #{serviceLevel}</if>
|
|
|
- <if test="serviceCategory != null ">and cm_providers.serviceCategory = #{serviceCategory}</if>
|
|
|
- <if test="status != null ">and cm_providers.status = #{status}</if>
|
|
|
- <if test="userId != null ">and cm_providers.userId = #{userId}</if>
|
|
|
- <if test="address != null and address != ''">and cm_providers.address = #{address}</if>
|
|
|
- <if test="linkMan != null and linkMan != ''">and cm_providers.linkMan = #{linkMan}</if>
|
|
|
- <if test="mobile != null and mobile != ''">and cm_providers.mobile = #{mobile}</if>
|
|
|
- <if test="text != null and text != ''">and cm_providers.text = #{text}</if>
|
|
|
- <if test="qrCodeImage != null and qrCodeImage != ''">and cm_providers.qrCodeImage = #{qrCodeImage}</if>
|
|
|
- <if test="qualificationImage != null and qualificationImage != ''">and cm_providers.qualificationImage =
|
|
|
- #{qualificationImage}
|
|
|
- </if>
|
|
|
- <if test="qualificationId != null and qualificationId != ''">and cm_providers.qualificationId =
|
|
|
- #{qualificationId}
|
|
|
- </if>
|
|
|
+ <if test="serviceProviderId != null and serviceProviderId != ''">
|
|
|
+ and serviceProviderId = #{serviceProviderId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="serviceLevel != null ">and serviceLevel = #{serviceLevel}</if>
|
|
|
+ <if test="serviceCategory != null ">and cserviceCategory = #{serviceCategory}</if>
|
|
|
+ <if test="status != null ">and status = #{status}</if>
|
|
|
+ <if test="userId != null ">and userId = #{userId}</if>
|
|
|
+ <if test="address != null and address != ''">and address = #{address}</if>
|
|
|
+ <if test="linkMan != null and linkMan != ''">andlinkMan = #{linkMan}</if>
|
|
|
+ <if test="mobile != null and mobile != ''">and contractMobile = #{mobile}</if>
|
|
|
</where>
|
|
|
- group by cm_providers.id
|
|
|
- order by cm_providers.createTime desc
|
|
|
+ group by serviceProviderId
|
|
|
+ order by addTime desc
|
|
|
limit 0,1
|
|
|
</select>
|
|
|
|
|
|
- <select id="getCmProvidersList" parameterType="CmProviders" resultMap="CmProvidersResult">
|
|
|
- <include refid="selectCmProvidersVo"/>
|
|
|
- ,cm_providers_contract.contractStartDate
|
|
|
- ,cm_providers_contract.contractEndDate
|
|
|
- from cm_providers AS cm_providers
|
|
|
- LEFT JOIN cm_providers_contract as cm_providers_contract ON cm_providers_contract.providersId = cm_providers.id
|
|
|
+ <select id="getCmProvidersList" parameterType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel"
|
|
|
+ resultType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel">
|
|
|
+ select
|
|
|
+ sp.serviceProviderId,
|
|
|
+ sp.name,
|
|
|
+ sp.serviceLevel,
|
|
|
+ sp.serviceCategory,
|
|
|
+ sp.status,
|
|
|
+ sp.userId,
|
|
|
+ sp.address,
|
|
|
+ sp.linkMan,
|
|
|
+ sp.contractMobile as mobile,
|
|
|
+ sp.text,
|
|
|
+ sp.brandName,
|
|
|
+ sp.qrCodeImage,
|
|
|
+ sp.qualificationImage,
|
|
|
+ sp.qualificationId,
|
|
|
+ sp.createBy,
|
|
|
+ sp.addTime,
|
|
|
+ sp.splitCode,
|
|
|
+ cm_providers_contract.contractStartDate,
|
|
|
+ cm_providers_contract.contractEndDate
|
|
|
+ from serviceprovider AS sp
|
|
|
+ LEFT JOIN cm_providers_contract as cm_providers_contract ON cm_providers_contract.providersId =
|
|
|
+ sp.serviceProviderId
|
|
|
<where>
|
|
|
- <if test="id != null and id != ''">and cm_providers.id = #{id}</if>
|
|
|
- <if test="name != null and name != ''">and cm_providers.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="serviceLevel != null ">and cm_providers.serviceLevel = #{serviceLevel}</if>
|
|
|
- <if test="status != null ">and cm_providers.status = #{status}</if>
|
|
|
- <if test="userId != null ">and cm_providers.userId = #{userId}</if>
|
|
|
- <if test="serviceCategory != null ">and cm_providers.serviceCategory = #{serviceCategory}</if>
|
|
|
- <if test="address != null and address != ''">and cm_providers.address = #{address}</if>
|
|
|
- <if test="linkMan != null and linkMan != ''">and cm_providers.linkMan = #{linkMan}</if>
|
|
|
- <if test="mobile != null and mobile != ''">and cm_providers.mobile = #{mobile}</if>
|
|
|
- <if test="text != null and text != ''">and cm_providers.text = #{text}</if>
|
|
|
- <if test="qrCodeImage != null and qrCodeImage != ''">and cm_providers.qrCodeImage = #{qrCodeImage}</if>
|
|
|
- <if test="qualificationImage != null and qualificationImage != ''">and cm_providers.qualificationImage =
|
|
|
- #{qualificationImage}
|
|
|
- </if>
|
|
|
- <if test="qualificationId != null and qualificationId != ''">and cm_providers.qualificationId =
|
|
|
- #{qualificationId}
|
|
|
- </if>
|
|
|
- <if test="contractStartDate != null ">and cm_providers_contract.contractStartDate >= #{contractStartDate}
|
|
|
- </if>
|
|
|
- <if test="contractEndDate != null ">and cm_providers_contract.contractEndDate <![CDATA[ <= ]]>
|
|
|
- #{contractEndDate}
|
|
|
+ <if test="serviceProviderId != null and serviceProviderId != ''">
|
|
|
+ and sp.serviceProviderId = #{serviceProviderId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">and sp.name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="serviceLevel != null ">and sp.serviceLevel = #{serviceLevel}</if>
|
|
|
+ <if test="status != null ">and sp.status = #{status}</if>
|
|
|
+ <if test="userId != null ">and sp.userId = #{userId}</if>
|
|
|
+ <if test="serviceCategory != null ">and sp.serviceCategory = #{serviceCategory}</if>
|
|
|
+ <if test="address != null and address != ''">and sp.address = #{address}</if>
|
|
|
+ <if test="linkMan != null and linkMan != ''">and sp.linkMan = #{linkMan}</if>
|
|
|
+ <if test="mobile != null and mobile != ''">and sp.contractMobile = #{mobile}</if>
|
|
|
+ <if test="qualificationId != null and qualificationId != ''">
|
|
|
+ and sp.qualificationId = #{qualificationId}
|
|
|
+ </if>
|
|
|
+ <if test="contractStartDate != null ">
|
|
|
+ and cm_providers_contract.contractStartDate >= #{contractStartDate}
|
|
|
+ </if>
|
|
|
+ <if test="contractEndDate != null ">
|
|
|
+ and cm_providers_contract.contractEndDate <![CDATA[ <= ]]> #{contractEndDate}
|
|
|
</if>
|
|
|
</where>
|
|
|
- group by cm_providers.id
|
|
|
- order by cm_providers.createTime desc
|
|
|
+ group by sp.serviceProviderId
|
|
|
+ order by sp.addTime desc
|
|
|
</select>
|
|
|
|
|
|
- <select id="getCount" parameterType="CmProviders" resultType="int">
|
|
|
+ <select id="getCount" parameterType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel"
|
|
|
+ resultType="int">
|
|
|
select count(1)
|
|
|
- from cm_providers AS cm_providers
|
|
|
+ from serviceprovider
|
|
|
<where>
|
|
|
- <if test="id != null and id != ''">and cm_providers.id = #{id}</if>
|
|
|
- <if test="name != null and name != ''">and cm_providers.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="serviceLevel != null ">and cm_providers.serviceLevel = #{serviceLevel}</if>
|
|
|
- <if test="userId != null ">and cm_providers.userId = #{userId}</if>
|
|
|
- <if test="status != null ">and cm_providers.status = #{status}</if>
|
|
|
- <if test="serviceCategory != null ">and cm_providers.serviceCategory = #{serviceCategory}</if>
|
|
|
- <if test="address != null and address != ''">and cm_providers.address = #{address}</if>
|
|
|
- <if test="linkMan != null and linkMan != ''">and cm_providers.linkMan = #{linkMan}</if>
|
|
|
- <if test="mobile != null and mobile != ''">and cm_providers.mobile = #{mobile}</if>
|
|
|
- <if test="text != null and text != ''">and cm_providers.text = #{text}</if>
|
|
|
- <if test="qrCodeImage != null and qrCodeImage != ''">and cm_providers.qrCodeImage = #{qrCodeImage}</if>
|
|
|
- <if test="qualificationImage != null and qualificationImage != ''">and cm_providers.qualificationImage =
|
|
|
- #{qualificationImage}
|
|
|
- </if>
|
|
|
- <if test="qualificationId != null and qualificationId != ''">and cm_providers.qualificationId =
|
|
|
- #{qualificationId}
|
|
|
+ <if test="serviceProviderId != null and serviceProviderId != ''">
|
|
|
+ and serviceProviderId = #{serviceProviderId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="serviceLevel != null ">and serviceLevel = #{serviceLevel}</if>
|
|
|
+ <if test="userId != null ">and userId = #{userId}</if>
|
|
|
+ <if test="status != null ">and status = #{status}</if>
|
|
|
+ <if test="serviceCategory != null ">and serviceCategory = #{serviceCategory}</if>
|
|
|
+ <if test="address != null and address != ''">and address = #{address}</if>
|
|
|
+ <if test="mobile != null and mobile != ''">and contractMobile = #{mobile}</if>
|
|
|
+ <if test="qualificationId != null and qualificationId != ''">
|
|
|
+ and qualificationId = #{qualificationId}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="getCmProvidersById" parameterType="String" resultMap="CmProvidersResult">
|
|
|
- <include refid="selectCmProvidersVo"/>
|
|
|
- from cm_providers AS cm_providers
|
|
|
- where cm_providers.id = #{id}
|
|
|
- </select>
|
|
|
-
|
|
|
-
|
|
|
- <select id="getById" parameterType="CmProviders" resultType="String">
|
|
|
- select id
|
|
|
- from cm_providers AS cm_providers
|
|
|
- <where>
|
|
|
- <if test="id != null and id != ''">and cm_providers.id = #{id}</if>
|
|
|
- <if test="name != null and name != ''">and cm_providers.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="serviceLevel != null ">and cm_providers.serviceLevel = #{serviceLevel}</if>
|
|
|
- <if test="serviceCategory != null ">and cm_providers.serviceCategory = #{serviceCategory}</if>
|
|
|
- <if test="status != null ">and cm_providers.status = #{status}</if>
|
|
|
- <if test="userId != null ">and cm_providers.userId = #{userId}</if>
|
|
|
- <if test="address != null and address != ''">and cm_providers.address = #{address}</if>
|
|
|
- <if test="linkMan != null and linkMan != ''">and cm_providers.linkMan = #{linkMan}</if>
|
|
|
- <if test="mobile != null and mobile != ''">and cm_providers.mobile = #{mobile}</if>
|
|
|
- <if test="text != null and text != ''">and cm_providers.text = #{text}</if>
|
|
|
- <if test="qrCodeImage != null and qrCodeImage != ''">and cm_providers.qrCodeImage = #{qrCodeImage}</if>
|
|
|
- <if test="qualificationImage != null and qualificationImage != ''">and cm_providers.qualificationImage =
|
|
|
- #{qualificationImage}
|
|
|
- </if>
|
|
|
- <if test="qualificationId != null and qualificationId != ''">and cm_providers.qualificationId =
|
|
|
- #{qualificationId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- group by cm_providers.id
|
|
|
- limit 0,1
|
|
|
+ <select id="getCmProvidersById" parameterType="String"
|
|
|
+ resultType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel">
|
|
|
+ select serviceProviderId,
|
|
|
+ name,
|
|
|
+ serviceLevel,
|
|
|
+ serviceCategory,
|
|
|
+ status,
|
|
|
+ userId,
|
|
|
+ address,
|
|
|
+ linkMan,
|
|
|
+ contractMobile as mobile,
|
|
|
+ text,
|
|
|
+ brandName,
|
|
|
+ qrCodeImage,
|
|
|
+ qualificationImage,
|
|
|
+ qualificationId,
|
|
|
+ createBy,
|
|
|
+ addTime,
|
|
|
+ splitCode
|
|
|
+ from serviceprovider
|
|
|
+ where serviceProviderId = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="getProvidersUploadFileList" resultType="UploadFilePo">
|
|
@@ -173,17 +147,18 @@
|
|
|
qrCodeImage as fileUrl,
|
|
|
</if>
|
|
|
name as fileName
|
|
|
- from cm_providers AS cm_providers
|
|
|
+ from serviceprovider AS sp
|
|
|
<where>
|
|
|
- cm_providers.id in
|
|
|
+ sp.serviceProviderId in
|
|
|
<foreach item="idsIn"
|
|
|
collection="ids.split(',')"
|
|
|
open="(" separator="," close=")">
|
|
|
#{idsIn}
|
|
|
</foreach>
|
|
|
</where>
|
|
|
- group by cm_providers.id
|
|
|
+ group by sp.serviceProviderId
|
|
|
</select>
|
|
|
+
|
|
|
<select id="getProductList" resultType="com.caimei365.manager.entity.caimei.product.Product">
|
|
|
SELECT
|
|
|
p.productId,
|
|
@@ -211,6 +186,7 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
<select id="getProviderProductList" resultType="com.caimei365.manager.entity.caimei.product.Product">
|
|
|
SELECT
|
|
|
p.productId,
|
|
@@ -237,12 +213,12 @@
|
|
|
<select id="getProviderTeam" resultType="com.caimei365.manager.entity.caimei.providers.CmProviderTeam">
|
|
|
SELECT DISTINCT csr.leaderId,
|
|
|
csr.createdTime,
|
|
|
- s.linkMan as leaderName,
|
|
|
+ s.name as leaderName,
|
|
|
csr.id as teamId,
|
|
|
csr.name,
|
|
|
(SELECT COUNT(teamId) FROM cm_serviceteam_group WHERE teamId = csr.id) AS groupCount
|
|
|
FROM cm_serviceteam_role csr
|
|
|
- LEFT JOIN serviceprovider s ON csr.leaderId = s.serviceProviderID
|
|
|
+ LEFT JOIN serviceprovider s ON csr.leaderId = s.serviceProviderID
|
|
|
order by csr.createdTime desc
|
|
|
</select>
|
|
|
|
|
@@ -260,7 +236,6 @@
|
|
|
a.townID AS "townId",
|
|
|
a.flag AS "flag",
|
|
|
a.spID AS "spId",
|
|
|
- a.mainServiceProviderID AS "mainServiceProviderId",
|
|
|
a.address AS "address",
|
|
|
a.linkMan AS "linkMan",
|
|
|
a.linkManIdentity AS "linkManIdentity",
|
|
@@ -356,8 +331,11 @@
|
|
|
ORDER BY case when a.status = 91 then 0 else 1 end desc, a.addTime DESC
|
|
|
</select>
|
|
|
|
|
|
- <select id="groupList" resultType="com.caimei365.manager.entity.caimei.cmUser.ServiceProviderModel">
|
|
|
- SELECT csg.serviceId AS serviceProviderId, s.linkMan as name, s.contractMobile as mobile,csr.leaderId as leaderId
|
|
|
+ <select id="groupList" resultType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel">
|
|
|
+ SELECT csg.serviceId AS serviceProviderId,
|
|
|
+ s.name as name,
|
|
|
+ s.contractMobile as mobile,
|
|
|
+ csr.leaderId as leaderId
|
|
|
FROM cm_serviceTeam_group csg
|
|
|
LEFT JOIN serviceprovider s ON csg.serviceId = s.serviceProviderID
|
|
|
LEFT JOIN cm_serviceteam_role csr ON csg.teamId = csr.id
|
|
@@ -365,30 +343,30 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
- <insert id="addCmProviders" parameterType="CmProviders" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into cm_providers
|
|
|
+ <insert id="addCmProviders" parameterType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel"
|
|
|
+ useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into serviceprovider
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null and id != ''">id,</if>
|
|
|
+ <if test="serviceProviderId != null and serviceProviderId != ''">id,</if>
|
|
|
<if test="name != null and name != ''">name,</if>
|
|
|
<if test="serviceLevel != null">serviceLevel,</if>
|
|
|
<if test="serviceCategory != null">serviceCategory,</if>
|
|
|
<if test="address != null and address != ''">address,</if>
|
|
|
<if test="linkMan != null and linkMan != ''">linkMan,</if>
|
|
|
- <if test="mobile != null and mobile != ''">mobile,</if>
|
|
|
+ <if test="mobile != null and mobile != ''">contractMobile,</if>
|
|
|
<if test="text != null and text != ''">text,</if>
|
|
|
<if test="qrCodeImage != null and qrCodeImage != ''">qrCodeImage,</if>
|
|
|
<if test="qualificationImage != null and qualificationImage != ''">qualificationImage,</if>
|
|
|
<if test="qualificationId != null and qualificationId != ''">qualificationId,</if>
|
|
|
<if test="createBy != null and createBy != ''">createBy,</if>
|
|
|
- <if test="updateTime != null">updateTime,</if>
|
|
|
- <if test="createTime != null">createTime,</if>
|
|
|
+ <if test="addTime != null">addTime,</if>
|
|
|
<if test="status != null">status,</if>
|
|
|
<if test="userId != null">userId,</if>
|
|
|
<if test="brandName != null and brandName != ''">brandName,</if>
|
|
|
<if test="splitCode != null and splitCode != ''">splitCode,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null and id != ''">#{id},</if>
|
|
|
+ <if test="serviceProviderId != null and serviceProviderId != ''">#{serviceProviderId},</if>
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
|
<if test="serviceLevel != null">#{serviceLevel},</if>
|
|
|
<if test="serviceCategory != null">#{serviceCategory},</if>
|
|
@@ -400,8 +378,7 @@
|
|
|
<if test="qualificationImage != null and qualificationImage != ''">#{qualificationImage},</if>
|
|
|
<if test="qualificationId != null and qualificationId != ''">#{qualificationId},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="addTime != null">#{addTime},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
<if test="brandName != null and brandName != ''">#{brandName},</if>
|
|
@@ -430,7 +407,7 @@
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
- <select id="addGroups" resultType="com.caimei365.manager.entity.caimei.cmUser.ServiceProviderModel">
|
|
|
+ <select id="addGroups" resultType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel">
|
|
|
SELECT s.serviceProviderID AS serviceProviderId, s.linkMan as name, s.contractMobile as mobile
|
|
|
FROM serviceprovider s
|
|
|
LEFT JOIN cm_serviceTeam_group csg ON csg.serviceId = s.serviceProviderID
|
|
@@ -443,8 +420,8 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
- <update id="updateCmProviders" parameterType="CmProviders">
|
|
|
- update cm_providers
|
|
|
+ <update id="updateCmProviders" parameterType="com.caimei365.manager.entity.caimei.providers.ServiceProviderModel">
|
|
|
+ update serviceprovider
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
|
<if test="serviceLevel != null">serviceLevel = #{serviceLevel},</if>
|
|
@@ -459,14 +436,13 @@
|
|
|
</if>
|
|
|
<if test="qualificationId != null and qualificationId != ''">qualificationId = #{qualificationId},</if>
|
|
|
<if test="createBy != null and createBy != ''">createBy = #{createBy},</if>
|
|
|
- <if test="updateTime != null">updateTime = #{updateTime},</if>
|
|
|
- <if test="createTime != null">createTime = #{createTime},</if>
|
|
|
+ <if test="addTime != null">addTime = #{addTime},</if>
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
<if test="userId != null">userId = #{userId},</if>
|
|
|
<if test="brandName != null and brandName != ''">brandName = #{brandName},</if>
|
|
|
<if test="splitCode != null and splitCode != ''">splitCode = #{splitCode},</if>
|
|
|
</trim>
|
|
|
- where id = #{id}
|
|
|
+ where serviceProviderID = #{serviceProviderId}
|
|
|
<if test="userId != null">or userId = #{userId}</if>
|
|
|
</update>
|
|
|
|
|
@@ -490,32 +466,8 @@
|
|
|
|
|
|
<delete id="delCmProvidersById" parameterType="String">
|
|
|
delete
|
|
|
- from cm_providers
|
|
|
- where id = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="delCmProviders" parameterType="CmProviders">
|
|
|
- delete
|
|
|
- from cm_providers AS cm_providers
|
|
|
- <where>
|
|
|
- <if test="id != null and id != ''">and cm_providers.id = #{id}</if>
|
|
|
- <if test="name != null and name != ''">and cm_providers.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="serviceLevel != null ">and cm_providers.serviceLevel = #{serviceLevel}</if>
|
|
|
- <if test="serviceCategory != null ">and cm_providers.serviceCategory = #{serviceCategory}</if>
|
|
|
- <if test="status != null ">and cm_providers.status = #{status}</if>
|
|
|
- <if test="userId != null ">and cm_providers.userId = #{userId}</if>
|
|
|
- <if test="address != null and address != ''">and cm_providers.address = #{address}</if>
|
|
|
- <if test="linkMan != null and linkMan != ''">and cm_providers.linkMan = #{linkMan}</if>
|
|
|
- <if test="mobile != null and mobile != ''">and cm_providers.mobile = #{mobile}</if>
|
|
|
- <if test="text != null and text != ''">and cm_providers.text = #{text}</if>
|
|
|
- <if test="qrCodeImage != null and qrCodeImage != ''">and cm_providers.qrCodeImage = #{qrCodeImage}</if>
|
|
|
- <if test="qualificationImage != null and qualificationImage != ''">and cm_providers.qualificationImage =
|
|
|
- #{qualificationImage}
|
|
|
- </if>
|
|
|
- <if test="qualificationId != null and qualificationId != ''">and cm_providers.qualificationId =
|
|
|
- #{qualificationId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ from serviceprovider
|
|
|
+ where serviceProviderID = #{serviceProviderId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="delProviderProduct">
|