1.修改测试环境配置
2.修改country_info 表名为server_country_info 3.修改new_hosts表名为 server_new_hosts
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -14,7 +14,7 @@
|
||||
<groupId>com.yupi</groupId>
|
||||
<artifactId>springboot-init</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>springboot-init</name>
|
||||
<name>tk-dataSave</name>
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
</properties>
|
||||
|
||||
@@ -42,8 +42,10 @@ public class LogInterceptor {
|
||||
Object[] args = point.getArgs();
|
||||
String reqParam = "[" + StringUtils.join(args, ", ") + "]";
|
||||
// 输出请求日志
|
||||
log.info("request start,id: {}, path: {}, ip: {}, params: {}", requestId, url,
|
||||
httpServletRequest.getRemoteHost(), reqParam);
|
||||
// log.info("request start,id: {}, path: {}, ip: {}, params: {}", requestId, url,
|
||||
// httpServletRequest.getRemoteHost(), reqParam);
|
||||
log.info("request start,id: {}, path: {}, ip: {}", requestId, url,
|
||||
httpServletRequest.getRemoteHost());
|
||||
// 执行原方法
|
||||
Object result = point.proceed();
|
||||
// 输出响应日志
|
||||
|
||||
@@ -88,6 +88,12 @@ public class NewHosts {
|
||||
@ApiModelProperty(value = "租户 Id", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* 租户 Id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户 Id", example = "1")
|
||||
private Long userId;
|
||||
/**
|
||||
* 入库人
|
||||
*/
|
||||
|
||||
@@ -8,9 +8,9 @@ spring:
|
||||
# todo 需替换配置
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/ruoyi-vue-pro?rewriteBatchedStatements=true
|
||||
url: jdbc:mysql://120.26.251.180:3326/new_tkdata?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: 123asd
|
||||
password: wfn53400
|
||||
# Redis 配置
|
||||
# todo 需替换配置
|
||||
redis:
|
||||
@@ -18,11 +18,12 @@ spring:
|
||||
host: localhost
|
||||
port: 6379
|
||||
timeout: 5000
|
||||
password: Ofl1xafvbJFtQFo
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
port: 5672
|
||||
username: guest
|
||||
password: guest
|
||||
username: root
|
||||
password: 123asd
|
||||
listener:
|
||||
simple:
|
||||
acknowledge-mode: manual
|
||||
|
||||
@@ -6,7 +6,7 @@ spring:
|
||||
name: springboot-init
|
||||
# 默认 dev 环境
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
# 支持 swagger3
|
||||
mvc:
|
||||
pathmatch:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.yupi.springbootinit.mapper.CountryInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.CountryInfo">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table country_info-->
|
||||
<!--@Table server_country_info-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<id column="country_id" jdbcType="VARCHAR" property="countryId" />
|
||||
<result column="country_group" jdbcType="VARCHAR" property="countryGroup" />
|
||||
@@ -25,19 +25,19 @@
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from country_info
|
||||
from server_country_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and country_id = #{countryId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
delete from country_info
|
||||
delete from server_country_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and country_id = #{countryId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.CountryInfo" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into country_info (country_id, country_group, country_group_name,
|
||||
insert into server_country_info (country_id, country_group, country_group_name,
|
||||
country_name, `language`, language_name,
|
||||
create_time, creator, update_time,
|
||||
updater)
|
||||
@@ -48,7 +48,7 @@
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.CountryInfo" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into country_info
|
||||
insert into server_country_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="countryId != null">
|
||||
country_id,
|
||||
@@ -116,7 +116,7 @@
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yupi.springbootinit.model.entity.CountryInfo">
|
||||
<!--@mbg.generated-->
|
||||
update country_info
|
||||
update server_country_info
|
||||
<set>
|
||||
<if test="countryGroup != null">
|
||||
country_group = #{countryGroup,jdbcType=VARCHAR},
|
||||
@@ -151,7 +151,7 @@
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yupi.springbootinit.model.entity.CountryInfo">
|
||||
<!--@mbg.generated-->
|
||||
update country_info
|
||||
update server_country_info
|
||||
set country_group = #{countryGroup,jdbcType=VARCHAR},
|
||||
country_group_name = #{countryGroupName,jdbcType=VARCHAR},
|
||||
country_name = #{countryName,jdbcType=VARCHAR},
|
||||
@@ -167,8 +167,8 @@
|
||||
|
||||
<select id="selectCountryGroupCountryByCountryName" resultType="com.yupi.springbootinit.model.vo.country.CountryInfoVO">
|
||||
SELECT c2.country_name as countryName
|
||||
FROM country_info c1
|
||||
JOIN country_info c2 ON c1.country_group = c2.country_group
|
||||
FROM server_country_info c1
|
||||
JOIN server_country_info c2 ON c1.country_group = c2.country_group
|
||||
WHERE c1.country_name = #{countryName,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.yupi.springbootinit.mapper.NewHostsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yupi.springbootinit.model.entity.NewHosts">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table new_hosts-->
|
||||
<!--@Table server_new_hosts-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="hosts_id" jdbcType="VARCHAR" property="hostsId" />
|
||||
<result column="hosts_level" jdbcType="VARCHAR" property="hostsLevel" />
|
||||
@@ -30,17 +30,17 @@
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from new_hosts
|
||||
from server_new_hosts
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<!--@mbg.generated-->
|
||||
delete from new_hosts
|
||||
delete from server_new_hosts
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts (hosts_id, hosts_level, hosts_coins,
|
||||
insert into server_new_hosts (hosts_id, hosts_level, hosts_coins,
|
||||
Invitation_type, online_fans,fans, fllowernum,
|
||||
yesterday_coins, country, hosts_kind,
|
||||
tenant_id, creator
|
||||
@@ -52,7 +52,7 @@
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yupi.springbootinit.model.entity.NewHosts" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts
|
||||
insert into server_new_hosts
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="hostsId != null">
|
||||
hosts_id,
|
||||
@@ -144,7 +144,7 @@
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yupi.springbootinit.model.entity.NewHosts">
|
||||
<!--@mbg.generated-->
|
||||
update new_hosts
|
||||
update server_new_hosts
|
||||
<set>
|
||||
<if test="hostsId != null">
|
||||
hosts_id = #{hostsId,jdbcType=VARCHAR},
|
||||
@@ -193,7 +193,7 @@
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yupi.springbootinit.model.entity.NewHosts">
|
||||
<!--@mbg.generated-->
|
||||
update new_hosts
|
||||
update server_new_hosts
|
||||
set hosts_id = #{hostsId,jdbcType=VARCHAR},
|
||||
hosts_level = #{hostsLevel,jdbcType=VARCHAR},
|
||||
hosts_coins = #{hostsCoins,jdbcType=INTEGER},
|
||||
@@ -212,15 +212,15 @@
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into new_hosts
|
||||
insert into server_new_hosts
|
||||
(hosts_id, hosts_level, hosts_coins, Invitation_type, online_fans,fans, fllowernum, yesterday_coins,
|
||||
country, hosts_kind, tenant_id, creator)
|
||||
country, hosts_kind, tenant_id, creator, user_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.hostsId,jdbcType=VARCHAR}, #{item.hostsLevel,jdbcType=VARCHAR}, #{item.hostsCoins,jdbcType=INTEGER},
|
||||
#{item.invitationType,jdbcType=INTEGER}, #{item.onlineFans,jdbcType=INTEGER},#{item.fans,jdbcType=INTEGER},
|
||||
#{item.fllowernum,jdbcType=INTEGER}, #{item.yesterdayCoins,jdbcType=INTEGER}, #{item.country,jdbcType=VARCHAR},
|
||||
#{item.hostsKind,jdbcType=VARCHAR}, #{item.tenantId,jdbcType=BIGINT}, #{item.creator,jdbcType=INTEGER})
|
||||
#{item.hostsKind,jdbcType=VARCHAR}, #{item.tenantId,jdbcType=BIGINT}, #{item.creator,jdbcType=INTEGER},#{item.userId,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user