|
@@ -1,155 +1,30 @@
|
|
|
-<?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">
|
|
|
+<?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.tianhu.system.mapper.SysCompanyMapper">
|
|
|
|
|
|
- <resultMap type="SysCompany" id="SysCompanyResult">
|
|
|
- <result property="scyId" column="scy_id" />
|
|
|
- <result property="scyName" column="scy_name" />
|
|
|
- <result property="scyAbridge" column="scy_abridge" />
|
|
|
- <result property="scyAddress" column="scy_address" />
|
|
|
- <result property="scyPhone" column="scy_phone" />
|
|
|
- <result property="scySocialCode" column="scy_social_code" />
|
|
|
- <result property="scyLegal" column="scy_legal" />
|
|
|
- <result property="scyLicense" column="scy_license" />
|
|
|
- <result property="scyEndTime" column="scy_end_time" />
|
|
|
- <result property="scyDescribe" column="scy_describe" />
|
|
|
- <result property="scyRemarks" column="scy_remarks" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="scyStt" column="scy_STT" />
|
|
|
- <result property="scyStartTime" column="scy_start_time" />
|
|
|
- <result property="scyCode" column="scy_code" />
|
|
|
- <result property="scyUserStaffBinding" column="scy_user_staff_binding" />
|
|
|
- <result property="scyIsGroup" column="scy_is_group" />
|
|
|
- <result property="scyParentId" column="scy_parent_id" />
|
|
|
- <result property="scyLeader" column="scy_leader" />
|
|
|
+ <!-- 通用查询映射结果 -->
|
|
|
+ <resultMap id="BaseResultMap" type="com.tianhu.system.domain.SysCompany">
|
|
|
+ <id column="scy_id" property="scyId" />
|
|
|
+ <result column="scy_license_file" property="scyLicenseFile" />
|
|
|
+ <result column="scy_name" property="scyName" />
|
|
|
+ <result column="scy_social_code" property="scySocialCode" />
|
|
|
+ <result column="scy_start_time" property="scyStartTime" />
|
|
|
+ <result column="scy_end_time" property="scyEndTime" />
|
|
|
+ <result column="scy_address" property="scyAddress" />
|
|
|
+ <result column="scy_phone" property="scyPhone" />
|
|
|
+ <result column="scy_legal_file" property="scyLegalFile" />
|
|
|
+ <result column="scy_legal" property="scyLegal" />
|
|
|
+ <result column="scy_legal_id" property="scyLegalId" />
|
|
|
+ <result column="scy_authorization_file" property="scyAuthorizationFile" />
|
|
|
+ <result column="scy_commitment_file" property="scyCommitmentFile" />
|
|
|
+ <result column="scy_appendix_file" property="scyAppendixFile" />
|
|
|
+ <result column="scy_type" property="scyType" />
|
|
|
+ <result column="scy_remarks" property="scyRemarks" />
|
|
|
+ <result column="scy_status" property="scyStatus" />
|
|
|
+ <result column="create_by" property="createBy" />
|
|
|
+ <result column="create_time" property="createTime" />
|
|
|
+ <result column="update_by" property="updateBy" />
|
|
|
+ <result column="update_time" property="updateTime" />
|
|
|
</resultMap>
|
|
|
|
|
|
- <sql id="selectSysCompanyVo">
|
|
|
- select scy_id, scy_name, scy_abridge, scy_address, scy_phone, scy_social_code, scy_legal, scy_license, scy_end_time, scy_describe, scy_remarks, create_by, create_time, update_by, update_time, scy_STT, scy_start_time, scy_code, scy_user_staff_binding, scy_is_group, scy_parent_id, scy_leader from sys_company
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectSysCompanyList" parameterType="SysCompany" resultMap="SysCompanyResult">
|
|
|
- <include refid="selectSysCompanyVo"/>
|
|
|
- <where>
|
|
|
- <if test="scyName != null and scyName != ''"> and scy_name = #{scyName}</if>
|
|
|
- <if test="scyAbridge != null and scyAbridge != ''"> and scy_abridge = #{scyAbridge}</if>
|
|
|
- <if test="scyAddress != null and scyAddress != ''"> and scy_address = #{scyAddress}</if>
|
|
|
- <if test="scyPhone != null and scyPhone != ''"> and scy_phone = #{scyPhone}</if>
|
|
|
- <if test="scySocialCode != null and scySocialCode != ''"> and scy_social_code = #{scySocialCode}</if>
|
|
|
- <if test="scyLegal != null and scyLegal != ''"> and scy_legal = #{scyLegal}</if>
|
|
|
- <if test="scyLicense != null and scyLicense != ''"> and scy_license = #{scyLicense}</if>
|
|
|
- <if test="scyEndTime != null and scyEndTime != ''"> and scy_end_time = #{scyEndTime}</if>
|
|
|
- <if test="scyDescribe != null and scyDescribe != ''"> and scy_describe = #{scyDescribe}</if>
|
|
|
- <if test="scyRemarks != null and scyRemarks != ''"> and scy_remarks = #{scyRemarks}</if>
|
|
|
- <if test="scyStt != null and scyStt != ''"> and scy_STT = #{scyStt}</if>
|
|
|
- <if test="scyStartTime != null and scyStartTime != ''"> and scy_start_time = #{scyStartTime}</if>
|
|
|
- <if test="scyCode != null and scyCode != ''"> and scy_code = #{scyCode}</if>
|
|
|
- <if test="scyUserStaffBinding != null and scyUserStaffBinding != ''"> and scy_user_staff_binding = #{scyUserStaffBinding}</if>
|
|
|
- <if test="scyIsGroup != null and scyIsGroup != ''"> and scy_is_group = #{scyIsGroup}</if>
|
|
|
- <if test="scyParentId != null and scyParentId != ''"> and scy_parent_id = #{scyParentId}</if>
|
|
|
- <if test="scyLeader != null and scyLeader != ''"> and scy_leader = #{scyLeader}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectSysCompanyById" parameterType="String" resultMap="SysCompanyResult">
|
|
|
- <include refid="selectSysCompanyVo"/>
|
|
|
- where scy_id = #{scyId}
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="insertSysCompany" parameterType="SysCompany">
|
|
|
- insert into sys_company
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="scyId != null">scy_id,</if>
|
|
|
- <if test="scyName != null">scy_name,</if>
|
|
|
- <if test="scyAbridge != null">scy_abridge,</if>
|
|
|
- <if test="scyAddress != null">scy_address,</if>
|
|
|
- <if test="scyPhone != null">scy_phone,</if>
|
|
|
- <if test="scySocialCode != null">scy_social_code,</if>
|
|
|
- <if test="scyLegal != null">scy_legal,</if>
|
|
|
- <if test="scyLicense != null">scy_license,</if>
|
|
|
- <if test="scyEndTime != null">scy_end_time,</if>
|
|
|
- <if test="scyDescribe != null">scy_describe,</if>
|
|
|
- <if test="scyRemarks != null">scy_remarks,</if>
|
|
|
- <if test="createBy != null">create_by,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="updateBy != null">update_by,</if>
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
- <if test="scyStt != null">scy_STT,</if>
|
|
|
- <if test="scyStartTime != null">scy_start_time,</if>
|
|
|
- <if test="scyCode != null">scy_code,</if>
|
|
|
- <if test="scyUserStaffBinding != null">scy_user_staff_binding,</if>
|
|
|
- <if test="scyIsGroup != null">scy_is_group,</if>
|
|
|
- <if test="scyParentId != null">scy_parent_id,</if>
|
|
|
- <if test="scyLeader != null">scy_leader,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="scyId != null">#{scyId},</if>
|
|
|
- <if test="scyName != null">#{scyName},</if>
|
|
|
- <if test="scyAbridge != null">#{scyAbridge},</if>
|
|
|
- <if test="scyAddress != null">#{scyAddress},</if>
|
|
|
- <if test="scyPhone != null">#{scyPhone},</if>
|
|
|
- <if test="scySocialCode != null">#{scySocialCode},</if>
|
|
|
- <if test="scyLegal != null">#{scyLegal},</if>
|
|
|
- <if test="scyLicense != null">#{scyLicense},</if>
|
|
|
- <if test="scyEndTime != null">#{scyEndTime},</if>
|
|
|
- <if test="scyDescribe != null">#{scyDescribe},</if>
|
|
|
- <if test="scyRemarks != null">#{scyRemarks},</if>
|
|
|
- <if test="createBy != null">#{createBy},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
- <if test="updateBy != null">#{updateBy},</if>
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
- <if test="scyStt != null">#{scyStt},</if>
|
|
|
- <if test="scyStartTime != null">#{scyStartTime},</if>
|
|
|
- <if test="scyCode != null">#{scyCode},</if>
|
|
|
- <if test="scyUserStaffBinding != null">#{scyUserStaffBinding},</if>
|
|
|
- <if test="scyIsGroup != null">#{scyIsGroup},</if>
|
|
|
- <if test="scyParentId != null">#{scyParentId},</if>
|
|
|
- <if test="scyLeader != null">#{scyLeader},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="updateSysCompany" parameterType="SysCompany">
|
|
|
- update sys_company
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="scyName != null">scy_name = #{scyName},</if>
|
|
|
- <if test="scyAbridge != null">scy_abridge = #{scyAbridge},</if>
|
|
|
- <if test="scyAddress != null">scy_address = #{scyAddress},</if>
|
|
|
- <if test="scyPhone != null">scy_phone = #{scyPhone},</if>
|
|
|
- <if test="scySocialCode != null">scy_social_code = #{scySocialCode},</if>
|
|
|
- <if test="scyLegal != null">scy_legal = #{scyLegal},</if>
|
|
|
- <if test="scyLicense != null">scy_license = #{scyLicense},</if>
|
|
|
- <if test="scyEndTime != null">scy_end_time = #{scyEndTime},</if>
|
|
|
- <if test="scyDescribe != null">scy_describe = #{scyDescribe},</if>
|
|
|
- <if test="scyRemarks != null">scy_remarks = #{scyRemarks},</if>
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
- <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
- <if test="scyStt != null">scy_STT = #{scyStt},</if>
|
|
|
- <if test="scyStartTime != null">scy_start_time = #{scyStartTime},</if>
|
|
|
- <if test="scyCode != null">scy_code = #{scyCode},</if>
|
|
|
- <if test="scyUserStaffBinding != null">scy_user_staff_binding = #{scyUserStaffBinding},</if>
|
|
|
- <if test="scyIsGroup != null">scy_is_group = #{scyIsGroup},</if>
|
|
|
- <if test="scyParentId != null">scy_parent_id = #{scyParentId},</if>
|
|
|
- <if test="scyLeader != null">scy_leader = #{scyLeader},</if>
|
|
|
- </trim>
|
|
|
- where scy_id = #{scyId}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deleteSysCompanyById" parameterType="String">
|
|
|
- delete from sys_company where scy_id = #{scyId}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteSysCompanyByIds" parameterType="String">
|
|
|
- delete from sys_company where scy_id in
|
|
|
- <foreach item="scyId" collection="array" open="(" separator="," close=")">
|
|
|
- #{scyId}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
-
|
|
|
-</mapper>
|
|
|
+</mapper>
|