Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
a7fe6583
Commit
a7fe6583
authored
Jun 04, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加“是否为新机构”字段
parent
5f16ef05
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
7 deletions
+50
-7
bsoft-admin/src/main/java/com/bsoft/admin/model/DicOrg.java
+12
-0
bsoft-admin/src/main/java/com/bsoft/admin/model/reqmodel/OrgReq.java
+28
-1
bsoft-admin/src/main/java/com/bsoft/admin/service/impl/DicOrgServiceImpl.java
+2
-0
bsoft-admin/src/main/resources/mapper/DicOrgMapper.xml
+8
-6
No files found.
bsoft-admin/src/main/java/com/bsoft/admin/model/DicOrg.java
View file @
a7fe6583
...
...
@@ -27,6 +27,8 @@ public class DicOrg {
private
Long
parentId
;
private
Long
isNew
;
public
Long
getId
()
{
return
id
;
}
...
...
@@ -123,6 +125,14 @@ public class DicOrg {
this
.
parentId
=
parentId
;
}
public
Long
getIsNew
()
{
return
isNew
;
}
public
void
setIsNew
(
Long
isNew
)
{
this
.
isNew
=
isNew
;
}
@Override
public
String
toString
()
{
return
"DicOrg{"
+
...
...
@@ -138,6 +148,7 @@ public class DicOrg {
", orgType='"
+
orgType
+
'\''
+
", orgAddress='"
+
orgAddress
+
'\''
+
", parentId="
+
parentId
+
", isNew="
+
isNew
+
'}'
;
}
}
\ No newline at end of file
bsoft-admin/src/main/java/com/bsoft/admin/model/reqmodel/OrgReq.java
View file @
a7fe6583
...
...
@@ -77,6 +77,10 @@ public class OrgReq {
@NotNull
(
message
=
"父级关系 参数必传"
)
private
Long
parentId
;
@ApiModelProperty
(
value
=
"是否为新机构"
,
required
=
true
)
@NotNull
(
message
=
"是否为新机构 参数必传"
)
private
Long
isNEw
;
public
String
getOrgCode
()
{
return
orgCode
;
}
...
...
@@ -141,6 +145,14 @@ public class OrgReq {
this
.
parentId
=
parentId
;
}
public
Long
getIsNEw
()
{
return
isNEw
;
}
public
void
setIsNEw
(
Long
isNEw
)
{
this
.
isNEw
=
isNEw
;
}
@Override
public
String
toString
()
{
return
"AddOrgReq{"
+
...
...
@@ -152,6 +164,7 @@ public class OrgReq {
", orgType='"
+
orgType
+
'\''
+
", orgAddress='"
+
orgAddress
+
'\''
+
", parentId="
+
parentId
+
", isNEw="
+
isNEw
+
'}'
;
}
}
...
...
@@ -210,6 +223,11 @@ public class OrgReq {
@NotNull
(
message
=
"父级关系 参数必传"
)
private
Long
parentId
;
@ApiModelProperty
(
value
=
"是否为新机构"
,
required
=
true
)
@NotNull
(
message
=
"是否为新机构 参数必传"
)
private
Long
isNEw
;
public
Long
getOrgId
()
{
return
orgId
;
}
...
...
@@ -282,9 +300,17 @@ public class OrgReq {
this
.
parentId
=
parentId
;
}
public
Long
getIsNEw
()
{
return
isNEw
;
}
public
void
setIsNEw
(
Long
isNEw
)
{
this
.
isNEw
=
isNEw
;
}
@Override
public
String
toString
()
{
return
"Update{"
+
return
"Update
OrgReq
{"
+
"orgId="
+
orgId
+
", orgCode='"
+
orgCode
+
'\''
+
", orgName='"
+
orgName
+
'\''
+
...
...
@@ -294,6 +320,7 @@ public class OrgReq {
", orgType='"
+
orgType
+
'\''
+
", orgAddress='"
+
orgAddress
+
'\''
+
", parentId="
+
parentId
+
", isNEw="
+
isNEw
+
'}'
;
}
}
...
...
bsoft-admin/src/main/java/com/bsoft/admin/service/impl/DicOrgServiceImpl.java
View file @
a7fe6583
...
...
@@ -72,6 +72,7 @@ public class DicOrgServiceImpl implements DicOrgService {
dicOrg
.
setOrgType
(
org
.
getOrgType
());
dicOrg
.
setOrgAddress
(
org
.
getOrgAddress
());
dicOrg
.
setParentId
(
org
.
getParentId
());
dicOrg
.
setIsNew
(
org
.
getIsNEw
());
dicOrgMapper
.
insert
(
dicOrg
);
return
true
;
}
...
...
@@ -101,6 +102,7 @@ public class DicOrgServiceImpl implements DicOrgService {
dicOrg
.
setOrgType
(
org
.
getOrgType
());
dicOrg
.
setOrgAddress
(
org
.
getOrgAddress
());
dicOrg
.
setParentId
(
org
.
getParentId
());
dicOrg
.
setIsNew
(
org
.
getIsNEw
());
dicOrgMapper
.
updateByPrimaryKey
(
dicOrg
);
return
true
;
}
...
...
bsoft-admin/src/main/resources/mapper/DicOrgMapper.xml
View file @
a7fe6583
...
...
@@ -14,6 +14,7 @@
<result
column=
"ORG_TYPE"
jdbcType=
"VARCHAR"
property=
"orgType"
/>
<result
column=
"ORG_ADDRESS"
jdbcType=
"VARCHAR"
property=
"orgAddress"
/>
<result
column=
"PARENT_ID"
jdbcType=
"DECIMAL"
property=
"parentId"
/>
<result
column=
"IS_NEW"
jdbcType=
"DECIMAL"
property=
"isNew"
/>
</resultMap>
<resultMap
id=
"DicOrgResultMap"
extends=
"BaseResultMap"
type=
"com.bsoft.admin.model.respmodel.DicOrgList"
/>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
...
...
@@ -27,11 +28,11 @@
insert into DIC_ORG (ID,CREATE_DATE, CREATE_USERID, "STATE",
ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID)
ORG_ADDRESS, PARENT_ID
,IS_NEW
)
values (#{id,jdbcType=DECIMAL},#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL}
, #{isNew,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.admin.model.DicOrg"
>
update DIC_ORG
...
...
@@ -45,24 +46,25 @@
ORG_GROUP = #{orgGroup,jdbcType=VARCHAR},
ORG_TYPE = #{orgType,jdbcType=VARCHAR},
ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL}
PARENT_ID = #{parentId,jdbcType=DECIMAL},
IS_NEW = #{isNew,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
,IS_NEW
from DIC_ORG
where ID = #{id,jdbcType=DECIMAL} and "STATE"=1
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
,IS_NEW
from DIC_ORG
where "STATE"=1
</select>
<select
id=
"selectParentAll"
resultMap=
"DicOrgResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
,IS_NEW
from DIC_ORG
where "STATE"=1
</select>
...
...
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