Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
3a0f0191
Commit
3a0f0191
authored
Mar 09, 2019
by
季圣华
Browse files
重构-系统配置模块
parent
691b494c
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
erp_web/js/print/print.js
View file @
3a0f0191
...
@@ -21,11 +21,9 @@ function CreateFormPage(strPrintName, printDatagrid) {
...
@@ -21,11 +21,9 @@ function CreateFormPage(strPrintName, printDatagrid) {
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
page
)
{
if
(
res
.
data
&&
res
.
data
.
page
)
{
var
array
=
res
.
data
.
page
.
rows
;
var
array
=
res
.
data
.
page
.
rows
;
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
array
.
length
>
0
)
{
var
name
=
array
[
i
].
name
;
var
info
=
array
[
0
];
if
(
name
===
"
company_name
"
)
{
companyName
=
info
.
companyName
;
companyName
=
array
[
i
].
value
;
}
}
}
}
}
}
}
...
...
erp_web/pages/manage/systemConfig.html
View file @
3a0f0191
This diff is collapsed.
Click to expand it.
sql/jsh_erp.sql
View file @
3a0f0191
...
@@ -1308,4 +1308,22 @@ INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`,
...
@@ -1308,4 +1308,22 @@ INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`,
-- ----------------------------
-- ----------------------------
INSERT
INTO
`jsh_organization`
(
`org_no`
,
`org_full_name`
,
`org_abr`
,
`org_tpcd`
,
`org_stcd`
,
`org_parent_no`
,
`sort`
,
`remark`
,
`create_time`
,
`creator`
,
`update_time`
,
`updater`
,
`org_create_time`
,
`org_stop_time`
)
VALUES
(
'01'
,
'根机构'
,
'根机构'
,
NULL
,
'2'
,
'-1'
,
'1'
,
'根机构,初始化存在'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`jsh_organization`
(
`org_no`
,
`org_full_name`
,
`org_abr`
,
`org_tpcd`
,
`org_stcd`
,
`org_parent_no`
,
`sort`
,
`remark`
,
`create_time`
,
`creator`
,
`update_time`
,
`updater`
,
`org_create_time`
,
`org_stop_time`
)
VALUES
(
'01'
,
'根机构'
,
'根机构'
,
NULL
,
'2'
,
'-1'
,
'1'
,
'根机构,初始化存在'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
-- ----------------------------
-- 时间:2019年3月9日
-- version:1.0.6
-- 此次更新
-- 整改jsh_systemconfig表的字段
-- ----------------------------
alter
table
jsh_systemconfig
drop
type
;
alter
table
jsh_systemconfig
drop
name
;
alter
table
jsh_systemconfig
drop
value
;
alter
table
jsh_systemconfig
drop
description
;
alter
table
jsh_systemconfig
add
company_name
varchar
(
50
)
DEFAULT
null
COMMENT
'公司名称'
;
alter
table
jsh_systemconfig
add
company_contacts
varchar
(
20
)
DEFAULT
null
COMMENT
'公司联系人'
;
alter
table
jsh_systemconfig
add
company_address
varchar
(
50
)
DEFAULT
null
COMMENT
'公司地址'
;
alter
table
jsh_systemconfig
add
company_tel
varchar
(
20
)
DEFAULT
null
COMMENT
'公司电话'
;
alter
table
jsh_systemconfig
add
company_fax
varchar
(
20
)
DEFAULT
null
COMMENT
'公司传真'
;
alter
table
jsh_systemconfig
add
company_post_code
varchar
(
20
)
DEFAULT
null
COMMENT
'公司邮编'
;
delete
from
jsh_systemconfig
;
insert
into
jsh_systemconfig
(
`company_name`
,
`company_contacts`
,
`company_address`
,
`company_tel`
,
`company_fax`
,
`company_post_code`
)
values
(
"南通jshERP公司"
,
"张三"
,
"南通市通州区某某路"
,
"0513-10101010"
,
"0513-18181818"
,
"226300"
);
sql/华夏ERP数据库设计汇总.xlsx
View file @
3a0f0191
No preview for this file type
src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java
View file @
3a0f0191
...
@@ -11,35 +11,51 @@ public class SystemConfig {
...
@@ -11,35 +11,51 @@ public class SystemConfig {
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
typ
e
* This field corresponds to the database column jsh_systemconfig.
company_nam
e
*
*
* @mbggenerated
* @mbggenerated
*/
*/
private
String
typ
e
;
private
String
companyNam
e
;
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
name
* This field corresponds to the database column jsh_systemconfig.
company_contacts
*
*
* @mbggenerated
* @mbggenerated
*/
*/
private
String
name
;
private
String
companyContacts
;
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
value
* This field corresponds to the database column jsh_systemconfig.
company_address
*
*
* @mbggenerated
* @mbggenerated
*/
*/
private
String
value
;
private
String
companyAddress
;
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
description
* This field corresponds to the database column jsh_systemconfig.
company_tel
*
*
* @mbggenerated
* @mbggenerated
*/
*/
private
String
description
;
private
String
companyTel
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_fax
*
* @mbggenerated
*/
private
String
companyFax
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_post_code
*
* @mbggenerated
*/
private
String
companyPostCode
;
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
...
@@ -67,97 +83,145 @@ public class SystemConfig {
...
@@ -67,97 +83,145 @@ public class SystemConfig {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.type
* This method returns the value of the database column jsh_systemconfig.company_name
*
* @return the value of jsh_systemconfig.company_name
*
* @mbggenerated
*/
public
String
getCompanyName
()
{
return
companyName
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_name
*
* @param companyName the value for jsh_systemconfig.company_name
*
* @mbggenerated
*/
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
==
null
?
null
:
companyName
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_contacts
*
* @return the value of jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
public
String
getCompanyContacts
()
{
return
companyContacts
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_contacts
*
* @param companyContacts the value for jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
public
void
setCompanyContacts
(
String
companyContacts
)
{
this
.
companyContacts
=
companyContacts
==
null
?
null
:
companyContacts
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_address
*
*
* @return the value of jsh_systemconfig.
type
* @return the value of jsh_systemconfig.
company_address
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
String
get
Type
()
{
public
String
get
CompanyAddress
()
{
return
type
;
return
companyAddress
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
type
* This method sets the value of the database column jsh_systemconfig.
company_address
*
*
* @param
type
the value for jsh_systemconfig.
type
* @param
companyAddress
the value for jsh_systemconfig.
company_address
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
void
set
Type
(
String
type
)
{
public
void
set
CompanyAddress
(
String
companyAddress
)
{
this
.
type
=
type
==
null
?
null
:
type
.
trim
();
this
.
companyAddress
=
companyAddress
==
null
?
null
:
companyAddress
.
trim
();
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.
name
* This method returns the value of the database column jsh_systemconfig.
company_tel
*
*
* @return the value of jsh_systemconfig.
name
* @return the value of jsh_systemconfig.
company_tel
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
String
get
Name
()
{
public
String
get
CompanyTel
()
{
return
name
;
return
companyTel
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
name
* This method sets the value of the database column jsh_systemconfig.
company_tel
*
*
* @param
name
the value for jsh_systemconfig.
name
* @param
companyTel
the value for jsh_systemconfig.
company_tel
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
void
set
Name
(
String
name
)
{
public
void
set
CompanyTel
(
String
companyTel
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
this
.
companyTel
=
companyTel
==
null
?
null
:
companyTel
.
trim
();
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.
value
* This method returns the value of the database column jsh_systemconfig.
company_fax
*
*
* @return the value of jsh_systemconfig.
value
* @return the value of jsh_systemconfig.
company_fax
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
String
get
Value
()
{
public
String
get
CompanyFax
()
{
return
value
;
return
companyFax
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
value
* This method sets the value of the database column jsh_systemconfig.
company_fax
*
*
* @param
value
the value for jsh_systemconfig.
value
* @param
companyFax
the value for jsh_systemconfig.
company_fax
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
void
set
Value
(
String
value
)
{
public
void
set
CompanyFax
(
String
companyFax
)
{
this
.
value
=
value
==
null
?
null
:
value
.
trim
();
this
.
companyFax
=
companyFax
==
null
?
null
:
companyFax
.
trim
();
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.
description
* This method returns the value of the database column jsh_systemconfig.
company_post_code
*
*
* @return the value of jsh_systemconfig.
description
* @return the value of jsh_systemconfig.
company_post_code
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
String
get
Description
()
{
public
String
get
CompanyPostCode
()
{
return
description
;
return
companyPostCode
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
description
* This method sets the value of the database column jsh_systemconfig.
company_post_code
*
*
* @param
description
the value for jsh_systemconfig.
description
* @param
companyPostCode
the value for jsh_systemconfig.
company_post_code
*
*
* @mbggenerated
* @mbggenerated
*/
*/
public
void
set
Description
(
String
description
)
{
public
void
set
CompanyPostCode
(
String
companyPostCode
)
{
this
.
description
=
description
==
null
?
null
:
description
.
trim
();
this
.
companyPostCode
=
companyPostCode
==
null
?
null
:
companyPostCode
.
trim
();
}
}
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java
View file @
3a0f0191
This diff is collapsed.
Click to expand it.
src/main/java/com/jsh/erp/datasource/mappers/SystemConfigMapperEx.java
View file @
3a0f0191
...
@@ -9,8 +9,10 @@ import java.util.List;
...
@@ -9,8 +9,10 @@ import java.util.List;
public
interface
SystemConfigMapperEx
{
public
interface
SystemConfigMapperEx
{
List
<
SystemConfig
>
selectByConditionSystemConfig
(
List
<
SystemConfig
>
selectByConditionSystemConfig
(
@Param
(
"companyName"
)
String
companyName
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
@Param
(
"rows"
)
Integer
rows
);
Long
countsBySystemConfig
();
Long
countsBySystemConfig
(
@Param
(
"companyName"
)
String
companyName
);
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigComponent.java
View file @
3a0f0191
...
@@ -31,13 +31,17 @@ public class SystemConfigComponent implements ICommonQuery {
...
@@ -31,13 +31,17 @@ public class SystemConfigComponent implements ICommonQuery {
}
}
private
List
<?>
getSystemConfigList
(
Map
<
String
,
String
>
map
)
{
private
List
<?>
getSystemConfigList
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
companyName
=
StringUtil
.
getInfo
(
search
,
"companyName"
);
String
order
=
QueryUtils
.
order
(
map
);
String
order
=
QueryUtils
.
order
(
map
);
return
systemConfigService
.
select
(
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
return
systemConfigService
.
select
(
companyName
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
}
@Override
@Override
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
return
systemConfigService
.
countSystemConfig
();
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
companyName
=
StringUtil
.
getInfo
(
search
,
"companyName"
);
return
systemConfigService
.
countSystemConfig
(
companyName
);
}
}
@Override
@Override
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java
View file @
3a0f0191
...
@@ -33,12 +33,12 @@ public class SystemConfigService {
...
@@ -33,12 +33,12 @@ public class SystemConfigService {
SystemConfigExample
example
=
new
SystemConfigExample
();
SystemConfigExample
example
=
new
SystemConfigExample
();
return
systemConfigMapper
.
selectByExample
(
example
);
return
systemConfigMapper
.
selectByExample
(
example
);
}
}
public
List
<
SystemConfig
>
select
(
int
offset
,
int
rows
)
{
public
List
<
SystemConfig
>
select
(
String
companyName
,
int
offset
,
int
rows
)
{
return
systemConfigMapperEx
.
selectByConditionSystemConfig
(
offset
,
rows
);
return
systemConfigMapperEx
.
selectByConditionSystemConfig
(
companyName
,
offset
,
rows
);
}
}
public
Long
countSystemConfig
()
{
public
Long
countSystemConfig
(
String
companyName
)
{
return
systemConfigMapperEx
.
countsBySystemConfig
();
return
systemConfigMapperEx
.
countsBySystemConfig
(
companyName
);
}
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
@@ -69,7 +69,7 @@ public class SystemConfigService {
...
@@ -69,7 +69,7 @@ public class SystemConfigService {
public
int
checkIsNameExist
(
Long
id
,
String
name
)
{
public
int
checkIsNameExist
(
Long
id
,
String
name
)
{
SystemConfigExample
example
=
new
SystemConfigExample
();
SystemConfigExample
example
=
new
SystemConfigExample
();
example
.
createCriteria
().
andIdNotEqualTo
(
id
).
andNameEqualTo
(
name
);
example
.
createCriteria
().
andIdNotEqualTo
(
id
).
and
Company
NameEqualTo
(
name
);
List
<
SystemConfig
>
list
=
systemConfigMapper
.
selectByExample
(
example
);
List
<
SystemConfig
>
list
=
systemConfigMapper
.
selectByExample
(
example
);
return
list
.
size
();
return
list
.
size
();
}
}
...
...
src/main/resources/mapper_xml/SystemConfigMapper.xml
View file @
3a0f0191
...
@@ -7,10 +7,12 @@
...
@@ -7,10 +7,12 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element is automatically generated by MyBatis Generator, do not modify.
-->
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"company_name"
jdbcType=
"VARCHAR"
property=
"companyName"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"company_contacts"
jdbcType=
"VARCHAR"
property=
"companyContacts"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"company_address"
jdbcType=
"VARCHAR"
property=
"companyAddress"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"company_tel"
jdbcType=
"VARCHAR"
property=
"companyTel"
/>
<result
column=
"company_fax"
jdbcType=
"VARCHAR"
property=
"companyFax"
/>
<result
column=
"company_post_code"
jdbcType=
"VARCHAR"
property=
"companyPostCode"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<!--
<!--
...
@@ -83,7 +85,7 @@
...
@@ -83,7 +85,7 @@
WARNING - @mbggenerated
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element is automatically generated by MyBatis Generator, do not modify.
-->
-->
id,
type, name, value, description
id,
company_name, company_contacts, company_address, company_tel, company_fax, company_post_code
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
@@ -136,10 +138,12 @@
...
@@ -136,10 +138,12 @@
WARNING - @mbggenerated
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element is automatically generated by MyBatis Generator, do not modify.
-->
-->
insert into jsh_systemconfig (id, type, name,
insert into jsh_systemconfig (id, company_name, company_contacts,
value, description)
company_address, company_tel, company_fax,
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
company_post_code)
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
#{companyPostCode,jdbcType=VARCHAR})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
<!--
<!--
...
@@ -151,34 +155,46 @@
...
@@ -151,34 +155,46 @@
<if
test=
"id != null"
>
<if
test=
"id != null"
>
id,
id,
</if>
</if>
<if
test=
"
typ
e != null"
>
<if
test=
"
companyNam
e != null"
>
typ
e,
company_nam
e,
</if>
</if>
<if
test=
"
name
!= null"
>
<if
test=
"
companyContacts
!= null"
>
name
,
company_contacts
,
</if>
</if>
<if
test=
"
value
!= null"
>
<if
test=
"
companyAddress
!= null"
>
value
,
company_address
,
</if>
</if>
<if
test=
"description != null"
>
<if
test=
"companyTel != null"
>
description,
company_tel,
</if>
<if
test=
"companyFax != null"
>
company_fax,
</if>
<if
test=
"companyPostCode != null"
>
company_post_code,
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
#{id,jdbcType=BIGINT},
</if>
</if>
<if
test=
"type != null"
>
<if
test=
"companyName != null"
>
#{type,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR},
</if>
<if
test=
"companyContacts != null"
>
#{companyContacts,jdbcType=VARCHAR},
</if>
<if
test=
"companyAddress != null"
>
#{companyAddress,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
name
!= null"
>
<if
test=
"
companyTel
!= null"
>
#{
name
,jdbcType=VARCHAR},
#{
companyTel
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
value
!= null"
>
<if
test=
"
companyFax
!= null"
>
#{
value
,jdbcType=VARCHAR},
#{
companyFax
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
description
!= null"
>
<if
test=
"
companyPostCode
!= null"
>
#{
description
,jdbcType=VARCHAR},
#{
companyPostCode
,jdbcType=VARCHAR},
</if>
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -202,17 +218,23 @@
...
@@ -202,17 +218,23 @@
<if
test=
"record.id != null"
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.
typ
e != null"
>
<if
test=
"record.
companyNam
e != null"
>
typ
e = #{record.
typ
e,jdbcType=VARCHAR},
company_nam
e = #{record.
companyNam
e,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.
name
!= null"
>
<if
test=
"record.
companyContacts
!= null"
>
name = #{record.name
,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.
value
!= null"
>
<if
test=
"record.
companyAddress
!= null"
>
value = #{record.value
,jdbcType=VARCHAR},
company_address = #{record.companyAddress
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.description != null"
>
<if
test=
"record.companyTel != null"
>
description = #{record.description,jdbcType=VARCHAR},
company_tel = #{record.companyTel,jdbcType=VARCHAR},
</if>
<if
test=
"record.companyFax != null"
>
company_fax = #{record.companyFax,jdbcType=VARCHAR},
</if>
<if
test=
"record.companyPostCode != null"
>
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR},
</if>
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
...
@@ -226,10 +248,12 @@
...
@@ -226,10 +248,12 @@
-->
-->
update jsh_systemconfig
update jsh_systemconfig
set id = #{record.id,jdbcType=BIGINT},
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR},
company_name = #{record.companyName,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
company_address = #{record.companyAddress,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}
company_tel = #{record.companyTel,jdbcType=VARCHAR},
company_fax = #{record.companyFax,jdbcType=VARCHAR},
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -241,17 +265,23 @@
...
@@ -241,17 +265,23 @@
-->
-->
update jsh_systemconfig
update jsh_systemconfig
<set>
<set>
<if
test=
"type != null"
>
<if
test=
"companyName != null"
>
type = #{type,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if
test=
"companyContacts != null"
>
company_contacts = #{companyContacts,jdbcType=VARCHAR},
</if>
<if
test=
"companyAddress != null"
>
company_address = #{companyAddress,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
name
!= null"
>
<if
test=
"
companyTel
!= null"
>
name = #{name
,jdbcType=VARCHAR},
company_tel = #{companyTel
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
value
!= null"
>
<if
test=
"
companyFax
!= null"
>
value = #{value
,jdbcType=VARCHAR},
company_fax = #{companyFax
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
description
!= null"
>
<if
test=
"
companyPostCode
!= null"
>
description = #{description
,jdbcType=VARCHAR},
company_post_code = #{companyPostCode
,jdbcType=VARCHAR},
</if>
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
...
@@ -262,10 +292,12 @@
...
@@ -262,10 +292,12 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element is automatically generated by MyBatis Generator, do not modify.
-->
-->
update jsh_systemconfig
update jsh_systemconfig
set type = #{type,jdbcType=VARCHAR},
set company_name = #{companyName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
company_contacts = #{companyContacts,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
company_address = #{companyAddress,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
company_tel = #{companyTel,jdbcType=VARCHAR},
company_fax = #{companyFax,jdbcType=VARCHAR},
company_post_code = #{companyPostCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/SystemConfigMapperEx.xml
View file @
3a0f0191
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
select *
select *
FROM jsh_systemconfig
FROM jsh_systemconfig
where 1=1
where 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
</if>
<if
test=
"offset != null and rows != null"
>
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
limit #{offset},#{rows}
</if>
</if>
...
@@ -14,5 +17,8 @@
...
@@ -14,5 +17,8 @@
COUNT(id)
COUNT(id)
FROM jsh_systemconfig
FROM jsh_systemconfig
WHERE 1=1
WHERE 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
</if>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/test/resources/generatorConfig.xml
View file @
3a0f0191
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<generatorConfiguration>
<generatorConfiguration>
<classPathEntry
<classPathEntry
location=
"
C
:\
Users\cjl\.m2\
repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"
/>
location=
"
E
:\
maven-
repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"
/>
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
defaultModelType=
"flat"
>
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
defaultModelType=
"flat"
>
<commentGenerator>
<commentGenerator>
...
@@ -59,12 +59,12 @@
...
@@ -59,12 +59,12 @@
<table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table>
<table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table>
<table tableName="jsh_person" domainObjectName="Person"></table>
<table tableName="jsh_person" domainObjectName="Person"></table>
<table tableName="jsh_role" domainObjectName="Role"></table>
<table tableName="jsh_role" domainObjectName="Role"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
-->
<table
tableName=
"jsh_systemconfig"
domainObjectName=
"SystemConfig"
></table>
<table
tableName=
"jsh_systemconfig"
domainObjectName=
"SystemConfig"
></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<!--
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
-->
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<!--
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table
tableName=
"jsh_organization"
domainObjectName=
"Organization"
></table>
<table
tableName=
"jsh_organization"
domainObjectName=
"Organization"
></table>
<!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>-->
<!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>-->
</context>
</context>
...
...
Write
Preview
Supports
Markdown
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