wuxw лет назад: 3
Родитель
Сommit
ce64e66781

+ 0 - 49
service-api/src/main/java/com/java110/api/listener/communityLocation/DeleteCommunityLocationAttrListener.java

@@ -1,49 +0,0 @@
-package com.java110.api.listener.communityLocation;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.communityLocationAttr.ICommunityLocationAttrBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeCommunityLocationAttrConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-
-/**
- * 保存小区侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("deleteCommunityLocationAttrListener")
-public class DeleteCommunityLocationAttrListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private ICommunityLocationAttrBMO communityLocationAttrBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        communityLocationAttrBMOImpl.deleteCommunityLocationAttr(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeCommunityLocationAttrConstant.DELETE_COMMUNITYLOCATIONATTR;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 82
service-api/src/main/java/com/java110/api/listener/communityLocation/ListCommunityLocationAttrsListener.java

@@ -1,82 +0,0 @@
-package com.java110.api.listener.communityLocation;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.dto.communityLocationAttr.CommunityLocationAttrDto;
-import com.java110.intf.community.ICommunityLocationAttrInnerServiceSMO;
-import com.java110.utils.constant.ServiceCodeCommunityLocationAttrConstant;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 查询小区侦听类
- */
-@Java110Listener("listCommunityLocationAttrsListener")
-public class ListCommunityLocationAttrsListener extends AbstractServiceApiListener {
-
-    @Autowired
-    private ICommunityLocationAttrInnerServiceSMO communityLocationAttrInnerServiceSMOImpl;
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeCommunityLocationAttrConstant.LIST_COMMUNITYLOCATIONATTRS;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    public ICommunityLocationAttrInnerServiceSMO getCommunityLocationAttrInnerServiceSMOImpl() {
-        return communityLocationAttrInnerServiceSMOImpl;
-    }
-
-    public void setCommunityLocationAttrInnerServiceSMOImpl(ICommunityLocationAttrInnerServiceSMO communityLocationAttrInnerServiceSMOImpl) {
-        this.communityLocationAttrInnerServiceSMOImpl = communityLocationAttrInnerServiceSMOImpl;
-    }
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        CommunityLocationAttrDto communityLocationAttrDto = BeanConvertUtil.covertBean(reqJson, CommunityLocationAttrDto.class);
-
-        int count = communityLocationAttrInnerServiceSMOImpl.queryCommunityLocationAttrsCount(communityLocationAttrDto);
-
-        List<CommunityLocationAttrDto> communityLocationAttrDtos = null;
-
-        if (count > 0) {
-            communityLocationAttrDtos = communityLocationAttrInnerServiceSMOImpl.queryCommunityLocationAttrs(communityLocationAttrDto);
-        } else {
-            communityLocationAttrDtos = new ArrayList<>();
-        }
-
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, communityLocationAttrDtos);
-
-        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-        context.setResponseEntity(responseEntity);
-
-    }
-}

+ 0 - 47
service-api/src/main/java/com/java110/api/listener/communityLocation/SaveCommunityLocationAttrListener.java

@@ -1,47 +0,0 @@
-package com.java110.api.listener.communityLocation;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.communityLocationAttr.ICommunityLocationAttrBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeCommunityLocationAttrConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-/**
- * 保存商户侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("saveCommunityLocationAttrListener")
-public class SaveCommunityLocationAttrListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private ICommunityLocationAttrBMO communityLocationAttrBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-        communityLocationAttrBMOImpl.addCommunityLocationAttr(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeCommunityLocationAttrConstant.ADD_COMMUNITYLOCATIONATTR;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 48
service-api/src/main/java/com/java110/api/listener/communityLocation/UpdateCommunityLocationAttrListener.java

@@ -1,48 +0,0 @@
-package com.java110.api.listener.communityLocation;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.communityLocationAttr.ICommunityLocationAttrBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeCommunityLocationAttrConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-/**
- * 保存位置属性侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("updateCommunityLocationAttrListener")
-public class UpdateCommunityLocationAttrListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private ICommunityLocationAttrBMO communityLocationAttrBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-
-        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
-        Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        communityLocationAttrBMOImpl.updateCommunityLocationAttr(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeCommunityLocationAttrConstant.UPDATE_COMMUNITYLOCATIONATTR;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-}