Browse Source

[chg]删除protal工程

别傲 5 years ago
parent
commit
7119e9ee22

+ 0 - 29
lift-portal-service/pom.xml

@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>lift-server</artifactId>
-        <groupId>cn.com.ty</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>lift-portal-service</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>cn.com.xwy</groupId>
-            <artifactId>xwy-spring-boot</artifactId>
-        </dependency>
-
-        <!--单体开发时注释掉依赖-->
-<!--        <dependency>-->
-<!--            <groupId>cn.com.xwy</groupId>-->
-<!--            <artifactId>xwy-cloud-dependencies</artifactId>-->
-<!--        </dependency>-->
-
-    </dependencies>
-
-
-</project>

+ 0 - 22
lift-portal-service/src/main/java/cn/com/ty/portal/PortalApplication.java

@@ -1,22 +0,0 @@
-package cn.com.ty.portal;
-
-import lombok.extern.slf4j.Slf4j;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * @Author xwy
- * @create 2019/11/4
- */
-@Slf4j
-@MapperScan("cn.com.ty.**.dao.mapper")
-@SpringBootApplication(scanBasePackages = {"cn.com.ty.portal","cn.com.xwy.boot"})
-public class PortalApplication {
-
-    public static void main(String[] args) {
-        log.debug("PortalApplication startup main");
-        SpringApplication application = new SpringApplication(PortalApplication.class);
-        application.run(args);
-    }
-}

+ 0 - 41
lift-portal-service/src/main/java/cn/com/ty/portal/controller/RoleController.java

@@ -1,41 +0,0 @@
-package cn.com.ty.portal.controller;
-
-import cn.com.ty.portal.controller.dto.RoleListModel;
-import cn.com.ty.portal.dao.entity.SysRole;
-import cn.com.ty.portal.service.RoleService;
-import cn.com.xwy.boot.web.dto.RestResponse;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@Slf4j
-@RestController
-//@RequestMapping(path = "/role", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
-@RequestMapping(path = "/role")
-public class RoleController {
-
-    @Autowired
-    private RoleService roleService;
-    /**
-     * 分页查询角色
-     */
-    @RequestMapping("/list")
-    public RestResponse<IPage<SysRole>> list(RoleListModel request){
-        IPage<SysRole> sysRoleIPage = roleService.queryList(request);
-        return RestResponse.ok(sysRoleIPage);
-    }
-
-    @PostMapping("/add")
-    public RestResponse<String> addRole(){
-        return RestResponse.ok(roleService.addRole());
-    }
-
-
-    @PostMapping("/delete")
-    public RestResponse<String> deleteRole(){
-        return RestResponse.ok(roleService.deleteRole());
-    }
-}

+ 0 - 31
lift-portal-service/src/main/java/cn/com/ty/portal/controller/RoleMenuController.java

@@ -1,31 +0,0 @@
-package cn.com.ty.portal.controller;
-
-import cn.com.ty.portal.controller.dto.RoleListModel;
-import cn.com.ty.portal.service.RoleMenuService;
-import cn.com.ty.portal.service.model.RoleMenuModel;
-import cn.com.xwy.boot.web.dto.RestResponse;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@Slf4j
-@RestController
-//@RequestMapping(path = "/role", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
-@RequestMapping(path = "/role/menu")
-public class RoleMenuController {
-
-    @Autowired
-    private RoleMenuService roleService;
-    /**
-     * 分页查询角色
-     */
-    @RequestMapping("/list")
-    public RestResponse<IPage<RoleMenuModel>> list(@RequestBody RoleListModel request){
-        IPage<RoleMenuModel> sysRoleIPage = roleService.queryMenuByRole(request);
-        return RestResponse.ok(sysRoleIPage);
-    }
-
-}

+ 0 - 16
lift-portal-service/src/main/java/cn/com/ty/portal/controller/dto/RoleListModel.java

@@ -1,16 +0,0 @@
-package cn.com.ty.portal.controller.dto;
-
-import cn.com.xwy.boot.controller.BaseRequestModel;
-import lombok.Data;
-
-@Data
-public class RoleListModel extends BaseRequestModel {
-    /**
-     * 角色名称
-     */
-    private String roleName;
-    /**
-     * 角色编码
-     */
-    private String roleCode;
-}

+ 0 - 47
lift-portal-service/src/main/java/cn/com/ty/portal/dao/entity/SysRole.java

@@ -1,47 +0,0 @@
-package cn.com.ty.portal.dao.entity;
-
-import cn.com.xwy.boot.mybatis.BaseEntity;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-
-/**
- * <p>
- * 角色表
- * </p>
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@TableName("sys_role")
-@Accessors(chain = true)
-public class SysRole extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键
-     */
-    @TableId(value = "role_id",type = IdType.AUTO)
-	private Integer id;
-    /**
-     * 角色名称
-     */
-	@TableField("role_name")
-	private String roleName;
-	/**
-	 * 角色编码
-	 */
-	@TableField("role_code")
-	private String roleCode;
-    /**
-     * 角色描述
-     */
-	@TableField("role_desc")
-	private String roleDesc;
-
-}

+ 0 - 10
lift-portal-service/src/main/java/cn/com/ty/portal/dao/mapper/RoleMapper.java

@@ -1,10 +0,0 @@
-package cn.com.ty.portal.dao.mapper;
-
-import cn.com.ty.portal.dao.entity.SysRole;
-import cn.com.xwy.boot.mybatis.MyBatisMapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-@MyBatisMapper
-public interface RoleMapper extends BaseMapper<SysRole> {
-
-}

+ 0 - 16
lift-portal-service/src/main/java/cn/com/ty/portal/dao/mapper/RoleMenuMapper.java

@@ -1,16 +0,0 @@
-package cn.com.ty.portal.dao.mapper;
-
-import cn.com.ty.portal.service.model.RoleMenuModel;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-/**
- * @Description: TODO
- * @Author xwy
- * @create 2019/11/12
- */
-
-public interface RoleMenuMapper {
-    List<RoleMenuModel> queryMenuByRole(IPage page, String roleCode);
-}

+ 0 - 29
lift-portal-service/src/main/java/cn/com/ty/portal/service/RoleMenuService.java

@@ -1,29 +0,0 @@
-package cn.com.ty.portal.service;
-
-import cn.com.ty.portal.controller.dto.RoleListModel;
-import cn.com.ty.portal.dao.mapper.RoleMenuMapper;
-import cn.com.ty.portal.service.model.RoleMenuModel;
-import cn.com.xwy.boot.service.impl.BaseServiceImpl;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * @Description: TODO
- * @Author xwy
- * @create 2019/11/12
- */
-@Service
-public class RoleMenuService extends BaseServiceImpl {
-    @Autowired
-    private RoleMenuMapper mapper;
-
-    public IPage<RoleMenuModel> queryMenuByRole(RoleListModel model){
-        IPage page = this.getPage(model);
-        List<RoleMenuModel> roleMenuModels = mapper.queryMenuByRole(page, model.getRoleCode());
-        page.setRecords(roleMenuModels);
-        return page;
-    }
-}

+ 0 - 45
lift-portal-service/src/main/java/cn/com/ty/portal/service/RoleService.java

@@ -1,45 +0,0 @@
-package cn.com.ty.portal.service;
-
-import cn.com.ty.portal.controller.dto.RoleListModel;
-import cn.com.ty.portal.dao.entity.SysRole;
-import cn.com.ty.portal.dao.mapper.RoleMapper;
-import cn.com.xwy.boot.service.impl.BaseServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-import java.util.Objects;
-
-@Slf4j
-@Service
-public class RoleService extends BaseServiceImpl<RoleMapper, SysRole> {
-
-    public IPage<SysRole> queryList(RoleListModel model){
-        QueryWrapper<SysRole> queryWrapper = getQueryWrapper();
-        LambdaQueryWrapper<SysRole> lambdaQueryWrapper = queryWrapper.lambda();
-        if (Objects.nonNull(model.getRoleCode())){
-            lambdaQueryWrapper.like(SysRole::getRoleCode,model.getRoleCode());
-        }
-        if (Objects.nonNull(model.getRoleName())){
-            lambdaQueryWrapper.like(SysRole::getRoleName,model.getRoleName());
-        }
-        return this.page(getPage(model), queryWrapper);
-    }
-
-    public String addRole(){
-        SysRole role = new SysRole();
-        role.setRoleCode("TEST_ROLE")
-                .setId(25)
-                .setRoleName("测试角色")
-                .setRoleDesc("测试");
-        boolean b = this.saveOrUpdate(role);
-        return b? "success" : "false";
-    }
-
-    public String deleteRole(){
-        return this.removeById(25) ? "success" : "false";
-    }
-
-}

+ 0 - 13
lift-portal-service/src/main/java/cn/com/ty/portal/service/model/RoleMenuModel.java

@@ -1,13 +0,0 @@
-package cn.com.ty.portal.service.model;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class RoleMenuModel implements Serializable {
-    private String roleName;
-    private String roleCode;
-    private String menuName;
-    private String url;
-}

+ 0 - 18
lift-portal-service/src/main/resources/application.yml

@@ -1,18 +0,0 @@
-server:
-  port: 20225
-
-spring:
-  application:
-    name: lift-portal-service
-  profiles:
-    active: dev
-  datasource:
-    url: jdbc:mysql://132.232.206.88/rdsliftmanager?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
-    username: root
-    password: ms.c88pocY/
-
-#自动添加createTime、isDelete 等字段
-xwy:
-  mybatis:
-    audit:
-      enabled: true

+ 0 - 24
lift-portal-service/src/main/resources/bootstrap.yml

@@ -1,24 +0,0 @@
-spring:
-  cloud:
-    config:
-      fail-fast: true
-      discovery:
-        service-id: lift-config-server
-        enabled: true
-      name: portal
-      profile: ${spring.profiles.active}
-      failFast: true
-      retry:
-        multipliter: 1000
-        initial-interval: 1.2
-        max-interval: 2000
-        max-attempts: 6
-eureka:
-  instance:
-    prefer-ip-address: true
-    lease-renewal-interval-in-seconds: 5
-    lease-expiration-duration-in-seconds: 20
-  client:
-    service-url:
-      defaultZone: http://localhost:10225/eureka/
-

+ 0 - 8
lift-portal-service/src/main/resources/logback-spring.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<configuration debug="false" scan="false">
-    <include resource="cn/com/xwy/boot/logging/logback/defaults.xml"/>
-    <!-- Level: ALL > TRACE > FATAL > DEBUG > INFO > WARN > ERROR > OFF -->
-    <Logger name="cn.com.xwy.portal" level="DEBUG"/>
-    <root level="info"/>
-</configuration>

+ 0 - 21
lift-portal-service/src/main/resources/mapper/RoleMenuMapper.xml

@@ -1,21 +0,0 @@
-<?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="cn.com.ty.portal.dao.mapper.RoleMenuMapper">
-
-
-    <select id="queryMenuByRole" resultType="cn.com.ty.portal.service.model.RoleMenuModel">
-        SELECT
-            sr.role_code roleCode,
-            sr.role_name roleName,
-            sm.menu_name menuName,
-            sm.url
-        FROM
-            sys_role sr,
-            sys_menu sm,
-            sys_role_menu srm
-        WHERE
-            sr.role_id = srm.role_id
-        AND sm.menu_id = srm.menu_id
-        AND sr.role_code = #{roleCode}
-    </select>
-</mapper>

+ 0 - 1
pom.xml

@@ -5,7 +5,6 @@
     <modelVersion>4.0.0</modelVersion>
     <modules>
         <module>lift-demo-service</module>
-        <module>lift-portal-service</module>
         <module>lift-business-service</module>
         <module>lift-enterprise-service</module>
         <module>lift-system-service</module>