Przeglądaj źródła

Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

java110 5 lat temu
rodzic
commit
17515778c6

+ 6 - 24
java110-db/src/main/resources/mapper/common/AdvertServiceDaoImplMapper.xml

@@ -158,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>
@@ -194,9 +191,6 @@
         <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}
         </if>
@@ -242,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>
@@ -263,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>
@@ -298,9 +283,6 @@
         <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}
         </if>

+ 0 - 1
service-api/src/main/java/com/java110/api/listener/advert/DeleteAdvertListener.java

@@ -25,7 +25,6 @@ public class DeleteAdvertListener extends AbstractServiceApiPlusListener {
         //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
 
         Assert.hasKeyAndValue(reqJson, "advertId", "广告ID不能为空");
-        Assert.hasKeyAndValue(reqJson, "communityId", "小区信息不能为空");
 
     }
 

+ 0 - 2
service-api/src/main/java/com/java110/api/listener/advert/ListAdvertsListener.java

@@ -75,7 +75,6 @@ public class ListAdvertsListener extends AbstractServiceApiListener {
     @Override
     protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
         super.validatePageInfo(reqJson);
-        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区信息");
     }
 
     @Override
@@ -85,7 +84,6 @@ public class ListAdvertsListener extends AbstractServiceApiListener {
         List<ApiAdvertDataVo> adverts = null;
         if (count > 0) {
             List<AdvertDto> advertDtos = advertInnerServiceSMOImpl.queryAdverts(advertDto);
-            refreshAdvert(advertDtos);
             adverts = BeanConvertUtil.covertBeanList(advertDtos, ApiAdvertDataVo.class);
         } else {
             adverts = new ArrayList<>();

+ 1 - 4
service-api/src/main/java/com/java110/api/listener/advert/SaveAdvertListener.java

@@ -68,10 +68,7 @@ public class SaveAdvertListener extends AbstractServiceApiPlusListener {
         reqJson.put("advertId", advertId);
         reqJson.put("state", "1000");
         reqJson.put("createTime", new Date());
-        /*reqJson.put("bId", "-1");
-        AdvertDto advertDto = BeanConvertUtil.covertBean(reqJson, AdvertDto.class);
-        //保存广告信息
-        advertInnerServiceSMOImpl.saveAdverts(advertDto);*/
+        reqJson.put("communityId", "9999");
         AdvertPo advertPo = BeanConvertUtil.covertBean(reqJson, AdvertPo.class);
         super.insert(context, advertPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ADVERT);
         if (hasKeyAndValue(reqJson, "photos") && reqJson.getJSONArray("photos").size() > 0) {

+ 0 - 1
service-front/src/main/java/com/java110/front/smo/advert/impl/ListAdvertsSMOImpl.java

@@ -35,7 +35,6 @@ public class ListAdvertsSMOImpl extends AbstractComponentSMO implements IListAdv
     protected void validate(IPageData pd, JSONObject paramIn) {
 
         super.validatePageInfo(pd);
-        Assert.hasKeyAndValue(paramIn, "communityId", "未包含小区信息");
 
         //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_ADVERT);
     }