Browse Source

feat: 删除无用代码

weijianghai 2 years ago
parent
commit
e6fa417873

+ 0 - 35
src/main/java/com/nokia/controller/CityController.java

@@ -1,35 +0,0 @@
-package com.nokia.controller;
-import java.util.List;
-
-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.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.nokia.common.R;
-import com.nokia.pojo.City;
-import com.nokia.service.CityService;
-
-/*
- * 已弃用代码
- */
-@Deprecated
-@RestController
-@RequestMapping("rest/api/city")
-public class CityController {
-
-    private final CityService cityServiceimpl;
-
-    @Autowired
-    public CityController(CityService cityServiceimpl) {
-        this.cityServiceimpl = cityServiceimpl;
-    }
-
-    @PostMapping("list")
-    @ResponseBody
-    public R list() {
-        List<City> cities = cityServiceimpl.list();
-        return R.ok().data(cities);
-    }
-}

+ 0 - 9
src/main/java/com/nokia/controller/RoleController.java

@@ -1,9 +0,0 @@
-package com.nokia.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RequestMapping("rest/api/role")
-@RestController
-public class RoleController {
-}

+ 0 - 21
src/main/java/com/nokia/dao/CityDao.java

@@ -1,21 +0,0 @@
-package com.nokia.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nokia.pojo.City;
-import com.nokia.vo.flow.FlowOrgVo;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Select;
-
-/*
- * 已弃用代码
- */
-@Deprecated
-@Mapper
-public interface CityDao extends BaseMapper<City> {
-    @Select("select * from sqmdb_rpt.acl_city where city_id = #{cityId}")
-    City findByCityId(Integer cityId);
-
-    @Select("select city_id as org_id, city_name_zh as org_name from sqmdb_rpt.acl_city where city_id = #{cityId}")
-    FlowOrgVo findOrgByCityId(Integer cityId);
-}

+ 0 - 17
src/main/java/com/nokia/dao/UserRoleDao.java

@@ -1,17 +0,0 @@
-package com.nokia.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nokia.pojo.UserRole;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Select;
-
-/*
- * 已弃用代码
- */
-@Deprecated
-@Mapper
-public interface UserRoleDao extends BaseMapper<UserRole> {
-
-    @Select("select role_id from sqmdb_rpt.acl_user_role where user_id = #{userId} and role_id= #{role_id}")
-    Integer hasRole(Integer userId, Integer role_id);
-}

+ 0 - 27
src/main/java/com/nokia/pojo/City.java

@@ -1,27 +0,0 @@
-package com.nokia.pojo;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * 城市
- */
-@Deprecated
-@Data
-@TableName("sqmdb_rpt.acl_city")
-public class City implements Serializable {
-    @TableId(type = IdType.AUTO)
-    private Integer cityId;
-    // 城市中文名
-    private String cityNameZh;
-    // 城市英文名
-    private String cityNameEn;
-    // 排序
-    private Integer ord;
-    // 归属省中文名
-    private String province;
-}

+ 0 - 15
src/main/java/com/nokia/pojo/District.java

@@ -1,15 +0,0 @@
-package com.nokia.pojo;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import lombok.Data;
-
-@Deprecated
-@Data
-@TableName("sqmdb_rpt.acl_district")
-public class District {
-    private Integer cityId;
-    private String cityName;
-    private Integer districtId;
-    private String districtName;
-}

+ 0 - 24
src/main/java/com/nokia/pojo/UserRole.java

@@ -1,24 +0,0 @@
-package com.nokia.pojo;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-
-import java.util.Date;
-
-@Deprecated
-@Data
-@TableName("sqmdb_rpt.acl_user_role")
-public class UserRole {
-    @TableId(type = IdType.AUTO)
-    private Integer id;
-    private Integer userId;
-    private Integer roleId;
-    @TableField(fill = FieldFill.INSERT)
-    private Date createTime;
-    @TableField(fill = FieldFill.INSERT_UPDATE)
-    private Date updateTime;
-    @TableField(exist = false)
-    private Role roleEntity;
-    @TableField(exist = false)
-    private User userEntity;
-}

+ 0 - 15
src/main/java/com/nokia/service/CityService.java

@@ -1,15 +0,0 @@
-package com.nokia.service;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nokia.dao.CityDao;
-import com.nokia.pojo.City;
-import org.springframework.stereotype.Service;
-
-/*
- * 已弃用代码
- */
-@Deprecated
-@Service
-public class CityService extends ServiceImpl<CityDao, City> {
-
-}

+ 0 - 28
src/test/java/com/nokia/dao/RoleDaoTest.java

@@ -1,28 +0,0 @@
-package com.nokia.dao;
-
-import java.util.List;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import com.nokia.pojo.Role;
-
-@SpringBootTest
-public class RoleDaoTest {
-
-    @Autowired
-    private RoleDao roleDao;
-
-    @Test
-    void testFindByUserId() {
-        List<Role> roles = roleDao.findByUserId(10);
-        System.out.println(roles);
-    }
-
-    @Test
-    void testFindRoleNameLike() {
-        List<Role> roles = roleDao.findRoleNameLike("工单");
-        System.out.println(roles);
-    }
-}

+ 0 - 24
src/test/java/com/nokia/dao/RoleEntityDaoTest.java

@@ -1,24 +0,0 @@
-package com.nokia.dao;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.nokia.pojo.Role;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import java.util.List;
-
-@SpringBootTest
-public class RoleEntityDaoTest {
-    @Autowired
-    private RoleDao roleDao;
-
-    @Test
-    public void test() {
-        Role roleEntity = new Role();
-        roleEntity.setRoleName("管理员");
-        roleDao.insert(roleEntity);
-        List<Role> roleEntities = roleDao.selectList(Wrappers.query());
-        System.out.println(roleEntities);
-    }
-}

+ 0 - 28
src/test/java/com/nokia/service/RoleServiceTest.java

@@ -1,28 +0,0 @@
-package com.nokia.service;
-
-import java.util.List;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import com.nokia.pojo.Role;
-
-@SpringBootTest
-public class RoleServiceTest {
-
-    @Autowired
-    private RoleService roleService;
-
-    @Test
-    void testGetByRoleName() {
-        Role role = roleService.getByRoleName("工单答复");
-        System.out.println(role);
-    }
-
-    @Test
-    void testGetRoleNameLike() {
-        List<Role> roles = roleService.getRoleNameLike("工单");
-        System.out.println(roles);
-    }
-}