java110
2021-05-19 09a2b97879cc645d55b4cc277594f28a1d7de629
java110-db/src/main/resources/mapper/common/AdvertServiceDaoImplMapper.xml
old mode 100644 new mode 100755
@@ -11,13 +11,6 @@
    (#{classify},#{adName},#{locationTypeCd},#{adTypeCd},#{advertId},#{operate},#{startTime},#{state},#{endTime},#{communityId},#{bId},#{locationObjId},#{seq})
    </insert>
    <!-- 保存广告信息 -->
    <insert id="saveAdverts" parameterType="Map">
    insert into advert(advert_id,b_id,ad_name,ad_type_cd,classify,community_id,location_type_cd,location_obj_id,state,seq,start_time,end_time,create_time)
    values
    (#{advertId},#{bId},#{adName},#{adTypeCd},#{classify},#{communityId},#{locationTypeCd},#{locationObjId},#{state},#{seq},#{startTime},#{endTime},#{createTime})
    </insert>
    <!-- 查询广告信息信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessAdvertInfo" parameterType="Map" resultType="Map">
        select t.classify,t.ad_name,t.ad_name adName,t.location_type_cd,t.location_type_cd
@@ -165,15 +158,12 @@
        locationTypeCd,t.status_cd,t.status_cd statusCd,t.ad_type_cd,t.ad_type_cd adTypeCd,t.advert_id,t.advert_id
        advertId,t.start_time,t.start_time startTime,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id
        communityId,t.b_id,t.b_id bId,t.location_obj_id,t.location_obj_id locationObjId,t.seq,td1.name
        classifyName,td2.name stateName,t.create_time createTime
        from advert t,t_dict td1,t_dict td2
        classifyName,td2.name stateName,t.create_time createTime,td3.name locationObjName
        from advert t
        left join t_dict td1 on  t.classify = td1.status_cd and td1.table_name = 'advert' and td1.table_columns = 'classify'
        left join t_dict td2 on t.state = td2.status_cd and td2.table_name = 'advert' and td2.table_columns = 'state'
        left join t_dict td3 on t.location_type_cd = td3.status_cd and td3.table_name = 'advert' and td3.table_columns = 'location_type_cd'
        where 1 =1
        and t.classify = td1.status_cd
        and td1.table_name = 'advert'
        and td1.table_columns = 'classify'
        and t.state = td2.status_cd
        and td2.table_name = 'advert'
        and td2.table_columns = 'state'
        <if test="classify !=null and classify != ''">
            and t.classify= #{classify}
        </if>
@@ -200,9 +190,6 @@
        </if>
        <if test="endTime !=null ">
            and t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
@@ -249,9 +236,6 @@
        <if test="endTime !=null ">
            , t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
        </if>
        <if test="locationObjId !=null and locationObjId != ''">
            , t.location_obj_id= #{locationObjId}
        </if>
@@ -270,14 +254,8 @@
    <!-- 查询广告信息数量 add by wuxw 2018-07-03 -->
    <select id="queryAdvertsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from advert t,t_dict td1,t_dict td2
        from advert t
        where 1 =1
        and t.classify = td1.status_cd
        and td1.table_name = 'advert'
        and td1.table_columns = 'classify'
        and t.state = td2.status_cd
        and td2.table_name = 'advert'
        and td2.table_columns = 'state'
        <if test="classify !=null and classify != ''">
            and t.classify= #{classify}
        </if>
@@ -304,9 +282,6 @@
        </if>
        <if test="endTime !=null ">
            and t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}