产品模块2
This commit is contained in:
@@ -42,11 +42,11 @@
|
||||
<version>2.2.20</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
<version>4.5</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.jsqlparser</groupId>-->
|
||||
<!-- <artifactId>jsqlparser</artifactId>-->
|
||||
<!-- <version>4.5</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- EasyExcel 核心库 -->
|
||||
<dependency>
|
||||
|
||||
@@ -10,8 +10,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
* 应用服务启动类
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@MapperScan("com.tashow.cloud.product.mapper")
|
||||
public class ProductServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -66,12 +66,11 @@ public class ProdController {
|
||||
return success(BeanUtils.toBean(prod, ProdRespVO.class));
|
||||
}
|
||||
|
||||
@PermitAll
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得商品分页")
|
||||
@PreAuthorize("@ss.hasPermission('tashow-module-product:prod:query')")
|
||||
@PermitAll
|
||||
public CommonResult<PageResult<ProdRespVO>> getProdPage(@Valid ProdPageReqVO pageReqVO) {
|
||||
PageResult<ProdDO> pageResult = prodService.getProdPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProdRespVO.class));
|
||||
public CommonResult<PageResult<List<ProdDO>>> getProdPage(@Valid ProdPageReqVO pageReqVO) {
|
||||
PageResult<List<ProdDO>> pageResult = prodService.getProdPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface ProdMapper extends BaseMapperX<ProdDO> {
|
||||
|
||||
// PageResult<ProdDO> getProdPage1(ProdPageReqVO reqVO);
|
||||
PageResult<List<ProdDO>> getProdPageList(ProdPageReqVO reqVO);
|
||||
|
||||
}
|
||||
@@ -52,6 +52,6 @@ public interface ProdService {
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 商品分页
|
||||
*/
|
||||
PageResult<ProdDO> getProdPage(ProdPageReqVO pageReqVO);
|
||||
PageResult<List<ProdDO>> getProdPage(ProdPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -68,8 +68,8 @@ public class ProdServiceImpl implements ProdService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProdDO> getProdPage(ProdPageReqVO pageReqVO) {
|
||||
return null;// prodMapper.getProdPage1(pageReqVO);
|
||||
public PageResult<List<ProdDO>> getProdPage(ProdPageReqVO pageReqVO) {
|
||||
return prodMapper.getProdPageList(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +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="com.tashow.cloud.product.mapper.CategoryMapper">
|
||||
<resultMap id="BaseResultMap" type="com.tashow.cloud.product.domain.Category">
|
||||
<id property="categoryId" column="category_id" />
|
||||
<result property="shopId" column="shop_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="icon" column="icon" />
|
||||
<result property="pic" column="pic" />
|
||||
<result property="describe" column="describe" />
|
||||
<result property="tag" column="tag" />
|
||||
<result property="seq" column="seq" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="grade" column="grade" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updater" column="updater" />
|
||||
</resultMap>
|
||||
|
||||
<select id="listByParentId" resultType="com.tashow.cloud.product.domain.Category">
|
||||
select category_id,icon,category_name,`seq`,`status`,pic from tz_category where parent_id = #{parentId} and `status` = 1 order by seq
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="tableCategory" resultType="com.tashow.cloud.product.domain.Category">
|
||||
select category_id ,parent_id ,category_name,pic,seq,status from tz_category where shop_id = #{shopId} order by seq
|
||||
</select>
|
||||
</mapper>
|
||||
-->
|
||||
@@ -8,7 +8,7 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<!-- <select id="getProdPage1" resultType="com.tashow.cloud.product.dto.ProdDO">-->
|
||||
<!-- select * from tz_prod-->
|
||||
<!-- </select>-->
|
||||
<select id="getProdPageList" resultType="java.util.List">
|
||||
select * from tz_prod
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user