Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-wx
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 00966bfd
authored
Mar 12, 2020
by
魏文甫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
1 parent
84d5074c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
282 deletions
src/main/java/com/server/Application.java
src/main/java/com/server/web/controller/UserController.java
src/main/resources/generatorConfig.xml
src/main/resources/mybatis/mapper/TBaseBannerMapper.xml
src/main/resources/mybatis/mapping/CommentMapper.xml
src/main/resources/mybatis/mapping/CourseMapper.xml
src/main/resources/mybatis/mybatis-config.xml
src/main/java/com/server/Application.java
View file @
00966bf
...
...
@@ -9,7 +9,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication
@EnableTransactionManagement
@ServletComponentScan
@MapperScan
(
"com.server.web.common.mapper"
)
@MapperScan
(
{
"com.server.web.common.mapper"
,
"com.server.web.common.mapping"
}
)
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/server/web/controller/UserController.java
View file @
00966bf
This diff is collapsed.
Click to expand it.
src/main/resources/generatorConfig.xml
View file @
00966bf
...
...
@@ -64,14 +64,6 @@
</javaClientGenerator>
<table
tableName=
"t_base_banner"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_base_first_class"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_base_second_class"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_kzy_comment"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_kzy_course"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_kzy_information"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_kzy_relation_class"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_kzy_user"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
<table
tableName=
"t_kzy_user_integral_flowing"
schema=
"sc"
><generatedKey
column=
"ID"
sqlStatement=
"MySql"
identity=
"true"
/></table>
</context>
</generatorConfiguration>
\ No newline at end of file
src/main/resources/mybatis/mapper/TBaseBannerMapper.xml
View file @
00966bf
...
...
@@ -289,275 +289,4 @@
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap
id=
"BaseResultMap"
type=
"com.server.web.common.model.TBaseBanner"
>
<constructor>
<idArg
column=
"id"
javaType=
"java.lang.Long"
jdbcType=
"BIGINT"
/>
<arg
column=
"title"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<arg
column=
"pic_url"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<arg
column=
"weight"
javaType=
"java.lang.Integer"
jdbcType=
"INTEGER"
/>
<arg
column=
"url"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<arg
column=
"remark"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<arg
column=
"is_delete"
javaType=
"java.lang.Integer"
jdbcType=
"INTEGER"
/>
<arg
column=
"is_up"
javaType=
"java.lang.Integer"
jdbcType=
"INTEGER"
/>
<arg
column=
"create_dt"
javaType=
"java.util.Date"
jdbcType=
"TIMESTAMP"
/>
</constructor>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, title, pic_url, weight, url, remark, is_delete, is_up, create_dt
</sql>
<select
id=
"selectByExample"
parameterType=
"com.server.web.common.model.TBaseBannerExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from t_base_banner
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from t_base_banner
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from t_base_banner
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.server.web.common.model.TBaseBannerExample"
>
delete from t_base_banner
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.server.web.common.model.TBaseBanner"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_banner (title, pic_url, weight,
url, remark, is_delete,
is_up, create_dt)
values (#{title,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, #{weight,jdbcType=INTEGER},
#{url,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER},
#{isUp,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.server.web.common.model.TBaseBanner"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_banner
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"picUrl != null"
>
pic_url,
</if>
<if
test=
"weight != null"
>
weight,
</if>
<if
test=
"url != null"
>
url,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
<if
test=
"isUp != null"
>
is_up,
</if>
<if
test=
"createDt != null"
>
create_dt,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"picUrl != null"
>
#{picUrl,jdbcType=VARCHAR},
</if>
<if
test=
"weight != null"
>
#{weight,jdbcType=INTEGER},
</if>
<if
test=
"url != null"
>
#{url,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"isDelete != null"
>
#{isDelete,jdbcType=INTEGER},
</if>
<if
test=
"isUp != null"
>
#{isUp,jdbcType=INTEGER},
</if>
<if
test=
"createDt != null"
>
#{createDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.server.web.common.model.TBaseBannerExample"
resultType=
"java.lang.Long"
>
select count(*) from t_base_banner
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update t_base_banner
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.title != null"
>
title = #{record.title,jdbcType=VARCHAR},
</if>
<if
test=
"record.picUrl != null"
>
pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if
test=
"record.weight != null"
>
weight = #{record.weight,jdbcType=INTEGER},
</if>
<if
test=
"record.url != null"
>
url = #{record.url,jdbcType=VARCHAR},
</if>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.isDelete != null"
>
is_delete = #{record.isDelete,jdbcType=INTEGER},
</if>
<if
test=
"record.isUp != null"
>
is_up = #{record.isUp,jdbcType=INTEGER},
</if>
<if
test=
"record.createDt != null"
>
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update t_base_banner
set id = #{record.id,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
weight = #{record.weight,jdbcType=INTEGER},
url = #{record.url,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
is_up = #{record.isUp,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.server.web.common.model.TBaseBanner"
>
update t_base_banner
<set>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"picUrl != null"
>
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if
test=
"weight != null"
>
weight = #{weight,jdbcType=INTEGER},
</if>
<if
test=
"url != null"
>
url = #{url,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete,jdbcType=INTEGER},
</if>
<if
test=
"isUp != null"
>
is_up = #{isUp,jdbcType=INTEGER},
</if>
<if
test=
"createDt != null"
>
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.server.web.common.model.TBaseBanner"
>
update t_base_banner
set title = #{title,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
weight = #{weight,jdbcType=INTEGER},
url = #{url,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
is_up = #{isUp,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/CommentMapper.xml
0 → 100644
View file @
00966bf
<?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.server.web.common.mapping.CommentMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/CourseMapper.xml
0 → 100644
View file @
00966bf
<?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.server.web.common.mapping.CourseMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mybatis-config.xml
0 → 100644
View file @
00966bf
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting
name=
"callSettersOnNulls"
value=
"true"
/>
<setting
name=
"cacheEnabled"
value=
"true"
/>
<setting
name=
"lazyLoadingEnabled"
value=
"true"
/>
<setting
name=
"aggressiveLazyLoading"
value=
"true"
/>
<setting
name=
"multipleResultSetsEnabled"
value=
"true"
/>
<setting
name=
"useColumnLabel"
value=
"true"
/>
<setting
name=
"useGeneratedKeys"
value=
"false"
/>
<setting
name=
"autoMappingBehavior"
value=
"PARTIAL"
/>
<setting
name=
"defaultExecutorType"
value=
"SIMPLE"
/>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
<setting
name=
"localCacheScope"
value=
"SESSION"
/>
<setting
name=
"jdbcTypeForNull"
value=
"NULL"
/>
<setting
name=
"logImpl"
value=
"LOG4J"
/>
</settings>
<typeAliases>
<typeAlias
alias=
"Integer"
type=
"java.lang.Integer"
/>
<typeAlias
alias=
"Long"
type=
"java.lang.Long"
/>
<typeAlias
alias=
"HashMap"
type=
"java.util.HashMap"
/>
<typeAlias
alias=
"LinkedHashMap"
type=
"java.util.LinkedHashMap"
/>
<typeAlias
alias=
"ArrayList"
type=
"java.util.ArrayList"
/>
<typeAlias
alias=
"LinkedList"
type=
"java.util.LinkedList"
/>
</typeAliases>
</configuration>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment