|
@@ -0,0 +1,402 @@
|
|
|
+<?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.hcloud.microservice.org.dao.BaseOrgMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.hcloud.microservice.org.facade.entity.BaseOrg">
|
|
|
+ <id column="guid" jdbcType="CHAR" property="guid" />
|
|
|
+ <result column="dic_org_type_code" jdbcType="INTEGER" property="dicOrgTypeCode" />
|
|
|
+ <result column="org_name" jdbcType="VARCHAR" property="orgName" />
|
|
|
+ <result column="org_code" jdbcType="CHAR" property="orgCode" />
|
|
|
+ <result column="org_brevity" jdbcType="CHAR" property="orgBrevity" />
|
|
|
+ <result column="ico" jdbcType="VARCHAR" property="ico" />
|
|
|
+ <result column="org_address" jdbcType="VARCHAR" property="orgAddress" />
|
|
|
+ <result column="position_type" jdbcType="INTEGER" property="positionType" />
|
|
|
+ <result column="fk_position_id" jdbcType="CHAR" property="fkPositionId" />
|
|
|
+ <result column="principals" jdbcType="VARCHAR" property="principals" />
|
|
|
+ <result column="org_imgs" jdbcType="VARCHAR" property="orgImgs" />
|
|
|
+ <result column="wx_qr_img" jdbcType="VARCHAR" property="wxQRImg" />
|
|
|
+ <result column="qq_code" jdbcType="VARCHAR" property="qqCode" />
|
|
|
+ <result column="company_url" jdbcType="VARCHAR" property="companyUrl" />
|
|
|
+ <result column="company_tel" jdbcType="VARCHAR" property="companyTel" />
|
|
|
+ <result column="tel" jdbcType="CHAR" property="tel" />
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
+ <result column="qrcode_url_prefixe" jdbcType="VARCHAR" property="qrcodeUrlPrefixe" />
|
|
|
+ <result column="state" jdbcType="INTEGER" property="state" />
|
|
|
+ <result column="create_user" jdbcType="CHAR" property="createUser" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="modify_user" jdbcType="CHAR" property="modifyUser" />
|
|
|
+ <result column="modied_time" jdbcType="TIMESTAMP" property="modiedTime" />
|
|
|
+ <result column="system_name" jdbcType="VARCHAR" property="systemName" />
|
|
|
+ <result column="temple_type" jdbcType="INTEGER" property="templeType" />
|
|
|
+ <result column="qualifica_imgs" jdbcType="VARCHAR" property="qualificaImgs" />
|
|
|
+ <result column="tmall_url" jdbcType="VARCHAR" property="tmallUrl" />
|
|
|
+ <result column="jd_url" jdbcType="VARCHAR" property="jdUrl" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ guid, dic_org_type_code, org_name, org_code, org_brevity, ico, org_address, position_type,
|
|
|
+ fk_position_id, principals, org_imgs,wx_qr_img,qq_code,company_url,company_tel,tel, remark,
|
|
|
+ qrcode_url_prefixe,state, create_user,create_time, modify_user, modied_time,system_name,temple_type,
|
|
|
+ qualifica_imgs,tmall_url,jd_url
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_base_org
|
|
|
+ where guid = #{guid,jdbcType=CHAR}
|
|
|
+ </select>
|
|
|
+ <select id="searchOrgInfoByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean"
|
|
|
+ resultMap="BaseResultMap">
|
|
|
+ SELECT
|
|
|
+ aa.guid,
|
|
|
+ aa.org_code,
|
|
|
+ aa.org_name,
|
|
|
+ aa.principals,
|
|
|
+ aa.org_address,
|
|
|
+ aa.tel,
|
|
|
+ aa.org_imgs,
|
|
|
+ aa.wx_qr_img,
|
|
|
+ aa.qq_code,
|
|
|
+ aa.company_url,
|
|
|
+ aa.company_tel,
|
|
|
+ aa.qrcode_url_prefixe,
|
|
|
+ aa.create_user,
|
|
|
+ aa.create_user,
|
|
|
+ aa.system_name,
|
|
|
+ aa.temple_type
|
|
|
+ FROM
|
|
|
+ t_base_org aa
|
|
|
+ WHERE
|
|
|
+ aa.state=1
|
|
|
+ <if test="data.dicOrgTypeCode!=null">
|
|
|
+ and aa.dic_org_type_code = #{data.dicOrgTypeCode}
|
|
|
+ </if>
|
|
|
+ <if test="data.orgName!=null and data.orgName!=''">
|
|
|
+ AND aa.org_name LIKE CONCAT(#{data.orgName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="data.orgCode!=null and data.orgCode!=''">
|
|
|
+ AND aa.org_code = #{data.orgCode}
|
|
|
+ </if>
|
|
|
+ <if test="data.orgBrevity!=null and data.orgBrevity!=''">
|
|
|
+ AND aa.org_brevity = #{data.orgBrevity}
|
|
|
+ </if>
|
|
|
+ <if test="data.orgAddress!=null and data.orgAddress!=''">
|
|
|
+ AND aa.org_address LIKE CONCAT('%', #{data.orgAddress}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="data.tel!=null and data.tel!=''">
|
|
|
+ AND aa.tel = #{data.tel}
|
|
|
+ </if>
|
|
|
+ ORDER BY aa.create_time DESC
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from t_base_org
|
|
|
+ where guid = #{guid,jdbcType=CHAR}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.hcloud.microservice.org.facade.entity.BaseOrg">
|
|
|
+ insert into t_base_org (guid, dic_org_type_code, org_name,
|
|
|
+ org_code, org_brevity, ico,
|
|
|
+ org_address, position_type, fk_position_id,
|
|
|
+ principals,org_imgs,wx_qr_img,qq_code,
|
|
|
+ company_url,company_tel, tel, remark,qrcode_url_prefixe,
|
|
|
+ state, create_user,create_time, modify_user, modied_time,system_name,temple_type
|
|
|
+ )
|
|
|
+ values (#{guid,jdbcType=CHAR}, #{dicOrgTypeCode,jdbcType=INTEGER}, #{orgName,jdbcType=VARCHAR},
|
|
|
+ #{orgCode,jdbcType=CHAR}, #{orgBrevity,jdbcType=CHAR}, #{ico,jdbcType=VARCHAR},
|
|
|
+ #{orgAddress,jdbcType=VARCHAR}, #{positionType,jdbcType=INTEGER}, #{fkPositionId,jdbcType=CHAR},
|
|
|
+ #{principals,jdbcType=VARCHAR},#{orgImgs,jdbcType=VARCHAR} ,#{wxQRImg,jdbcType=VARCHAR},
|
|
|
+ #{qqCode,jdbcType=VARCHAR},#{companyUrl,jdbcType=VARCHAR},#{companyTel,jdbcType=VARCHAR},
|
|
|
+ #{tel,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR},#{qrcodeUrlPrefixe,jdbcType=VARCHAR},
|
|
|
+ #{state,jdbcType=INTEGER}, #{createUser,jdbcType=CHAR},#{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{modifyUser,jdbcType=CHAR}, #{modiedTime,jdbcType=TIMESTAMP},#{systemName,jdbcType=VARCHAR},
|
|
|
+ #{templeType,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.hcloud.microservice.org.facade.entity.BaseOrg">
|
|
|
+ insert into t_base_org
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="guid != null">
|
|
|
+ guid,
|
|
|
+ </if>
|
|
|
+ <if test="dicOrgTypeCode != null">
|
|
|
+ dic_org_type_code,
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null">
|
|
|
+ org_name,
|
|
|
+ </if>
|
|
|
+ <if test="orgCode != null">
|
|
|
+ org_code,
|
|
|
+ </if>
|
|
|
+ <if test="orgBrevity != null">
|
|
|
+ org_brevity,
|
|
|
+ </if>
|
|
|
+ <if test="ico != null">
|
|
|
+ ico,
|
|
|
+ </if>
|
|
|
+ <if test="orgAddress != null">
|
|
|
+ org_address,
|
|
|
+ </if>
|
|
|
+ <if test="positionType != null">
|
|
|
+ position_type,
|
|
|
+ </if>
|
|
|
+ <if test="fkPositionId != null">
|
|
|
+ fk_position_id,
|
|
|
+ </if>
|
|
|
+ <if test="principals != null">
|
|
|
+ principals,
|
|
|
+ </if>
|
|
|
+ <if test="orgImgs != null">
|
|
|
+ org_imgs,
|
|
|
+ </if>
|
|
|
+ <if test="wxQRImg != null">
|
|
|
+ wx_qr_img,
|
|
|
+ </if>
|
|
|
+ <if test="qqCode != null">
|
|
|
+ qq_code,
|
|
|
+ </if>
|
|
|
+ <if test="companyUrl != null">
|
|
|
+ company_url,
|
|
|
+ </if>
|
|
|
+ <if test="companyTel != null">
|
|
|
+ company_tel,
|
|
|
+ </if>
|
|
|
+ <if test="tel != null">
|
|
|
+ tel,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark,
|
|
|
+ </if>
|
|
|
+ <if test="qrcodeUrlPrefixe != null">
|
|
|
+ qrcode_url_prefixe,
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ state,
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ create_user,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="modifyUser != null">
|
|
|
+ modify_user,
|
|
|
+ </if>
|
|
|
+ <if test="modiedTime != null">
|
|
|
+ modied_time,
|
|
|
+ </if>
|
|
|
+ <if test="systemName != null">
|
|
|
+ system_name,
|
|
|
+ </if>
|
|
|
+ <if test="templeType != null">
|
|
|
+ temple_type,
|
|
|
+ </if>
|
|
|
+ <if test="qualificaImgs != null">
|
|
|
+ qualifica_imgs,
|
|
|
+ </if>
|
|
|
+ <if test="tmallUrl != null">
|
|
|
+ tmall_url,
|
|
|
+ </if>
|
|
|
+ <if test="jdUrl != null">
|
|
|
+ jd_url,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="guid != null">
|
|
|
+ #{guid,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="dicOrgTypeCode != null">
|
|
|
+ #{dicOrgTypeCode,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null">
|
|
|
+ #{orgName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgCode != null">
|
|
|
+ #{orgCode,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgBrevity != null">
|
|
|
+ #{orgBrevity,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ico != null">
|
|
|
+ #{ico,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgAddress != null">
|
|
|
+ #{orgAddress,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="positionType != null">
|
|
|
+ #{positionType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="fkPositionId != null">
|
|
|
+ #{fkPositionId,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="principals != null">
|
|
|
+ #{principals,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgImgs != null">
|
|
|
+ #{orgImgs,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="wxQRImg != null">
|
|
|
+ #{wxQRImg,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="qqCode != null">
|
|
|
+ #{qqCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyUrl != null">
|
|
|
+ #{companyUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyTel != null">
|
|
|
+ #{companyTel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="tel != null">
|
|
|
+ #{tel,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="qrcodeUrlPrefixe != null">
|
|
|
+ #{qrcodeUrlPrefixe,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ #{state,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ #{createUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="modifyUser != null">
|
|
|
+ #{modifyUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="modiedTime != null">
|
|
|
+ #{modiedTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="systemName != null">
|
|
|
+ #{systemName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="templeType != null">
|
|
|
+ #{templeType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="qualificaImgs != null">
|
|
|
+ #{qualificaImgs,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="tmallUrl != null">
|
|
|
+ #{tmallUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="jdUrl != null">
|
|
|
+ #{jdUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.hcloud.microservice.org.facade.entity.BaseOrg">
|
|
|
+ update t_base_org
|
|
|
+ <set>
|
|
|
+ <if test="dicOrgTypeCode != null">
|
|
|
+ dic_org_type_code = #{dicOrgTypeCode,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orgName != null">
|
|
|
+ org_name = #{orgName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgCode != null">
|
|
|
+ org_code = #{orgCode,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgBrevity != null">
|
|
|
+ org_brevity = #{orgBrevity,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ico != null">
|
|
|
+ ico = #{ico,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgAddress != null">
|
|
|
+ org_address = #{orgAddress,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="positionType != null">
|
|
|
+ position_type = #{positionType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="fkPositionId != null">
|
|
|
+ fk_position_id = #{fkPositionId,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="principals != null">
|
|
|
+ principals = #{principals,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orgImgs != null">
|
|
|
+ org_imgs=#{orgImgs,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="wxQRImg != null">
|
|
|
+ wx_qr_img=#{wxQRImg,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="qqCode != null">
|
|
|
+ qq_code = #{qqCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyUrl != null">
|
|
|
+ company_url = #{companyUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyTel != null">
|
|
|
+ company_tel = #{companyTel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="tel != null">
|
|
|
+ tel = #{tel,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="qrcodeUrlPrefixe != null">
|
|
|
+ qrcode_url_prefixe = #{qrcodeUrlPrefixe,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ state = #{state,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ create_user = #{createUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="modifyUser != null">
|
|
|
+ modify_user = #{modifyUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="modiedTime != null">
|
|
|
+ modied_time = #{modiedTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="systemName != null">
|
|
|
+ system_name = #{systemName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="templeType != null">
|
|
|
+ temple_type = #{templeType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="qualificaImgs != null">
|
|
|
+ qualifica_imgs = #{qualificaImgs,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="tmallUrl != null">
|
|
|
+ tmall_url = #{tmallUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="jdUrl != null">
|
|
|
+ jd_url = #{jdUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where guid = #{guid,jdbcType=CHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.hcloud.microservice.org.facade.entity.BaseOrg">
|
|
|
+ update t_base_org
|
|
|
+ set dic_org_type_code = #{dicOrgTypeCode,jdbcType=INTEGER},
|
|
|
+ org_name = #{orgName,jdbcType=VARCHAR},
|
|
|
+ org_code = #{orgCode,jdbcType=CHAR},
|
|
|
+ org_brevity = #{orgBrevity,jdbcType=CHAR},
|
|
|
+ ico = #{ico,jdbcType=VARCHAR},
|
|
|
+ org_address = #{orgAddress,jdbcType=VARCHAR},
|
|
|
+ position_type = #{positionType,jdbcType=INTEGER},
|
|
|
+ fk_position_id = #{fkPositionId,jdbcType=CHAR},
|
|
|
+ principals = #{principals,jdbcType=VARCHAR},
|
|
|
+ org_imgs=#{orgImgs,jdbcType=VARCHAR},
|
|
|
+ wx_qr_img=#{wxQRImg,jdbcType=VARCHAR},
|
|
|
+ qq_code = #{qqCode,jdbcType=VARCHAR},
|
|
|
+ company_url = #{companyUrl,jdbcType=VARCHAR},
|
|
|
+ company_tel = #{companyTel,jdbcType=VARCHAR},
|
|
|
+ tel = #{tel,jdbcType=CHAR},
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ qrcode_url_prefixe = #{qrcodeUrlPrefixe,jdbcType=VARCHAR},
|
|
|
+ state = #{state,jdbcType=INTEGER},
|
|
|
+ create_user = #{createUser,jdbcType=CHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ modify_user = #{modifyUser,jdbcType=CHAR},
|
|
|
+ modied_time = #{modiedTime,jdbcType=TIMESTAMP},
|
|
|
+ system_name = #{systemName,jdbcType=VARCHAR},
|
|
|
+ temple_type = #{templeType,jdbcType=INTEGER}
|
|
|
+ where guid = #{guid,jdbcType=CHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|