|
|
@@ -2,4 +2,145 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="org.jeecg.modules.hlgcompany.mapper.HlgCompanyMapper">
|
|
|
|
|
|
+ <sql id="hlgCompanyColumns">
|
|
|
+ a.id AS "id",
|
|
|
+ a.platform_id AS "platformId",
|
|
|
+ a.company_name AS "companyName",
|
|
|
+ a.duty_paragraph AS "dutyParagraph",
|
|
|
+ a.business_license AS "businessLicense",
|
|
|
+ a.province_code AS "provinceCode",
|
|
|
+ a.city_code AS "cityCode",
|
|
|
+ a.country_code AS "countryCode",
|
|
|
+ a.province_city_country AS "provinceCityCountry",
|
|
|
+ a.address AS "address",
|
|
|
+ a.contact_person AS "contactPerson",
|
|
|
+ a.mobile_phone AS "mobilePhone",
|
|
|
+ a.phone AS "phone",
|
|
|
+ a.sys_org_code AS "sysOrgCode",
|
|
|
+ a.is_lock AS "isLock",
|
|
|
+ a.create_time AS "createTime",
|
|
|
+ a.create_by AS "createBy.id",
|
|
|
+ a.update_time AS "updateTime",
|
|
|
+ a.update_by AS "updateBy.id"
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <sql id="hlgCompanyJoins">
|
|
|
+
|
|
|
+ </sql>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="get" resultType="org.jeecg.modules.hlgcompany.entity.HlgCompany" >
|
|
|
+ SELECT
|
|
|
+ <include refid="hlgCompanyColumns"/>
|
|
|
+ FROM hlg_company a
|
|
|
+ <include refid="hlgCompanyJoins"/>
|
|
|
+ WHERE a.id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findList" resultType="org.jeecg.modules.hlgcompany.entity.HlgCompany" >
|
|
|
+ SELECT
|
|
|
+ <include refid="hlgCompanyColumns"/>
|
|
|
+ FROM hlg_company a
|
|
|
+ <include refid="hlgCompanyJoins"/>
|
|
|
+ <where>
|
|
|
+
|
|
|
+ ${ew.sqlSegment}
|
|
|
+ <if test="hlgCompany.companyName != null and hlgCompany.companyName != ''">
|
|
|
+ AND a.company_name LIKE concat('%',#{hlgCompany.companyName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="hlgCompany.provinceCode != null and hlgCompany.provinceCode !=''">
|
|
|
+ and a.province_code = #{hlgCompany.provinceCode}
|
|
|
+ </if>
|
|
|
+ <if test="hlgCompany.cityCode != null and hlgCompany.cityCode !=''">
|
|
|
+ and a.city_code = #{hlgCompany.cityCode}
|
|
|
+ </if>
|
|
|
+ <if test="hlgCompany.countryCode != null and hlgCompany.countryCode !=''">
|
|
|
+ and a.country_code = #{hlgCompany.countryCode}
|
|
|
+ </if>
|
|
|
+ <if test="hlgCompany.createTime_begin != null and hlgCompany.createTime_end != null ">
|
|
|
+ AND a.create_time BETWEEN #{hlgCompany.createTime_begin} AND #{hlgCompany.createTime_end}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY a.update_time DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <insert id="insertHlgCompany" keyProperty="id" useGeneratedKeys="true" parameterType="org.jeecg.modules.hlgcompany.entity.HlgCompany">
|
|
|
+ INSERT INTO hlg_company(
|
|
|
+ platform_id,
|
|
|
+ company_name,
|
|
|
+ duty_paragraph,
|
|
|
+ business_license,
|
|
|
+ province_code,
|
|
|
+ city_code,
|
|
|
+ country_code,
|
|
|
+ province_city_country,
|
|
|
+ address,
|
|
|
+ contact_person,
|
|
|
+ mobile_phone,
|
|
|
+ phone,
|
|
|
+ sys_org_code,
|
|
|
+ is_lock,
|
|
|
+ create_time,
|
|
|
+ create_by,
|
|
|
+ update_time,
|
|
|
+ update_by
|
|
|
+ ) VALUES (
|
|
|
+ #{platformId},
|
|
|
+ #{companyName},
|
|
|
+ #{dutyParagraph},
|
|
|
+ #{businessLicense},
|
|
|
+ #{provinceCode},
|
|
|
+ #{cityCode},
|
|
|
+ #{countryCode},
|
|
|
+ #{provinceCityCountry},
|
|
|
+ #{address},
|
|
|
+ #{contactPerson},
|
|
|
+ #{mobilePhone},
|
|
|
+ #{phone},
|
|
|
+ #{sysOrgCode},
|
|
|
+ #{isLock},
|
|
|
+ #{createTime},
|
|
|
+ #{createBy.id},
|
|
|
+ #{updateTime},
|
|
|
+ #{updateBy.id}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="update">
|
|
|
+ UPDATE hlg_company SET
|
|
|
+ platform_id = #{platformId},
|
|
|
+ company_name = #{companyName},
|
|
|
+ duty_paragraph = #{dutyParagraph},
|
|
|
+ business_license = #{businessLicense},
|
|
|
+ province_code = #{provinceCode},
|
|
|
+ city_code = #{cityCode},
|
|
|
+ country_code = #{countryCode},
|
|
|
+ province_city_country = #{provinceCityCountry},
|
|
|
+ address = #{address},
|
|
|
+ contact_person = #{contactPerson},
|
|
|
+ mobile_phone = #{mobilePhone},
|
|
|
+ phone = #{phone},
|
|
|
+ sys_org_code = #{sysOrgCode},
|
|
|
+ is_lock = #{isLock},
|
|
|
+ create_time = #{createTime},
|
|
|
+ update_time = #{updateTime},
|
|
|
+ update_by = #{updateBy.id}
|
|
|
+ WHERE id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+ <!--物理删除-->
|
|
|
+ <update id="delete">
|
|
|
+ DELETE FROM hlg_company
|
|
|
+ WHERE id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--逻辑删除-->
|
|
|
+ <update id="deleteByLogic">
|
|
|
+ UPDATE hlg_company SET
|
|
|
+ del_flag = #{DEL_FLAG_DELETE}
|
|
|
+ WHERE id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|