| New file |
| | |
| | | package com.java110.api.listener.menuGroup; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.menu.IMenuInnerServiceSMO; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | 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.CommonConstant; |
| | | import com.java110.common.constant.ServiceCodeConstant; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.common.constant.ServiceCodeMenuGroupConstant; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("deleteMenuGroupListener") |
| | | public class DeleteMenuGroupListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "gId", "组Id不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | ResponseEntity<String> responseEntity = null; |
| | | |
| | | MenuGroupDto menuGroupDto = BeanConvertUtil.covertBean(reqJson, MenuGroupDto.class); |
| | | |
| | | |
| | | int saveFlag = menuInnerServiceSMOImpl.deleteMenuGroup(menuGroupDto); |
| | | |
| | | responseEntity = new ResponseEntity<String>(saveFlag > 0 ? "成功" : "失败", saveFlag > 0 ? HttpStatus.OK : HttpStatus.BAD_REQUEST); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeMenuGroupConstant.DELETE_MENUGROUP; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IMenuInnerServiceSMO getMenuInnerServiceSMOImpl() { |
| | | return menuInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setMenuInnerServiceSMOImpl(IMenuInnerServiceSMO menuInnerServiceSMOImpl) { |
| | | this.menuInnerServiceSMOImpl = menuInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.menuGroup; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.common.constant.ServiceCodeMenuGroupConstant; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.menu.IMenuInnerServiceSMO; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.vo.api.menuGroup.ApiMenuGroupDataVo; |
| | | import com.java110.vo.api.menuGroup.ApiMenuGroupVo; |
| | | 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("listMenuGroupsListener") |
| | | public class ListMenuGroupsListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeMenuGroupConstant.LIST_MENUGROUPS; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | MenuGroupDto menuGroupDto = BeanConvertUtil.covertBean(reqJson, MenuGroupDto.class); |
| | | |
| | | int count = menuInnerServiceSMOImpl.queryMenuGroupsCount(menuGroupDto); |
| | | |
| | | List<ApiMenuGroupDataVo> menuGroups = null; |
| | | |
| | | if (count > 0) { |
| | | menuGroups = BeanConvertUtil.covertBeanList(menuInnerServiceSMOImpl.queryMenuGroups(menuGroupDto), ApiMenuGroupDataVo.class); |
| | | } else { |
| | | menuGroups = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiMenuGroupVo apiMenuGroupVo = new ApiMenuGroupVo(); |
| | | |
| | | apiMenuGroupVo.setTotal(count); |
| | | apiMenuGroupVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiMenuGroupVo.setMenuGroups(menuGroups); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiMenuGroupVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | |
| | | public IMenuInnerServiceSMO getMenuInnerServiceSMOImpl() { |
| | | return menuInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setMenuInnerServiceSMOImpl(IMenuInnerServiceSMO menuInnerServiceSMOImpl) { |
| | | this.menuInnerServiceSMOImpl = menuInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.menuGroup; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.menu.IMenuInnerServiceSMO; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | import com.java110.dto.service.ServiceBusinessDto; |
| | | 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.CommonConstant; |
| | | import com.java110.common.constant.ServiceCodeConstant; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ServiceCodeMenuGroupConstant; |
| | | |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("saveMenuGroupListener") |
| | | public class SaveMenuGroupListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "name", "必填,请填写组名称"); |
| | | Assert.hasKeyAndValue(reqJson, "icon", "必填,请填写icon"); |
| | | Assert.hasKeyAndValue(reqJson, "label", "必填,请填写标签"); |
| | | Assert.hasKeyAndValue(reqJson, "seq", "必填,请填写序列"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | ResponseEntity<String> responseEntity = null; |
| | | |
| | | MenuGroupDto menuGroupDto = BeanConvertUtil.covertBean(reqJson, MenuGroupDto.class); |
| | | |
| | | |
| | | int saveFlag = menuInnerServiceSMOImpl.saveMenuGroup(menuGroupDto); |
| | | |
| | | responseEntity = new ResponseEntity<String>(saveFlag > 0 ? "成功" : "失败", saveFlag > 0 ? HttpStatus.OK : HttpStatus.BAD_REQUEST); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeMenuGroupConstant.ADD_MENUGROUP; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IMenuInnerServiceSMO getMenuInnerServiceSMOImpl() { |
| | | return menuInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setMenuInnerServiceSMOImpl(IMenuInnerServiceSMO menuInnerServiceSMOImpl) { |
| | | this.menuInnerServiceSMOImpl = menuInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.menuGroup; |
| | | |
| | | 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.ServiceCodeConstant; |
| | | 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.menu.IMenuInnerServiceSMO; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | 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.ServiceCodeMenuGroupConstant; |
| | | |
| | | /** |
| | | * 保存菜单组侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("updateMenuGroupListener") |
| | | public class UpdateMenuGroupListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "gId", "组Id不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "name", "必填,请填写组名称"); |
| | | Assert.hasKeyAndValue(reqJson, "icon", "必填,请填写icon"); |
| | | Assert.hasKeyAndValue(reqJson, "label", "必填,请填写标签"); |
| | | Assert.hasKeyAndValue(reqJson, "seq", "必填,请填写序列"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | |
| | | ResponseEntity<String> responseEntity = null; |
| | | |
| | | MenuGroupDto menuGroupDto = BeanConvertUtil.covertBean(reqJson, MenuGroupDto.class); |
| | | |
| | | |
| | | int saveFlag = menuInnerServiceSMOImpl.updateMenuGroup(menuGroupDto); |
| | | |
| | | responseEntity = new ResponseEntity<String>(saveFlag > 0 ? "成功" : "失败", saveFlag > 0 ? HttpStatus.OK : HttpStatus.BAD_REQUEST); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeMenuGroupConstant.UPDATE_MENUGROUP; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IMenuInnerServiceSMO getMenuInnerServiceSMOImpl() { |
| | | return menuInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setMenuInnerServiceSMOImpl(IMenuInnerServiceSMO menuInnerServiceSMOImpl) { |
| | | this.menuInnerServiceSMOImpl = menuInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao; |
| | | |
| | | |
| | | import com.java110.common.exception.DAOException; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 路由组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 路由服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IMenuServiceDao { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 路由信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveMenuGroupInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询路由信息(instance过程) |
| | | * 根据bId 查询路由信息 |
| | | * @param info bId 信息 |
| | | * @return 路由信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getMenuGroupInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改路由信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int updateMenuGroupInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询路由总数 |
| | | * |
| | | * @param info 路由信息 |
| | | * @return 路由数量 |
| | | */ |
| | | int queryMenuGroupsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.community.dao.IMenuServiceDao; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 路由服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("menuServiceDaoImpl") |
| | | //@Transactional |
| | | public class MenuServiceDaoImpl extends BaseServiceDao implements IMenuServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(MenuServiceDaoImpl.class); |
| | | |
| | | |
| | | /** |
| | | * 保存路由信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int saveMenuGroupInfo(Map info) throws DAOException { |
| | | logger.debug("保存路由信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("menuServiceDaoImpl.saveMenuGroupInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询路由信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getMenuGroupInfo(Map info) throws DAOException { |
| | | logger.debug("查询路由信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessMenuGroupInfos = sqlSessionTemplate.selectList("menuServiceDaoImpl.getMenuGroupInfo",info); |
| | | |
| | | return businessMenuGroupInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改路由信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int updateMenuGroupInfo(Map info) throws DAOException { |
| | | logger.debug("修改路由信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("menuServiceDaoImpl.updateMenuGroupInfo",info); |
| | | |
| | | return saveFlag; |
| | | } |
| | | |
| | | /** |
| | | * 查询路由数量 |
| | | * @param info 路由信息 |
| | | * @return 路由数量 |
| | | */ |
| | | @Override |
| | | public int queryMenuGroupsCount(Map info) { |
| | | logger.debug("查询路由数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessMenuGroupInfos = sqlSessionTemplate.selectList("menuServiceDaoImpl.queryMenuGroupsCount", info); |
| | | if (businessMenuGroupInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessMenuGroupInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.community.dao.IMenuServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.menu.IMenuInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 路由内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class MenuInnerServiceSMOImpl extends BaseServiceSMO implements IMenuInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IMenuServiceDao menuServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public List<MenuGroupDto> queryMenuGroups(@RequestBody MenuGroupDto menuGroupDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = menuGroupDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | menuGroupDto.setPage((page - 1) * menuGroupDto.getRow()); |
| | | menuGroupDto.setRow(page * menuGroupDto.getRow()); |
| | | } |
| | | |
| | | List<MenuGroupDto> menuGroups = BeanConvertUtil.covertBeanList(menuServiceDaoImpl.getMenuGroupInfo(BeanConvertUtil.beanCovertMap(menuGroupDto)), MenuGroupDto.class); |
| | | |
| | | |
| | | return menuGroups; |
| | | } |
| | | |
| | | @Override |
| | | public int updateMenuGroup(@RequestBody MenuGroupDto menuGroupDto) { |
| | | return menuServiceDaoImpl.updateMenuGroupInfo(BeanConvertUtil.beanCovertMap(menuGroupDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int saveMenuGroup(@RequestBody MenuGroupDto menuGroupDto) { |
| | | return menuServiceDaoImpl.saveMenuGroupInfo(BeanConvertUtil.beanCovertMap(menuGroupDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteMenuGroup(@RequestBody MenuGroupDto menuGroupDto) { |
| | | menuGroupDto.setStatusCd("1"); |
| | | return menuServiceDaoImpl.updateMenuGroupInfo(BeanConvertUtil.beanCovertMap(menuGroupDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int queryMenuGroupsCount(@RequestBody MenuGroupDto menuGroupDto) { |
| | | return menuServiceDaoImpl.queryMenuGroupsCount(BeanConvertUtil.beanCovertMap(menuGroupDto)); } |
| | | |
| | | public IMenuServiceDao getMenuServiceDaoImpl() { |
| | | return menuServiceDaoImpl; |
| | | } |
| | | |
| | | public void setMenuServiceDaoImpl(IMenuServiceDao menuServiceDaoImpl) { |
| | | this.menuServiceDaoImpl = menuServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.menuGroup; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.menuGroup.IAddMenuGroupSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加菜单组组件 |
| | | */ |
| | | @Component("addMenuGroup") |
| | | public class AddMenuGroupComponent { |
| | | |
| | | @Autowired |
| | | private IAddMenuGroupSMO addMenuGroupSMOImpl; |
| | | |
| | | /** |
| | | * 添加菜单组数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> save(IPageData pd){ |
| | | return addMenuGroupSMOImpl.saveMenuGroup(pd); |
| | | } |
| | | |
| | | public IAddMenuGroupSMO getAddMenuGroupSMOImpl() { |
| | | return addMenuGroupSMOImpl; |
| | | } |
| | | |
| | | public void setAddMenuGroupSMOImpl(IAddMenuGroupSMO addMenuGroupSMOImpl) { |
| | | this.addMenuGroupSMOImpl = addMenuGroupSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.menuGroup; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.menuGroup.IListMenuGroupsSMO; |
| | | 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("chooseMenuGroup") |
| | | public class ChooseMenuGroupComponent { |
| | | |
| | | @Autowired |
| | | private IListMenuGroupsSMO listMenuGroupsSMOImpl; |
| | | |
| | | /** |
| | | * 查询应用列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listMenuGroupsSMOImpl.listMenuGroups(pd); |
| | | } |
| | | |
| | | public IListMenuGroupsSMO getListMenuGroupsSMOImpl() { |
| | | return listMenuGroupsSMOImpl; |
| | | } |
| | | |
| | | public void setListMenuGroupsSMOImpl(IListMenuGroupsSMO listMenuGroupsSMOImpl) { |
| | | this.listMenuGroupsSMOImpl = listMenuGroupsSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.menuGroup; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.menuGroup.IDeleteMenuGroupSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加菜单组组件 |
| | | */ |
| | | @Component("deleteMenuGroup") |
| | | public class DeleteMenuGroupComponent { |
| | | |
| | | @Autowired |
| | | private IDeleteMenuGroupSMO deleteMenuGroupSMOImpl; |
| | | |
| | | /** |
| | | * 添加菜单组数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> delete(IPageData pd){ |
| | | return deleteMenuGroupSMOImpl.deleteMenuGroup(pd); |
| | | } |
| | | |
| | | public IDeleteMenuGroupSMO getDeleteMenuGroupSMOImpl() { |
| | | return deleteMenuGroupSMOImpl; |
| | | } |
| | | |
| | | public void setDeleteMenuGroupSMOImpl(IDeleteMenuGroupSMO deleteMenuGroupSMOImpl) { |
| | | this.deleteMenuGroupSMOImpl = deleteMenuGroupSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.menuGroup; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.menuGroup.IEditMenuGroupSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 编辑小区组件 |
| | | */ |
| | | @Component("editMenuGroup") |
| | | public class EditMenuGroupComponent { |
| | | |
| | | @Autowired |
| | | private IEditMenuGroupSMO editMenuGroupSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> update(IPageData pd){ |
| | | return editMenuGroupSMOImpl.updateMenuGroup(pd); |
| | | } |
| | | |
| | | public IEditMenuGroupSMO getEditMenuGroupSMOImpl() { |
| | | return editMenuGroupSMOImpl; |
| | | } |
| | | |
| | | public void setEditMenuGroupSMOImpl(IEditMenuGroupSMO editMenuGroupSMOImpl) { |
| | | this.editMenuGroupSMOImpl = editMenuGroupSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.menuGroup; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.menuGroup.IListMenuGroupsSMO; |
| | | 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("menuGroupManage") |
| | | public class MenuGroupManageComponent { |
| | | |
| | | @Autowired |
| | | private IListMenuGroupsSMO listMenuGroupsSMOImpl; |
| | | |
| | | /** |
| | | * 查询菜单组列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listMenuGroupsSMOImpl.listMenuGroups(pd); |
| | | } |
| | | |
| | | public IListMenuGroupsSMO getListMenuGroupsSMOImpl() { |
| | | return listMenuGroupsSMOImpl; |
| | | } |
| | | |
| | | public void setListMenuGroupsSMOImpl(IListMenuGroupsSMO listMenuGroupsSMOImpl) { |
| | | this.listMenuGroupsSMOImpl = listMenuGroupsSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.menuGroup; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加菜单组接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IAddMenuGroupSMO { |
| | | |
| | | /** |
| | | * 添加菜单组 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> saveMenuGroup(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.menuGroup; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加菜单组接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IDeleteMenuGroupSMO { |
| | | |
| | | /** |
| | | * 添加菜单组 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> deleteMenuGroup(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.menuGroup; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 修改菜单组接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IEditMenuGroupSMO { |
| | | |
| | | /** |
| | | * 修改小区 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> updateMenuGroup(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.menuGroup; |
| | | |
| | | 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 IListMenuGroupsSMO { |
| | | |
| | | /** |
| | | * 查询菜单组信息 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象数据 |
| | | * @throws SMOException 业务代码层 |
| | | */ |
| | | ResponseEntity<String> listMenuGroups(IPageData pd) throws SMOException; |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.menuGroup.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.menuGroup.IAddMenuGroupSMO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Service("addMenuGroupSMOImpl") |
| | | public class AddMenuGroupSMOImpl extends AbstractComponentSMO implements IAddMenuGroupSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "name", "必填,请填写组名称"); |
| | | Assert.hasKeyAndValue(paramIn, "icon", "必填,请填写icon"); |
| | | Assert.hasKeyAndValue(paramIn, "label", "必填,请填写标签"); |
| | | Assert.hasKeyAndValue(paramIn, "seq", "必填,请填写序列"); |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.MENU); |
| | | |
| | | } |
| | | |
| | | @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/menuGroup.saveMenuGroup", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> saveMenuGroup(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.menuGroup.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.menuGroup.IDeleteMenuGroupSMO; |
| | | 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("deleteMenuGroupSMOImpl") |
| | | public class DeleteMenuGroupSMOImpl extends AbstractComponentSMO implements IDeleteMenuGroupSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "gId", "组Id不能为空"); |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.MENU); |
| | | |
| | | } |
| | | |
| | | @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/menuGroup.deleteMenuGroup", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> deleteMenuGroup(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.menuGroup.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.menuGroup.IEditMenuGroupSMO; |
| | | 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("eidtMenuGroupSMOImpl") |
| | | public class EditMenuGroupSMOImpl extends AbstractComponentSMO implements IEditMenuGroupSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | Assert.hasKeyAndValue(paramIn, "gId", "组Id不能为空"); |
| | | Assert.hasKeyAndValue(paramIn, "name", "必填,请填写组名称"); |
| | | Assert.hasKeyAndValue(paramIn, "icon", "必填,请填写icon"); |
| | | Assert.hasKeyAndValue(paramIn, "label", "必填,请填写标签"); |
| | | Assert.hasKeyAndValue(paramIn, "seq", "必填,请填写序列"); |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.MENU); |
| | | |
| | | } |
| | | |
| | | @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/menuGroup.updateMenuGroup", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> updateMenuGroup(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.menuGroup.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 com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.web.core.AbstractComponentSMO; |
| | | import com.java110.web.smo.menuGroup.IListMenuGroupsSMO; |
| | | 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; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 查询menuGroup服务类 |
| | | */ |
| | | @Service("listMenuGroupsSMOImpl") |
| | | public class ListMenuGroupsSMOImpl extends AbstractComponentSMO implements IListMenuGroupsSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> listMenuGroups(IPageData pd) throws SMOException { |
| | | return businessProcess(pd); |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | super.validatePageInfo(pd); |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.MENU); |
| | | } |
| | | |
| | | @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/menuGroup.listMenuGroups" + 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; |
| | | } |
| | | } |
| New file |
| | |
| | | <div id = "addMenuGroupModel" 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">楼名称</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.name" 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"><input v-model="addFloorInfo.floorNum" type="email" 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"><input v-model="addFloorInfo.remark" type="tel" 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"> |
| | | <input v-model="addMenuGroupInfo.name" type="text" placeholder="必填,请填写组名称" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">icon</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addMenuGroupInfo.icon" type="text" placeholder="必填,请填写icon" 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="addMenuGroupInfo.label"> |
| | | <option selected disabled value="">必填,请选择标签</option> |
| | | <option value="HOT">HOT</option> |
| | | <option value="TOP">TOP</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="addMenuGroupInfo.seq" 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"> |
| | | <textarea placeholder="选填,请填写描述" class="form-control" v-model="addMenuGroupInfo.description"></textarea> </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="saveMenuGroupInfo()" ><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){ |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | addMenuGroupInfo:{ |
| | | gId:'', |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('addMenuGroup','openAddMenuGroupModal',function(){ |
| | | $('#addMenuGroupModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | addMenuGroupValidate(){ |
| | | return vc.validate.validate({ |
| | | addMenuGroupInfo:vc.component.addMenuGroupInfo |
| | | },{ |
| | | 'addMenuGroupInfo.name':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"组名称不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,10", |
| | | errInfo:"组名称必须在2至10字符之间" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.icon':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"icon不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,20", |
| | | errInfo:"icon必须在2至20字符之间" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.label':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"标签不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"1,20", |
| | | errInfo:"标签错误" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.seq':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"序列不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"序列必须为整数" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.description':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"备注内容不能超过200" |
| | | }, |
| | | ], |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | }, |
| | | saveMenuGroupInfo:function(){ |
| | | if(!vc.component.addMenuGroupValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | |
| | | return ; |
| | | } |
| | | |
| | | vc.component.addMenuGroupInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | //不提交数据将数据 回调给侦听处理 |
| | | if(vc.notNull($props.callBackListener)){ |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addMenuGroupInfo); |
| | | $('#addMenuGroupModel').modal('hide'); |
| | | return ; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'addMenuGroup', |
| | | 'save', |
| | | JSON.stringify(vc.component.addMenuGroupInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#addMenuGroupModel').modal('hide'); |
| | | vc.component.clearAddMenuGroupInfo(); |
| | | vc.emit('menuGroupManage','listMenuGroup',{}); |
| | | |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }, |
| | | clearAddMenuGroupInfo:function(){ |
| | | vc.component.addMenuGroupInfo = { |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <div id = "chooseMenuGroupModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseMenuGroupModelLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h3 class="modal-title" id="chooseMenuGroupModelLabel">选择菜单组</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="chooseMenuGroupInfo._currentMenuGroupName" class="form-control form-control-sm"> |
| | | <span class="input-group-append"> |
| | | <button type="button" class="btn btn-sm btn-primary" v-on:click="queryMenuGroups()">查询</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">组名称</th> |
| | | <th class="text-center">icon</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="menuGroup in chooseMenuGroupInfo.menuGroups"> |
| | | <td class="text-center">{{menuGroup.gId}}</td> |
| | | <td class="text-center">{{menuGroup.name}}</td> |
| | | <td class="text-center">{{menuGroup.icon}}</td> |
| | | <td class="text-center">{{menuGroup.label}}</td> |
| | | <td class="text-center">{{menuGroup.seq}}</td> |
| | | <td class="text-center">{{menuGroup.description}}</td> |
| | | |
| | | <td> |
| | | <button class="btn btn-primary btn-xs" v-on:click="chooseMenuGroup(menuGroup)">选择</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | vc.extends({ |
| | | propTypes: { |
| | | emitChooseMenuGroup:vc.propTypes.string, |
| | | emitLoadData:vc.propTypes.string |
| | | }, |
| | | data:{ |
| | | chooseMenuGroupInfo:{ |
| | | menuGroups:[], |
| | | _currentMenuGroupName:'', |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('chooseMenuGroup','openChooseMenuGroupModel',function(_param){ |
| | | $('#chooseMenuGroupModel').modal('show'); |
| | | vc.component._refreshChooseMenuGroupInfo(); |
| | | vc.component._loadAllMenuGroupInfo(1,10,''); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _loadAllMenuGroupInfo:function(_page,_row,_name){ |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_row, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | name:_name |
| | | } |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('chooseMenuGroup', |
| | | 'list', |
| | | param, |
| | | function(json){ |
| | | var _menuGroupInfo = JSON.parse(json); |
| | | vc.component.chooseMenuGroupInfo.menuGroups = _menuGroupInfo.menuGroups; |
| | | },function(){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | chooseMenuGroup:function(_menuGroup){ |
| | | if(_menuGroup.hasOwnProperty('name')){ |
| | | _menuGroup.menuGroupName = _menuGroup.name; |
| | | } |
| | | vc.emit($props.emitChooseMenuGroup,'chooseMenuGroup',_menuGroup); |
| | | vc.emit($props.emitLoadData,'listMenuGroupData',{ |
| | | menuGroupId:_menuGroup.menuGroupId |
| | | }); |
| | | $('#chooseMenuGroupModel').modal('hide'); |
| | | }, |
| | | queryMenuGroups:function(){ |
| | | vc.component._loadAllMenuGroupInfo(1,10,vc.component.chooseMenuGroupInfo._currentMenuGroupName); |
| | | }, |
| | | _refreshChooseMenuGroupInfo:function(){ |
| | | vc.component.chooseMenuGroupInfo._currentMenuGroupName = ""; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="modal fade" id="deleteMenuGroupModel" 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="closeDeleteMenuGroupModel()">点错了</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="deleteMenuGroup()">确认删除</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | deleteMenuGroupInfo:{ |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('deleteMenuGroup','openDeleteMenuGroupModal',function(_params){ |
| | | |
| | | vc.component.deleteMenuGroupInfo = _params; |
| | | $('#deleteMenuGroupModel').modal('show'); |
| | | |
| | | }); |
| | | }, |
| | | methods:{ |
| | | deleteMenuGroup:function(){ |
| | | vc.component.deleteMenuGroupInfo.communityId=vc.getCurrentCommunity().communityId; |
| | | vc.http.post( |
| | | 'deleteMenuGroup', |
| | | 'delete', |
| | | JSON.stringify(vc.component.deleteMenuGroupInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#deleteMenuGroupModel').modal('hide'); |
| | | vc.emit('menuGroupManage','listMenuGroup',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | vc.message(json); |
| | | |
| | | }); |
| | | }, |
| | | closeDeleteMenuGroupModel:function(){ |
| | | $('#deleteMenuGroupModel').modal('hide'); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| New file |
| | |
| | | <div id = "editMenuGroupModel" 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">组名称</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editMenuGroupInfo.name" type="text" placeholder="必填,请填写组名称" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">icon</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editMenuGroupInfo.icon" type="text" placeholder="必填,请填写icon" 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="editMenuGroupInfo.label"> |
| | | <option selected disabled value="">必填,请选择标签</option> |
| | | <option value="HOT">HOT</option> |
| | | <option value="TOP">TOP</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="editMenuGroupInfo.seq" 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"> |
| | | <textarea placeholder="选填,请填写描述" class="form-control" v-model="editMenuGroupInfo.description"></textarea> </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="editMenuGroup()" ><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:{ |
| | | editMenuGroupInfo:{ |
| | | gId:'', |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('editMenuGroup','openEditMenuGroupModal',function(_params){ |
| | | vc.component.refreshEditMenuGroupInfo(); |
| | | $('#editMenuGroupModel').modal('show'); |
| | | vc.copyObject(_params, vc.component.editMenuGroupInfo ); |
| | | vc.component.editMenuGroupInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | }); |
| | | }, |
| | | methods:{ |
| | | editMenuGroupValidate:function(){ |
| | | return vc.validate.validate({ |
| | | editMenuGroupInfo:vc.component.editMenuGroupInfo |
| | | },{ |
| | | 'editMenuGroupInfo.name':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"组名称不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,10", |
| | | errInfo:"组名称必须在2至10字符之间" |
| | | }, |
| | | ], |
| | | 'editMenuGroupInfo.icon':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"icon不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,20", |
| | | errInfo:"icon必须在2至20字符之间" |
| | | }, |
| | | ], |
| | | 'editMenuGroupInfo.label':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"标签不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"1,20", |
| | | errInfo:"标签错误" |
| | | }, |
| | | ], |
| | | 'editMenuGroupInfo.seq':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"序列不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"序列必须为整数" |
| | | }, |
| | | ], |
| | | 'editMenuGroupInfo.description':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"备注内容不能超过200" |
| | | }, |
| | | ], |
| | | 'editMenuGroupInfo.gId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"组Id不能为空" |
| | | }] |
| | | |
| | | }); |
| | | }, |
| | | editMenuGroup:function(){ |
| | | if(!vc.component.editMenuGroupValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | return ; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'editMenuGroup', |
| | | 'update', |
| | | JSON.stringify(vc.component.editMenuGroupInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#editMenuGroupModel').modal('hide'); |
| | | vc.emit('menuGroupManage','listMenuGroup',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | }, |
| | | refreshEditMenuGroupInfo:function(){ |
| | | vc.component.editMenuGroupInfo= { |
| | | gId:'', |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(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;"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4" > |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入组名称" v-model="menuGroupManageInfo.conditions.name" class=" form-control"> |
| | | </div> </div><div class="col-sm-4" > |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入icon" v-model="menuGroupManageInfo.conditions.icon" class=" form-control"> |
| | | </div> </div><div class="col-sm-3" > |
| | | <select class="custom-select" v-model="menuGroupManageInfo.conditions.label"> |
| | | <option selected value="">请选择标签</option> |
| | | <option value="HOT">HOT</option> |
| | | <option value="TOP">TOP</option> |
| | | </select> </div><div class="col-sm-1"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryMenuGroupMethod()"> |
| | | <i class="glyphicon glyphicon-search"></i> 查询 |
| | | </button> |
| | | </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="_openAddMenuGroupModal()"> |
| | | <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">组名称</th> |
| | | <th class="text-center">icon</th> |
| | | <th class="text-center">标签</th> |
| | | <th class="text-center">序列</th> |
| | | <th class="text-center">操作</th> |
| | | |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="menuGroup in menuGroupManageInfo.menuGroups"> |
| | | <td class="text-center">{{menuGroup.gId}}</td> |
| | | <td class="text-center">{{menuGroup.name}}</td> |
| | | <td class="text-center">{{menuGroup.icon}}</td> |
| | | <td class="text-center">{{menuGroup.label}}</td> |
| | | <td class="text-center">{{menuGroup.seq}}</td> |
| | | <td class="text-center"><div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openEditMenuGroupModel(menuGroup)">修改</button> |
| | | </div> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDeleteMenuGroupModel(menuGroup)">删除</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="addMenuGroup" |
| | | callBackListener="" |
| | | callBackFunction="" |
| | | ></vc:create> |
| | | <vc:create name="editMenuGroup"></vc:create> |
| | | <vc:create name="deleteMenuGroup"></vc:create> |
| | | |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | menuGroupManageInfo:{ |
| | | menuGroups:[], |
| | | total:0, |
| | | records:1, |
| | | moreCondition:false, |
| | | name:'', |
| | | conditions:{ |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | |
| | | } |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component._listMenuGroups(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | |
| | | vc.on('menuGroupManage','listMenuGroup',function(_param){ |
| | | vc.component._listMenuGroups(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | | vc.component._listMenuGroups(_currentPage,DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listMenuGroups:function(_page, _rows){ |
| | | |
| | | vc.component.menuGroupManageInfo.conditions.page = _page; |
| | | vc.component.menuGroupManageInfo.conditions.row = _rows; |
| | | var param = { |
| | | params:vc.component.menuGroupManageInfo.conditions |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('menuGroupManage', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _menuGroupManageInfo=JSON.parse(json); |
| | | vc.component.menuGroupManageInfo.total = _menuGroupManageInfo.total; |
| | | vc.component.menuGroupManageInfo.records = _menuGroupManageInfo.records; |
| | | vc.component.menuGroupManageInfo.menuGroups = _menuGroupManageInfo.menuGroups; |
| | | vc.emit('pagination','init',{ |
| | | total:vc.component.menuGroupManageInfo.records, |
| | | currentPage:_page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _openAddMenuGroupModal:function(){ |
| | | vc.emit('addMenuGroup','openAddMenuGroupModal',{}); |
| | | }, |
| | | _openEditMenuGroupModel:function(_menuGroup){ |
| | | vc.emit('editMenuGroup','openEditMenuGroupModal',_menuGroup); |
| | | }, |
| | | _openDeleteMenuGroupModel:function(_menuGroup){ |
| | | vc.emit('deleteMenuGroup','openDeleteMenuGroupModal',_menuGroup); |
| | | }, |
| | | _queryMenuGroupMethod:function(){ |
| | | vc.component._listMenuGroups(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | |
| | | }, |
| | | _moreCondition:function(){ |
| | | if(vc.component.menuGroupManageInfo.moreCondition){ |
| | | vc.component.menuGroupManageInfo.moreCondition = false; |
| | | }else{ |
| | | vc.component.menuGroupManageInfo.moreCondition = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | })(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="viewMenuGroupInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectMenuGroupInfoModel()"> |
| | | <i class="glyphicon glyphicon-search"></i> 选择菜单组</button> |
| | | |
| | | <button type="button" v-if="viewMenuGroupInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddMenuGroupInfoModel()"> |
| | | <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" >组名称:</label> |
| | | <label class="">{{viewMenuGroupInfo.name}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >icon:</label> |
| | | <label class="">{{viewMenuGroupInfo.icon}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >标签:</label> |
| | | <label class="">{{viewMenuGroupInfo.label}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >序列:</label> |
| | | <label class="">{{viewMenuGroupInfo.seq}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >描述:</label> |
| | | <label class="">{{viewMenuGroupInfo.description}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="addMenuGroup" |
| | | callBackListener="viewMenuGroupInfo" |
| | | callBackFunction="chooseMenuGroup" |
| | | ></vc:create> |
| | | |
| | | |
| | | <vc:create name="chooseMenuGroup" |
| | | emitChooseMenuGroup="viewMenuGroupInfo" |
| | | emitLoadData="viewMenuGroupInfo" |
| | | ></vc:create> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 菜单组 组件 |
| | | **/ |
| | | (function(vc){ |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | viewMenuGroupInfo:{ |
| | | index:0, |
| | | flowComponent:'viewMenuGroupInfo', |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | //根据请求参数查询 查询 业主信息 |
| | | vc.component._loadMenuGroupInfoData(); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('viewMenuGroupInfo','chooseMenuGroup',function(_app){ |
| | | vc.copyObject(_app, vc.component.viewMenuGroupInfo); |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewMenuGroupInfo); |
| | | }); |
| | | |
| | | vc.on('viewMenuGroupInfo', 'onIndex', function(_index){ |
| | | vc.component.viewMenuGroupInfo.index = _index; |
| | | }); |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | _openSelectMenuGroupInfoModel(){ |
| | | vc.emit('chooseMenuGroup','openChooseMenuGroupModel',{}); |
| | | }, |
| | | _openAddMenuGroupInfoModel(){ |
| | | vc.emit('addMenuGroup','openAddMenuGroupModal',{}); |
| | | }, |
| | | _loadMenuGroupInfoData: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="menuGroupManage"></vc:create> |
| | | </div> |
| | | |
| | | <vc:create name="copyright"></vc:create> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="commonBottom"></vc:create> |
| | | </body> |
| | | </html> |
| | |
| | | public class MappingDto extends PageDto implements Serializable { |
| | | |
| | | private String domain; |
| | | private String name; |
| | | private String remark; |
| | | private String id; |
| | | private String value; |
| | | private String key; |
| | | private String name; |
| | | private String remark; |
| | | private String id; |
| | | private String value; |
| | | private String key; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public String getDomain() { |
| | | return domain; |
| | | } |
| | | public void setDomain(String domain) { |
| | | |
| | | public void setDomain(String domain) { |
| | | this.domain = domain; |
| | | } |
| | | public String getName() { |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | public void setName(String name) { |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public String getRemark() { |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getId() { |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | public void setId(String id) { |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | public String getValue() { |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | public void setValue(String value) { |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | public String getKey() { |
| | | |
| | | public String getKey() { |
| | | return key; |
| | | } |
| | | public void setKey(String key) { |
| | | |
| | | public void setKey(String key) { |
| | | this.key = key; |
| | | } |
| | | |
| New file |
| | |
| | | package com.java110.dto.menuGroup; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class MenuGroupDto extends PageDto implements Serializable { |
| | | |
| | | private String gId; |
| | | private String name; |
| | | private String icon; |
| | | private String label; |
| | | private String seq; |
| | | private String description; |
| | | private String statusCd; |
| | | |
| | | public String getGId() { |
| | | return gId; |
| | | } |
| | | |
| | | public void setGId(String gId) { |
| | | this.gId = gId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getIcon() { |
| | | return icon; |
| | | } |
| | | |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | } |
| | | |
| | | public String getLabel() { |
| | | return label; |
| | | } |
| | | |
| | | public void setLabel(String label) { |
| | | this.label = label; |
| | | } |
| | | |
| | | public String getSeq() { |
| | | return seq; |
| | | } |
| | | |
| | | public void setSeq(String seq) { |
| | | this.seq = seq; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.vo.api.menuGroup; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ApiMenuGroupDataVo implements Serializable { |
| | | |
| | | private String gId; |
| | | private String name; |
| | | private String icon; |
| | | private String label; |
| | | private String seq; |
| | | private String description; |
| | | public String getGId() { |
| | | return gId; |
| | | } |
| | | public void setGId(String gId) { |
| | | this.gId = gId; |
| | | } |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public String getIcon() { |
| | | return icon; |
| | | } |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | } |
| | | public String getLabel() { |
| | | return label; |
| | | } |
| | | public void setLabel(String label) { |
| | | this.label = label; |
| | | } |
| | | public String getSeq() { |
| | | return seq; |
| | | } |
| | | public void setSeq(String seq) { |
| | | this.seq = seq; |
| | | } |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.vo.api.menuGroup; |
| | | |
| | | import com.java110.vo.MorePageVo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | public class ApiMenuGroupVo extends MorePageVo implements Serializable { |
| | | List<ApiMenuGroupDataVo> menuGroups; |
| | | |
| | | |
| | | public List<ApiMenuGroupDataVo> getMenuGroups() { |
| | | return menuGroups; |
| | | } |
| | | |
| | | public void setMenuGroups(List<ApiMenuGroupDataVo> menuGroups) { |
| | | this.menuGroups = menuGroups; |
| | | } |
| | | } |
| | |
| | | { |
| | | "templateName":"服务实现", |
| | | "templateCode":"serviceImpl", |
| | | "templateKey":"serviceBusinessId", |
| | | "templateKeyName":"服务实现ID", |
| | | "templateName":"菜单组", |
| | | "templateCode":"menuGroup", |
| | | "templateKey":"gId", |
| | | "templateKeyName":"组Id", |
| | | "searchCode": "name", |
| | | "searchName": "服务名称", |
| | | "searchName": "组名称", |
| | | "conditions": [ |
| | | { |
| | | "name": "业务类型", |
| | | "inputType": "input", |
| | | "code": "businessTypeCd", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "业务名称", |
| | | "name": "组名称", |
| | | "inputType": "input", |
| | | "code": "name", |
| | | "whereCondition": "like" |
| | | }, |
| | | { |
| | | "name": "调用方式", |
| | | "inputType": "select", |
| | | "code": "invokeType", |
| | | "selectValue":"1,2,3", |
| | | "selectValueName":"微服务POST方式,webservice方式,http post方式", |
| | | "whereCondition": "equal" |
| | | "name": "icon", |
| | | "inputType": "input", |
| | | "code": "icon", |
| | | "whereCondition": "like" |
| | | }, |
| | | { |
| | | "name": "kafka主题", |
| | | "inputType": "input", |
| | | "code": "messageTopic", |
| | | "whereCondition": "like" |
| | | "name": "标签", |
| | | "inputType": "select", |
| | | "code": "label", |
| | | "selectValue":"HOT,TOP", |
| | | "selectValueName":"HOT,TOP", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"businessTypeCd", |
| | | "cnCode":"业务类型", |
| | | "desc":"必填,请填写业务类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"业务类型必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"name", |
| | | "cnCode":"业务名称", |
| | | "desc":"必填,请填写业务名称", |
| | | "cnCode":"组名称", |
| | | "desc":"必填,请填写组名称", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"业务类型必须在2至50字符之间", |
| | | "limitParam":"2,10", |
| | | "limitErrInfo":"组名称必须在2至10字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"invokeType", |
| | | "cnCode":"调用类型", |
| | | "desc":"必填,请填写调用类型", |
| | | "code":"icon", |
| | | "cnCode":"icon", |
| | | "desc":"必填,请填写icon", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,20", |
| | | "limitErrInfo":"icon必须在2至20字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"label", |
| | | "cnCode":"标签", |
| | | "desc":"必填,请填写标签", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"select", |
| | | "selectValue":"1,2,3", |
| | | "selectValueName":"微服务POST方式,webservice方式,http post方式", |
| | | "selectValue":"HOT,TOP", |
| | | "selectValueName":"HOT,TOP", |
| | | "limit":"maxin", |
| | | "limitParam":"1,4", |
| | | "limitErrInfo":"调用类型错误", |
| | | "limitParam":"1,20", |
| | | "limitErrInfo":"标签错误", |
| | | "show": true |
| | | }, |
| | | |
| | | { |
| | | "code":"url", |
| | | "cnCode":"调用地址", |
| | | "desc":"必填,请填写调用地址,为mapping 表中domain为DOMAIN.COMMON映射key", |
| | | "code":"seq", |
| | | "cnCode":"序列", |
| | | "desc":"必填,请填写序列", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"1000", |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"调用次数错误", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"messageTopic", |
| | | "cnCode":"kafka主题", |
| | | "desc":"可填,请填写kafka主题", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "defaultValue":"", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"kafka主题不能超过50", |
| | | "show": false |
| | | }, |
| | | { |
| | | "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 |
| | | "limitErrInfo":"序列必须为整数", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"description", |
| New file |
| | |
| | | { |
| | | "templateName":"服务实现", |
| | | "templateCode":"serviceImpl", |
| | | "templateKey":"serviceBusinessId", |
| | | "templateKeyName":"服务实现ID", |
| | | "searchCode": "name", |
| | | "searchName": "服务名称", |
| | | "conditions": [ |
| | | { |
| | | "name": "业务类型", |
| | | "inputType": "input", |
| | | "code": "businessTypeCd", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "业务名称", |
| | | "inputType": "input", |
| | | "code": "name", |
| | | "whereCondition": "like" |
| | | }, |
| | | { |
| | | "name": "调用方式", |
| | | "inputType": "select", |
| | | "code": "invokeType", |
| | | "selectValue":"1,2,3", |
| | | "selectValueName":"微服务POST方式,webservice方式,http post方式", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "kafka主题", |
| | | "inputType": "input", |
| | | "code": "messageTopic", |
| | | "whereCondition": "like" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"businessTypeCd", |
| | | "cnCode":"业务类型", |
| | | "desc":"必填,请填写业务类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"业务类型必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"name", |
| | | "cnCode":"业务名称", |
| | | "desc":"必填,请填写业务名称", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"业务类型必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"invokeType", |
| | | "cnCode":"调用类型", |
| | | "desc":"必填,请填写调用类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"select", |
| | | "selectValue":"1,2,3", |
| | | "selectValueName":"微服务POST方式,webservice方式,http post方式", |
| | | "limit":"maxin", |
| | | "limitParam":"1,4", |
| | | "limitErrInfo":"调用类型错误", |
| | | "show": true |
| | | }, |
| | | |
| | | { |
| | | "code":"url", |
| | | "cnCode":"调用地址", |
| | | "desc":"必填,请填写调用地址,为mapping 表中domain为DOMAIN.COMMON映射key", |
| | | "required":true, |
| | | "hasDefaultValue":true, |
| | | "defaultValue":"1000", |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"调用次数错误", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"messageTopic", |
| | | "cnCode":"kafka主题", |
| | | "desc":"可填,请填写kafka主题", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "defaultValue":"", |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"50", |
| | | "limitErrInfo":"kafka主题不能超过50", |
| | | "show": false |
| | | }, |
| | | { |
| | | "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":"description", |
| | | "cnCode":"描述", |
| | | "desc":"可填,请填写描述", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "defaultValue":"", |
| | | "inputType":"textarea", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"备注内容不能超过200", |
| | | "show": false |
| | | } |
| | | ] |
| | | } |
| | |
| | | public static final String HAS_LIST_CACHE = "500201907032"; |
| | | public static final String LIST_SERVICEIMPL = "500201906028"; |
| | | |
| | | public static final String MENU = ""; |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | package com.java110.common.constant; |
| | | |
| | | /** |
| | | * 菜单组常量类 |
| | | * Created by wuxw on 2017/5/20. |
| | | */ |
| | | public class ServiceCodeMenuGroupConstant { |
| | | |
| | | /** |
| | | * 添加 菜单组 |
| | | */ |
| | | public static final String ADD_MENUGROUP = "menuGroup.saveMenuGroup"; |
| | | |
| | | |
| | | /** |
| | | * 修改 菜单组 |
| | | */ |
| | | public static final String UPDATE_MENUGROUP = "menuGroup.updateMenuGroup"; |
| | | /** |
| | | * 删除 菜单组 |
| | | */ |
| | | public static final String DELETE_MENUGROUP = "menuGroup.deleteMenuGroup"; |
| | | |
| | | |
| | | /** |
| | | * 查询 菜单组 |
| | | */ |
| | | public static final String LIST_MENUGROUPS = "menuGroup.listMenuGroups"; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.core.smo.menu; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IMenuGroupInnerServiceSMO |
| | | * @Description 路由接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/menuApi") |
| | | public interface IMenuInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param routeDto 数据对象分享 |
| | | * @return MenuGroupDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryMenuGroups", method = RequestMethod.POST) |
| | | List<MenuGroupDto> queryMenuGroups(@RequestBody MenuGroupDto routeDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param routeDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryMenuGroupsCount", method = RequestMethod.POST) |
| | | int queryMenuGroupsCount(@RequestBody MenuGroupDto routeDto); |
| | | |
| | | /** |
| | | * <p>修改APP信息</p> |
| | | * |
| | | * @param routeDto 数据对象分享 |
| | | * @return ServiceDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/updateMenuGroup", method = RequestMethod.POST) |
| | | int updateMenuGroup(@RequestBody MenuGroupDto routeDto); |
| | | |
| | | |
| | | /** |
| | | * <p>添加APP信息</p> |
| | | * |
| | | * @param routeDto 数据对象分享 |
| | | * @return MenuGroupDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/saveMenuGroup", method = RequestMethod.POST) |
| | | int saveMenuGroup(@RequestBody MenuGroupDto routeDto); |
| | | |
| | | /** |
| | | * <p>删除APP信息</p> |
| | | * |
| | | * @param routeDto 数据对象分享 |
| | | * @return MenuGroupDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/deleteMenuGroup", method = RequestMethod.POST) |
| | | int deleteMenuGroup(@RequestBody MenuGroupDto routeDto); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="menuServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存路由信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveMenuGroupInfo" parameterType="Map"> |
| | | insert into m_menu_group( |
| | | g_id,name,icon,label,seq,description |
| | | ) values ( |
| | | #{gId},#{name},#{icon},#{label},#{seq},#{description} |
| | | ) |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询路由信息 add by wuxw 2018-07-03 --> |
| | | <select id="getMenuGroupInfo" parameterType="Map" resultType="Map"> |
| | | select t.g_id,t.name,t.icon,t.label,t.seq,t.description,t.g_id gId |
| | | from m_menu_group t |
| | | where 1 =1 |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="icon !=null and icon != ''"> |
| | | and t.icon= #{icon} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="label !=null and label != ''"> |
| | | and t.label= #{label} |
| | | </if> |
| | | <if test="seq !=null"> |
| | | and t.seq= #{seq} |
| | | </if> |
| | | <if test="description !=null and description != ''"> |
| | | and t.description= #{description} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改路由信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateMenuGroupInfo" parameterType="Map"> |
| | | update m_menu_group t set |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | t.status_cd = #{statusCd}, |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | t.name= #{name}, |
| | | </if> |
| | | <if test="icon !=null and icon != ''"> |
| | | t.icon= #{icon}, |
| | | </if> |
| | | <if test="label !=null and label != ''"> |
| | | t.label= #{label}, |
| | | </if> |
| | | <if test="seq !=null "> |
| | | t.seq= #{seq}, |
| | | </if> |
| | | <if test="description !=null and description != ''"> |
| | | t.description= #{description} |
| | | </if> |
| | | where t.g_id= #{gId} |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询路由数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryMenuGroupsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from m_menu_group t |
| | | where 1 =1 |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="icon !=null and icon != ''"> |
| | | and t.icon= #{icon} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="label !=null and label != ''"> |
| | | and t.label= #{label} |
| | | </if> |
| | | <if test="seq !=null"> |
| | | and t.seq= #{seq} |
| | | </if> |
| | | <if test="description !=null and description != ''"> |
| | | and t.description= #{description} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |