修改区域管理模块

This commit is contained in:
yovinchen 2023-09-15 09:29:31 +08:00
parent 8db86081eb
commit 32d2af152e
18 changed files with 44 additions and 52 deletions

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FindBugsConfigurable">

View File

@ -2,6 +2,5 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/guigu-ssyx-parent" vcs="Git" />
</component>
</project>

View File

@ -26,6 +26,22 @@
<artifactId>joda-time</artifactId>
</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>
<groupId>com.atguigu</groupId>
<artifactId>model</artifactId>

View File

@ -1,4 +1,4 @@
package com.atguigu.ssyx;
package ssyx;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.generator.AutoGenerator;

View File

@ -37,12 +37,9 @@
<artifactId>redisson</artifactId>
<version>3.11.2</version>
</dependency>
<!--mybatis-plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atguigu</groupId>
@ -50,16 +47,6 @@
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</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>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>

View File

@ -18,7 +18,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
*/
@EnableTransactionManagement
@Configuration
@MapperScan("com.atguigu.ssyx.*.mapper")
@MapperScan(value = {"com.atguigu.ssyx.*.mapper"})
public class MybatisPlusConfig {
/**

View File

@ -25,7 +25,7 @@
<java.version>1.8</java.version>
<cloud.version>Hoxton.SR8</cloud.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>
<jwt.version>0.7.0</jwt.version>
<fastjson.version>2.0.0</fastjson.version>

View File

@ -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.autoconfigure.SpringBootApplication;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
* ClassName: ServiceSysApplication
@ -13,8 +11,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
* @Create 2023/9/14 15:36
*/
@SpringBootApplication
@EnableSwagger2WebMvc
@MapperScan(value = "com.atguigu.ssyx.*.mapper")
public class ServiceSysApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceSysApplication.class, args);

View File

@ -7,10 +7,7 @@ import com.atguigu.ssyx.sys.service.RegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -25,7 +22,7 @@ import java.util.List;
@Api(value = "地区接口", tags = "地区接口")
@RestController
@RequestMapping("/admin/sys/region")
//@CrossOrigin
@CrossOrigin
public class RegionController {
@Autowired

View File

@ -10,10 +10,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* <p>
* 城市仓库关联表 前端控制器
@ -22,23 +21,21 @@ import javax.annotation.Resource;
* @author atguigu
* @since 2023-09-14
*/
@Api(value = "开通区域接口", tags = "开通区域接口")
@RestController
@RequestMapping(value = "/admin/sys/regionWare")
@Api(value = "开通区域接口", tags = "开通区域接口")
@CrossOrigin
public class RegionWareController {
@Resource
@Autowired
private RegionWareService regionWareService;
//TODO 分页查询错误
@ApiOperation(value = "获取开通区域列表")
@GetMapping("{page}/{limit}")
public Result index(
@ApiParam(name = "page", value = "当前页码", required = true)
@PathVariable Long page,
@ApiParam(name = "limit", value = "每页记录数", required = true)
@PathVariable Long limit,
@ApiParam(name = "regionWareVo", value = "查询对象", required = false)
RegionWareQueryVo regionWareQueryVo) {
public Result index(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
@ApiParam(name = "limit", value = "每页记录数", required = true) @PathVariable Long limit,
@ApiParam(name = "regionWareVo", value = "查询对象", required = false) RegionWareQueryVo regionWareQueryVo) {
try {
Page<RegionWare> pageParam = new Page<>(page, limit);
IPage<RegionWare> pageModel = regionWareService.selectPage(pageParam, regionWareQueryVo);

View File

@ -2,7 +2,7 @@ package com.atguigu.ssyx.sys.mapper;
import com.atguigu.ssyx.model.sys.Region;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;
/**
* <p>
@ -12,7 +12,7 @@ import org.mapstruct.Mapper;
* @author atguigu
* @since 2023-09-14
*/
@Mapper
@Repository
public interface RegionMapper extends BaseMapper<Region> {
}

View File

@ -2,7 +2,7 @@ package com.atguigu.ssyx.sys.mapper;
import com.atguigu.ssyx.model.sys.RegionWare;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;
/**
* <p>
@ -12,7 +12,7 @@ import org.mapstruct.Mapper;
* @author atguigu
* @since 2023-09-14
*/
@Mapper
@Repository
public interface RegionWareMapper extends BaseMapper<RegionWare> {
}

View File

@ -3,7 +3,7 @@ package com.atguigu.ssyx.sys.mapper;
import com.atguigu.ssyx.model.sys.Ware;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;
/**
* <p>
@ -13,7 +13,7 @@ import org.mapstruct.Mapper;
* @author atguigu
* @since 2023-09-14
*/
@Mapper
@Repository
public interface WareMapper extends BaseMapper<Ware> {
}

View File

@ -10,11 +10,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
/**
* <p>
* 城市仓库关联表 服务实现类
@ -27,7 +26,7 @@ import javax.annotation.Resource;
public class RegionWareServiceImpl extends ServiceImpl<RegionWareMapper, RegionWare> implements RegionWareService {
@Resource
@Autowired
RegionWareMapper regionWareMapper;
//开通区域列表
@ -41,7 +40,8 @@ public class RegionWareServiceImpl extends ServiceImpl<RegionWareMapper, RegionW
.or()
.like(RegionWare::getWareName, keyword);
}
return baseMapper.selectPage(pageParam, wrapper);
IPage<RegionWare> regionWarePage = baseMapper.selectPage(pageParam, wrapper);
return regionWarePage;
}
//添加开通区域

View File

@ -16,3 +16,4 @@ spring:
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8

View File

@ -3,4 +3,4 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://localhost:8201'
VUE_APP_BASE_API = 'http://localhost:9001'

View File

@ -3,5 +3,5 @@ ENV = 'production'
# base api
#VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://localhost:8201'
VUE_APP_BASE_API = 'http://localhost:9001'

View File

@ -2,7 +2,7 @@
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<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
}}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>