|
@@ -2,9 +2,9 @@
|
|
|
<!DOCTYPE mapper
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
-<mapper namespace="com.dgtly.companyext.mapper.CompanyExtInfoMapper">
|
|
|
+<mapper namespace="com.dgtly.companyext.mapper.CompanyReviewedMapper">
|
|
|
|
|
|
- <resultMap type="CompanyExtInfo" id="CompanyExtInfoResult">
|
|
|
+ <resultMap type="CompanyReviewed" id="CompanyReviewedResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="companyId" column="company_id" />
|
|
|
<result property="companyName" column="company_name" />
|
|
@@ -26,14 +26,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
|
+ <result property="loginName" column="login_name" />
|
|
|
+ <result property="password" column="password" />
|
|
|
+ <result property="reason" column="reason" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="primaryBusiness" column="primary_business" />
|
|
|
</resultMap>
|
|
|
|
|
|
- <sql id="selectCompanyExtInfoVo">
|
|
|
- select id, company_id, company_name, company_type, detail_address, longitude, latitude, legal_person, contact_number, establish_date, unified_social_credit_code, business_license_url, default_img_url, propaganda_img_url, company_introduce, version_num, create_by, create_time, update_by, update_time, remark from company_ext_info
|
|
|
+ <sql id="selectCompanyReviewedVo">
|
|
|
+ select id, company_id, company_name, company_type, detail_address, longitude, latitude, legal_person, contact_number, establish_date,
|
|
|
+ unified_social_credit_code, business_license_url, default_img_url, propaganda_img_url, company_introduce, version_num, create_by,
|
|
|
+ create_time, update_by, update_time, remark ,login_name,password,reason,status,primary_business
|
|
|
+ from company_reviewed
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectCompanyExtInfoList" parameterType="CompanyExtInfo" resultMap="CompanyExtInfoResult">
|
|
|
- <include refid="selectCompanyExtInfoVo"/>
|
|
|
+ <select id="selectCompanyReviewedList" parameterType="CompanyReviewed" resultMap="CompanyReviewedResult">
|
|
|
+ <include refid="selectCompanyReviewedVo"/>
|
|
|
<where>
|
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
@@ -50,20 +58,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="propagandaImgUrl != null and propagandaImgUrl != ''"> and propaganda_img_url = #{propagandaImgUrl}</if>
|
|
|
<if test="companyIntroduce != null and companyIntroduce != ''"> and company_introduce = #{companyIntroduce}</if>
|
|
|
<if test="versionNum != null "> and version_num = #{versionNum}</if>
|
|
|
+ <if test="loginName != null and loginName != ''"> and login_name = #{loginName}</if>
|
|
|
+ <if test="password != null and password != ''"> and password = #{password}</if>
|
|
|
+ <if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectCompanyExtInfoById" parameterType="Long" resultMap="CompanyExtInfoResult">
|
|
|
- <include refid="selectCompanyExtInfoVo"/>
|
|
|
+ <select id="selectCompanyReviewedById" parameterType="Long" resultMap="CompanyReviewedResult">
|
|
|
+ <include refid="selectCompanyReviewedVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
- <select id="selectCompanyExtInfoByCompanyId" parameterType="Long" resultMap="CompanyExtInfoResult">
|
|
|
- <include refid="selectCompanyExtInfoVo"/>
|
|
|
+ <select id="selectCompanyReviewedByCompanyId" parameterType="Long" resultMap="CompanyReviewedResult">
|
|
|
+ <include refid="selectCompanyReviewedVo"/>
|
|
|
where company_id = #{companyId}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertCompanyExtInfo" parameterType="CompanyExtInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into company_ext_info
|
|
|
+ <insert id="insertCompanyReviewed" parameterType="CompanyReviewed" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into company_reviewed
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null ">company_id,</if>
|
|
|
<if test="companyName != null and companyName != ''">company_name,</if>
|
|
@@ -85,6 +97,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
<if test="updateTime != null ">update_time,</if>
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
+ <if test="loginName != null and loginName != ''"> login_name ,</if>
|
|
|
+ <if test="password != null and password != ''"> password ,</if>
|
|
|
+ <if test="reason != null and reason != ''"> reason,</if>
|
|
|
+ <if test="status != null ">status ,</if>
|
|
|
+ <if test="primaryBusiness != null and primaryBusiness != ''">primary_business,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null ">#{companyId},</if>
|
|
@@ -107,11 +124,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
<if test="updateTime != null ">#{updateTime},</if>
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
+ <if test="loginName != null and loginName != ''"> #{loginName},</if>
|
|
|
+ <if test="password != null and password != ''"> #{password},</if>
|
|
|
+ <if test="reason != null and reason != ''"> #{reason},</if>
|
|
|
+ <if test="status != null "> #{status},</if>
|
|
|
+ <if test="primaryBusiness != null and primaryBusiness != ''">#{primaryBusiness},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
- <update id="updateCompanyExtInfo" parameterType="CompanyExtInfo">
|
|
|
- update company_ext_info
|
|
|
+ <update id="updateCompanyReviewed" parameterType="CompanyReviewed">
|
|
|
+ update company_reviewed
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="companyId != null ">company_id = #{companyId},</if>
|
|
|
<if test="companyName != null and companyName != ''">company_name = #{companyName},</if>
|
|
@@ -133,19 +155,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
+ <if test="loginName != null and loginName != ''"> login_name = #{loginName},</if>
|
|
|
+ <if test="password != null and password != ''"> password = #{password},</if>
|
|
|
+ <if test="reason != null and reason != ''"> reason = #{reason},</if>
|
|
|
+ <if test="status != null "> status = #{status},</if>
|
|
|
+ <if test="primaryBusiness != null and primaryBusiness != ''">primary_business=#{primaryBusiness},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
- <delete id="deleteCompanyExtInfoById" parameterType="Long">
|
|
|
- delete from company_ext_info where id = #{id}
|
|
|
+ <delete id="deleteCompanyReviewedById" parameterType="Long">
|
|
|
+ delete from company_reviewed where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
- <delete id="deleteCompanyExtInfoByIds" parameterType="String">
|
|
|
- delete from company_ext_info where id in
|
|
|
+ <delete id="deleteCompanyReviewedByIds" parameterType="String">
|
|
|
+ delete from company_reviewed where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+
|
|
|
+ <select id="checkLoginNameUnique" resultType="int">
|
|
|
+ select count(1) from company_reviewed where login_name=#{loginName} and reason='0' and status="0"
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectCompanyReviewedListWiteAudit" parameterType="CompanyReviewed" resultMap="CompanyReviewedResult">
|
|
|
+ <include refid="selectCompanyReviewedVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
+ <if test="companyType != null "> and company_type = #{companyType}</if>
|
|
|
+ <if test="detailAddress != null and detailAddress != ''"> and detail_address = #{detailAddress}</if>
|
|
|
+ <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
|
+ <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
|
|
+ <if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
|
|
|
+ <if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if>
|
|
|
+ <if test="establishDate != null "> and establish_date = #{establishDate}</if>
|
|
|
+ <if test="unifiedSocialCreditCode != null and unifiedSocialCreditCode != ''"> and unified_social_credit_code = #{unifiedSocialCreditCode}</if>
|
|
|
+ <if test="businessLicenseUrl != null and businessLicenseUrl != ''"> and business_license_url = #{businessLicenseUrl}</if>
|
|
|
+ <if test="defaultImgUrl != null and defaultImgUrl != ''"> and default_img_url = #{defaultImgUrl}</if>
|
|
|
+ <if test="propagandaImgUrl != null and propagandaImgUrl != ''"> and propaganda_img_url = #{propagandaImgUrl}</if>
|
|
|
+ <if test="companyIntroduce != null and companyIntroduce != ''"> and company_introduce = #{companyIntroduce}</if>
|
|
|
+ <if test="versionNum != null "> and version_num = #{versionNum}</if>
|
|
|
+ <if test="loginName != null and loginName != ''"> and login_name = #{loginName}</if>
|
|
|
+ <if test="password != null and password != ''"> and password = #{password}</if>
|
|
|
+ <if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
|
|
+ </where>
|
|
|
+ order by status,create_time
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|