Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-message
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-message
Commits
bb5b34f3
Commit
bb5b34f3
authored
Sep 16, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
310d9b92
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
186 deletions
+6
-186
TabCityMapper.java
src/main/java/com/gic/message/dao/mapper/TabCityMapper.java
+0
-63
TestMapper.java
src/main/java/com/gic/message/dao/mapper/TestMapper.java
+4
-0
KafkaMessageServiceImpl.java
...com/gic/message/service/impl/KafkaMessageServiceImpl.java
+2
-2
TabCityMapper.xml
src/main/resources/mapper/TabCityMapper.xml
+0
-121
No files found.
src/main/java/com/gic/message/dao/mapper/TabCityMapper.java
deleted
100644 → 0
View file @
310d9b92
package
com
.
gic
.
message
.
dao
.
mapper
;
import
com.gic.store.entity.TabCity
;
import
java.util.List
;
public
interface
TabCityMapper
{
/**
* 根据主键删除
*
* @param cityId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
String
cityId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabCity
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabCity
record
);
/**
* 根据主键查询
*
* @param cityId 主键
* @return 实体对象
*/
TabCity
selectByPrimaryKey
(
String
cityId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabCity
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabCity
record
);
/**
* 查询所有城市
* @return
*/
List
<
TabCity
>
selectAllCity
();
}
\ No newline at end of file
src/main/java/com/gic/message/dao/mapper/TestMapper.java
0 → 100644
View file @
bb5b34f3
package
com
.
gic
.
message
.
dao
.
mapper
;
public
class
TestMapper
{
}
src/main/java/com/gic/message/service/impl/KafkaMessageServiceImpl.java
View file @
bb5b34f3
...
...
@@ -11,7 +11,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
private
static
final
Logger
log
=
LogManager
.
getLogger
(
KafkaMessageServiceImpl
.
class
);
@Override
public
void
onMessage
(
ConsumerRecord
<
String
,
GicRecord
>
stringGicRecordC
onsumerRecord
)
{
log
.
info
(
"接收kafka消息,内容为
:{}"
,
JSON
.
toJSONString
(
stringGicRecordConsumerRecord
));
public
void
onMessage
(
ConsumerRecord
<
String
,
GicRecord
>
c
onsumerRecord
)
{
log
.
info
(
"接收kafka消息,内容为
111:"
+
consumerRecord
.
value
(
));
}
}
src/main/resources/mapper/TabCityMapper.xml
deleted
100644 → 0
View file @
310d9b92
<?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.gic.store.dao.mapper.TabCityMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabCity"
>
<id
column=
"city_id"
jdbcType=
"VARCHAR"
property=
"cityId"
/>
<result
column=
"city_name"
jdbcType=
"VARCHAR"
property=
"cityName"
/>
<result
column=
"province_id"
jdbcType=
"VARCHAR"
property=
"provinceId"
/>
<result
column=
"city_py"
jdbcType=
"VARCHAR"
property=
"cityPy"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
city_id, city_name, province_id, city_py, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_city
where city_id = #{cityId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_city
where city_id = #{cityId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabCity"
>
insert into tab_city (city_id, city_name, province_id,
city_py, create_time, update_time
)
values (#{cityId,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR},
#{cityPy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabCity"
>
insert into tab_city
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"cityId != null"
>
city_id,
</if>
<if
test=
"cityName != null"
>
city_name,
</if>
<if
test=
"provinceId != null"
>
province_id,
</if>
<if
test=
"cityPy != null"
>
city_py,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"cityId != null"
>
#{cityId,jdbcType=VARCHAR},
</if>
<if
test=
"cityName != null"
>
#{cityName,jdbcType=VARCHAR},
</if>
<if
test=
"provinceId != null"
>
#{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"cityPy != null"
>
#{cityPy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabCity"
>
update tab_city
<set>
<if
test=
"cityName != null"
>
city_name = #{cityName,jdbcType=VARCHAR},
</if>
<if
test=
"provinceId != null"
>
province_id = #{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"cityPy != null"
>
city_py = #{cityPy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where city_id = #{cityId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabCity"
>
update tab_city
set city_name = #{cityName,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=VARCHAR},
city_py = #{cityPy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where city_id = #{cityId,jdbcType=VARCHAR}
</update>
<select
id=
"selectAllCity"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_city
</select>
<select
id=
"queryCity"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_city where 1=1
<if
test=
"search != null and search != ''"
>
and city_name like concat('%',#{search}, '%')
</if>
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment