商品系统项目结构整理

This commit is contained in:
YunaiV
2019-03-03 18:04:06 +08:00
parent eddec34e5d
commit 359d6766f3
38 changed files with 200 additions and 73 deletions

View File

@@ -1,32 +1,9 @@
spring:
application:
name: product-application
# datasource
datasource:
url: jdbc:mysql://127.0.0.1:33061/mall_product?useSSL=false
driver-class-name: com.mysql.jdbc.Driver
username: root
password: 123456
# server
server:
port: 8081
# mybatis
mybatis:
config-location: classpath:mybatis-config.xml
mapper-locations: classpath:mapper/*.xml
type-aliases-package: cn.iocoder.mall.product.dataobject
# dubbo
dubbo:
registry:
address: zookeeper://127.0.0.1:2181
protocol:
port: -1
name: dubbo
scan:
base-packages: cn.iocoder.mall.product.service
demo:
service:
version: 1.0.0
port: 18081
servlet:
context-path: /product-api/

View File

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

View File

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

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<!-- 使用驼峰命名法转换字段。 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
<typeAliases>
<typeAlias alias="Integer" type="java.lang.Integer"/>
<typeAlias alias="Long" type="java.lang.Long"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/>
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap"/>
<typeAlias alias="ArrayList" type="java.util.ArrayList"/>
<typeAlias alias="LinkedList" type="java.util.LinkedList"/>
</typeAliases>
</configuration>