增加 swagger 提供 API 文档功能

增加 mapstruct 提供 Bean 之间的复制
This commit is contained in:
YunaiV
2019-02-22 19:33:42 +08:00
parent aedecc44d1
commit 398d23cc9f
23 changed files with 633 additions and 38 deletions

View File

@@ -1,12 +1,15 @@
<?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.iocoder.mall.product.dao.ProductSpuMapper">
<?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.iocoder.mall.product.dao.ProductCategoryMapper">
<select id="selectById" parameterType="Integer" resultType="ProductSpuDO">
<select id="selectListByPidAndStatusOrderBySort" resultType="ProductCategoryDO">
SELECT
id
FROM product_spu
WHERE id = #{id}
id, name, pic_url, sort
FROM product_category
WHERE pid = #{pid}
AND status = #{status}
ORDER BY sort ASC
</select>
</mapper>
</mapper>

View File

@@ -0,0 +1,12 @@
<?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.iocoder.mall.product.dao.ProductSpuMapper">
<select id="selectById" parameterType="Integer" resultType="ProductSpuDO">
SELECT
id
FROM product_spu
WHERE id = #{id}
</select>
</mapper>