|
@@ -7,6 +7,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="CompanyExamine" id="CompanyExamineResult">
|
|
<resultMap type="CompanyExamine" id="CompanyExamineResult">
|
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
|
<result property="companyId" column="company_id" />
|
|
<result property="companyId" column="company_id" />
|
|
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
|
|
+ <result property="companyType" column="company_type" />
|
|
|
|
|
+ <result property="detailAddress" column="detail_address" />
|
|
|
|
|
+ <result property="longitude" column="longitude" />
|
|
|
|
|
+ <result property="latitude" column="latitude" />
|
|
|
|
|
+ <result property="legalPerson" column="legal_person" />
|
|
|
|
|
+ <result property="contactNumber" column="contact_number" />
|
|
|
|
|
+ <result property="establishDate" column="establish_date" />
|
|
|
|
|
+ <result property="unifiedSocialCreditCode" column="unified_social_credit_code" />
|
|
|
|
|
+ <result property="businessLicenseUrl" column="business_license_url" />
|
|
|
|
|
+ <result property="defaultImgUrl" column="default_img_url" />
|
|
|
|
|
+ <result property="propagandaImgUrl" column="propaganda_img_url" />
|
|
|
|
|
+ <result property="companyIntroduce" column="company_introduce" />
|
|
|
|
|
+ <result property="versionNum" column="version_num" />
|
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
|
<result property="applyDate" column="apply_date" />
|
|
<result property="applyDate" column="apply_date" />
|
|
|
<result property="examineDate" column="examine_date" />
|
|
<result property="examineDate" column="examine_date" />
|
|
@@ -31,8 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
cei.legal_person,
|
|
cei.legal_person,
|
|
|
cei.contact_number,
|
|
cei.contact_number,
|
|
|
ce.STATUS,
|
|
ce.STATUS,
|
|
|
- ce.apply_date,
|
|
|
|
|
- ce.examine_date,
|
|
|
|
|
|
|
+ date_format(ce.apply_date,'%Y-%m-%d') as 'apply_date',
|
|
|
|
|
+ date_format(ce.examine_date,'%Y-%m-%d') as 'examine_date',
|
|
|
ce.reject_reason
|
|
ce.reject_reason
|
|
|
FROM
|
|
FROM
|
|
|
company_examine ce,company_ext_info cei
|
|
company_examine ce,company_ext_info cei
|
|
@@ -42,13 +56,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyType != null "> and cei.company_type = #{companyType}</if>
|
|
<if test="companyType != null "> and cei.company_type = #{companyType}</if>
|
|
|
<if test="legalPerson != null and legalPerson != ''"> and cei.legal_person like concat('%', #{legalPerson}, '%')</if>
|
|
<if test="legalPerson != null and legalPerson != ''"> and cei.legal_person like concat('%', #{legalPerson}, '%')</if>
|
|
|
<if test="status != null "> and ce.status = #{status}</if>
|
|
<if test="status != null "> and ce.status = #{status}</if>
|
|
|
- <if test="applyDate != null "> and date_format(ce.apply_date,'%y-%m-%d') = date_format(#{applyDate},'%y-%m-%d')</if>
|
|
|
|
|
- <if test="examineDate != null "> and date_format(ce.examine_date,'%y-%m-%d') = date_format(#{examineDate},'%y-%m-%d')</if>
|
|
|
|
|
|
|
+ <if test="applyDate != null and applyDate != ''"> and date_format(ce.apply_date,'%Y-%m-%d') = #{applyDate}</if>
|
|
|
|
|
+ <if test="examineDate != null and examineDate != ''"> and date_format(ce.examine_date,'%Y-%m-%d') = #{examineDate}</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectCompanyExamineById" parameterType="Long" resultMap="CompanyExamineResult">
|
|
<select id="selectCompanyExamineById" parameterType="Long" resultMap="CompanyExamineResult">
|
|
|
- <include refid="selectCompanyExamineVo"/>
|
|
|
|
|
- where id = #{id}
|
|
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ ce.id,
|
|
|
|
|
+ ce.company_id,
|
|
|
|
|
+ cei.company_name,
|
|
|
|
|
+ cei.company_type,
|
|
|
|
|
+ cei.legal_person,
|
|
|
|
|
+ cei.detail_address,
|
|
|
|
|
+ cei.longitude,
|
|
|
|
|
+ cei.latitude,
|
|
|
|
|
+ cei.legal_person,
|
|
|
|
|
+ cei.contact_number,
|
|
|
|
|
+ date_format(cei.establish_date,'%Y-%m-%d') as 'establish_date',
|
|
|
|
|
+ cei.unified_social_credit_code,
|
|
|
|
|
+ cei.business_license_url,
|
|
|
|
|
+ cei.default_img_url,
|
|
|
|
|
+ cei.propaganda_img_url,
|
|
|
|
|
+ cei.company_introduce,
|
|
|
|
|
+ cei.version_num,
|
|
|
|
|
+ cei.contact_number,
|
|
|
|
|
+ ce.STATUS,
|
|
|
|
|
+ ce.apply_date,
|
|
|
|
|
+ ce.examine_date,
|
|
|
|
|
+ ce.reject_reason
|
|
|
|
|
+ FROM
|
|
|
|
|
+ company_examine ce
|
|
|
|
|
+ LEFT JOIN company_ext_info cei on ce.company_id = cei.company_id
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ ce.del_flag = '0'
|
|
|
|
|
+ AND cei.del_flag = '0'
|
|
|
|
|
+ AND cei.version_num = (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ MAX(a.version_num)
|
|
|
|
|
+ FROM
|
|
|
|
|
+ company_ext_info a
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ a.company_id = ce.company_id
|
|
|
|
|
+ )
|
|
|
|
|
+ AND ce.id = #{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertCompanyExamine" parameterType="CompanyExamine" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertCompanyExamine" parameterType="CompanyExamine" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -82,16 +132,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<update id="updateCompanyExamine" parameterType="CompanyExamine">
|
|
<update id="updateCompanyExamine" parameterType="CompanyExamine">
|
|
|
update company_examine
|
|
update company_examine
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="companyId != null ">company_id = #{companyId},</if>
|
|
|
|
|
<if test="status != null ">status = #{status},</if>
|
|
<if test="status != null ">status = #{status},</if>
|
|
|
- <if test="applyDate != null ">apply_date = #{applyDate},</if>
|
|
|
|
|
- <if test="examineDate != null ">examine_date = #{examineDate},</if>
|
|
|
|
|
|
|
+ examine_date = NOW(),
|
|
|
<if test="rejectReason != null and rejectReason != ''">reject_reason = #{rejectReason},</if>
|
|
<if test="rejectReason != null and rejectReason != ''">reject_reason = #{rejectReason},</if>
|
|
|
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
|
- <if test="createTime != null ">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<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>
|
|
|
|
|
|
|
+ update_time = NOW(),
|
|
|
</trim>
|
|
</trim>
|
|
|
where id = #{id}
|
|
where id = #{id}
|
|
|
</update>
|
|
</update>
|