|
@@ -17,14 +17,16 @@
|
|
|
<result column="signet" jdbcType="VARCHAR" property="signet"/>
|
|
<result column="signet" jdbcType="VARCHAR" property="signet"/>
|
|
|
<result column="uu" jdbcType="VARCHAR" property="uu"/>
|
|
<result column="uu" jdbcType="VARCHAR" property="uu"/>
|
|
|
<result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
|
|
<result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
|
|
|
|
|
+ <result column="dc_name" jdbcType="VARCHAR" property="dcName"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<resultMap id="BaseResultMap" type="com.usoftchina.saas.account.vo.CompanyBaseVO">
|
|
<resultMap id="BaseResultMap" type="com.usoftchina.saas.account.vo.CompanyBaseVO">
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
<result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
|
|
<result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
|
|
|
|
|
+ <result column="dc_name" jdbcType="VARCHAR" property="dcName"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="baseColumns">
|
|
<sql id="baseColumns">
|
|
|
- id,name,business_code,address,uu,creator_id,create_time,updater_id,update_time,fax,tel,signet,uu,logo_url
|
|
|
|
|
|
|
+ id,name,business_code,address,uu,creator_id,create_time,updater_id,update_time,fax,tel,signet,uu,logo_url,dc_name
|
|
|
</sql>
|
|
</sql>
|
|
|
<insert id="insert" parameterType="com.usoftchina.saas.account.po.Company"
|
|
<insert id="insert" parameterType="com.usoftchina.saas.account.po.Company"
|
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
@@ -32,12 +34,12 @@
|
|
|
SELECT LAST_INSERT_ID() AS ID
|
|
SELECT LAST_INSERT_ID() AS ID
|
|
|
</selectKey>
|
|
</selectKey>
|
|
|
insert into ac_company(name, business_code, address, logo_url, creator_id, create_time, updater_id, update_time,
|
|
insert into ac_company(name, business_code, address, logo_url, creator_id, create_time, updater_id, update_time,
|
|
|
- tel, fax, signet, uu, type)
|
|
|
|
|
|
|
+ tel, fax, signet, uu, type, dc_name)
|
|
|
values (#{name,jdbcType=VARCHAR}, #{businessCode,jdbcType=VARCHAR},
|
|
values (#{name,jdbcType=VARCHAR}, #{businessCode,jdbcType=VARCHAR},
|
|
|
#{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
|
#{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
#{tel,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{signet,jdbcType=VARCHAR}, #{uu,jdbcType=VARCHAR},
|
|
#{tel,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{signet,jdbcType=VARCHAR}, #{uu,jdbcType=VARCHAR},
|
|
|
- #{type,jdbcType=VARCHAR})
|
|
|
|
|
|
|
+ #{type,jdbcType=VARCHAR}, #{dcName,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Company"
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Company"
|
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
@@ -55,6 +57,9 @@
|
|
|
<if test="logoUrl != null">
|
|
<if test="logoUrl != null">
|
|
|
logo_url,
|
|
logo_url,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="dcName != null">
|
|
|
|
|
+ dc_name,
|
|
|
|
|
+ </if>
|
|
|
<if test="uu != null">
|
|
<if test="uu != null">
|
|
|
uu,
|
|
uu,
|
|
|
</if>
|
|
</if>
|
|
@@ -84,6 +89,9 @@
|
|
|
<if test="logoUrl != null">
|
|
<if test="logoUrl != null">
|
|
|
#{logoUrl,jdbcType=VARCHAR},
|
|
#{logoUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="dcName != null">
|
|
|
|
|
+ #{dcName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
<if test="uu != null">
|
|
<if test="uu != null">
|
|
|
#{uu,jdbcType=BIGINT},
|
|
#{uu,jdbcType=BIGINT},
|
|
|
</if>
|
|
</if>
|
|
@@ -114,7 +122,7 @@
|
|
|
select <include refid="baseColumns"/> from ac_company where business_code=#{businessCode,jdbcType=VARCHAR}
|
|
select <include refid="baseColumns"/> from ac_company where business_code=#{businessCode,jdbcType=VARCHAR}
|
|
|
</select>
|
|
</select>
|
|
|
<select id="selectBaseByAccountId" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
<select id="selectBaseByAccountId" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
- select ac_company.id,ac_company.name,ac_company.logo_url from ac_account_company,ac_company
|
|
|
|
|
|
|
+ select ac_company.id,ac_company.name,ac_company.logo_url,ac_company.dc_name from ac_account_company,ac_company
|
|
|
where ac_account_company.company_id=ac_company.id and ac_account_company.account_id=#{accountId,jdbcType=BIGINT}
|
|
where ac_account_company.company_id=ac_company.id and ac_account_company.account_id=#{accountId,jdbcType=BIGINT}
|
|
|
</select>
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
@@ -144,6 +152,9 @@
|
|
|
<if test="type != null">
|
|
<if test="type != null">
|
|
|
type = #{type,jdbcType=VARCHAR}
|
|
type = #{type,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="dcName != null">
|
|
|
|
|
+ dc_name = #{dcName,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id}
|
|
where id = #{id}
|
|
|
</update>
|
|
</update>
|