多环境

This commit is contained in:
Jerry Yan 2024-12-17 15:27:17 +08:00
parent d308ef9bca
commit b3b7590775
7 changed files with 231 additions and 112 deletions

View File

@ -0,0 +1,108 @@
server:
port: 8030
spring:
application:
name: basic
main:
allow-bean-definition-overriding: true
mvc:
# 启用hiddenMethod过滤器(头像上传)
hiddenmethod:
filter:
enabled: true
datasource: # 数据源的相关配置
type: com.zaxxer.hikari.HikariDataSource # 数据源类型HikariCP
driver-class-name: com.mysql.cj.jdbc.Driver # mysql驱动
url: jdbc:mysql://8.134.112.96:3306/liuying_mgmt_re?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: yckj2017
hikari:
connection-timeout: 30000 # 等待连接池分配连接的最大时长毫秒超过这个时长还没可用的连接则发生SQLException 默认:30秒
minimum-idle: 5 # 最小连接数
maximum-pool-size: 20 # 最大连接数
auto-commit: true # 事务自动提交
idle-timeout: 60000 # 连接超时的最大时长(毫秒)
pool-name: DateSourceHikariCP # 连接池名字
max-lifetime: 180000 # 连接的生命时长(毫秒)
connection-test-query: SELECT 1 # 连接测试语句
jackson:
date-format: "yyyy-MM-dd HH:mm:ss"
time-zone: GMT+8
redis:
host: 10.59.3.242
port: 6379
# 密码过于复杂需要使用''引起来,要不可能导致项目无法启动,因为无法识别特殊字符
password: yckj2018
jedis:
pool:
max-active: -1 # 连接池最大连接数(使用负值表示没有限制)
min-idle: 1 # 连接池中的最小空闲连接
time-between-eviction-runs: 3000
timeout: 40000
# 配置用户头像存放静态资源文件夹
resources:
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
# 配置请求文件大小
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# MyBatis
mybatis-plus:
configuration:
# 开启驼峰命名法
map-underscore-to-camel-case: true
use-generated-keys: true
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 指定使用的日志配置文件
logging:
config: classpath:logback-spring.xml
# 微信小程序相关配置
wx:
# 公众号的appId
appId: fix
# 公众号的密钥
appSecret: fix
# 小程序的AppId
miniProgramAppId: wxe7ff26af70bfc37c
# 小程序的secret
miniProgramSecret: 5252fbbc68513bc77b7cc0052b9f9695
# 申请openid授权
grandType: authorization_code
# 推送模板
push:
templateId: 5b8vTm7kvwYubqDxb3dxBqFIhc3Swt5l7QHSK5r-ZRI
# 商户号
mchId: 1700540331
# 商户证书序列号
mchSerialNo: 2AD248A1D15F0056D6AEC20B4EEF53F3C32CBFF0
# 支付回调接口地址
payNotifyUrl: https://xxxx/a/biz/wxpay/payNotify
# 退款回调接口地址
refundNotifyUrl: https://xxxx/a/biz/wxpay/payNotify
# 商户API私钥路径
keyPath: module-app/src/main/resources/cert/apiclient_key.pem
# 商户APIV3密钥
apiV3: ZHENTUAIzhentuaiZHENTUAIzhentuai
# 人脸合格得分
face:
score: 80
#阿里云OSS
aliYunOss:
endpoint: "https://oss-cn-shanghai.aliyuncs.com"
accessKeyId: "LTAI5tCa641QdNHH9Ybg9u7V"
accessKeySecret: "RRVIgekoqx96Fgm2Gs7eQshMShcEpk"
bucketName: "frametour-assets"
objectName: "user-faces/"
url: "https://frametour-assets.oss-cn-shanghai.aliyuncs.com/"
region: "cn-shanghai"
#阿里云人脸检测
aliYunFace:
accessKeyId: "LTAI5tMwrmxVcUEKoH5QzLHx"
accessKeySecret: "ZCIP8aKx1jwX1wkeYIPQEDZ8fPtN1c"
region: "cn-shanghai"

View File

@ -0,0 +1,108 @@
server:
port: 8030
spring:
application:
name: basic
main:
allow-bean-definition-overriding: true
mvc:
# 启用hiddenMethod过滤器(头像上传)
hiddenmethod:
filter:
enabled: true
datasource: # 数据源的相关配置
type: com.zaxxer.hikari.HikariDataSource # 数据源类型HikariCP
driver-class-name: com.mysql.cj.jdbc.Driver # mysql驱动
url: jdbc:mysql://106.14.162.214:3306/zt?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: zt
password: ZhEnTuAi2024zHeNtUaI
hikari:
connection-timeout: 30000 # 等待连接池分配连接的最大时长毫秒超过这个时长还没可用的连接则发生SQLException 默认:30秒
minimum-idle: 5 # 最小连接数
maximum-pool-size: 20 # 最大连接数
auto-commit: true # 事务自动提交
idle-timeout: 60000 # 连接超时的最大时长(毫秒)
pool-name: DateSourceHikariCP # 连接池名字
max-lifetime: 180000 # 连接的生命时长(毫秒)
connection-test-query: SELECT 1 # 连接测试语句
jackson:
date-format: "yyyy-MM-dd HH:mm:ss"
time-zone: GMT+8
redis:
host: 127.0.0.1
port: 6379
# 密码过于复杂需要使用''引起来,要不可能导致项目无法启动,因为无法识别特殊字符
password: ''
jedis:
pool:
max-active: -1 # 连接池最大连接数(使用负值表示没有限制)
min-idle: 1 # 连接池中的最小空闲连接
time-between-eviction-runs: 3000
timeout: 40000
# 配置用户头像存放静态资源文件夹
resources:
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
# 配置请求文件大小
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# MyBatis
mybatis-plus:
configuration:
# 开启驼峰命名法
map-underscore-to-camel-case: true
use-generated-keys: true
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 指定使用的日志配置文件
logging:
config: classpath:logback-spring.xml
# 微信小程序相关配置
wx:
# 公众号的appId
appId: fix
# 公众号的密钥
appSecret: fix
# 小程序的AppId
miniProgramAppId: wxe7ff26af70bfc37c
# 小程序的secret
miniProgramSecret: 5252fbbc68513bc77b7cc0052b9f9695
# 申请openid授权
grandType: authorization_code
# 推送模板
push:
templateId: 5b8vTm7kvwYubqDxb3dxBqFIhc3Swt5l7QHSK5r-ZRI
# 商户号
mchId: 1700540331
# 商户证书序列号
mchSerialNo: 2AD248A1D15F0056D6AEC20B4EEF53F3C32CBFF0
# 支付回调接口地址
payNotifyUrl: https://xxxx/a/biz/wxpay/payNotify
# 退款回调接口地址
refundNotifyUrl: https://xxxx/a/biz/wxpay/payNotify
# 商户API私钥路径
keyPath: module-app/src/main/resources/cert/apiclient_key.pem
# 商户APIV3密钥
apiV3: ZHENTUAIzhentuaiZHENTUAIzhentuai
# 人脸合格得分
face:
score: 80
#阿里云OSS
aliYunOss:
endpoint: "https://oss-cn-shanghai.aliyuncs.com"
accessKeyId: "LTAI5tCa641QdNHH9Ybg9u7V"
accessKeySecret: "RRVIgekoqx96Fgm2Gs7eQshMShcEpk"
bucketName: "frametour-assets"
objectName: "user-faces/"
url: "https://frametour-assets.oss-cn-shanghai.aliyuncs.com/"
region: "cn-shanghai"
#阿里云人脸检测
aliYunFace:
accessKeyId: "LTAI5tMwrmxVcUEKoH5QzLHx"
accessKeySecret: "ZCIP8aKx1jwX1wkeYIPQEDZ8fPtN1c"
region: "cn-shanghai"

View File

@ -1,108 +1,3 @@
server:
port: 8030
spring:
application:
name: basic
main:
allow-bean-definition-overriding: true
mvc:
# 启用hiddenMethod过滤器(头像上传)
hiddenmethod:
filter:
enabled: true
datasource: # 数据源的相关配置
type: com.zaxxer.hikari.HikariDataSource # 数据源类型HikariCP
driver-class-name: com.mysql.cj.jdbc.Driver # mysql驱动
url: jdbc:mysql://8.134.112.96:3306/liuying_mgmt_re?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: yckj2017
hikari:
connection-timeout: 30000 # 等待连接池分配连接的最大时长毫秒超过这个时长还没可用的连接则发生SQLException 默认:30秒
minimum-idle: 5 # 最小连接数
maximum-pool-size: 20 # 最大连接数
auto-commit: true # 事务自动提交
idle-timeout: 60000 # 连接超时的最大时长(毫秒)
pool-name: DateSourceHikariCP # 连接池名字
max-lifetime: 180000 # 连接的生命时长(毫秒)
connection-test-query: SELECT 1 # 连接测试语句
jackson:
date-format: "yyyy-MM-dd HH:mm:ss"
time-zone: GMT+8
redis:
host: 10.59.3.242
port: 6379
# 密码过于复杂需要使用''引起来,要不可能导致项目无法启动,因为无法识别特殊字符
password: yckj2018
jedis:
pool:
max-active: -1 # 连接池最大连接数(使用负值表示没有限制)
min-idle: 1 # 连接池中的最小空闲连接
time-between-eviction-runs: 3000
timeout: 40000
# 配置用户头像存放静态资源文件夹
resources:
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
# 配置请求文件大小
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# MyBatis
mybatis-plus:
configuration:
# 开启驼峰命名法
map-underscore-to-camel-case: true
use-generated-keys: true
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 指定使用的日志配置文件
logging:
config: classpath:logback-spring.xml
# 微信小程序相关配置
wx:
# 公众号的appId
appId: fix
# 公众号的密钥
appSecret: fix
# 小程序的AppId
miniProgramAppId: wxe7ff26af70bfc37c
# 小程序的secret
miniProgramSecret: 5252fbbc68513bc77b7cc0052b9f9695
# 申请openid授权
grandType: authorization_code
# 推送模板
push:
templateId: 5b8vTm7kvwYubqDxb3dxBqFIhc3Swt5l7QHSK5r-ZRI
# 商户号
mchId: 1700540331
# 商户证书序列号
mchSerialNo: 2AD248A1D15F0056D6AEC20B4EEF53F3C32CBFF0
# 支付回调接口地址
payNotifyUrl: https://xxxx/a/biz/wxpay/payNotify
# 退款回调接口地址
refundNotifyUrl: https://xxxx/a/biz/wxpay/payNotify
# 商户API私钥路径
keyPath: module-app/src/main/resources/cert/apiclient_key.pem
# 商户APIV3密钥
apiV3: ZHENTUAIzhentuaiZHENTUAIzhentuai
# 人脸合格得分
face:
score: 80
#阿里云OSS
aliYunOss:
endpoint: "https://oss-cn-shanghai.aliyuncs.com"
accessKeyId: "LTAI5tCa641QdNHH9Ybg9u7V"
accessKeySecret: "RRVIgekoqx96Fgm2Gs7eQshMShcEpk"
bucketName: "frametour-assets"
objectName: "user-faces/"
url: "https://frametour-assets.oss-cn-shanghai.aliyuncs.com/"
region: "cn-shanghai"
#阿里云人脸检测
aliYunFace:
accessKeyId: "LTAI5tMwrmxVcUEKoH5QzLHx"
accessKeySecret: "ZCIP8aKx1jwX1wkeYIPQEDZ8fPtN1c"
region: "cn-shanghai"
profiles:
active: dev

View File

@ -52,7 +52,7 @@
delete from device where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO">
select d.id, scenic_id, d.name, no, d.longitude, d.latitude, d.status, create_at, d.update_at, s.name scenic_name, d.keepalive_at
select d.id, scenic_id, d.name, no, d.longitude, d.latitude, d.status, create_at, d.update_at, s.name scenic_name, d.keepalive_at, d.online
from device d
left join scenic s on d.scenic_id = s.id
<where>

View File

@ -50,6 +50,7 @@
<result column="create_at" property="createAt"/>
<result column="update_at" property="updateAt"/>
<result column="coverUrl" property="coverUrl"/>
<result column="shootingTime" property="shootingTime"/>
<collection property="orderItemList" select="getOrderItemList" column="id" ofType="com.ycwl.basic.model.pc.order.resp.OrderItemVO">
<result column="oiId" property="id"/>
<result column="orderId" property="orderId"/>
@ -278,7 +279,7 @@
</select>
<select id="appList" resultMap="AppBaseResultMap">
select DISTINCT o.id, o.member_id,m.nickname ,m.real_name , o.openid, o.price, pay_price, remark, o.broker_id, o.promo_code,
refund_reason, refund_status, o.`status`, refund_at, pay_at, cancel_at, o.goods_type,
refund_reason, refund_status, o.`status`, o.create_at, refund_at, pay_at, cancel_at, o.goods_type, vd.create_time shootingTime,
t.cover_url coverUrl
from `order` AS o
left join member m on o.member_id = m.id

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ycwl.basic.mapper.SourceMapper">
<insert id="add">
insert into source(id, scenic_id, device_id, member_id, url, video_url, `type`, face_sample_id)
values (#{id}, #{scenicId}, #{deviceId}, #{memberId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId})
insert into source(id, scenic_id, device_id, member_id, url, video_url, `type`, face_sample_id, pos_json)
values (#{id}, #{scenicId}, #{deviceId}, #{memberId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId}, #{posJson})
</insert>
<update id="update">
update source
@ -16,6 +16,7 @@
<if test="isBuy!=null">is_buy = #{isBuy}, </if>
<if test="type!=null">`type` = #{type}, </if>
<if test="faceSampleId!= null">face_sample_id = #{faceSampleId}, </if>
<if test="posJson!= null">pos_json = #{posJson}, </if>
</set>
where id = #{id}
</update>
@ -80,4 +81,10 @@
</foreach>
and type = 1
</select>
<select id="findBySampleId" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
select *
from source
where type = 2 and face_sample_id = #{faceSampleId}
limit 1
</select>
</mapper>

View File

@ -49,7 +49,7 @@
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
t.name templateName,t.price templatePrice,v.is_buy isBuy,
t.name templateName,t.price templatePrice,v.is_buy isBuy, t.cover_url templateCoverUrl,
s.name scenicName
from video v
left join scenic s on v.scenic_id = s.id