CorporationMapper.xml 2.01 KB
<?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.huaheng.pc.config.corporation.mapper.CorporationMapper">
  <resultMap id="BaseResultMap" type="com.huaheng.pc.config.corporation.domain.Corporation">
    <!--@mbg.generated-->
    <!--@Table corporation-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="pLogoBig" jdbcType="VARCHAR" property="column" />
    <result column="pLogoSmall" jdbcType="VARCHAR" property="column" />
    <result column="pIcon" jdbcType="VARCHAR" property="pIcon" />
    <result column="versionInfo" jdbcType="VARCHAR" property="versionInfo" />
    <result column="baseAddress" jdbcType="VARCHAR" property="baseAddress" />
    <result column="enable" jdbcType="VARCHAR" property="enable" />
    <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
    <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
    <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
    <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
    <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
    <result column="created" jdbcType="TIMESTAMP" property="created" />
    <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `name`, pLogoBig, pLogoSmall, pIcon, versionInfo, baseAddress, enable, userDef1, userDef2, userDef3, lastUpdated, lastUpdatedBy, created, createdBy
  </sql>
  <select id="getEnableCorporation" resultType="com.huaheng.pc.config.corporation.domain.Corporation">
    select * from corporation where enable = 1
  </select>

  <update id="disableAllCorporation">
      update corporation set enable = 0
  </update>

  <update id="enableCorporationById">
      update corporation set enable = 1 where id=#{id}
  </update>
</mapper>