<?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.hzya.frame.u9c.category.dao.impl.VU9cCategoryDaoImpl">

    <resultMap id="get-VU9cCategoryEntity-result" type="com.hzya.frame.u9c.category.entity.VU9cCategoryEntity" >
        <result property="id" column="id" jdbcType="VARCHAR"/>
        <result property="code" column="code" jdbcType="VARCHAR"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="crmId" column="crm_id" jdbcType="VARCHAR"/>
        <result property="operatorsId" column="operators_id" jdbcType="VARCHAR"/>
        <result property="crmUpId" column="crm_up_id" jdbcType="VARCHAR"/>
        <result property="upCode" column="up_code" jdbcType="VARCHAR"/>
        <result property="upName" column="up_name" jdbcType="VARCHAR"/>
        <result property="updateTime" column="update_time" jdbcType="VARCHAR"/>
    </resultMap>
    <!-- 查询的字段-->
    <sql id = "VU9cCategoryEntity_Base_Column_List">
        id
       ,code 
        ,name 
     </sql>
    <!-- 查询 采用==查询 -->
    <select id="entity_list_base_category" resultMap="get-VU9cCategoryEntity-result" parameterType = "com.hzya.frame.u9c.category.entity.VU9cCategoryEntity">
      select * from v_u9c_cbo_category
        where (crm_id is null or crm_id  ='' or update_time > #{updateTime})
    </select>

    <!--通过主键修改方法-->
    <update id="entity_update_category" parameterType = "com.hzya.frame.u9c.category.entity.VU9cCategoryEntity" >
        update CBO_Category  set
        DescFlexField_PrivateDescSeg1 = #{dataId}
        where  id= #{id}
    </update>
</mapper>

