Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
MicroCommunity
Commits
6ce11a80
Commit
6ce11a80
authored
3 years ago
by
java110
Browse files
Options
Download
Email Patches
Plain Diff
优化代码
parent
41154060
master
0.9-stable
1.0-stable
1.1-stable
1.2-stable
1.3-stable
1.3.1-stable
v1.31
v1.3
v1.2
v1.1
v1.0
v0.9
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
service-api/src/main/java/com/java110/api/bmo/community/impl/CommunityBMOImpl.java
+1
-0
.../com/java110/api/bmo/community/impl/CommunityBMOImpl.java
service-api/src/main/java/com/java110/api/bmo/floor/impl/FloorBMOImpl.java
+17
-0
...ain/java/com/java110/api/bmo/floor/impl/FloorBMOImpl.java
service-api/src/main/java/com/java110/api/bmo/owner/impl/OwnerBMOImpl.java
+10
-0
...ain/java/com/java110/api/bmo/owner/impl/OwnerBMOImpl.java
with
28 additions
and
0 deletions
+28
-0
service-api/src/main/java/com/java110/api/bmo/community/impl/CommunityBMOImpl.java
+
1
-
0
View file @
6ce11a80
...
...
@@ -488,6 +488,7 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
*/
public
void
addCommunityMembers
(
JSONObject
paramInJson
,
DataFlowContext
dataFlowContext
)
{
JSONObject
businessCommunityMember
=
new
JSONObject
();
businessCommunityMember
.
put
(
"communityMemberId"
,
"-1"
);
businessCommunityMember
.
put
(
"communityId"
,
paramInJson
.
getString
(
"communityId"
));
...
...
This diff is collapsed.
Click to expand it.
service-api/src/main/java/com/java110/api/bmo/floor/impl/FloorBMOImpl.java
+
17
-
0
View file @
6ce11a80
...
...
@@ -4,16 +4,20 @@ import com.alibaba.fastjson.JSONObject;
import
com.java110.api.bmo.ApiBaseBMO
;
import
com.java110.api.bmo.floor.IFloorBMO
;
import
com.java110.core.context.DataFlowContext
;
import
com.java110.dto.community.CommunityDto
;
import
com.java110.intf.community.ICommunityInnerServiceSMO
;
import
com.java110.dto.CommunityMemberDto
;
import
com.java110.po.community.CommunityMemberPo
;
import
com.java110.po.floor.FloorPo
;
import
com.java110.utils.constant.*
;
import
com.java110.utils.exception.ListenerExecuteException
;
import
com.java110.utils.util.Assert
;
import
com.java110.utils.util.BeanConvertUtil
;
import
com.java110.utils.util.DateUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Calendar
;
import
java.util.List
;
/**
...
...
@@ -118,12 +122,25 @@ public class FloorBMOImpl extends ApiBaseBMO implements IFloorBMO {
*/
public
void
addCommunityMember
(
JSONObject
paramInJson
,
DataFlowContext
context
)
{
//查询小区是否存在
CommunityDto
communityDto
=
new
CommunityDto
();
communityDto
.
setCommunityId
(
paramInJson
.
getString
(
"communityId"
));
List
<
CommunityDto
>
communityDtos
=
communityInnerServiceSMOImpl
.
queryCommunitys
(
communityDto
);
Assert
.
listOnlyOne
(
communityDtos
,
"小区不存"
);
JSONObject
businessCommunityMember
=
new
JSONObject
();
businessCommunityMember
.
put
(
"communityMemberId"
,
"-1"
);
businessCommunityMember
.
put
(
"communityId"
,
paramInJson
.
getString
(
"communityId"
));
businessCommunityMember
.
put
(
"memberId"
,
paramInJson
.
getString
(
"floorId"
));
businessCommunityMember
.
put
(
"memberTypeCd"
,
CommunityMemberTypeConstant
.
FLOOR
);
businessCommunityMember
.
put
(
"auditStatusCd"
,
StateConstant
.
AGREE_AUDIT
);
businessCommunityMember
.
put
(
"startTime"
,
DateUtil
.
getNow
(
DateUtil
.
DATE_FORMATE_STRING_A
));
Calendar
endTime
=
Calendar
.
getInstance
();
endTime
.
add
(
Calendar
.
MONTH
,
Integer
.
parseInt
(
communityDtos
.
get
(
0
).
getPayFeeMonth
()));
businessCommunityMember
.
put
(
"endTime"
,
DateUtil
.
getFormatTimeString
(
endTime
.
getTime
(),
DateUtil
.
DATE_FORMATE_STRING_A
));
CommunityMemberPo
communityMemberPo
=
BeanConvertUtil
.
covertBean
(
businessCommunityMember
,
CommunityMemberPo
.
class
);
super
.
insert
(
context
,
communityMemberPo
,
BusinessTypeConstant
.
BUSINESS_TYPE_MEMBER_JOINED_COMMUNITY
);
}
...
...
This diff is collapsed.
Click to expand it.
service-api/src/main/java/com/java110/api/bmo/owner/impl/OwnerBMOImpl.java
+
10
-
0
View file @
6ce11a80
...
...
@@ -35,6 +35,7 @@ import com.java110.utils.util.DateUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -234,7 +235,12 @@ public class OwnerBMOImpl extends ApiBaseBMO implements IOwnerBMO {
* @return 小区成员信息
*/
public
void
addCommunityMember
(
JSONObject
paramInJson
,
DataFlowContext
dataFlowContext
)
{
//查询小区是否存在
CommunityDto
communityDto
=
new
CommunityDto
();
communityDto
.
setCommunityId
(
paramInJson
.
getString
(
"communityId"
));
List
<
CommunityDto
>
communityDtos
=
communityInnerServiceSMOImpl
.
queryCommunitys
(
communityDto
);
Assert
.
listOnlyOne
(
communityDtos
,
"小区不存"
);
JSONObject
businessCommunityMember
=
new
JSONObject
();
businessCommunityMember
.
put
(
"communityMemberId"
,
"-1"
);
...
...
@@ -242,6 +248,10 @@ public class OwnerBMOImpl extends ApiBaseBMO implements IOwnerBMO {
businessCommunityMember
.
put
(
"memberId"
,
paramInJson
.
getString
(
"ownerId"
));
businessCommunityMember
.
put
(
"memberTypeCd"
,
CommunityMemberTypeConstant
.
OWNER
);
businessCommunityMember
.
put
(
"auditStatusCd"
,
StateConstant
.
AGREE_AUDIT
);
businessCommunityMember
.
put
(
"startTime"
,
DateUtil
.
getNow
(
DateUtil
.
DATE_FORMATE_STRING_A
));
Calendar
endTime
=
Calendar
.
getInstance
();
endTime
.
add
(
Calendar
.
MONTH
,
Integer
.
parseInt
(
communityDtos
.
get
(
0
).
getPayFeeMonth
()));
businessCommunityMember
.
put
(
"endTime"
,
DateUtil
.
getFormatTimeString
(
endTime
.
getTime
(),
DateUtil
.
DATE_FORMATE_STRING_A
));
CommunityMemberPo
communityMemberPo
=
BeanConvertUtil
.
covertBean
(
businessCommunityMember
,
CommunityMemberPo
.
class
);
super
.
insert
(
dataFlowContext
,
communityMemberPo
,
BusinessTypeConstant
.
BUSINESS_TYPE_MEMBER_JOINED_COMMUNITY
);
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help