Просмотр исходного кода

小区文化活动开发完成

wuxw лет назад: 6
Родитель
Сommit
79f2c9f3dd

+ 59 - 5
Api/src/main/java/com/java110/api/listener/activities/SaveActivitiesListener.java

@@ -3,17 +3,20 @@ package com.java110.api.listener.activities;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.api.listener.AbstractServiceApiListener;
 import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.core.smo.file.IFileInnerServiceSMO;
+import com.java110.dto.file.FileDto;
+import com.java110.utils.constant.*;
+import com.java110.utils.exception.ListenerExecuteException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.Assert;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.context.DataFlowContext;
 import com.java110.entity.center.AppService;
 import com.java110.entity.center.AppService;
 import com.java110.event.service.api.ServiceDataFlowEvent;
 import com.java110.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.CommonConstant;
-import com.java110.utils.constant.ServiceCodeConstant;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.ServiceCodeActivitiesConstant;
 
 
 
 
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.annotation.Java110Listener;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.ResponseEntity;
@@ -24,6 +27,9 @@ import org.springframework.http.ResponseEntity;
  */
  */
 @Java110Listener("saveActivitiesListener")
 @Java110Listener("saveActivitiesListener")
 public class SaveActivitiesListener extends AbstractServiceApiListener {
 public class SaveActivitiesListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private IFileInnerServiceSMO fileInnerServiceSMOImpl;
     @Override
     @Override
     protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
     protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
         //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
         //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
@@ -46,9 +52,27 @@ public class SaveActivitiesListener extends AbstractServiceApiListener {
 
 
         AppService service = event.getAppService();
         AppService service = event.getAppService();
 
 
+        reqJson.put("activitiesId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_activitiesId));
+
         //添加单元信息
         //添加单元信息
         businesses.add(addActivities(reqJson, context));
         businesses.add(addActivities(reqJson, context));
 
 
+        if (reqJson.containsKey("headerImg") && !StringUtils.isEmpty(reqJson.getString("headerImg"))) {
+            FileDto fileDto = new FileDto();
+            fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id));
+            fileDto.setFileName(fileDto.getFileId());
+            fileDto.setContext(reqJson.getString("headerImg"));
+            fileDto.setSuffix("jpeg");
+            fileDto.setCommunityId(reqJson.getString("communityId"));
+            if (fileInnerServiceSMOImpl.saveFile(fileDto) < 1) {
+                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "保存文件出错");
+            }
+            reqJson.put("headerImg", fileDto.getFileId());
+
+            businesses.add(addHeaderImg(reqJson, context));
+
+        }
+
         JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
         JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
 
 
         //将 rest header 信息传递到下层服务中去
         //将 rest header 信息传递到下层服务中去
@@ -59,6 +83,32 @@ public class SaveActivitiesListener extends AbstractServiceApiListener {
         context.setResponseEntity(responseEntity);
         context.setResponseEntity(responseEntity);
     }
     }
 
 
+    /**
+     * 添加物业费用
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    private JSONObject addHeaderImg(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+
+        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FILE_REL);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 2);
+        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+        JSONObject businessUnit = new JSONObject();
+        businessUnit.put("fileRelId", "-1");
+        businessUnit.put("relTypeCd", "70000");
+        businessUnit.put("saveWay", "table");
+        businessUnit.put("objId", paramInJson.getString("activitiesId"));
+        businessUnit.put("fileRealName", paramInJson.getString("headerImg"));
+        businessUnit.put("fileSaveName", paramInJson.getString("headerImg"));
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessFileRel", businessUnit);
+
+        return business;
+    }
+
     @Override
     @Override
     public String getServiceCode() {
     public String getServiceCode() {
         return ServiceCodeActivitiesConstant.ADD_ACTIVITIES;
         return ServiceCodeActivitiesConstant.ADD_ACTIVITIES;
@@ -91,7 +141,11 @@ public class SaveActivitiesListener extends AbstractServiceApiListener {
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         JSONObject businessActivities = new JSONObject();
         JSONObject businessActivities = new JSONObject();
         businessActivities.putAll(paramInJson);
         businessActivities.putAll(paramInJson);
-        businessActivities.put("activitiesId", "-1");
+        businessActivities.put("readCount","0");
+        businessActivities.put("likeCount","0");
+        businessActivities.put("collectCount","0");
+        businessActivities.put("state","11000"); // 先设置为不审核
+        //businessActivities.put("activitiesId", "-1");
         //计算 应收金额
         //计算 应收金额
         business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessActivities", businessActivities);
         business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessActivities", businessActivities);
         return business;
         return business;

+ 94 - 0
Api/src/main/java/com/java110/api/listener/activities/UpdateActivitiesListener.java

@@ -5,26 +5,51 @@ import com.alibaba.fastjson.JSONObject;
 import com.java110.api.listener.AbstractServiceApiListener;
 import com.java110.api.listener.AbstractServiceApiListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.context.DataFlowContext;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.core.smo.community.IActivitiesInnerServiceSMO;
+import com.java110.core.smo.file.IFileInnerServiceSMO;
+import com.java110.core.smo.file.IFileRelInnerServiceSMO;
+import com.java110.dto.activities.ActivitiesDto;
+import com.java110.dto.file.FileDto;
+import com.java110.dto.file.FileRelDto;
 import com.java110.entity.center.AppService;
 import com.java110.entity.center.AppService;
 import com.java110.event.service.api.ServiceDataFlowEvent;
 import com.java110.event.service.api.ServiceDataFlowEvent;
 import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.constant.CommonConstant;
 import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.constant.ServiceCodeActivitiesConstant;
 import com.java110.utils.constant.ServiceCodeActivitiesConstant;
+import com.java110.utils.exception.ListenerExecuteException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.ResponseEntity;
 
 
+import java.util.List;
+
 /**
 /**
  * 保存活动侦听
  * 保存活动侦听
  * add by wuxw 2019-06-30
  * add by wuxw 2019-06-30
  */
  */
 @Java110Listener("updateActivitiesListener")
 @Java110Listener("updateActivitiesListener")
 public class UpdateActivitiesListener extends AbstractServiceApiListener {
 public class UpdateActivitiesListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private IActivitiesInnerServiceSMO activitiesInnerServiceSMOImpl;
+
+    @Autowired
+    private IFileInnerServiceSMO fileInnerServiceSMOImpl;
+
+    @Autowired
+    private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl;
+
     @Override
     @Override
     protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
     protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
 
 
         Assert.hasKeyAndValue(reqJson, "activitiesId", "活动ID不能为空");
         Assert.hasKeyAndValue(reqJson, "activitiesId", "活动ID不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
         Assert.hasKeyAndValue(reqJson, "title", "必填,请填写业活动标题");
         Assert.hasKeyAndValue(reqJson, "title", "必填,请填写业活动标题");
         Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择活动类型");
         Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择活动类型");
         Assert.hasKeyAndValue(reqJson, "headerImg", "必填,请选择头部照片");
         Assert.hasKeyAndValue(reqJson, "headerImg", "必填,请选择头部照片");
@@ -46,6 +71,22 @@ public class UpdateActivitiesListener extends AbstractServiceApiListener {
         //添加单元信息
         //添加单元信息
         businesses.add(updateActivities(reqJson, context));
         businesses.add(updateActivities(reqJson, context));
 
 
+        if (reqJson.containsKey("headerImg") && !StringUtils.isEmpty(reqJson.getString("headerImg"))) {
+            FileDto fileDto = new FileDto();
+            fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id));
+            fileDto.setFileName(fileDto.getFileId());
+            fileDto.setContext(reqJson.getString("headerImg"));
+            fileDto.setSuffix("jpeg");
+            fileDto.setCommunityId(reqJson.getString("communityId"));
+            if (fileInnerServiceSMOImpl.saveFile(fileDto) < 1) {
+                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "保存文件出错");
+            }
+            reqJson.put("headerImg", fileDto.getFileId());
+
+            businesses.add(editHeaderImg(reqJson, context));
+
+        }
+
         JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
         JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
 
 
         //将 rest header 信息传递到下层服务中去
         //将 rest header 信息传递到下层服务中去
@@ -56,6 +97,48 @@ public class UpdateActivitiesListener extends AbstractServiceApiListener {
         context.setResponseEntity(responseEntity);
         context.setResponseEntity(responseEntity);
     }
     }
 
 
+    /**
+     * 修改头部照片
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    private JSONObject editHeaderImg(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+        FileRelDto fileRelDto = new FileRelDto();
+        fileRelDto.setRelTypeCd("70000");
+        fileRelDto.setObjId(paramInJson.getString("activitiesId"));
+        List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto);
+        if (fileRelDtos == null || fileRelDtos.size() == 0) {
+            JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+            business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FILE_REL);
+            business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 2);
+            business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+            JSONObject businessUnit = new JSONObject();
+            businessUnit.put("fileRelId", "-1");
+            businessUnit.put("relTypeCd", "70000");
+            businessUnit.put("saveWay", "table");
+            businessUnit.put("objId", paramInJson.getString("activitiesId"));
+            businessUnit.put("fileRealName", paramInJson.getString("headerImg"));
+            businessUnit.put("fileSaveName", paramInJson.getString("headerImg"));
+            business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessFileRel", businessUnit);
+            return business;
+        }
+        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FILE_REL);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 2);
+        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+        JSONObject businessUnit = new JSONObject();
+        businessUnit.putAll(BeanConvertUtil.beanCovertMap(fileRelDtos.get(0)));
+        businessUnit.put("fileRealName", paramInJson.getString("headerImg"));
+        businessUnit.put("fileSaveName", paramInJson.getString("headerImg"));
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessFileRel", businessUnit);
+        return business;
+
+
+    }
+
     @Override
     @Override
     public String getServiceCode() {
     public String getServiceCode() {
         return ServiceCodeActivitiesConstant.UPDATE_ACTIVITIES;
         return ServiceCodeActivitiesConstant.UPDATE_ACTIVITIES;
@@ -81,6 +164,13 @@ public class UpdateActivitiesListener extends AbstractServiceApiListener {
      */
      */
     private JSONObject updateActivities(JSONObject paramInJson, DataFlowContext dataFlowContext) {
     private JSONObject updateActivities(JSONObject paramInJson, DataFlowContext dataFlowContext) {
 
 
+        ActivitiesDto activitiesDto = new ActivitiesDto();
+        activitiesDto.setActivitiesId(paramInJson.getString("activitiesId"));
+        activitiesDto.setCommunityId(paramInJson.getString("communityId"));
+        List<ActivitiesDto> activitiesDtos = activitiesInnerServiceSMOImpl.queryActivitiess(activitiesDto);
+
+        Assert.listOnlyOne(activitiesDtos, "未找到需要修改的活动 或多条数据");
+
 
 
         JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
         JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
         business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ACTIVITIES);
         business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ACTIVITIES);
@@ -88,6 +178,10 @@ public class UpdateActivitiesListener extends AbstractServiceApiListener {
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         JSONObject businessActivities = new JSONObject();
         JSONObject businessActivities = new JSONObject();
         businessActivities.putAll(paramInJson);
         businessActivities.putAll(paramInJson);
+        businessActivities.put("readCount",activitiesDtos.get(0).getReadCount());
+        businessActivities.put("likeCount",activitiesDtos.get(0).getLikeCount());
+        businessActivities.put("collectCount",activitiesDtos.get(0).getCollectCount());
+        businessActivities.put("state",activitiesDtos.get(0).getState()); // 先设置为不审核
         //计算 应收金额
         //计算 应收金额
         business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessActivities", businessActivities);
         business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessActivities", businessActivities);
         return business;
         return business;

+ 2 - 0
CommunityService/src/main/java/com/java110/community/listener/activities/AbstractActivitiesBusinessServiceDataFlowListener.java

@@ -51,6 +51,7 @@ public abstract class AbstractActivitiesBusinessServiceDataFlowListener extends
         businessActivitiesInfo.put("endTime", businessActivitiesInfo.get("end_time"));
         businessActivitiesInfo.put("endTime", businessActivitiesInfo.get("end_time"));
         businessActivitiesInfo.put("communityId", businessActivitiesInfo.get("community_id"));
         businessActivitiesInfo.put("communityId", businessActivitiesInfo.get("community_id"));
         businessActivitiesInfo.put("headerImg", businessActivitiesInfo.get("header_img"));
         businessActivitiesInfo.put("headerImg", businessActivitiesInfo.get("header_img"));
+        businessActivitiesInfo.put("state", businessActivitiesInfo.get("state"));
         businessActivitiesInfo.remove("bId");
         businessActivitiesInfo.remove("bId");
         businessActivitiesInfo.put("statusCd", statusCd);
         businessActivitiesInfo.put("statusCd", statusCd);
     }
     }
@@ -89,6 +90,7 @@ public abstract class AbstractActivitiesBusinessServiceDataFlowListener extends
         currentActivitiesInfo.put("endTime", currentActivitiesInfo.get("end_time"));
         currentActivitiesInfo.put("endTime", currentActivitiesInfo.get("end_time"));
         currentActivitiesInfo.put("communityId", currentActivitiesInfo.get("community_id"));
         currentActivitiesInfo.put("communityId", currentActivitiesInfo.get("community_id"));
         currentActivitiesInfo.put("headerImg", currentActivitiesInfo.get("header_img"));
         currentActivitiesInfo.put("headerImg", currentActivitiesInfo.get("header_img"));
+        currentActivitiesInfo.put("state", currentActivitiesInfo.get("state"));
 
 
 
 
         currentActivitiesInfo.put("operate", StatusConstant.OPERATE_DEL);
         currentActivitiesInfo.put("operate", StatusConstant.OPERATE_DEL);

+ 1 - 0
WebService/src/main/java/com/java110/web/smo/activities/impl/AddActivitiesSMOImpl.java

@@ -31,6 +31,7 @@ public class AddActivitiesSMOImpl extends AbstractComponentSMO implements IAddAc
 
 
         //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
         //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
         Assert.hasKeyAndValue(paramIn, "title", "必填,请填写业活动标题");
         Assert.hasKeyAndValue(paramIn, "title", "必填,请填写业活动标题");
+        Assert.hasKeyAndValue(paramIn, "communityId", "必填,请填写小区ID");
         Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择活动类型");
         Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择活动类型");
         Assert.hasKeyAndValue(paramIn, "headerImg", "必填,请选择头部照片");
         Assert.hasKeyAndValue(paramIn, "headerImg", "必填,请选择头部照片");
         Assert.hasKeyAndValue(paramIn, "context", "必填,请填写活动内容");
         Assert.hasKeyAndValue(paramIn, "context", "必填,请填写活动内容");

+ 1 - 0
WebService/src/main/java/com/java110/web/smo/activities/impl/DeleteActivitiesSMOImpl.java

@@ -31,6 +31,7 @@ public class DeleteActivitiesSMOImpl extends AbstractComponentSMO implements IDe
 
 
         //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
         //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
         Assert.hasKeyAndValue(paramIn, "activitiesId", "活动ID不能为空");
         Assert.hasKeyAndValue(paramIn, "activitiesId", "活动ID不能为空");
+        Assert.hasKeyAndValue(paramIn, "communityId", "必填,请填写小区ID");
 
 
 
 
         //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_ACTIVITIES);
         //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_ACTIVITIES);

+ 1 - 0
WebService/src/main/java/com/java110/web/smo/activities/impl/EditActivitiesSMOImpl.java

@@ -29,6 +29,7 @@ public class EditActivitiesSMOImpl extends AbstractComponentSMO implements IEdit
         //super.validatePageInfo(pd);
         //super.validatePageInfo(pd);
 
 
         Assert.hasKeyAndValue(paramIn, "activitiesId", "活动ID不能为空");
         Assert.hasKeyAndValue(paramIn, "activitiesId", "活动ID不能为空");
+        Assert.hasKeyAndValue(paramIn, "communityId", "必填,请填写小区ID");
         Assert.hasKeyAndValue(paramIn, "title", "必填,请填写业活动标题");
         Assert.hasKeyAndValue(paramIn, "title", "必填,请填写业活动标题");
         Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择活动类型");
         Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择活动类型");
         Assert.hasKeyAndValue(paramIn, "headerImg", "必填,请选择头部照片");
         Assert.hasKeyAndValue(paramIn, "headerImg", "必填,请选择头部照片");

+ 7 - 4
WebService/src/main/resources/components/activitiesPackage/addActivitiesView/addActivitiesView.js

@@ -10,7 +10,7 @@
                 context: '',
                 context: '',
                 startTime: '',
                 startTime: '',
                 endTime: '',
                 endTime: '',
-                photos:[],
+
 
 
             }
             }
         },
         },
@@ -24,7 +24,11 @@
             });
             });
 
 
             vc.on("addActivitiesView", "notifyUploadImage", function (_param) {
             vc.on("addActivitiesView", "notifyUploadImage", function (_param) {
-                vc.component.addActivitiesView.photos = _param;
+                if(vc.notNull(_param) && _param.length >0){
+                    vc.component.addActivitiesView.headerImg = _param[0];
+                }else{
+                    vc.component.addActivitiesView.headerImg = '';
+                }
             });
             });
         },
         },
         methods: {
         methods: {
@@ -152,8 +156,7 @@
                     headerImg: '',
                     headerImg: '',
                     context: '',
                     context: '',
                     startTime: '',
                     startTime: '',
-                    endTime: '',
-                    photos:[],
+                    endTime: ''
 
 
                 };
                 };
             },
             },

+ 8 - 5
WebService/src/main/resources/components/activitiesPackage/editActivitiesView/editActivitiesView.js

@@ -9,8 +9,7 @@
                 headerImg: '',
                 headerImg: '',
                 context: '',
                 context: '',
                 startTime: '',
                 startTime: '',
-                endTime: '',
-                photos:[]
+                endTime: ''
             }
             }
         },
         },
          _initMethod:function(){
          _initMethod:function(){
@@ -27,13 +26,17 @@
                 _params.context = filterXSS(_params.context);
                 _params.context = filterXSS(_params.context);
                 vc.copyObject(_params,vc.component.editActivitiesViewInfo);
                 vc.copyObject(_params,vc.component.editActivitiesViewInfo);
                 $(".eidtSummernote").summernote('code', vc.component.editActivitiesViewInfo.context);
                 $(".eidtSummernote").summernote('code', vc.component.editActivitiesViewInfo.context);
-
-                vc.component.editActivitiesViewInfo.photos.push(vc.component.editActivitiesViewInfo.headerImg);
+                var photos = [];
+                photos.push(vc.component.editActivitiesViewInfo.headerImg);
                 vc.emit('editActivitiesView', 'uploadImage', 'notifyPhotos', vc.component.editActivitiesViewInfo.photos);
                 vc.emit('editActivitiesView', 'uploadImage', 'notifyPhotos', vc.component.editActivitiesViewInfo.photos);
             });
             });
 
 
              vc.on("editActivitiesViewInfo", "notifyUploadImage", function (_param) {
              vc.on("editActivitiesViewInfo", "notifyUploadImage", function (_param) {
-                 vc.component.editActivitiesViewInfo.photos = _param;
+                 if(vc.notNull(_param) && _param.length >0){
+                     vc.component.editActivitiesViewInfo.headerImg = _param[0];
+                 }else{
+                     vc.component.editActivitiesViewInfo.headerImg = '';
+                 }
              });
              });
 
 
         },
         },

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/activities/ActivitiesDto.java

@@ -28,6 +28,7 @@ public class ActivitiesDto extends PageDto implements Serializable {
     private String endTime;
     private String endTime;
     private String communityId;
     private String communityId;
     private String headerImg;
     private String headerImg;
+    private String state;
 
 
 
 
     private Date createTime;
     private Date createTime;
@@ -155,4 +156,12 @@ public class ActivitiesDto extends PageDto implements Serializable {
     public void setStatusCd(String statusCd) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
         this.statusCd = statusCd;
     }
     }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
 }
 }

+ 7 - 0
java110-bean/src/main/java/com/java110/vo/api/activities/ApiActivitiesDataVo.java

@@ -12,6 +12,7 @@ public class ApiActivitiesDataVo implements Serializable {
     private String context;
     private String context;
     private String startTime;
     private String startTime;
     private String endTime;
     private String endTime;
+    private String state;
 
 
     public String getActivitiesId() {
     public String getActivitiesId() {
         return activitiesId;
         return activitiesId;
@@ -69,5 +70,11 @@ public class ApiActivitiesDataVo implements Serializable {
         this.endTime = endTime;
         this.endTime = endTime;
     }
     }
 
 
+    public String getState() {
+        return state;
+    }
 
 
+    public void setState(String state) {
+        this.state = state;
+    }
 }
 }

+ 272 - 252
java110-db/src/main/resources/mapper/community/ActivitiesServiceDaoImplMapper.xml

@@ -5,287 +5,307 @@
 <mapper namespace="activitiesServiceDaoImpl">
 <mapper namespace="activitiesServiceDaoImpl">
 
 
     <!-- 保存活动信息 add by wuxw 2018-07-03 -->
     <!-- 保存活动信息 add by wuxw 2018-07-03 -->
-       <insert id="saveBusinessActivitiesInfo" parameterType="Map">
+    <insert id="saveBusinessActivitiesInfo" parameterType="Map">
            insert into business_activities(
            insert into business_activities(
-collect_count,like_count,title,read_count,user_name,user_id,activities_id,operate,type_cd,context,start_time,end_time,community_id,b_id,header_img
+collect_count,like_count,title,read_count,user_name,user_id,activities_id,operate,type_cd,context,start_time,end_time,community_id,b_id,header_img,state
 ) values (
 ) values (
-#{collectCount},#{likeCount},#{title},#{readCount},#{userName},#{userId},#{activitiesId},#{operate},#{typeCd},#{context},#{startTime},#{endTime},#{communityId},#{bId},#{headerImg}
+#{collectCount},#{likeCount},#{title},#{readCount},#{userName},#{userId},#{activitiesId},#{operate},#{typeCd},#{context},#{startTime},#{endTime},
+#{communityId},#{bId},#{headerImg},#{state}
 )
 )
        </insert>
        </insert>
 
 
 
 
-       <!-- 查询活动信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessActivitiesInfo" parameterType="Map" resultType="Map">
-           select  t.collect_count,t.collect_count collectCount,t.like_count,t.like_count likeCount,t.title,t.read_count,t.read_count readCount,t.user_name,t.user_name userName,t.user_id,t.user_id userId,t.activities_id,t.activities_id activitiesId,t.operate,t.type_cd,t.type_cd typeCd,t.context,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.header_img,t.header_img headerImg 
-from business_activities t 
-where 1 =1 
-<if test="collectCount !=null and collectCount != ''">
-   and t.collect_count= #{collectCount}
-</if> 
-<if test="likeCount !=null and likeCount != ''">
-   and t.like_count= #{likeCount}
-</if> 
-<if test="title !=null and title != ''">
-   and t.title= #{title}
-</if> 
-<if test="readCount !=null and readCount != ''">
-   and t.read_count= #{readCount}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="activitiesId !=null and activitiesId != ''">
-   and t.activities_id= #{activitiesId}
-</if> 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="typeCd !=null and typeCd != ''">
-   and t.type_cd= #{typeCd}
-</if> 
-<if test="context !=null and context != ''">
-   and t.context= #{context}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-   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> 
-<if test="headerImg !=null and headerImg != ''">
-   and t.header_img= #{headerImg}
-</if> 
-
-       </select>
-
-
+    <!-- 查询活动信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessActivitiesInfo" parameterType="Map" resultType="Map">
+        select t.collect_count,t.collect_count collectCount,t.like_count,t.like_count
+        likeCount,t.title,t.read_count,t.read_count readCount,t.user_name,t.user_name userName,t.user_id,t.user_id
+        userId,t.activities_id,t.activities_id activitiesId,t.operate,t.type_cd,t.type_cd
+        typeCd,t.context,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
+        communityId,t.b_id,t.b_id bId,t.header_img,t.header_img headerImg,t.state
+        from business_activities t
+        where 1 =1
+        <if test="collectCount !=null and collectCount != ''">
+            and t.collect_count= #{collectCount}
+        </if>
+        <if test="likeCount !=null and likeCount != ''">
+            and t.like_count= #{likeCount}
+        </if>
+        <if test="title !=null and title != ''">
+            and t.title= #{title}
+        </if>
+        <if test="readCount !=null and readCount != ''">
+            and t.read_count= #{readCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="activitiesId !=null and activitiesId != ''">
+            and t.activities_id= #{activitiesId}
+        </if>
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="context !=null and context != ''">
+            and t.context= #{context}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            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>
+        <if test="headerImg !=null and headerImg != ''">
+            and t.header_img= #{headerImg}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
 
 
+    </select>
 
 
 
 
     <!-- 保存活动信息至 instance表中 add by wuxw 2018-07-03 -->
     <!-- 保存活动信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveActivitiesInfoInstance" parameterType="Map">
     <insert id="saveActivitiesInfoInstance" parameterType="Map">
         insert into activities(
         insert into activities(
-collect_count,like_count,status_cd,title,read_count,user_name,user_id,activities_id,type_cd,context,start_time,end_time,community_id,b_id,header_img
-) select t.collect_count,t.like_count,'0',t.title,t.read_count,t.user_name,t.user_id,t.activities_id,t.type_cd,t.context,t.start_time,t.end_time,t.community_id,t.b_id,t.header_img from business_activities t where 1=1
-<if test="collectCount !=null and collectCount != ''">
-   and t.collect_count= #{collectCount}
-</if> 
-<if test="likeCount !=null and likeCount != ''">
-   and t.like_count= #{likeCount}
-</if> 
-<if test="title !=null and title != ''">
-   and t.title= #{title}
-</if> 
-<if test="readCount !=null and readCount != ''">
-   and t.read_count= #{readCount}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="activitiesId !=null and activitiesId != ''">
-   and t.activities_id= #{activitiesId}
-</if> 
-   and t.operate= 'ADD'
-<if test="typeCd !=null and typeCd != ''">
-   and t.type_cd= #{typeCd}
-</if> 
-<if test="context !=null and context != ''">
-   and t.context= #{context}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-   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> 
-<if test="headerImg !=null and headerImg != ''">
-   and t.header_img= #{headerImg}
-</if> 
+        collect_count,like_count,status_cd,title,read_count,user_name,user_id,activities_id,type_cd,context,start_time,
+        end_time,community_id,b_id,header_img,state
+        ) select
+        t.collect_count,t.like_count,'0',t.title,t.read_count,t.user_name,t.user_id,t.activities_id,t.type_cd,t.context,t.start_time,
+        t.end_time,t.community_id,t.b_id,t.header_img,t.state
+        from business_activities t where 1=1
+        <if test="collectCount !=null and collectCount != ''">
+            and t.collect_count= #{collectCount}
+        </if>
+        <if test="likeCount !=null and likeCount != ''">
+            and t.like_count= #{likeCount}
+        </if>
+        <if test="title !=null and title != ''">
+            and t.title= #{title}
+        </if>
+        <if test="readCount !=null and readCount != ''">
+            and t.read_count= #{readCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="activitiesId !=null and activitiesId != ''">
+            and t.activities_id= #{activitiesId}
+        </if>
+        and t.operate= 'ADD'
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="context !=null and context != ''">
+            and t.context= #{context}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            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>
+        <if test="headerImg !=null and headerImg != ''">
+            and t.header_img= #{headerImg}
+        </if>
 
 
     </insert>
     </insert>
 
 
 
 
-
     <!-- 查询活动信息 add by wuxw 2018-07-03 -->
     <!-- 查询活动信息 add by wuxw 2018-07-03 -->
     <select id="getActivitiesInfo" parameterType="Map" resultType="Map">
     <select id="getActivitiesInfo" parameterType="Map" resultType="Map">
-        select  t.collect_count,t.collect_count collectCount,t.like_count,t.like_count likeCount,t.status_cd,t.status_cd statusCd,t.title,t.read_count,t.read_count readCount,t.user_name,t.user_name userName,t.user_id,t.user_id userId,t.activities_id,t.activities_id activitiesId,t.type_cd,t.type_cd typeCd,t.context,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.header_img,t.header_img headerImg 
-from activities t 
-where 1 =1 
-<if test="collectCount !=null and collectCount != ''">
-   and t.collect_count= #{collectCount}
-</if> 
-<if test="likeCount !=null and likeCount != ''">
-   and t.like_count= #{likeCount}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="title !=null and title != ''">
-   and t.title= #{title}
-</if> 
-<if test="readCount !=null and readCount != ''">
-   and t.read_count= #{readCount}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="activitiesId !=null and activitiesId != ''">
-   and t.activities_id= #{activitiesId}
-</if> 
-<if test="typeCd !=null and typeCd != ''">
-   and t.type_cd= #{typeCd}
-</if> 
-<if test="context !=null and context != ''">
-   and t.context= #{context}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-   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> 
-<if test="headerImg !=null and headerImg != ''">
-   and t.header_img= #{headerImg}
-</if> 
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.collect_count,t.collect_count collectCount,t.like_count,t.like_count likeCount,t.status_cd,t.status_cd
+        statusCd,t.title,t.read_count,t.read_count readCount,t.user_name,t.user_name userName,t.user_id,t.user_id
+        userId,t.activities_id,t.activities_id activitiesId,t.type_cd,t.type_cd
+        typeCd,t.context,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
+        communityId,t.b_id,t.b_id bId,t.header_img,t.header_img headerImg,t.state
+        from activities t
+        where 1 =1
+        <if test="collectCount !=null and collectCount != ''">
+            and t.collect_count= #{collectCount}
+        </if>
+        <if test="likeCount !=null and likeCount != ''">
+            and t.like_count= #{likeCount}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="title !=null and title != ''">
+            and t.title= #{title}
+        </if>
+        <if test="readCount !=null and readCount != ''">
+            and t.read_count= #{readCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="activitiesId !=null and activitiesId != ''">
+            and t.activities_id= #{activitiesId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="context !=null and context != ''">
+            and t.context= #{context}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            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>
+        <if test="headerImg !=null and headerImg != ''">
+            and t.header_img= #{headerImg}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
 
     </select>
     </select>
 
 
 
 
-
-
     <!-- 修改活动信息 add by wuxw 2018-07-03 -->
     <!-- 修改活动信息 add by wuxw 2018-07-03 -->
     <update id="updateActivitiesInfoInstance" parameterType="Map">
     <update id="updateActivitiesInfoInstance" parameterType="Map">
-        update  activities t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="collectCount !=null and collectCount != ''">
-, t.collect_count= #{collectCount}
-</if> 
-<if test="likeCount !=null and likeCount != ''">
-, t.like_count= #{likeCount}
-</if> 
-<if test="title !=null and title != ''">
-, t.title= #{title}
-</if> 
-<if test="readCount !=null and readCount != ''">
-, t.read_count= #{readCount}
-</if> 
-<if test="userName !=null and userName != ''">
-, t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="typeCd !=null and typeCd != ''">
-, t.type_cd= #{typeCd}
-</if> 
-<if test="context !=null and context != ''">
-, t.context= #{context}
-</if> 
-<if test="startTime !=null and startTime != ''">
-, t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-, t.end_time= #{endTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="headerImg !=null and headerImg != ''">
-, t.header_img= #{headerImg}
-</if> 
- where 1=1 <if test="activitiesId !=null and activitiesId != ''">
-and t.activities_id= #{activitiesId}
-</if> 
-<if test="bId !=null and bId != ''">
-and t.b_id= #{bId}
-</if> 
+        update activities t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="collectCount !=null and collectCount != ''">
+            , t.collect_count= #{collectCount}
+        </if>
+        <if test="likeCount !=null and likeCount != ''">
+            , t.like_count= #{likeCount}
+        </if>
+        <if test="title !=null and title != ''">
+            , t.title= #{title}
+        </if>
+        <if test="readCount !=null and readCount != ''">
+            , t.read_count= #{readCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            , t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            , t.type_cd= #{typeCd}
+        </if>
+        <if test="context !=null and context != ''">
+            , t.context= #{context}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            , t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            , t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="headerImg !=null and headerImg != ''">
+            , t.header_img= #{headerImg}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        where 1=1
+        <if test="activitiesId !=null and activitiesId != ''">
+            and t.activities_id= #{activitiesId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
 
 
     </update>
     </update>
 
 
     <!-- 查询活动数量 add by wuxw 2018-07-03 -->
     <!-- 查询活动数量 add by wuxw 2018-07-03 -->
-     <select id="queryActivitiessCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from activities t 
-where 1 =1 
-<if test="collectCount !=null and collectCount != ''">
-   and t.collect_count= #{collectCount}
-</if> 
-<if test="likeCount !=null and likeCount != ''">
-   and t.like_count= #{likeCount}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="title !=null and title != ''">
-   and t.title= #{title}
-</if> 
-<if test="readCount !=null and readCount != ''">
-   and t.read_count= #{readCount}
-</if> 
-<if test="userName !=null and userName != ''">
-   and t.user_name= #{userName}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="activitiesId !=null and activitiesId != ''">
-   and t.activities_id= #{activitiesId}
-</if> 
-<if test="typeCd !=null and typeCd != ''">
-   and t.type_cd= #{typeCd}
-</if> 
-<if test="context !=null and context != ''">
-   and t.context= #{context}
-</if> 
-<if test="startTime !=null and startTime != ''">
-   and t.start_time= #{startTime}
-</if> 
-<if test="endTime !=null and endTime != ''">
-   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> 
-<if test="headerImg !=null and headerImg != ''">
-   and t.header_img= #{headerImg}
-</if> 
+    <select id="queryActivitiessCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from activities t
+        where 1 =1
+        <if test="collectCount !=null and collectCount != ''">
+            and t.collect_count= #{collectCount}
+        </if>
+        <if test="likeCount !=null and likeCount != ''">
+            and t.like_count= #{likeCount}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="title !=null and title != ''">
+            and t.title= #{title}
+        </if>
+        <if test="readCount !=null and readCount != ''">
+            and t.read_count= #{readCount}
+        </if>
+        <if test="userName !=null and userName != ''">
+            and t.user_name= #{userName}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="activitiesId !=null and activitiesId != ''">
+            and t.activities_id= #{activitiesId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="context !=null and context != ''">
+            and t.context= #{context}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            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>
+        <if test="headerImg !=null and headerImg != ''">
+            and t.header_img= #{headerImg}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
 
 
 
 
-     </select>
+    </select>
 
 
 </mapper>
 </mapper>