| | |
| | | */ |
| | | private String saveServiceInfo(JSONObject reqJson, JSONObject serviceInfo){ |
| | | ServiceDto serviceDto = BeanConvertUtil.covertBean(serviceInfo, ServiceDto.class); |
| | | serviceDto.setProvideAppId("8000418002"); |
| | | serviceDto.setBusinessTypeCd("API"); |
| | | serviceDto.setSeq("1"); |
| | | |
| | | serviceDto.setServiceId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_service_id)); |
| | | |
| New file |
| | |
| | | package com.java110.api.listener.serviceRegister; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.ServiceCodeServiceRegisterConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.service.IRouteInnerServiceSMO; |
| | | import com.java110.dto.service.RouteDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("deleteServiceRegisterListener") |
| | | public class DeleteServiceRegisterListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IRouteInnerServiceSMO routeInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "id", "绑定ID不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | RouteDto routeDto = BeanConvertUtil.covertBean(reqJson, RouteDto.class); |
| | | |
| | | routeDto.setStatusCd(StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | int count = routeInnerServiceSMOImpl.deleteRoute(routeDto); |
| | | |
| | | |
| | | if (count < 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "删除数据失败"); |
| | | } |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>("", HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeServiceRegisterConstant.DELETE_SERVICEREGISTER; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | public IRouteInnerServiceSMO getRouteInnerServiceSMOImpl() { |
| | | return routeInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setRouteInnerServiceSMOImpl(IRouteInnerServiceSMO routeInnerServiceSMOImpl) { |
| | | this.routeInnerServiceSMOImpl = routeInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.serviceRegister; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.common.constant.ServiceCodeServiceRegisterConstant; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.service.IRouteInnerServiceSMO; |
| | | import com.java110.core.smo.service.IServiceInnerServiceSMO; |
| | | import com.java110.dto.service.RouteDto; |
| | | import com.java110.dto.service.ServiceDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.vo.api.serviceRegister.ApiServiceRegisterDataVo; |
| | | import com.java110.vo.api.serviceRegister.ApiServiceRegisterVo; |
| | | 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("listServiceRegistersListener") |
| | | public class ListServiceRegistersListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IRouteInnerServiceSMO routeInnerServiceSMOIMpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeServiceRegisterConstant.LIST_SERVICEREGISTERS; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IRouteInnerServiceSMO getRouteInnerServiceSMOIMpl() { |
| | | return routeInnerServiceSMOIMpl; |
| | | } |
| | | |
| | | public void setRouteInnerServiceSMOIMpl(IRouteInnerServiceSMO routeInnerServiceSMOIMpl) { |
| | | this.routeInnerServiceSMOIMpl = routeInnerServiceSMOIMpl; |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | RouteDto routeDto = BeanConvertUtil.covertBean(reqJson, RouteDto.class); |
| | | |
| | | int count = routeInnerServiceSMOIMpl.queryRoutesCount(routeDto); |
| | | |
| | | List<ApiServiceRegisterDataVo> serviceRegisters = null; |
| | | |
| | | if (count > 0) { |
| | | serviceRegisters = BeanConvertUtil.covertBeanList(routeInnerServiceSMOIMpl.queryRoutes(routeDto), ApiServiceRegisterDataVo.class); |
| | | } else { |
| | | serviceRegisters = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiServiceRegisterVo apiServiceRegisterVo = new ApiServiceRegisterVo(); |
| | | |
| | | apiServiceRegisterVo.setTotal(count); |
| | | apiServiceRegisterVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiServiceRegisterVo.setServiceRegisters(serviceRegisters); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiServiceRegisterVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.serviceRegister; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.CommonConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.ServiceCodeConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.service.IRouteInnerServiceSMO; |
| | | import com.java110.dto.service.RouteDto; |
| | | import com.java110.dto.service.ServiceDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import com.java110.common.constant.ServiceCodeServiceRegisterConstant; |
| | | |
| | | /** |
| | | * 保存服务绑定侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("updateServiceRegisterListener") |
| | | public class UpdateServiceRegisterListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IRouteInnerServiceSMO routeInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "id", "绑定ID不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "appId", "必填,请填写应用ID"); |
| | | Assert.hasKeyAndValue(reqJson, "serviceId", "必填,请填写服务ID"); |
| | | Assert.hasKeyAndValue(reqJson, "orderTypeCd", "必填,请填写订单类型"); |
| | | Assert.hasKeyAndValue(reqJson, "invokeLimitTimes", "必填,请填写调用次数"); |
| | | Assert.hasKeyAndValue(reqJson, "invokeModel", "可填,请填写消息队列,订单在异步调用时使用"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | RouteDto routeDto = BeanConvertUtil.covertBean(reqJson, RouteDto.class); |
| | | |
| | | |
| | | int count = routeInnerServiceSMOImpl.updateRoute(routeDto); |
| | | |
| | | |
| | | if (count < 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "修改数据失败"); |
| | | } |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>("", HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | public IRouteInnerServiceSMO getRouteInnerServiceSMOImpl() { |
| | | return routeInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setRouteInnerServiceSMOImpl(IRouteInnerServiceSMO routeInnerServiceSMOImpl) { |
| | | this.routeInnerServiceSMOImpl = routeInnerServiceSMOImpl; |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeServiceRegisterConstant.UPDATE_SERVICEREGISTER; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.serviceRegister; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.serviceRegister.IListServiceRegistersSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 应用组件管理类 |
| | | * <p> |
| | | * add by wuxw |
| | | * <p> |
| | | * 2019-06-29 |
| | | */ |
| | | @Component("chooseServiceRegister") |
| | | public class ChooseServiceRegisterComponent { |
| | | |
| | | @Autowired |
| | | private IListServiceRegistersSMO listServiceRegistersSMOImpl; |
| | | |
| | | /** |
| | | * 查询应用列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listServiceRegistersSMOImpl.listServiceRegisters(pd); |
| | | } |
| | | |
| | | public IListServiceRegistersSMO getListServiceRegistersSMOImpl() { |
| | | return listServiceRegistersSMOImpl; |
| | | } |
| | | |
| | | public void setListServiceRegistersSMOImpl(IListServiceRegistersSMO listServiceRegistersSMOImpl) { |
| | | this.listServiceRegistersSMOImpl = listServiceRegistersSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.serviceRegister; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.serviceRegister.IDeleteServiceRegisterSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加服务绑定组件 |
| | | */ |
| | | @Component("deleteServiceRegister") |
| | | public class DeleteServiceRegisterComponent { |
| | | |
| | | @Autowired |
| | | private IDeleteServiceRegisterSMO deleteServiceRegisterSMOImpl; |
| | | |
| | | /** |
| | | * 添加服务绑定数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> delete(IPageData pd){ |
| | | return deleteServiceRegisterSMOImpl.deleteServiceRegister(pd); |
| | | } |
| | | |
| | | public IDeleteServiceRegisterSMO getDeleteServiceRegisterSMOImpl() { |
| | | return deleteServiceRegisterSMOImpl; |
| | | } |
| | | |
| | | public void setDeleteServiceRegisterSMOImpl(IDeleteServiceRegisterSMO deleteServiceRegisterSMOImpl) { |
| | | this.deleteServiceRegisterSMOImpl = deleteServiceRegisterSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.serviceRegister; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.serviceRegister.IEditServiceRegisterSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 编辑小区组件 |
| | | */ |
| | | @Component("editServiceRegister") |
| | | public class EditServiceRegisterComponent { |
| | | |
| | | @Autowired |
| | | private IEditServiceRegisterSMO editServiceRegisterSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> update(IPageData pd){ |
| | | return editServiceRegisterSMOImpl.updateServiceRegister(pd); |
| | | } |
| | | |
| | | public IEditServiceRegisterSMO getEditServiceRegisterSMOImpl() { |
| | | return editServiceRegisterSMOImpl; |
| | | } |
| | | |
| | | public void setEditServiceRegisterSMOImpl(IEditServiceRegisterSMO editServiceRegisterSMOImpl) { |
| | | this.editServiceRegisterSMOImpl = editServiceRegisterSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.serviceRegister; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.app.IListAppsSMO; |
| | | import com.java110.web.smo.serviceRegister.IListServiceRegistersSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 服务绑定组件管理类 |
| | | * |
| | | * add by wuxw |
| | | * |
| | | * 2019-06-29 |
| | | */ |
| | | @Component("serviceRegisterManage") |
| | | public class ServiceRegisterManageComponent { |
| | | |
| | | @Autowired |
| | | private IListServiceRegistersSMO listServiceRegistersSMOImpl; |
| | | |
| | | @Autowired |
| | | private IListAppsSMO listAppsSMOImpl; |
| | | |
| | | /** |
| | | * 查询服务绑定列表 |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd){ |
| | | return listServiceRegistersSMOImpl.listServiceRegisters(pd); |
| | | } |
| | | |
| | | |
| | | public ResponseEntity<String> loadApp(IPageData pd){ |
| | | return listAppsSMOImpl.listApps(pd); |
| | | } |
| | | |
| | | public IListServiceRegistersSMO getListServiceRegistersSMOImpl() { |
| | | return listServiceRegistersSMOImpl; |
| | | } |
| | | |
| | | public void setListServiceRegistersSMOImpl(IListServiceRegistersSMO listServiceRegistersSMOImpl) { |
| | | this.listServiceRegistersSMOImpl = listServiceRegistersSMOImpl; |
| | | } |
| | | |
| | | public IListAppsSMO getListAppsSMOImpl() { |
| | | return listAppsSMOImpl; |
| | | } |
| | | |
| | | public void setListAppsSMOImpl(IListAppsSMO listAppsSMOImpl) { |
| | | this.listAppsSMOImpl = listAppsSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.serviceRegister; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加服务绑定接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IDeleteServiceRegisterSMO { |
| | | |
| | | /** |
| | | * 添加服务绑定 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> deleteServiceRegister(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.serviceRegister; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 修改服务绑定接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IEditServiceRegisterSMO { |
| | | |
| | | /** |
| | | * 修改小区 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> updateServiceRegister(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.serviceRegister; |
| | | |
| | | import com.java110.common.exception.SMOException; |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 服务绑定管理服务接口类 |
| | | * |
| | | * add by wuxw 2019-06-29 |
| | | */ |
| | | public interface IListServiceRegistersSMO { |
| | | |
| | | /** |
| | | * 查询服务绑定信息 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象数据 |
| | | * @throws SMOException 业务代码层 |
| | | */ |
| | | ResponseEntity<String> listServiceRegisters(IPageData pd) throws SMOException; |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.serviceRegister.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.PrivilegeCodeConstant; |
| | | import com.java110.common.constant.ServiceConstant; |
| | | import com.java110.common.util.Assert; |
| | | import org.springframework.web.client.RestTemplate; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.core.AbstractComponentSMO; |
| | | import com.java110.web.smo.serviceRegister.IDeleteServiceRegisterSMO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | | * delete by wuxw 2019-06-30 |
| | | */ |
| | | @Service("deleteServiceRegisterSMOImpl") |
| | | public class DeleteServiceRegisterSMOImpl extends AbstractComponentSMO implements IDeleteServiceRegisterSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "id", "绑定ID不能为空"); |
| | | |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_SERVICEREGISTER); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/serviceRegister.deleteServiceRegister", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> deleteServiceRegister(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.serviceRegister.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.PrivilegeCodeConstant; |
| | | import com.java110.common.constant.ServiceConstant; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.core.AbstractComponentSMO; |
| | | import com.java110.web.smo.serviceRegister.IEditServiceRegisterSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | /** |
| | | * 添加服务绑定服务实现类 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Service("eidtServiceRegisterSMOImpl") |
| | | public class EditServiceRegisterSMOImpl extends AbstractComponentSMO implements IEditServiceRegisterSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | Assert.hasKeyAndValue(paramIn, "id", "绑定ID不能为空"); |
| | | Assert.hasKeyAndValue(paramIn, "appId", "必填,请填写应用ID"); |
| | | Assert.hasKeyAndValue(paramIn, "serviceId", "必填,请填写服务ID"); |
| | | Assert.hasKeyAndValue(paramIn, "orderTypeCd", "必填,请填写订单类型"); |
| | | Assert.hasKeyAndValue(paramIn, "invokeLimitTimes", "必填,请填写调用次数"); |
| | | Assert.hasKeyAndValue(paramIn, "invokeModel", "可填,请填写消息队列,订单在异步调用时使用"); |
| | | |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_SERVICEREGISTER); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/serviceRegister.updateServiceRegister", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> updateServiceRegister(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.serviceRegister.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.PrivilegeCodeConstant; |
| | | import com.java110.common.constant.ServiceConstant; |
| | | import com.java110.common.exception.SMOException; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import org.springframework.web.client.RestTemplate; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.web.core.AbstractComponentSMO; |
| | | import com.java110.web.smo.serviceRegister.IListServiceRegistersSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 查询serviceRegister服务类 |
| | | */ |
| | | @Service("listServiceRegistersSMOImpl") |
| | | public class ListServiceRegistersSMOImpl extends AbstractComponentSMO implements IListServiceRegistersSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> listServiceRegisters(IPageData pd) throws SMOException { |
| | | return businessProcess(pd); |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | super.validatePageInfo(pd); |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_SERVICEREGISTER); |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | paramIn.putAll(paramMap); |
| | | |
| | | String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/serviceRegister.listServiceRegisters" + mapToUrlParam(paramIn); |
| | | |
| | | |
| | | ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | apiUrl, |
| | | HttpMethod.GET); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| | |
| | | <span v-if="menu.label == undefined || menu.label == ''" class="fa arrow"></span> |
| | | </a> |
| | | <ul v-if="menu.childs != undefined && menu.childs.length >0" class="nav nav-second-level collapse" v-bind:class="{in: menu.active}"> |
| | | <li v-for="subMenu in menu.childs"><a v-bind:href="subMenu.href">{{subMenu.name}}</a></li> |
| | | <li v-for="subMenu in menu.childs" v-if="subMenu.isShow == 'Y'"><a v-bind:href="subMenu.href">{{subMenu.name}}</a></li> |
| | | </ul> |
| | | <a v-if="menu.childs == undefined || menu.childs.length ==0" v-bind:href="menu.href"> |
| | | <i class="fa " v-bind:class="menu.icon"></i> |
| | |
| | | <div class="ibox-title"> |
| | | <h5>查询条件</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" |
| | | <!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" |
| | | v-on:click="_moreCondition()">更多 |
| | | </button> |
| | | </button>--> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group input-group"> |
| | | <input type="text" placeholder="请选择应用名称" v-model="serviceManageInfo.conditions.appName" |
| | | class=" form-control"> |
| | | <div class="input-group-prepend"> |
| | | <button type="button" class="btn btn-primary btn-sm" |
| | | v-on:click="_openChooseAppMethod()"><i |
| | | class="glyphicon glyphicon-search"></i> 选择 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入服务名称" |
| | |
| | | v-model="serviceManageInfo.conditions.serviceCode" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryServiceMethod()"><i |
| | | class="glyphicon glyphicon-search" ></i> 查询 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-4" v-if="serviceManageInfo.moreCondition == true"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入调用地址" |
| | | v-model="serviceManageInfo.conditions.serviceUrl" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryServiceMethod()"><i |
| | | class="glyphicon glyphicon-search" ></i> 查询 |
| | | </button> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="chooseApp" |
| | | <!--<vc:create name="chooseApp" |
| | | emitChooseApp="serviceManage" |
| | | emitLoadData="serviceManage" |
| | | ></vc:create> |
| | | ></vc:create>--> |
| | | |
| | | |
| | | <vc:create name="addService" |
| | |
| | | name:'', |
| | | conditions:{ |
| | | appName:'', |
| | | appId:'', |
| | | serviceName:'', |
| | | serviceCode:'', |
| | | serviceUrl:'', |
| | | appId:'', |
| | | serviceName:'', |
| | | serviceCode:'', |
| | | serviceUrl:'', |
| | | |
| | | } |
| | | } |
| | |
| | | ); |
| | | }, |
| | | _openAddServiceModal:function(){ |
| | | //vc.emit('addService','openAddServiceModal',{}); |
| | | vc.jumpToPage("/flow/serviceBindingFlow"); |
| | | vc.emit('addService','openAddServiceModal',{}); |
| | | |
| | | }, |
| | | _openEditServiceModel:function(_service){ |
| | | vc.emit('editService','openEditServiceModal',_service); |
| New file |
| | |
| | | <div id = "chooseServiceRegisterModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseServiceRegisterModelLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h3 class="modal-title" id="chooseServiceRegisterModelLabel">选择服务绑定</h3> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class=" row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-7 m-b-xs"> |
| | | </div> |
| | | <div class="col-sm-5"> |
| | | <div class="input-group"> |
| | | <input placeholder="输入服务绑定名称" type="text" v-model="chooseServiceRegisterInfo._currentServiceRegisterName" class="form-control form-control-sm"> |
| | | <span class="input-group-append"> |
| | | <button type="button" class="btn btn-sm btn-primary" v-on:click="queryServiceRegisters()">查询</button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table-responsive" style="margin-top:15px"> |
| | | <table class="table table-striped"> |
| | | <thead> |
| | | <tr> |
| | | <th class="text-center">绑定ID</th> |
| | | <th class="text-center">应用ID</th> |
| | | <th class="text-center">服务ID</th> |
| | | <th class="text-center">订单类型</th> |
| | | <th class="text-center">调用次数</th> |
| | | <th class="text-center">调用方式</th> |
| | | <th class="text-center">操作</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="serviceRegister in chooseServiceRegisterInfo.serviceRegisters"> |
| | | <td class="text-center">{{serviceRegister.id}}</td> |
| | | <td class="text-center">{{serviceRegister.appId}}</td> |
| | | <td class="text-center">{{serviceRegister.serviceId}}</td> |
| | | <td class="text-center">{{serviceRegister.orderTypeCd}}</td> |
| | | <td class="text-center">{{serviceRegister.invokeLimitTimes}}</td> |
| | | <td class="text-center">{{serviceRegister.invokeModel}}</td> |
| | | |
| | | <td> |
| | | <button class="btn btn-primary btn-xs" v-on:click="chooseServiceRegister(serviceRegister)">选择</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | vc.extends({ |
| | | propTypes: { |
| | | emitChooseServiceRegister:vc.propTypes.string, |
| | | emitLoadData:vc.propTypes.string |
| | | }, |
| | | data:{ |
| | | chooseServiceRegisterInfo:{ |
| | | serviceRegisters:[], |
| | | _currentServiceRegisterName:'', |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('chooseServiceRegister','openChooseServiceRegisterModel',function(_param){ |
| | | $('#chooseServiceRegisterModel').modal('show'); |
| | | vc.component._refreshChooseServiceRegisterInfo(); |
| | | vc.component._loadAllServiceRegisterInfo(1,10,''); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _loadAllServiceRegisterInfo:function(_page,_row,_name){ |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_row, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | name:_name |
| | | } |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('chooseServiceRegister', |
| | | 'list', |
| | | param, |
| | | function(json){ |
| | | var _serviceRegisterInfo = JSON.parse(json); |
| | | vc.component.chooseServiceRegisterInfo.serviceRegisters = _serviceRegisterInfo.serviceRegisters; |
| | | },function(){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | chooseServiceRegister:function(_serviceRegister){ |
| | | if(_serviceRegister.hasOwnProperty('name')){ |
| | | _serviceRegister.serviceRegisterName = _serviceRegister.name; |
| | | } |
| | | vc.emit($props.emitChooseServiceRegister,'chooseServiceRegister',_serviceRegister); |
| | | vc.emit($props.emitLoadData,'listServiceRegisterData',{ |
| | | serviceRegisterId:_serviceRegister.serviceRegisterId |
| | | }); |
| | | $('#chooseServiceRegisterModel').modal('hide'); |
| | | }, |
| | | queryServiceRegisters:function(){ |
| | | vc.component._loadAllServiceRegisterInfo(1,10,vc.component.chooseServiceRegisterInfo._currentServiceRegisterName); |
| | | }, |
| | | _refreshChooseServiceRegisterInfo:function(){ |
| | | vc.component.chooseServiceRegisterInfo._currentServiceRegisterName = ""; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="modal fade" id="deleteServiceRegisterModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <tr align="center"><th>确定删除服务绑定</th></tr> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteServiceRegisterModel()">点错了</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="deleteServiceRegister()">确认删除</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | deleteServiceRegisterInfo:{ |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('deleteServiceRegister','openDeleteServiceRegisterModal',function(_params){ |
| | | |
| | | vc.component.deleteServiceRegisterInfo = _params; |
| | | $('#deleteServiceRegisterModel').modal('show'); |
| | | |
| | | }); |
| | | }, |
| | | methods:{ |
| | | deleteServiceRegister:function(){ |
| | | vc.component.deleteServiceRegisterInfo.communityId=vc.getCurrentCommunity().communityId; |
| | | vc.http.post( |
| | | 'deleteServiceRegister', |
| | | 'delete', |
| | | JSON.stringify(vc.component.deleteServiceRegisterInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#deleteServiceRegisterModel').modal('hide'); |
| | | vc.emit('serviceRegisterManage','listServiceRegister',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | vc.message(json); |
| | | |
| | | }); |
| | | }, |
| | | closeDeleteServiceRegisterModel:function(){ |
| | | $('#deleteServiceRegisterModel').modal('hide'); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| New file |
| | |
| | | <div id="editServiceRegisterModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" |
| | | aria-hidden="true"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b ">修改服务绑定</h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">应用ID</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editServiceRegisterInfo.appId" readonly type="text" placeholder="必填,请填写应用ID" |
| | | class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">服务ID</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editServiceRegisterInfo.serviceId" readonly type="text" |
| | | placeholder="必填,请填写服务ID" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">订单类型</label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="editServiceRegisterInfo.orderTypeCd"> |
| | | <option selected disabled value="">必填,请选择订单类型</option> |
| | | <option value="Q">查询</option> |
| | | <option value="D">业务受理</option> |
| | | </select></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">调用次数</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editServiceRegisterInfo.invokeLimitTimes" type="text" |
| | | placeholder="必填,请填写调用次数" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">调用方式</label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="editServiceRegisterInfo.invokeModel"> |
| | | <option selected disabled value="">必填,请选择调用方式</option> |
| | | <option value="S">同步方式</option> |
| | | <option value="A">异步方式</option> |
| | | </select></div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" |
| | | v-on:click="editServiceRegister()"><i class="fa fa-check"></i> 保存 |
| | | </button> |
| | | <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" |
| | | data-dismiss="modal">取消 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | editServiceRegisterInfo:{ |
| | | id:'', |
| | | appId:'', |
| | | serviceId:'', |
| | | orderTypeCd:'', |
| | | invokeLimitTimes:'1000', |
| | | invokeModel:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('editServiceRegister','openEditServiceRegisterModal',function(_params){ |
| | | vc.component.refreshEditServiceRegisterInfo(); |
| | | $('#editServiceRegisterModel').modal('show'); |
| | | vc.copyObject(_params, vc.component.editServiceRegisterInfo ); |
| | | vc.component.editServiceRegisterInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | }); |
| | | }, |
| | | methods:{ |
| | | editServiceRegisterValidate:function(){ |
| | | return vc.validate.validate({ |
| | | editServiceRegisterInfo:vc.component.editServiceRegisterInfo |
| | | },{ |
| | | 'editServiceRegisterInfo.appId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"应用ID不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"50", |
| | | errInfo:"应用ID不能超过50" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.serviceId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"服务ID不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,50", |
| | | errInfo:"服务ID必须在2至50字符之间" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.orderTypeCd':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"订单类型不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"1,4", |
| | | errInfo:"订单类型错误" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.invokeLimitTimes':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"调用次数不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"调用次数错误" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.invokeModel':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"调用方式不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"50", |
| | | errInfo:"消息队列不能超过50" |
| | | }, |
| | | ], |
| | | 'editServiceRegisterInfo.id':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"绑定ID不能为空" |
| | | }] |
| | | |
| | | }); |
| | | }, |
| | | editServiceRegister:function(){ |
| | | if(!vc.component.editServiceRegisterValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | return ; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'editServiceRegister', |
| | | 'update', |
| | | JSON.stringify(vc.component.editServiceRegisterInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#editServiceRegisterModel').modal('hide'); |
| | | vc.emit('serviceRegisterManage','listServiceRegister',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | }, |
| | | refreshEditServiceRegisterInfo:function(){ |
| | | vc.component.editServiceRegisterInfo= { |
| | | id:'', |
| | | appId:'', |
| | | serviceId:'', |
| | | orderTypeCd:'', |
| | | invokeLimitTimes:'1000', |
| | | invokeModel:'', |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| New file |
| | |
| | | <div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce"> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>查询条件</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" |
| | | v-on:click="_moreCondition()">更多 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group input-group"> |
| | | <input type="text" placeholder="请选择应用名称" |
| | | v-model="serviceRegisterManageInfo.conditions.appName" class=" form-control"> |
| | | <div class="input-group-prepend"> |
| | | <button type="button" class="btn btn-primary btn-sm" |
| | | v-on:click="_openChooseAppMethod()"><i |
| | | class="glyphicon glyphicon-search"></i> 选择 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入服务名称" |
| | | v-model="serviceRegisterManageInfo.conditions.serviceName" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入服务编码" |
| | | v-model="serviceRegisterManageInfo.conditions.serviceCode" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryServiceRegisterMethod()"> |
| | | <i class="glyphicon glyphicon-search" ></i> 查询 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-4" v-if="serviceRegisterManageInfo.moreCondition == true"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入调用地址" |
| | | v-model="serviceRegisterManageInfo.conditions.serviceUrl" class=" form-control"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox"> |
| | | <div class="ibox-title"> |
| | | <h5>服务绑定信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-primary btn-sm" |
| | | v-on:click="_openAddServiceRegisterModal()"> |
| | | <i class="glyphicon glyphicon-plus"></i> |
| | | 服务绑定 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | |
| | | <table class="footable table table-stripped toggle-arrow-tiny" |
| | | data-page-size="15" |
| | | style="table-layout: fixed;word-break:break-all;" |
| | | > |
| | | <thead> |
| | | <tr> |
| | | <th class="text-center">绑定ID</th> |
| | | <th class="text-center">应用ID</th> |
| | | <th class="text-center">应用名称</th> |
| | | <th class="text-center">服务ID</th> |
| | | <th class="text-center">服务名称</th> |
| | | <th class="text-center">订单类型</th> |
| | | <th class="text-center">操作</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="serviceRegister in serviceRegisterManageInfo.serviceRegisters"> |
| | | <td class="text-center">{{serviceRegister.id}}</td> |
| | | <td class="text-center">{{serviceRegister.appId}}</td> |
| | | <td class="text-center">{{serviceRegister.appName}}</td> |
| | | <td class="text-center">{{serviceRegister.serviceId}}</td> |
| | | <td class="text-center">{{serviceRegister.serviceName}}</td> |
| | | <td class="text-center">{{serviceRegister.orderTypeCd}}</td> |
| | | <td class="text-center"> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" |
| | | v-on:click="_openEditServiceRegisterModel(serviceRegister)">修改 |
| | | </button> |
| | | </div> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" |
| | | v-on:click="_openDeleteServiceRegisterModel(serviceRegister)">删除 |
| | | </button> |
| | | </div> |
| | | </td> |
| | | |
| | | </tr> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="7"> |
| | | <ul class="pagination float-right"></ul> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <!-- 分页 --> |
| | | <vc:create name="pagination"></vc:create> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="chooseApp" |
| | | emitChooseApp="serviceRegisterManage" |
| | | emitLoadData="serviceRegisterManage" |
| | | ></vc:create> |
| | | |
| | | <vc:create name="editServiceRegister"></vc:create> |
| | | <vc:create name="deleteServiceRegister"></vc:create> |
| | | |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | serviceRegisterManageInfo:{ |
| | | serviceRegisters:[], |
| | | total:0, |
| | | records:1, |
| | | moreCondition:false, |
| | | name:'', |
| | | conditions:{ |
| | | appName:'', |
| | | appId:'', |
| | | serviceName:'', |
| | | serviceCode:'', |
| | | serviceUrl:'', |
| | | |
| | | } |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('serviceRegisterManage','chooseApp',function(_param){ |
| | | vc.copyObject(_param,vc.component.serviceRegisterManageInfo.conditions); |
| | | }); |
| | | |
| | | vc.on('serviceRegisterManage','listServiceRegister',function(_param){ |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | | vc.component._listServiceRegisters(_currentPage,DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listServiceRegisters:function(_page, _rows){ |
| | | |
| | | vc.component.serviceRegisterManageInfo.conditions.page = _page; |
| | | vc.component.serviceRegisterManageInfo.conditions.row = _rows; |
| | | var param = { |
| | | params:vc.component.serviceRegisterManageInfo.conditions |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('serviceRegisterManage', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _serviceRegisterManageInfo=JSON.parse(json); |
| | | vc.component.serviceRegisterManageInfo.total = _serviceRegisterManageInfo.total; |
| | | vc.component.serviceRegisterManageInfo.records = _serviceRegisterManageInfo.records; |
| | | vc.component.serviceRegisterManageInfo.serviceRegisters = _serviceRegisterManageInfo.serviceRegisters; |
| | | vc.emit('pagination','init',{ |
| | | total:vc.component.serviceRegisterManageInfo.records, |
| | | currentPage:_page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _openAddServiceRegisterModal:function(){ |
| | | //vc.emit('addServiceRegister','openAddServiceRegisterModal',{}); |
| | | vc.jumpToPage("/flow/serviceBindingFlow"); |
| | | }, |
| | | _openEditServiceRegisterModel:function(_serviceRegister){ |
| | | vc.emit('editServiceRegister','openEditServiceRegisterModal',_serviceRegister); |
| | | }, |
| | | _openDeleteServiceRegisterModel:function(_serviceRegister){ |
| | | vc.emit('deleteServiceRegister','openDeleteServiceRegisterModal',_serviceRegister); |
| | | }, |
| | | _queryServiceRegisterMethod:function(){ |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | |
| | | }, |
| | | _moreCondition:function(){ |
| | | if(vc.component.serviceRegisterManageInfo.moreCondition){ |
| | | vc.component.serviceRegisterManageInfo.moreCondition = false; |
| | | }else{ |
| | | vc.component.serviceRegisterManageInfo.moreCondition = true; |
| | | } |
| | | } |
| | | |
| | | , |
| | | _openChooseAppMethod:function(){ |
| | | vc.emit('chooseApp','openChooseAppModel',{}); |
| | | |
| | | }, |
| | | _loadDataByParam: function(){ |
| | | vc.component.serviceManageInfo.conditions.appId = vc.getParam("appId"); |
| | | //如果 floodId 没有传 则,直接结束 |
| | | if(vc.component.serviceManageInfo.conditions.appId == null |
| | | || vc.component.serviceManageInfo.conditions.appId == undefined |
| | | || vc.component.serviceManageInfo.conditions.appId == ''){ |
| | | vc.component._listServices(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | return ; |
| | | } |
| | | |
| | | var param = { |
| | | params:{ |
| | | page:DEFAULT_PAGE, |
| | | row:DEFAULT_ROWS, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | appId:vc.component.serviceManageInfo.conditions.appId |
| | | } |
| | | } |
| | | |
| | | vc.http.get( |
| | | 'serviceRegisterManage', |
| | | 'loadApp', |
| | | param, |
| | | function(json,res){ |
| | | if(res.status == 200){ |
| | | var _appInfo = JSON.parse(json); |
| | | var _tmpApp = _appInfo.apps[0]; |
| | | vc.component.serviceManageInfo.conditions.appName = _tmpApp.name; |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | |
| | | vc.component._listServiceRegisters(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>服务绑定信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" v-if="viewServiceRegisterInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectServiceRegisterInfoModel()"> |
| | | <i class="glyphicon glyphicon-search"></i> 选择服务绑定</button> |
| | | |
| | | <button type="button" v-if="viewServiceRegisterInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddServiceRegisterInfoModel()"> |
| | | <i class="glyphicon glyphicon-plus"></i> 添加服务绑定</button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >应用ID:</label> |
| | | <label class="">{{viewServiceRegisterInfo.appId}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >服务ID:</label> |
| | | <label class="">{{viewServiceRegisterInfo.serviceId}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >订单类型:</label> |
| | | <label class="">{{viewServiceRegisterInfo.orderTypeCd}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >调用次数:</label> |
| | | <label class="">{{viewServiceRegisterInfo.invokeLimitTimes}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >调用方式:</label> |
| | | <label class="">{{viewServiceRegisterInfo.invokeModel}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="addServiceRegister" |
| | | callBackListener="viewServiceRegisterInfo" |
| | | callBackFunction="chooseServiceRegister" |
| | | ></vc:create> |
| | | |
| | | |
| | | <vc:create name="chooseServiceRegister" |
| | | emitChooseServiceRegister="viewServiceRegisterInfo" |
| | | emitLoadData="viewServiceRegisterInfo" |
| | | ></vc:create> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 服务绑定 组件 |
| | | **/ |
| | | (function(vc){ |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | viewServiceRegisterInfo:{ |
| | | index:0, |
| | | flowComponent:'viewServiceRegisterInfo', |
| | | appId:'', |
| | | serviceId:'', |
| | | orderTypeCd:'', |
| | | invokeLimitTimes:'', |
| | | invokeModel:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | //根据请求参数查询 查询 业主信息 |
| | | vc.component._loadServiceRegisterInfoData(); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('viewServiceRegisterInfo','chooseServiceRegister',function(_app){ |
| | | vc.copyObject(_app, vc.component.viewServiceRegisterInfo); |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewServiceRegisterInfo); |
| | | }); |
| | | |
| | | vc.on('viewServiceRegisterInfo', 'onIndex', function(_index){ |
| | | vc.component.viewServiceRegisterInfo.index = _index; |
| | | }); |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | _openSelectServiceRegisterInfoModel(){ |
| | | vc.emit('chooseServiceRegister','openChooseServiceRegisterModel',{}); |
| | | }, |
| | | _openAddServiceRegisterInfoModel(){ |
| | | vc.emit('addServiceRegister','openAddServiceRegisterModal',{}); |
| | | }, |
| | | _loadServiceRegisterInfoData:function(){ |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en" |
| | | xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:th="http://www.thymeleaf.org" |
| | | xmlns:vc="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="UTF-8"/> |
| | | <title>服务绑定初始化|java110</title> |
| | | <vc:create name="commonTop"></vc:create> |
| | | </head> |
| | | <body> |
| | | <vc:create name="bodyTop"></vc:create> |
| | | <div id="wrapper"> |
| | | <vc:create name="menu"></vc:create> |
| | | |
| | | |
| | | <div id="page-wrapper" class="gray-bg dashbard-1"> |
| | | <div class="row border-bottom"> |
| | | <vc:create name="nav"></vc:create> |
| | | </div> |
| | | <div class="wrapper wrapper-content" style="padding-bottom: 0px;"> |
| | | <vc:create name="breadcrumb"></vc:create> |
| | | </div> |
| | | <!-- id="component" --> |
| | | <div class="wrapper wrapper-content animated fadeInRight"> |
| | | <vc:create name="serviceRegisterManage"></vc:create> |
| | | </div> |
| | | |
| | | <vc:create name="copyright"></vc:create> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="commonBottom"></vc:create> |
| | | </body> |
| | | </html> |
| | |
| | | private String id; |
| | | private String serviceId; |
| | | private String invokeModel; |
| | | private String appName; |
| | | private String serviceName; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getAppName() { |
| | | return appName; |
| | | } |
| | | |
| | | public void setAppName(String appName) { |
| | | this.appName = appName; |
| | | } |
| | | |
| | | public String getServiceName() { |
| | | return serviceName; |
| | | } |
| | | |
| | | public void setServiceName(String serviceName) { |
| | | this.serviceName = serviceName; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.vo.api.serviceRegister; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ApiServiceRegisterDataVo implements Serializable { |
| | | |
| | | private String id; |
| | | private String appId; |
| | | private String serviceId; |
| | | private String orderTypeCd; |
| | | private String invokeLimitTimes; |
| | | private String invokeModel; |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | public String getAppId() { |
| | | return appId; |
| | | } |
| | | public void setAppId(String appId) { |
| | | this.appId = appId; |
| | | } |
| | | public String getServiceId() { |
| | | return serviceId; |
| | | } |
| | | public void setServiceId(String serviceId) { |
| | | this.serviceId = serviceId; |
| | | } |
| | | public String getOrderTypeCd() { |
| | | return orderTypeCd; |
| | | } |
| | | public void setOrderTypeCd(String orderTypeCd) { |
| | | this.orderTypeCd = orderTypeCd; |
| | | } |
| | | public String getInvokeLimitTimes() { |
| | | return invokeLimitTimes; |
| | | } |
| | | public void setInvokeLimitTimes(String invokeLimitTimes) { |
| | | this.invokeLimitTimes = invokeLimitTimes; |
| | | } |
| | | public String getInvokeModel() { |
| | | return invokeModel; |
| | | } |
| | | public void setInvokeModel(String invokeModel) { |
| | | this.invokeModel = invokeModel; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.vo.api.serviceRegister; |
| | | |
| | | import com.java110.vo.MorePageVo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | public class ApiServiceRegisterVo extends MorePageVo implements Serializable { |
| | | List<ApiServiceRegisterDataVo> serviceRegisters; |
| | | |
| | | |
| | | public List<ApiServiceRegisterDataVo> getServiceRegisters() { |
| | | return serviceRegisters; |
| | | } |
| | | |
| | | public void setServiceRegisters(List<ApiServiceRegisterDataVo> serviceRegisters) { |
| | | this.serviceRegisters = serviceRegisters; |
| | | } |
| | | } |
| | |
| | | conditionInput.append(" </div>"); |
| | | if (condIndex == 2) { |
| | | conditionInput.append("<div class=\"col-sm-1\">\n" + |
| | | " <button type=\"button\" class=\"btn btn-primary btn-sm\" v-on:click=\"_query" + toUpperCaseFirstOne(data.getString("templateCode")) + "Method()><i\n" + |
| | | " class=\"glyphicon glyphicon-search\" \"></i> 查询\n" + |
| | | " <button type=\"button\" class=\"btn btn-primary btn-sm\" v-on:click=\"_query" + toUpperCaseFirstOne(data.getString("templateCode")) + "Method()\">\n" + |
| | | " <i class=\"glyphicon glyphicon-search\"></i> 查询\n" + |
| | | " </button>\n" + |
| | | " </div>"); |
| | | } else if (condIndex % 3 == 2) { |
| | |
| | | { |
| | | "templateName":"服务", |
| | | "templateCode":"service", |
| | | "templateKey":"serviceId", |
| | | "templateKeyName":"服务ID", |
| | | "templateName":"服务绑定", |
| | | "templateCode":"serviceRegister", |
| | | "templateKey":"id", |
| | | "templateKeyName":"绑定ID", |
| | | "searchCode": "name", |
| | | "searchName": "服务名称", |
| | | "conditions": [ |
| | |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"name", |
| | | "cnCode":"服务名称", |
| | | "desc":"必填,请填写服务名称", |
| | | "code":"appId", |
| | | "cnCode":"应用ID", |
| | | "desc":"必填,请填写应用ID", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"服务名称不能超过50", |
| | | "limitErrInfo":"应用ID不能超过50", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"serviceCode", |
| | | "cnCode":"服务编码", |
| | | "desc":"必填,请填写服务编码如 service.saveService", |
| | | "code":"serviceId", |
| | | "cnCode":"服务ID", |
| | | "desc":"必填,请填写服务ID", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"服务编码必须在2至50字符之间", |
| | | "limitErrInfo":"服务ID必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"businessTypeCd", |
| | | "cnCode":"秘钥", |
| | | "desc":"可填,请填写秘钥,如果填写了需要加密传输", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"API", |
| | | "inputType":"none", |
| | | "limit":"maxin", |
| | | "limitParam":"2,4", |
| | | "limitErrInfo":"业务类型必须为API", |
| | | "show": false |
| | | }, |
| | | |
| | | { |
| | | "code":"seq", |
| | | "cnCode":"序列", |
| | | "desc":"必填,请填写序列", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"1", |
| | | "inputType":"none", |
| | | "limit":"maxLength", |
| | | "limitParam":"1", |
| | | "limitErrInfo":"序列格式错误", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"messageQueueName", |
| | | "cnCode":"消息队列", |
| | | "desc":"可填,请填写消息队列,订单在异步调用时使用", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "defaultValue":"", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"消息队列不能超过50", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"isInstance", |
| | | "cnCode":"是否实例", |
| | | "desc":"可填,请填写实例 Y 或N", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"Y", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"实例不能超过50", |
| | | "show": false |
| | | } |
| | | , |
| | | |
| | | { |
| | | "code":"url", |
| | | "cnCode":"调用地址", |
| | | "desc":"可填,请填写调用地址", |
| | | "required":false, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"http://order-service/orderApi/service", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"调用地址不能超过200", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"method", |
| | | "cnCode":"调用方式", |
| | | "desc":"必填,请填写调用方式", |
| | | "code":"orderTypeCd", |
| | | "cnCode":"订单类型", |
| | | "desc":"必填,请填写订单类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"select", |
| | | "selectValue":"GET,POST", |
| | | "selectValueName":"http get,http post", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"调用方式不能超过50", |
| | | "selectValue":"Q,D", |
| | | "selectValueName":"查询,业务受理", |
| | | "limit":"maxin", |
| | | "limitParam":"1,4", |
| | | "limitErrInfo":"订单类型错误", |
| | | "show": true |
| | | }, |
| | | |
| | | { |
| | | "code":"timeout", |
| | | "cnCode":"超时时间", |
| | | "desc":"必填,请填写超时时间", |
| | | "code":"invokeLimitTimes", |
| | | "cnCode":"调用次数", |
| | | "desc":"必填,请填写调用次数", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"60", |
| | | "defaultValue":"1000", |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"超时时间必须为数字", |
| | | "limitErrInfo":"调用次数错误", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"retryCount", |
| | | "cnCode":"重试次数", |
| | | "desc":"必填,请填写重试次数", |
| | | "code":"invokeModel", |
| | | "cnCode":"调用方式", |
| | | "desc":"可填,请填写消息队列,订单在异步调用时使用", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"3", |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"重试次数必须为数字", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"provideAppId", |
| | | "cnCode":"提供服务", |
| | | "desc":"必填,请填写提供服务", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"8000418002", |
| | | "inputType":"none", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"重试次数必须为数字", |
| | | "hasDefaultValue":false, |
| | | "defaultValue":"", |
| | | "inputType":"select", |
| | | "selectValue":"S,A", |
| | | "selectValueName":"同步方式,异步方式", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"消息队列不能超过50", |
| | | "show": false |
| | | } |
| | | ] |
| New file |
| | |
| | | { |
| | | "templateName":"服务", |
| | | "templateCode":"service", |
| | | "templateKey":"serviceId", |
| | | "templateKeyName":"服务ID", |
| | | "searchCode": "name", |
| | | "searchName": "服务名称", |
| | | "conditions": [ |
| | | { |
| | | "name": "应用名称", |
| | | "inputType": "choose", |
| | | "componentName": "chooseApp", |
| | | "code": "appName", |
| | | "key": "appId", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "服务名称", |
| | | "inputType": "input", |
| | | "code": "serviceName", |
| | | "whereCondition": "like" |
| | | }, |
| | | { |
| | | "name": "服务编码", |
| | | "inputType": "input", |
| | | "code": "serviceCode", |
| | | "whereCondition": "like" |
| | | }, |
| | | { |
| | | "name": "调用地址", |
| | | "inputType": "input", |
| | | "code": "serviceUrl", |
| | | "whereCondition": "like" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"name", |
| | | "cnCode":"服务名称", |
| | | "desc":"必填,请填写服务名称", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"服务名称不能超过50", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"serviceCode", |
| | | "cnCode":"服务编码", |
| | | "desc":"必填,请填写服务编码如 service.saveService", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"服务编码必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"businessTypeCd", |
| | | "cnCode":"秘钥", |
| | | "desc":"可填,请填写秘钥,如果填写了需要加密传输", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"API", |
| | | "inputType":"none", |
| | | "limit":"maxin", |
| | | "limitParam":"2,4", |
| | | "limitErrInfo":"业务类型必须为API", |
| | | "show": false |
| | | }, |
| | | |
| | | { |
| | | "code":"seq", |
| | | "cnCode":"序列", |
| | | "desc":"必填,请填写序列", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"1", |
| | | "inputType":"none", |
| | | "limit":"maxLength", |
| | | "limitParam":"1", |
| | | "limitErrInfo":"序列格式错误", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"messageQueueName", |
| | | "cnCode":"消息队列", |
| | | "desc":"可填,请填写消息队列,订单在异步调用时使用", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "defaultValue":"", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"消息队列不能超过50", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"isInstance", |
| | | "cnCode":"是否实例", |
| | | "desc":"可填,请填写实例 Y 或N", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"Y", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"实例不能超过50", |
| | | "show": false |
| | | } |
| | | , |
| | | |
| | | { |
| | | "code":"url", |
| | | "cnCode":"调用地址", |
| | | "desc":"可填,请填写调用地址", |
| | | "required":false, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"http://order-service/orderApi/service", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"调用地址不能超过200", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"method", |
| | | "cnCode":"调用方式", |
| | | "desc":"必填,请填写调用方式", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"select", |
| | | "selectValue":"GET,POST", |
| | | "selectValueName":"http get,http post", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"调用方式不能超过50", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"timeout", |
| | | "cnCode":"超时时间", |
| | | "desc":"必填,请填写超时时间", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"60", |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"超时时间必须为数字", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"retryCount", |
| | | "cnCode":"重试次数", |
| | | "desc":"必填,请填写重试次数", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"3", |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"重试次数必须为数字", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"provideAppId", |
| | | "cnCode":"提供服务", |
| | | "desc":"必填,请填写提供服务", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"8000418002", |
| | | "inputType":"none", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"重试次数必须为数字", |
| | | "show": false |
| | | } |
| | | ] |
| | | } |
| | |
| | | public static final String AGENT_HAS_LIST_SERVICE = "500201906027"; |
| | | public static final String AGENT_HAS_LIST_MAPPING = "500201906029"; |
| | | |
| | | public static final String AGENT_HAS_LIST_SERVICEREGISTER = "500201907032"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.constant; |
| | | |
| | | /** |
| | | * 服务绑定常量类 |
| | | * Created by wuxw on 2017/5/20. |
| | | */ |
| | | public class ServiceCodeServiceRegisterConstant { |
| | | |
| | | /** |
| | | * 添加 服务绑定 |
| | | */ |
| | | public static final String ADD_SERVICEREGISTER = "serviceRegister.saveServiceRegister"; |
| | | |
| | | |
| | | /** |
| | | * 修改 服务绑定 |
| | | */ |
| | | public static final String UPDATE_SERVICEREGISTER = "serviceRegister.updateServiceRegister"; |
| | | /** |
| | | * 删除 服务绑定 |
| | | */ |
| | | public static final String DELETE_SERVICEREGISTER = "serviceRegister.deleteServiceRegister"; |
| | | |
| | | |
| | | /** |
| | | * 查询 服务绑定 |
| | | */ |
| | | public static final String LIST_SERVICEREGISTERS = "serviceRegister.listServiceRegisters"; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/deleteService", method = RequestMethod.POST) |
| | | int deleteService(@RequestBody ServiceDto serviceDto); |
| | | |
| | | |
| | | } |
| | |
| | | <mapper namespace="routeServiceDaoImpl"> |
| | | |
| | | <!-- 保存路由信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessRouteInfo" parameterType="Map"> |
| | | insert into business_route( |
| | | invoke_limit_times,order_type_cd,operate,app_id,id,service_id,invoke_model |
| | | ) values ( |
| | | #{invokeLimitTimes},#{orderTypeCd},#{operate},#{appId},#{id},#{serviceId},#{invokeModel} |
| | | ) |
| | | </insert> |
| | | <insert id="saveBusinessRouteInfo" parameterType="Map"> |
| | | insert into business_route( |
| | | invoke_limit_times,order_type_cd,operate,app_id,id,service_id,invoke_model |
| | | ) values ( |
| | | #{invokeLimitTimes},#{orderTypeCd},#{operate},#{appId},#{id},#{serviceId},#{invokeModel} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询路由信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessRouteInfo" parameterType="Map" resultType="Map"> |
| | | select t.invoke_limit_times,t.invoke_limit_times invokeLimitTimes,t.order_type_cd,t.order_type_cd orderTypeCd,t.operate,t.app_id,t.app_id appId,t.id,t.service_id,t.service_id serviceId,t.invoke_model,t.invoke_model invokeModel |
| | | from business_route t |
| | | where 1 =1 |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | and t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | and t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | and t.app_id= #{appId} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | and t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | and t.invoke_model= #{invokeModel} |
| | | </if> |
| | | <!-- 查询路由信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessRouteInfo" parameterType="Map" resultType="Map"> |
| | | select t.invoke_limit_times,t.invoke_limit_times invokeLimitTimes,t.order_type_cd,t.order_type_cd |
| | | orderTypeCd,t.operate,t.app_id,t.app_id appId,t.id,t.service_id,t.service_id |
| | | serviceId,t.invoke_model,t.invoke_model invokeModel |
| | | from business_route t |
| | | where 1 =1 |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | and t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | and t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | and t.app_id= #{appId} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | and t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | and t.invoke_model= #{invokeModel} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存路由信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveRouteInfo" parameterType="Map"> |
| | | insert into c_route( |
| | | invoke_limit_times,order_type_cd,app_id,id,service_id,invoke_model |
| | | invoke_limit_times,order_type_cd,app_id,id,service_id,invoke_model |
| | | ) values ( |
| | | #{invokeLimitTimes},#{orderTypeCd},#{appId},#{id},#{serviceId},#{invokeModel} |
| | | #{invokeLimitTimes},#{orderTypeCd},#{appId},#{id},#{serviceId},#{invokeModel} |
| | | ) |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询路由信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRouteInfo" parameterType="Map" resultType="Map"> |
| | | select t.invoke_limit_times,t.invoke_limit_times invokeLimitTimes,t.order_type_cd,t.order_type_cd orderTypeCd,t.app_id,t.app_id appId,t.status_cd,t.status_cd statusCd,t.id,t.service_id,t.service_id serviceId,t.invoke_model,t.invoke_model invokeModel |
| | | from c_route t |
| | | where 1 =1 |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | and t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | and t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | and t.app_id= #{appId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | and t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | and t.invoke_model= #{invokeModel} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | select t.invoke_limit_times,t.invoke_limit_times invokeLimitTimes,t.order_type_cd,t.order_type_cd |
| | | orderTypeCd,t.app_id,t.app_id appId,t.status_cd,t.status_cd statusCd,t.id,t.service_id,t.service_id |
| | | serviceId,t.invoke_model,t.invoke_model invokeModel,s.name serviceName,a.name appName |
| | | from c_route t,c_service s, c_app a |
| | | where 1 =1 |
| | | and t.app_id = a.app_id |
| | | and t.service_id = s.service_id |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | and t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | and t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | and t.app_id= #{appId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | and s.status_cd= #{statusCd} |
| | | and a.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | and t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | and t.invoke_model= #{invokeModel} |
| | | </if> |
| | | <if test="serviceUrl !=null and serviceUrl != ''"> |
| | | and s.url like concat('%',#{serviceUrl},'%') |
| | | </if> |
| | | <if test="serviceName !=null and serviceName != ''"> |
| | | and s.name like concat('%',#{serviceName},'%') |
| | | </if> |
| | | <if test="serviceCode !=null and serviceCode != ''"> |
| | | and s.service_code= #{serviceCode} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改路由信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateRouteInfo" parameterType="Map"> |
| | | update c_route t set t.status_cd = #{statusCd} |
| | | update c_route t set t.status_cd = #{statusCd} |
| | | |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | , t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | , t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | , t.app_id= #{appId} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | , t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | , t.invoke_model= #{invokeModel} |
| | | </if> |
| | | where 1=1<if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | , t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | , t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | , t.invoke_model= #{invokeModel} |
| | | </if> |
| | | where 1=1 |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询路由数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryRoutesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from c_route t |
| | | where 1 =1 |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | and t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | and t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | and t.app_id= #{appId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | and t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | and t.invoke_model= #{invokeModel} |
| | | </if> |
| | | <select id="queryRoutesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from c_route t,c_service s, c_app a |
| | | where 1 =1 |
| | | and t.app_id = a.app_id |
| | | and t.service_id = s.service_id |
| | | <if test="invokeLimitTimes !=null and invokeLimitTimes != ''"> |
| | | and t.invoke_limit_times= #{invokeLimitTimes} |
| | | </if> |
| | | <if test="orderTypeCd !=null and orderTypeCd != ''"> |
| | | and t.order_type_cd= #{orderTypeCd} |
| | | </if> |
| | | <if test="appId !=null and appId != ''"> |
| | | and t.app_id= #{appId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | and s.status_cd= #{statusCd} |
| | | and a.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="id !=null and id != ''"> |
| | | and t.id= #{id} |
| | | </if> |
| | | <if test="serviceId !=null and serviceId != ''"> |
| | | and t.service_id= #{serviceId} |
| | | </if> |
| | | <if test="invokeModel !=null and invokeModel != ''"> |
| | | and t.invoke_model= #{invokeModel} |
| | | </if> |
| | | <if test="serviceUrl !=null and serviceUrl != ''"> |
| | | and s.url like concat('%',#{serviceUrl},'%') |
| | | </if> |
| | | <if test="serviceName !=null and serviceName != ''"> |
| | | and s.name like concat('%',#{serviceName},'%') |
| | | </if> |
| | | <if test="serviceCode !=null and serviceCode != ''"> |
| | | and s.service_code= #{serviceCode} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | </select> |
| | | |
| | | </mapper> |