修改区域管理模块
This commit is contained in:
parent
8db86081eb
commit
32d2af152e
@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="FindBugsConfigurable">
|
<component name="FindBugsConfigurable">
|
||||||
|
@ -2,6 +2,5 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/guigu-ssyx-parent" vcs="Git" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -26,6 +26,22 @@
|
|||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--mybatis-plus-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 代码生成器-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-generator</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.atguigu</groupId>
|
<groupId>com.atguigu</groupId>
|
||||||
<artifactId>model</artifactId>
|
<artifactId>model</artifactId>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.atguigu.ssyx;
|
package ssyx;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.DbType;
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
@ -37,12 +37,9 @@
|
|||||||
<artifactId>redisson</artifactId>
|
<artifactId>redisson</artifactId>
|
||||||
<version>3.11.2</version>
|
<version>3.11.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--mybatis-plus-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.atguigu</groupId>
|
<groupId>com.atguigu</groupId>
|
||||||
@ -50,16 +47,6 @@
|
|||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 代码生成器-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>mybatis-plus-generator</artifactId>
|
|
||||||
<version>3.4.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
<artifactId>velocity-engine-core</artifactId>
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
|
@ -18,7 +18,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|||||||
*/
|
*/
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
@Configuration
|
@Configuration
|
||||||
@MapperScan("com.atguigu.ssyx.*.mapper")
|
@MapperScan(value = {"com.atguigu.ssyx.*.mapper"})
|
||||||
public class MybatisPlusConfig {
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<cloud.version>Hoxton.SR8</cloud.version>
|
<cloud.version>Hoxton.SR8</cloud.version>
|
||||||
<alibaba.version>2.2.2.RELEASE</alibaba.version>
|
<alibaba.version>2.2.2.RELEASE</alibaba.version>
|
||||||
<mybatis-plus.version>3.4.1</mybatis-plus.version>
|
<mybatis-plus.version>3.4.0</mybatis-plus.version>
|
||||||
<mysql.version>8.0.30</mysql.version>
|
<mysql.version>8.0.30</mysql.version>
|
||||||
<jwt.version>0.7.0</jwt.version>
|
<jwt.version>0.7.0</jwt.version>
|
||||||
<fastjson.version>2.0.0</fastjson.version>
|
<fastjson.version>2.0.0</fastjson.version>
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package com.atguigu.ssyx.sys;
|
package com.atguigu.ssyx;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassName: ServiceSysApplication
|
* ClassName: ServiceSysApplication
|
||||||
@ -13,8 +11,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
|||||||
* @Create 2023/9/14 15:36
|
* @Create 2023/9/14 15:36
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableSwagger2WebMvc
|
|
||||||
@MapperScan(value = "com.atguigu.ssyx.*.mapper")
|
|
||||||
public class ServiceSysApplication {
|
public class ServiceSysApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(ServiceSysApplication.class, args);
|
SpringApplication.run(ServiceSysApplication.class, args);
|
@ -7,10 +7,7 @@ import com.atguigu.ssyx.sys.service.RegionService;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -25,7 +22,7 @@ import java.util.List;
|
|||||||
@Api(value = "地区接口", tags = "地区接口")
|
@Api(value = "地区接口", tags = "地区接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/admin/sys/region")
|
@RequestMapping("/admin/sys/region")
|
||||||
//@CrossOrigin
|
@CrossOrigin
|
||||||
public class RegionController {
|
public class RegionController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -10,10 +10,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 城市仓库关联表 前端控制器
|
* 城市仓库关联表 前端控制器
|
||||||
@ -22,23 +21,21 @@ import javax.annotation.Resource;
|
|||||||
* @author atguigu
|
* @author atguigu
|
||||||
* @since 2023-09-14
|
* @since 2023-09-14
|
||||||
*/
|
*/
|
||||||
@Api(value = "开通区域接口", tags = "开通区域接口")
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/admin/sys/regionWare")
|
@RequestMapping(value = "/admin/sys/regionWare")
|
||||||
|
@Api(value = "开通区域接口", tags = "开通区域接口")
|
||||||
@CrossOrigin
|
@CrossOrigin
|
||||||
public class RegionWareController {
|
public class RegionWareController {
|
||||||
@Resource
|
@Autowired
|
||||||
private RegionWareService regionWareService;
|
private RegionWareService regionWareService;
|
||||||
|
|
||||||
|
|
||||||
|
//TODO 分页查询错误
|
||||||
@ApiOperation(value = "获取开通区域列表")
|
@ApiOperation(value = "获取开通区域列表")
|
||||||
@GetMapping("{page}/{limit}")
|
@GetMapping("{page}/{limit}")
|
||||||
public Result index(
|
public Result index(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
|
||||||
@ApiParam(name = "page", value = "当前页码", required = true)
|
@ApiParam(name = "limit", value = "每页记录数", required = true) @PathVariable Long limit,
|
||||||
@PathVariable Long page,
|
@ApiParam(name = "regionWareVo", value = "查询对象", required = false) RegionWareQueryVo regionWareQueryVo) {
|
||||||
@ApiParam(name = "limit", value = "每页记录数", required = true)
|
|
||||||
@PathVariable Long limit,
|
|
||||||
@ApiParam(name = "regionWareVo", value = "查询对象", required = false)
|
|
||||||
RegionWareQueryVo regionWareQueryVo) {
|
|
||||||
try {
|
try {
|
||||||
Page<RegionWare> pageParam = new Page<>(page, limit);
|
Page<RegionWare> pageParam = new Page<>(page, limit);
|
||||||
IPage<RegionWare> pageModel = regionWareService.selectPage(pageParam, regionWareQueryVo);
|
IPage<RegionWare> pageModel = regionWareService.selectPage(pageParam, regionWareQueryVo);
|
||||||
|
@ -2,7 +2,7 @@ package com.atguigu.ssyx.sys.mapper;
|
|||||||
|
|
||||||
import com.atguigu.ssyx.model.sys.Region;
|
import com.atguigu.ssyx.model.sys.Region;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.mapstruct.Mapper;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -12,7 +12,7 @@ import org.mapstruct.Mapper;
|
|||||||
* @author atguigu
|
* @author atguigu
|
||||||
* @since 2023-09-14
|
* @since 2023-09-14
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Repository
|
||||||
public interface RegionMapper extends BaseMapper<Region> {
|
public interface RegionMapper extends BaseMapper<Region> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.atguigu.ssyx.sys.mapper;
|
|||||||
|
|
||||||
import com.atguigu.ssyx.model.sys.RegionWare;
|
import com.atguigu.ssyx.model.sys.RegionWare;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.mapstruct.Mapper;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -12,7 +12,7 @@ import org.mapstruct.Mapper;
|
|||||||
* @author atguigu
|
* @author atguigu
|
||||||
* @since 2023-09-14
|
* @since 2023-09-14
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Repository
|
||||||
public interface RegionWareMapper extends BaseMapper<RegionWare> {
|
public interface RegionWareMapper extends BaseMapper<RegionWare> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.atguigu.ssyx.sys.mapper;
|
|||||||
|
|
||||||
import com.atguigu.ssyx.model.sys.Ware;
|
import com.atguigu.ssyx.model.sys.Ware;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.mapstruct.Mapper;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -13,7 +13,7 @@ import org.mapstruct.Mapper;
|
|||||||
* @author atguigu
|
* @author atguigu
|
||||||
* @since 2023-09-14
|
* @since 2023-09-14
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Repository
|
||||||
public interface WareMapper extends BaseMapper<Ware> {
|
public interface WareMapper extends BaseMapper<Ware> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 城市仓库关联表 服务实现类
|
* 城市仓库关联表 服务实现类
|
||||||
@ -27,7 +26,7 @@ import javax.annotation.Resource;
|
|||||||
public class RegionWareServiceImpl extends ServiceImpl<RegionWareMapper, RegionWare> implements RegionWareService {
|
public class RegionWareServiceImpl extends ServiceImpl<RegionWareMapper, RegionWare> implements RegionWareService {
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
RegionWareMapper regionWareMapper;
|
RegionWareMapper regionWareMapper;
|
||||||
|
|
||||||
//开通区域列表
|
//开通区域列表
|
||||||
@ -41,7 +40,8 @@ public class RegionWareServiceImpl extends ServiceImpl<RegionWareMapper, RegionW
|
|||||||
.or()
|
.or()
|
||||||
.like(RegionWare::getWareName, keyword);
|
.like(RegionWare::getWareName, keyword);
|
||||||
}
|
}
|
||||||
return baseMapper.selectPage(pageParam, wrapper);
|
IPage<RegionWare> regionWarePage = baseMapper.selectPage(pageParam, wrapper);
|
||||||
|
return regionWarePage;
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加开通区域
|
//添加开通区域
|
||||||
|
@ -16,3 +16,4 @@ spring:
|
|||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
|
||||||
|
@ -3,4 +3,4 @@ ENV = 'development'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
# VUE_APP_BASE_API = '/dev-api'
|
# VUE_APP_BASE_API = '/dev-api'
|
||||||
VUE_APP_BASE_API = 'http://localhost:8201'
|
VUE_APP_BASE_API = 'http://localhost:9001'
|
||||||
|
@ -3,5 +3,5 @@ ENV = 'production'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
#VUE_APP_BASE_API = '/prod-api'
|
#VUE_APP_BASE_API = '/prod-api'
|
||||||
VUE_APP_BASE_API = 'http://localhost:8201'
|
VUE_APP_BASE_API = 'http://localhost:9001'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||||
<transition-group name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{
|
<span v-if="item.redirect==='noRedirect'||index===levelList.length-1" class="no-redirect">{{
|
||||||
item.meta.title
|
item.meta.title
|
||||||
}}</span>
|
}}</span>
|
||||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user