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