产品模块
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
--- #################### 注册中心 + 配置中心相关配置 ####################
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 43.139.42.137:8848 # Nacos 服务器地址
|
||||
username: nacos # Nacos 账号
|
||||
password: nacos # Nacos 密码
|
||||
discovery: # 【配置中心】配置项
|
||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
metadata:
|
||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||
config: # 【注册中心】配置项
|
||||
namespace: 76667956-2ac2-4e05-906b-4bca4ebcc5f0 # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
@@ -0,0 +1,12 @@
|
||||
server:
|
||||
port: 48083
|
||||
spring:
|
||||
application:
|
||||
name: product-server
|
||||
profiles:
|
||||
active: local
|
||||
config:
|
||||
import:
|
||||
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
|
||||
- optional:nacos:application.yaml # 加载【Nacos】的配置
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
|
||||
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
<?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>
|
||||
-->
|
||||
Reference in New Issue
Block a user