gongdecai 2 years ago
parent
commit
a6cc503d96

+ 7 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/oss/OssService.java

@@ -0,0 +1,7 @@
+package com.iotechn.unimall.app.api.oss;
+
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+
+@HttpOpenApi(group = "oss", description = "oss")
+public interface OssService {
+}

+ 38 - 0
unimall-core/src/main/java/com/iotechn/unimall/core/util/ConstantPropertiesUtils.java

@@ -0,0 +1,38 @@
+package com.iotechn.unimall.core.util;
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ConstantPropertiesUtils implements InitializingBean {
+
+    //读取配置文件内容
+
+    @Value("${aliyun.oss.file.endpoint}")
+    private String endpoint;
+
+    @Value("${aliyun.oss.file.keyid}")
+    private String keyId;
+
+    @Value("${aliyun.oss.file.keysecret}")
+    private String keySecret;
+
+    @Value("${aliyun.oss.file.bucketname}")
+    private String bucketName;
+
+    //定义公开的静态的常量
+    public static String END_POINT;
+    public static String ACCESS_KEY_ID;
+    public static String ACCESS_KEY_SECRET;
+    public static String BUCKET_NAME;
+
+
+    @Override
+    public void afterPropertiesSet() throws Exception {
+        END_POINT = endpoint;
+        ACCESS_KEY_ID = keyId;
+        ACCESS_KEY_SECRET = keySecret;
+        BUCKET_NAME = bucketName;
+    }
+}

+ 1 - 1
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/market/KouzhaoInfoMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.iotechn.kouzhao.data.mapper.kouzhao.KouzhaoInfoMapper">
+<mapper namespace="com.iotechn.unimall.data.mapper.market.KouzhaoInfoMapper">
     
 
 

+ 54 - 54
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/tools/gen/GenTableColumnMapper.xml

@@ -3,59 +3,59 @@
 <mapper
 	namespace="com.iotechn.unimall.data.mapper.tools.gen.GenTableColumnMapper">
 
-	<resultMap type="GenTableColumn" id="GenTableColumnResult">
-		<id property="columnId" column="column_id" />
-		<result property="tableId" column="table_id" />
-		<result property="columnName" column="column_name" />
-		<result property="columnComment" column="column_comment" />
-		<result property="columnType" column="column_type" />
-		<result property="javaType" column="java_type" />
-		<result property="javaField" column="java_field" />
-		<result property="isPk" column="is_pk" />
-		<result property="isIncrement" column="is_increment" />
-		<result property="isRequired" column="is_required" />
-		<result property="isInsert" column="is_insert" />
-		<result property="isEdit" column="is_edit" />
-		<result property="isList" column="is_list" />
-		<result property="isQuery" column="is_query" />
-		<result property="queryType" column="query_type" />
-		<result property="htmlType" column="html_type" />
-		<result property="dictType" column="dict_type" />
-		<result property="sort" column="sort" />
-		<result property="createBy" column="create_by" />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy" column="update_by" />
-		<result property="updateTime" column="update_time" />
-	</resultMap>
-	<sql id="selectDictTypeVo">
-		SELECT
-		table_id AS tableId,
-		`table_name` AS tableName,
-		table_comment AS tableComment,
-		class_name AS className,
-		tpl_category AS tplCategory,
-		package_name AS packageName,
-		module_name AS moduleName,
-		business_name AS businessName,
-		function_name AS functionName,
-		function_author AS functionAuthor,
-		create_by AS createBy,
-		create_time AS createTime,
-		update_by AS updateBy,
-		update_time AS updateTime,
-		`options`
-		FROM
-		sys_gen_table
-	</sql>
-	<select id="selectDbTableColumnsByName" parameterType="String" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTableColumn">
-		select column_name as columnName, (case when (is_nullable = 'no' <![CDATA[ && ]]>
-		column_key != 'PRI') then '1' else null end) as isRequired, (case
-		when column_key = 'PRI' then '1' else '0' end) as isPk,
-		ordinal_position as sort, column_comment as columnComment, (case when extra =
-		'auto_increment' then '1' else '0' end) as isIncrement, column_type as columnType
-		from information_schema.columns where table_schema = (select
-		database()) and table_name = (#{tableName})
-		order by ordinal_position
-	</select>
+<!--	<resultMap type="GenTableColumn" id="GenTableColumnResult">-->
+<!--		<id property="columnId" column="column_id" />-->
+<!--		<result property="tableId" column="table_id" />-->
+<!--		<result property="columnName" column="column_name" />-->
+<!--		<result property="columnComment" column="column_comment" />-->
+<!--		<result property="columnType" column="column_type" />-->
+<!--		<result property="javaType" column="java_type" />-->
+<!--		<result property="javaField" column="java_field" />-->
+<!--		<result property="isPk" column="is_pk" />-->
+<!--		<result property="isIncrement" column="is_increment" />-->
+<!--		<result property="isRequired" column="is_required" />-->
+<!--		<result property="isInsert" column="is_insert" />-->
+<!--		<result property="isEdit" column="is_edit" />-->
+<!--		<result property="isList" column="is_list" />-->
+<!--		<result property="isQuery" column="is_query" />-->
+<!--		<result property="queryType" column="query_type" />-->
+<!--		<result property="htmlType" column="html_type" />-->
+<!--		<result property="dictType" column="dict_type" />-->
+<!--		<result property="sort" column="sort" />-->
+<!--		<result property="createBy" column="create_by" />-->
+<!--		<result property="createTime" column="create_time" />-->
+<!--		<result property="updateBy" column="update_by" />-->
+<!--		<result property="updateTime" column="update_time" />-->
+<!--	</resultMap>-->
+<!--	<sql id="selectDictTypeVo">-->
+<!--		SELECT-->
+<!--		table_id AS tableId,-->
+<!--		`table_name` AS tableName,-->
+<!--		table_comment AS tableComment,-->
+<!--		class_name AS className,-->
+<!--		tpl_category AS tplCategory,-->
+<!--		package_name AS packageName,-->
+<!--		module_name AS moduleName,-->
+<!--		business_name AS businessName,-->
+<!--		function_name AS functionName,-->
+<!--		function_author AS functionAuthor,-->
+<!--		create_by AS createBy,-->
+<!--		create_time AS createTime,-->
+<!--		update_by AS updateBy,-->
+<!--		update_time AS updateTime,-->
+<!--		`options`-->
+<!--		FROM-->
+<!--		sys_gen_table-->
+<!--	</sql>-->
+<!--	<select id="selectDbTableColumnsByName" parameterType="String" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTableColumn">-->
+<!--		select column_name as columnName, (case when (is_nullable = 'no' <![CDATA[ && ]]>-->
+<!--		column_key != 'PRI') then '1' else null end) as isRequired, (case-->
+<!--		when column_key = 'PRI' then '1' else '0' end) as isPk,-->
+<!--		ordinal_position as sort, column_comment as columnComment, (case when extra =-->
+<!--		'auto_increment' then '1' else '0' end) as isIncrement, column_type as columnType-->
+<!--		from information_schema.columns where table_schema = (select-->
+<!--		database()) and table_name = (#{tableName})-->
+<!--		order by ordinal_position-->
+<!--	</select>-->
 
 </mapper>

+ 118 - 118
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/tools/gen/GenTableMapper.xml

@@ -2,124 +2,124 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.iotechn.unimall.data.mapper.tools.gen.GenTableMapper">
 
-	<resultMap type="GenTable" id="GenTableResult">
-	    <id     property="tableId"        column="table_id"        />
-		<result property="tableName"      column="table_name"      />
-		<result property="tableComment"   column="table_comment"   />
-		<result property="className"      column="class_name"      />
-		<result property="tplCategory"    column="tpl_category"    />
-		<result property="packageName"    column="package_name"    />
-		<result property="moduleName"     column="module_name"     />
-		<result property="businessName"   column="business_name"   />
-		<result property="functionName"   column="function_name"   />
-		<result property="functionAuthor" column="function_author" />
-		<result property="options"        column="options"         />
-		<result property="createBy"       column="create_by"       />
-		<result property="createTime"     column="create_time"     />
-		<result property="updateBy"       column="update_by"       />
-		<result property="updateTime"     column="update_time"     />
-		<result property="remark"         column="remark"          />
-		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />
-	</resultMap>
+<!--	<resultMap type="GenTable" id="GenTableResult">-->
+<!--	    <id     property="tableId"        column="table_id"        />-->
+<!--		<result property="tableName"      column="table_name"      />-->
+<!--		<result property="tableComment"   column="table_comment"   />-->
+<!--		<result property="className"      column="class_name"      />-->
+<!--		<result property="tplCategory"    column="tpl_category"    />-->
+<!--		<result property="packageName"    column="package_name"    />-->
+<!--		<result property="moduleName"     column="module_name"     />-->
+<!--		<result property="businessName"   column="business_name"   />-->
+<!--		<result property="functionName"   column="function_name"   />-->
+<!--		<result property="functionAuthor" column="function_author" />-->
+<!--		<result property="options"        column="options"         />-->
+<!--		<result property="createBy"       column="create_by"       />-->
+<!--		<result property="createTime"     column="create_time"     />-->
+<!--		<result property="updateBy"       column="update_by"       />-->
+<!--		<result property="updateTime"     column="update_time"     />-->
+<!--		<result property="remark"         column="remark"          />-->
+<!--		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />-->
+<!--	</resultMap>-->
 
-	<resultMap type="GenTableColumn" id="GenTableColumnResult">
-        <id     property="columnId"       column="column_id"      />
-        <result property="tableId"        column="table_id"       />
-        <result property="columnName"     column="column_name"    />
-        <result property="columnComment"  column="column_comment" />
-        <result property="columnType"     column="column_type"    />
-        <result property="javaType"       column="java_type"      />
-        <result property="javaField"      column="java_field"     />
-        <result property="isPk"           column="is_pk"          />
-        <result property="isIncrement"    column="is_increment"   />
-        <result property="isRequired"     column="is_required"    />
-        <result property="isInsert"       column="is_insert"      />
-        <result property="isEdit"         column="is_edit"        />
-        <result property="isList"         column="is_list"        />
-        <result property="isQuery"        column="is_query"       />
-        <result property="queryType"      column="query_type"     />
-        <result property="htmlType"       column="html_type"      />
-        <result property="dictType"       column="dict_type"      />
-        <result property="sort"           column="sort"           />
-        <result property="createBy"       column="create_by"      />
-        <result property="createTime"     column="create_time"    />
-        <result property="updateBy"       column="update_by"      />
-        <result property="updateTime"     column="update_time"    />
-    </resultMap>
-	<sql id="selectDictTypeVo">
-		SELECT
-			table_id AS tableId,
-			`table_name` AS tableName,
-			table_comment AS tableComment,
-			class_name AS className,
-			tpl_category AS tplCategory,
-			package_name AS packageName,
-			module_name AS moduleName,
-			business_name AS businessName,
-			function_name AS functionName,
-			function_author AS functionAuthor,
-			create_by AS createBy,
-			create_time AS createTime,
-			update_by AS updateBy,
-			update_time AS updateTime,
-			`options`
-		FROM
-			sys_gen_table
-	</sql>
-	<select id="selectDbTableListByNames"  resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">
-		SELECT
-        table_name as tableName,
-        table_comment as tableComment,
-        create_time as createTime,
-        update_time as updateTime
-		FROM
-			information_schema.TABLES
-		WHERE
-			table_schema = ( SELECT DATABASE ( ) )
-			AND table_name NOT LIKE 'qrtz_%'
-			AND table_name NOT LIKE 'gen_%'
-			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )
-			AND table_name in
-			<foreach  item="item" collection="array" index="index"  open="(" separator="," close=")">
-			#{item}
-			</foreach>
-	</select>
-	<select id="selectDbTableList" parameterType="GenTable" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">
-		SELECT
-			table_name as tableName,
-			table_comment as tableComment,
-			create_time as createTime,
-			update_time as updateTime
-		FROM
-			information_schema.TABLES
-		WHERE
-			table_schema = ( SELECT DATABASE ( ) )
-			AND table_name NOT LIKE 'qrtz_%'
-			AND table_name NOT LIKE 'gen_%'
-			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )
-		<if test="tableName != null and tableName != ''">
-			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
-		</if>
-		<if test="tableComment != null and tableComment != ''">
-			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
-		</if>
-	</select>
-	<select id="selectDbTableCount" parameterType="GenTable" resultType="java.lang.Integer">
-		SELECT
-			COUNT(*)
-		FROM
-			information_schema.TABLES
-		WHERE
-			table_schema = ( SELECT DATABASE ( ) )
-			AND table_name NOT LIKE 'qrtz_%'
-			AND table_name NOT LIKE 'gen_%'
-			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )
-		<if test="tableName != null and tableName != ''">
-			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
-		</if>
-		<if test="tableComment != null and tableComment != ''">
-			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
-		</if>
-	</select>
+<!--	<resultMap type="GenTableColumn" id="GenTableColumnResult">-->
+<!--        <id     property="columnId"       column="column_id"      />-->
+<!--        <result property="tableId"        column="table_id"       />-->
+<!--        <result property="columnName"     column="column_name"    />-->
+<!--        <result property="columnComment"  column="column_comment" />-->
+<!--        <result property="columnType"     column="column_type"    />-->
+<!--        <result property="javaType"       column="java_type"      />-->
+<!--        <result property="javaField"      column="java_field"     />-->
+<!--        <result property="isPk"           column="is_pk"          />-->
+<!--        <result property="isIncrement"    column="is_increment"   />-->
+<!--        <result property="isRequired"     column="is_required"    />-->
+<!--        <result property="isInsert"       column="is_insert"      />-->
+<!--        <result property="isEdit"         column="is_edit"        />-->
+<!--        <result property="isList"         column="is_list"        />-->
+<!--        <result property="isQuery"        column="is_query"       />-->
+<!--        <result property="queryType"      column="query_type"     />-->
+<!--        <result property="htmlType"       column="html_type"      />-->
+<!--        <result property="dictType"       column="dict_type"      />-->
+<!--        <result property="sort"           column="sort"           />-->
+<!--        <result property="createBy"       column="create_by"      />-->
+<!--        <result property="createTime"     column="create_time"    />-->
+<!--        <result property="updateBy"       column="update_by"      />-->
+<!--        <result property="updateTime"     column="update_time"    />-->
+<!--    </resultMap>-->
+<!--	<sql id="selectDictTypeVo">-->
+<!--		SELECT-->
+<!--			table_id AS tableId,-->
+<!--			`table_name` AS tableName,-->
+<!--			table_comment AS tableComment,-->
+<!--			class_name AS className,-->
+<!--			tpl_category AS tplCategory,-->
+<!--			package_name AS packageName,-->
+<!--			module_name AS moduleName,-->
+<!--			business_name AS businessName,-->
+<!--			function_name AS functionName,-->
+<!--			function_author AS functionAuthor,-->
+<!--			create_by AS createBy,-->
+<!--			create_time AS createTime,-->
+<!--			update_by AS updateBy,-->
+<!--			update_time AS updateTime,-->
+<!--			`options`-->
+<!--		FROM-->
+<!--			sys_gen_table-->
+<!--	</sql>-->
+<!--	<select id="selectDbTableListByNames"  resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">-->
+<!--		SELECT-->
+<!--        table_name as tableName,-->
+<!--        table_comment as tableComment,-->
+<!--        create_time as createTime,-->
+<!--        update_time as updateTime-->
+<!--		FROM-->
+<!--			information_schema.TABLES-->
+<!--		WHERE-->
+<!--			table_schema = ( SELECT DATABASE ( ) )-->
+<!--			AND table_name NOT LIKE 'qrtz_%'-->
+<!--			AND table_name NOT LIKE 'gen_%'-->
+<!--			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )-->
+<!--			AND table_name in-->
+<!--			<foreach  item="item" collection="array" index="index"  open="(" separator="," close=")">-->
+<!--			#{item}-->
+<!--			</foreach>-->
+<!--	</select>-->
+<!--	<select id="selectDbTableList" parameterType="GenTable" resultType="com.iotechn.unimall.data.domain.tools.gen.GenTable">-->
+<!--		SELECT-->
+<!--			table_name as tableName,-->
+<!--			table_comment as tableComment,-->
+<!--			create_time as createTime,-->
+<!--			update_time as updateTime-->
+<!--		FROM-->
+<!--			information_schema.TABLES-->
+<!--		WHERE-->
+<!--			table_schema = ( SELECT DATABASE ( ) )-->
+<!--			AND table_name NOT LIKE 'qrtz_%'-->
+<!--			AND table_name NOT LIKE 'gen_%'-->
+<!--			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )-->
+<!--		<if test="tableName != null and tableName != ''">-->
+<!--			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))-->
+<!--		</if>-->
+<!--		<if test="tableComment != null and tableComment != ''">-->
+<!--			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))-->
+<!--		</if>-->
+<!--	</select>-->
+<!--	<select id="selectDbTableCount" parameterType="GenTable" resultType="java.lang.Integer">-->
+<!--		SELECT-->
+<!--			COUNT(*)-->
+<!--		FROM-->
+<!--			information_schema.TABLES-->
+<!--		WHERE-->
+<!--			table_schema = ( SELECT DATABASE ( ) )-->
+<!--			AND table_name NOT LIKE 'qrtz_%'-->
+<!--			AND table_name NOT LIKE 'gen_%'-->
+<!--			AND table_name NOT IN ( SELECT table_name FROM sys_gen_table )-->
+<!--		<if test="tableName != null and tableName != ''">-->
+<!--			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))-->
+<!--		</if>-->
+<!--		<if test="tableComment != null and tableComment != ''">-->
+<!--			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))-->
+<!--		</if>-->
+<!--	</select>-->
 
 </mapper>

+ 16 - 5
unimall-launcher/src/main/resources/application.properties

@@ -37,6 +37,15 @@ spring.lock-redis.host=127.0.0.1
 spring.lock-redis.port=6379
 #spring.lock-redis.password=123456
 
+
+#服务名
+spring.application.name=service_oss
+
+#环境设置:dev test prod
+spring.profiles.active=dev
+
+
+
 ########################################################
 ###Freemarkder \u6A21\u7248\u5F15\u64CE \u7528\u6237\u751F\u6210Api\u6587\u6863
 ########################################################
@@ -75,13 +84,15 @@ api01.aliyun.appcode=07a738b1651e43a7acc1433d265ac20b
 ########################################################
 ###OSS 文件上传配置
 ########################################################
-oss.aliyun.oss.accessId=LTAI4G9c14PgKvM23WZ9zrpc
-oss.aliyun.oss.accessKey=FpClTp4OVrRRtHEfi3lBOWUoLxKieW
-oss.aliyun.oss.endpoint=oss-cn-beijing.aliyuncs.com
-oss.aliyun.oss.bucket=taohaoliang
+oss.aliyun.oss.accessId=LTAI5tCpbjqUvxF6yv398TvT
+oss.aliyun.oss.accessKey=jM1gUo6w3p1SqGtHgWURXj6sTcaiCT
+oss.aliyun.oss.endpoint=oss-cn-hangzhou.aliyuncs.com
+oss.aliyun.oss.bucket=kouzhaobucket
 oss.aliyun.oss.callbackUrl=
 oss.aliyun.oss.dir=imgs/
-oss.aliyun.oss.basekUrl=https://taohaoliang.oss-cn-beijing.aliyuncs.com/
+oss.aliyun.oss.basekUrl=https://kouzhaobucket.oss-cn-beijing.aliyuncs.com/
+
+
 
 ########################################################
 ### 微信 小程序、APP、H5信息