From cd33651deff9fff7e7d9651b766210771c075190 Mon Sep 17 00:00:00 2001
From: wfy <260536420@qq.com>
Date: 星期二, 14 九月 2021 17:26:16 +0800
Subject: [PATCH] Merge branch 'master' into wangfy-dev
---
service-dev/src/main/java/com/java110/dev/cmd/SaveMappingCmd.java | 4
service-community/src/main/java/com/java110/community/smo/impl/RoomV1InnerServiceSMOImpl.java | 89 ++
service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java | 4
java110-core/src/main/java/com/java110/core/event/cmd/AbstractServiceCmdListener.java | 49
java110-interface/src/main/java/com/java110/intf/community/IRoomV1InnerServiceSMO.java | 68 +
java110-db/src/main/resources/mapper/community/FloorV1ServiceDaoImplMapper.xml | 132 +++
java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdListener.java | 20
service-community/src/main/java/com/java110/community/cmd/room/DeleteRoomCmd.java | 72 +
service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/ListBusinessTableHisCmd.java | 5
service-community/src/main/java/com/java110/community/cmd/floor/UpdateFloorCmd.java | 74 +
java110-generator/src/main/resources/web/template_1.json | 359 ++++++-
service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java | 6
java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdEventPublishing.java | 43
java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml | 205 ++++
service-community/src/main/java/com/java110/community/cmd/room/SaveRoomCmd.java | 87 +
service-community/src/main/java/com/java110/community/cmd/floor/SaveFloorCmd.java | 94 ++
java110-generator/src/main/resources/newTemplate/SaveCmd.txt | 8
java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java | 2
service-user/src/main/java/com/java110/user/cmd/login/PcUserLoginCmd.java | 4
java110-generator/src/main/resources/newTemplate/UpdateCmd.txt | 8
service-dev/src/main/java/com/java110/dev/smo/impl/DevServiceCacheSMOImpl.java | 1
service-common/src/main/java/com/java110/common/bmo/workflow/impl/QueryWorkFlowFirstStaffBMOImpl.java | 3
service-community/src/main/java/com/java110/community/dao/impl/FloorV1ServiceDaoImpl.java | 112 ++
java110-bean/src/main/java/com/java110/po/floor/FloorPo.java | 21
service-community/src/main/java/com/java110/community/dao/impl/RoomV1ServiceDaoImpl.java | 112 ++
java110-interface/src/main/java/com/java110/intf/community/IFloorV1InnerServiceSMO.java | 68 +
java110-generator/src/main/java/com/java110/code/TableToJsonWeb.java | 117 ++
service-community/src/main/java/com/java110/community/cmd/floor/DeleteFloorCmd.java | 71 +
service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java | 75 +
java110-generator/src/main/resources/newTemplate/DeleteCmd.txt | 8
java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java | 2
service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/SaveBusinessTableHisCmd.java | 4
service-dev/src/main/java/com/java110/dev/cmd/cache/FlushCacheCmd.java | 6
service-community/src/main/java/com/java110/community/cmd/floor/ListFloorCmd.java | 86 +
service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/DeleteBusinessTableHisCmd.java | 14
service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/UpdateBusinessTableHisCmd.java | 4
java110-generator/src/main/java/com/java110/code/TableToJson.java | 95 ++
java110-generator/src/main/resources/newTemplate/ListCmd.txt | 6
java110-generator/src/main/resources/newBack/template_1.json | 103 +
service-community/src/main/java/com/java110/community/cmd/room/ListRoomCmd.java | 85 +
service-community/src/main/java/com/java110/community/smo/impl/FloorV1InnerServiceSMOImpl.java | 89 ++
service-community/src/main/java/com/java110/community/cmd/dict/QueryDictCmd.java | 4
service-community/src/main/java/com/java110/community/dao/IFloorV1ServiceDao.java | 77 +
service-community/src/main/java/com/java110/community/dao/IRoomV1ServiceDao.java | 77 +
service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java | 13
45 files changed, 2,388 insertions(+), 198 deletions(-)
diff --git a/java110-bean/src/main/java/com/java110/po/floor/FloorPo.java b/java110-bean/src/main/java/com/java110/po/floor/FloorPo.java
index 050b6d9..810a82d 100755
--- a/java110-bean/src/main/java/com/java110/po/floor/FloorPo.java
+++ b/java110-bean/src/main/java/com/java110/po/floor/FloorPo.java
@@ -12,13 +12,18 @@
**/
public class FloorPo implements Serializable {
+ public static final String FLOOR_ATTR_LARGE = "100201912001";//澶у帵妤兼爧 灞炴��
+ public static final String FLOOR_ATTR_VALUE = "8008";//澶у帵妤兼爧 灞炴�у��
+
private String floorId;
private String floorNum;
private String floorArea;
private String name;
private String userId;
+ private String bId;
private String remark;
private String communityId;
+ private String statusCd;
public String getFloorId() {
return floorId;
@@ -75,4 +80,20 @@
public void setFloorArea(String floorArea) {
this.floorArea = floorArea;
}
+
+ public String getStatusCd() {
+ return statusCd;
+ }
+
+ public void setStatusCd(String statusCd) {
+ this.statusCd = statusCd;
+ }
+
+ public String getbId() {
+ return bId;
+ }
+
+ public void setbId(String bId) {
+ this.bId = bId;
+ }
}
diff --git a/java110-core/src/main/java/com/java110/core/event/cmd/AbstractServiceCmdListener.java b/java110-core/src/main/java/com/java110/core/event/cmd/AbstractServiceCmdListener.java
index 0bc9c21..6916ada 100644
--- a/java110-core/src/main/java/com/java110/core/event/cmd/AbstractServiceCmdListener.java
+++ b/java110-core/src/main/java/com/java110/core/event/cmd/AbstractServiceCmdListener.java
@@ -1,6 +1,7 @@
package com.java110.core.event.cmd;
import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Transactional;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -22,38 +23,24 @@
Assert.jsonObjectHaveKey(reqJson, "page", "璇锋眰涓湭鍖呭惈page淇℃伅");
Assert.jsonObjectHaveKey(reqJson, "row", "璇锋眰涓湭鍖呭惈row淇℃伅");
}
+//
+// @Override
+//
+// public void cmd(CmdEvent event) throws CmdException {
+// //杩欓噷澶勭悊涓氬姟閫昏緫鏁版嵁
+// ICmdDataFlowContext dataFlowContext = event.getCmdDataFlowContext();
+// //鑾峰彇璇锋眰鏁版嵁
+// JSONObject reqJson = dataFlowContext.getReqJson();
+//
+// logger.debug("API鏈嶅姟 --- 璇锋眰鍙傛暟涓猴細{}", reqJson.toJSONString());
+//
+// validate(event, dataFlowContext,reqJson);
+//
+// doCmd(event, dataFlowContext, reqJson);
+//
+// //logger.debug("API鏈嶅姟 --- 杩斿洖鎶ユ枃淇℃伅锛歿}", dataFlowContext.getResponseEntity());
+// }
- @Override
- public void cmd(CmdEvent event) throws CmdException {
- //杩欓噷澶勭悊涓氬姟閫昏緫鏁版嵁
- ICmdDataFlowContext dataFlowContext = event.getCmdDataFlowContext();
- //鑾峰彇璇锋眰鏁版嵁
- JSONObject reqJson = dataFlowContext.getReqJson();
-
- logger.debug("API鏈嶅姟 --- 璇锋眰鍙傛暟涓猴細{}", reqJson.toJSONString());
-
- validate(event, dataFlowContext,reqJson);
-
- doCmd(event, dataFlowContext, reqJson);
-
- //logger.debug("API鏈嶅姟 --- 杩斿洖鎶ユ枃淇℃伅锛歿}", dataFlowContext.getResponseEntity());
- }
-
- /**
- * 鏁版嵁鏍煎紡鏍¢獙鏂规硶
- * @param event 浜嬩欢瀵硅薄
- * @param cmdDataFlowContext 璇锋眰鎶ユ枃鏁版嵁
- */
- protected abstract void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson);
-
-
- /**
- * 涓氬姟澶勭悊绫�
- * @param event 浜嬩欢瀵硅薄
- * @param cmdDataFlowContext 鏁版嵁涓婃枃瀵硅薄
- * @param reqJson 璇锋眰鎶ユ枃
- */
- protected abstract void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException;
@Override
diff --git a/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdEventPublishing.java b/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdEventPublishing.java
index 28e8ac0..729d2ca 100644
--- a/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdEventPublishing.java
+++ b/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdEventPublishing.java
@@ -1,16 +1,11 @@
package com.java110.core.event.cmd;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.context.DataFlowContext;
+import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.center.DataFlowListenerOrderComparator;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.core.event.service.api.ServiceDataFlowListener;
import com.java110.dto.CmdListenerDto;
-import com.java110.entity.center.AppService;
import com.java110.utils.constant.CommonConstant;
import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.ServiceCodeConstant;
import com.java110.utils.exception.BusinessException;
import com.java110.utils.exception.CmdException;
import com.java110.utils.exception.ListenerExecuteException;
@@ -19,9 +14,10 @@
import com.java110.utils.util.Assert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpMethod;
+import sun.misc.ProxyGenerator;
-import java.lang.annotation.Annotation;
+import java.io.File;
+import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -88,8 +84,9 @@
List<ServiceCmdListener> cmdListeners = new ArrayList<ServiceCmdListener>();
for (CmdListenerDto listenerBean : getListeners()) {
+ //ServiceCmdListener listener = ApplicationContextFactory.getBean(listenerBean.getBeanName(), ServiceCmdListener.class);
ServiceCmdListener listener = ApplicationContextFactory.getBean(listenerBean.getBeanName(), ServiceCmdListener.class);
- if(listenerBean.getServiceCode().equals(serviceCode)) {
+ if (listenerBean.getServiceCode().equals(serviceCode)) {
cmdListeners.add(listener);
}
}
@@ -124,7 +121,7 @@
* @param dataFlowContext
*/
public static void multicastEvent(String serviceCode, ICmdDataFlowContext dataFlowContext) throws BusinessException {
- multicastEvent(serviceCode, dataFlowContext, null);
+ multicastEvent(serviceCode, dataFlowContext, null);
}
/**
@@ -199,10 +196,34 @@
@SuppressWarnings({"unchecked", "rawtypes"})
protected static void invokeListener(ServiceCmdListener listener, CmdEvent event) {
try {
- listener.cmd(event);
+ // //杩欓噷澶勭悊涓氬姟閫昏緫鏁版嵁
+ ICmdDataFlowContext dataFlowContext = event.getCmdDataFlowContext();
+ //鑾峰彇璇锋眰鏁版嵁
+ JSONObject reqJson = dataFlowContext.getReqJson();
+
+ logger.debug("API鏈嶅姟 --- 璇锋眰鍙傛暟涓猴細{}", reqJson.toJSONString());
+
+ listener.validate(event, dataFlowContext, reqJson);
+
+ listener.doCmd(event, dataFlowContext, reqJson);
+
+ //logger.debug("API鏈嶅姟 --- 杩斿洖鎶ユ枃淇℃伅锛歿}", dataFlowContext.getResponseEntity());
+ // listener.cmd(event);
} catch (CmdException e) {
LoggerEngine.error("鍙戝竷渚﹀惉澶辫触", e);
throw e;
}
}
+
+ public static void testPoxy(Class clazz){
+ byte[] bytes = ProxyGenerator.generateProxyClass("$Proxy", new Class[]{clazz});
+ try(
+ FileOutputStream fos =new FileOutputStream(new File("D:/$Proxy.class"))
+ ){
+ fos.write(bytes);
+ fos.flush();
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ }
}
diff --git a/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdListener.java b/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdListener.java
index acf905f..7f7a848 100644
--- a/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdListener.java
+++ b/java110-core/src/main/java/com/java110/core/event/cmd/ServiceCmdListener.java
@@ -1,5 +1,7 @@
package com.java110.core.event.cmd;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.app.order.Ordered;
import com.java110.utils.exception.CmdException;
@@ -10,11 +12,23 @@
* Created by wuxw on 2018/4/17.
*/
public interface ServiceCmdListener extends EventListener, Ordered {
+
+
+ /**
+ * 鏁版嵁鏍煎紡鏍¢獙鏂规硶
+ *
+ * @param event 浜嬩欢瀵硅薄
+ * @param cmdDataFlowContext 璇锋眰鎶ユ枃鏁版嵁
+ */
+ void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson);
+
/**
* 鎵ц鎸囦护
- * @param event
- * @throws Exception
+ *
+ * @param event 浜嬩欢瀵硅薄
+ * @param cmdDataFlowContext 鏁版嵁涓婃枃瀵硅薄
+ * @param reqJson 璇锋眰鎶ユ枃
*/
- void cmd(CmdEvent event) throws CmdException;
+ void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException;
}
diff --git a/java110-db/src/main/resources/mapper/community/FloorV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/FloorV1ServiceDaoImplMapper.xml
new file mode 100644
index 0000000..dd4aeb3
--- /dev/null
+++ b/java110-db/src/main/resources/mapper/community/FloorV1ServiceDaoImplMapper.xml
@@ -0,0 +1,132 @@
+<?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="floorV1ServiceDaoImpl">
+
+
+
+
+
+ <!-- 淇濆瓨妤兼爧淇℃伅 add by wuxw 2018-07-03 -->
+ <insert id="saveFloorInfo" parameterType="Map">
+ insert into f_floor(
+floor_id,name,remark,b_id,community_id,user_id,floor_num,floor_area
+) values (
+#{floorId},#{name},#{remark},#{bId},#{communityId},#{userId},#{floorNum},#{floorArea}
+)
+ </insert>
+
+
+
+ <!-- 鏌ヨ妤兼爧淇℃伅 add by wuxw 2018-07-03 -->
+ <select id="getFloorInfo" parameterType="Map" resultType="Map">
+ select t.floor_id,t.floor_id floorId,t.name floorName,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.user_id,t.user_id userId,t3.name userName,
+ t.floor_num,t.floor_num floorNum,t.floor_area,t.floor_area floorArea
+ from f_floor t
+ LEFT JOIN f_floor_attr t2 on t.floor_id = t2.floor_id
+ LEFT JOIN u_user t3 on t.user_id = t3.user_id and t3.status_cd = 0
+ where t2.spec_cd='100201912001' and t2.value='8008' and t.status_cd=0
+<if test="floorId !=null and floorId != ''">
+ and t.floor_id= #{floorId}
+</if>
+<if test="name !=null and name != ''">
+ and t.name= #{name}
+</if>
+<if test="remark !=null and remark != ''">
+ and t.remark= #{remark}
+</if>
+<if test="bId !=null and bId != ''">
+ and t.b_id= #{bId}
+</if>
+<if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+</if>
+<if test="userId !=null and userId != ''">
+ and t.user_id= #{userId}
+</if>
+<if test="floorNum !=null and floorNum != ''">
+ and t.floor_num= #{floorNum}
+</if>
+<if test="floorArea !=null and floorArea != ''">
+ and t.floor_area= #{floorArea}
+</if>
+order by t.create_time desc
+<if test="page != -1 and page != null ">
+ limit #{page}, #{row}
+</if>
+
+ </select>
+
+
+
+
+ <!-- 淇敼妤兼爧淇℃伅 add by wuxw 2018-07-03 -->
+ <update id="updateFloorInfo" parameterType="Map">
+ update f_floor t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if>
+<if test="name !=null and name != ''">
+, t.name= #{name}
+</if>
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if>
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if>
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if>
+<if test="floorNum !=null and floorNum != ''">
+, t.floor_num= #{floorNum}
+</if>
+<if test="floorArea !=null and floorArea != ''">
+, t.floor_area= #{floorArea}
+</if>
+ where 1=1 <if test="floorId !=null and floorId != ''">
+and t.floor_id= #{floorId}
+</if>
+<if test="bId !=null and bId != ''">
+and t.b_id= #{bId}
+</if>
+
+ </update>
+
+ <!-- 鏌ヨ妤兼爧鏁伴噺 add by wuxw 2018-07-03 -->
+ <select id="queryFloorsCount" parameterType="Map" resultType="Map">
+ select count(1) count
+ from f_floor t
+ LEFT JOIN f_floor_attr t2 on t.floor_id = t2.floor_id
+ LEFT JOIN u_user t3 on t.user_id = t3.user_id and t3.status_cd = 0
+ where t2.spec_cd='100201912001' and t2.value='8008' and t.status_cd=0
+<if test="floorId !=null and floorId != ''">
+ and t.floor_id= #{floorId}
+</if>
+<if test="name !=null and name != ''">
+ and t.name= #{name}
+</if>
+<if test="remark !=null and remark != ''">
+ and t.remark= #{remark}
+</if>
+<if test="bId !=null and bId != ''">
+ and t.b_id= #{bId}
+</if>
+<if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+</if>
+<if test="userId !=null and userId != ''">
+ and t.user_id= #{userId}
+</if>
+<if test="floorNum !=null and floorNum != ''">
+ and t.floor_num= #{floorNum}
+</if>
+<if test="floorArea !=null and floorArea != ''">
+ and t.floor_area= #{floorArea}
+</if>
+
+
+ </select>
+
+</mapper>
diff --git a/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml
new file mode 100644
index 0000000..341106c
--- /dev/null
+++ b/java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml
@@ -0,0 +1,205 @@
+<?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="roomV1ServiceDaoImpl">
+
+
+
+
+
+ <!-- 淇濆瓨鎴垮眿淇℃伅 add by wuxw 2018-07-03 -->
+ <insert id="saveRoomInfo" parameterType="Map">
+ insert into building_room(
+section,remark,room_sub_type,room_area,user_id,room_id,layer,fee_coefficient,built_up_area,room_num,unit_id,state,community_id,apartment,room_type,room_rent
+) values (
+#{section},#{remark},#{roomSubType},#{roomArea},#{userId},#{roomId},#{layer},#{feeCoefficient},#{builtUpArea},#{roomNum},#{unitId},#{state},#{communityId},#{apartment},#{roomType},#{roomRent}
+)
+ </insert>
+
+
+
+ <!-- 鏌ヨ鎴垮眿淇℃伅 add by wuxw 2018-07-03 -->
+ <select id="getRoomInfo" parameterType="Map" resultType="Map">
+ select t.section,t.remark,t.status_cd,t.status_cd statusCd,t.room_sub_type,t.room_sub_type roomSubType,t.room_area,t.room_area roomArea,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.fee_coefficient,t.fee_coefficient feeCoefficient,t.built_up_area,t.built_up_area builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,t.community_id,t.community_id communityId,t.apartment,t.room_type,t.room_type roomType,t.room_rent,t.room_rent roomRent
+from building_room t
+where 1 =1
+<if test="section !=null and section != ''">
+ and t.section= #{section}
+</if>
+<if test="remark !=null and remark != ''">
+ and t.remark= #{remark}
+</if>
+<if test="statusCd !=null and statusCd != ''">
+ and t.status_cd= #{statusCd}
+</if>
+<if test="roomSubType !=null and roomSubType != ''">
+ and t.room_sub_type= #{roomSubType}
+</if>
+<if test="roomArea !=null and roomArea != ''">
+ and t.room_area= #{roomArea}
+</if>
+<if test="userId !=null and userId != ''">
+ and t.user_id= #{userId}
+</if>
+<if test="roomId !=null and roomId != ''">
+ and t.room_id= #{roomId}
+</if>
+<if test="layer !=null and layer != ''">
+ and t.layer= #{layer}
+</if>
+<if test="feeCoefficient !=null and feeCoefficient != ''">
+ and t.fee_coefficient= #{feeCoefficient}
+</if>
+<if test="builtUpArea !=null and builtUpArea != ''">
+ and t.built_up_area= #{builtUpArea}
+</if>
+<if test="roomNum !=null and roomNum != ''">
+ and t.room_num= #{roomNum}
+</if>
+<if test="unitId !=null and unitId != ''">
+ and t.unit_id= #{unitId}
+</if>
+<if test="state !=null and state != ''">
+ and t.state= #{state}
+</if>
+<if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+</if>
+<if test="apartment !=null and apartment != ''">
+ and t.apartment= #{apartment}
+</if>
+<if test="roomType !=null and roomType != ''">
+ and t.room_type= #{roomType}
+</if>
+<if test="roomRent !=null and roomRent != ''">
+ and t.room_rent= #{roomRent}
+</if>
+order by t.create_time desc
+<if test="page != -1 and page != null ">
+ limit #{page}, #{row}
+</if>
+
+ </select>
+
+
+
+
+ <!-- 淇敼鎴垮眿淇℃伅 add by wuxw 2018-07-03 -->
+ <update id="updateRoomInfo" parameterType="Map">
+ update building_room t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if>
+<if test="section !=null and section != ''">
+, t.section= #{section}
+</if>
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if>
+<if test="roomSubType !=null and roomSubType != ''">
+, t.room_sub_type= #{roomSubType}
+</if>
+<if test="roomArea !=null and roomArea != ''">
+, t.room_area= #{roomArea}
+</if>
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if>
+<if test="layer !=null and layer != ''">
+, t.layer= #{layer}
+</if>
+<if test="feeCoefficient !=null and feeCoefficient != ''">
+, t.fee_coefficient= #{feeCoefficient}
+</if>
+<if test="builtUpArea !=null and builtUpArea != ''">
+, t.built_up_area= #{builtUpArea}
+</if>
+<if test="roomNum !=null and roomNum != ''">
+, t.room_num= #{roomNum}
+</if>
+<if test="unitId !=null and unitId != ''">
+, t.unit_id= #{unitId}
+</if>
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if>
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if>
+<if test="apartment !=null and apartment != ''">
+, t.apartment= #{apartment}
+</if>
+<if test="roomType !=null and roomType != ''">
+, t.room_type= #{roomType}
+</if>
+<if test="roomRent !=null and roomRent != ''">
+, t.room_rent= #{roomRent}
+</if>
+ where 1=1 <if test="roomId !=null and roomId != ''">
+and t.room_id= #{roomId}
+</if>
+
+ </update>
+
+ <!-- 鏌ヨ鎴垮眿鏁伴噺 add by wuxw 2018-07-03 -->
+ <select id="queryRoomsCount" parameterType="Map" resultType="Map">
+ select count(1) count
+from building_room t
+where 1 =1
+<if test="section !=null and section != ''">
+ and t.section= #{section}
+</if>
+<if test="remark !=null and remark != ''">
+ and t.remark= #{remark}
+</if>
+<if test="statusCd !=null and statusCd != ''">
+ and t.status_cd= #{statusCd}
+</if>
+<if test="roomSubType !=null and roomSubType != ''">
+ and t.room_sub_type= #{roomSubType}
+</if>
+<if test="roomArea !=null and roomArea != ''">
+ and t.room_area= #{roomArea}
+</if>
+<if test="userId !=null and userId != ''">
+ and t.user_id= #{userId}
+</if>
+<if test="roomId !=null and roomId != ''">
+ and t.room_id= #{roomId}
+</if>
+<if test="layer !=null and layer != ''">
+ and t.layer= #{layer}
+</if>
+<if test="feeCoefficient !=null and feeCoefficient != ''">
+ and t.fee_coefficient= #{feeCoefficient}
+</if>
+<if test="builtUpArea !=null and builtUpArea != ''">
+ and t.built_up_area= #{builtUpArea}
+</if>
+<if test="roomNum !=null and roomNum != ''">
+ and t.room_num= #{roomNum}
+</if>
+<if test="unitId !=null and unitId != ''">
+ and t.unit_id= #{unitId}
+</if>
+<if test="state !=null and state != ''">
+ and t.state= #{state}
+</if>
+<if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+</if>
+<if test="apartment !=null and apartment != ''">
+ and t.apartment= #{apartment}
+</if>
+<if test="roomType !=null and roomType != ''">
+ and t.room_type= #{roomType}
+</if>
+<if test="roomRent !=null and roomRent != ''">
+ and t.room_rent= #{roomRent}
+</if>
+
+
+ </select>
+
+</mapper>
diff --git a/java110-generator/src/main/java/com/java110/code/TableToJson.java b/java110-generator/src/main/java/com/java110/code/TableToJson.java
new file mode 100644
index 0000000..5e76bad
--- /dev/null
+++ b/java110-generator/src/main/java/com/java110/code/TableToJson.java
@@ -0,0 +1,95 @@
+package com.java110.code;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.util.StringUtil;
+
+public class TableToJson {
+
+ //show create table c_orders 鐢ㄨ繖涓鍙ヨ幏鍙�
+ public static final String createTableSql = "CREATE TABLE `building_room` (\n" +
+ " `room_id` varchar(30) NOT NULL COMMENT '鎴垮眿ID',\n" +
+ " `b_id` varchar(30) NOT NULL COMMENT '涓氬姟Id',\n" +
+ " `room_num` varchar(12) NOT NULL COMMENT '鎴垮眿缂栧彿',\n" +
+ " `unit_id` varchar(30) NOT NULL COMMENT '鍗曞厓ID',\n" +
+ " `layer` int(11) NOT NULL COMMENT '灞傛暟',\n" +
+ " `section` int(11) DEFAULT NULL COMMENT '瀹�',\n" +
+ " `apartment` varchar(20) NOT NULL COMMENT '鎴峰瀷',\n" +
+ " `built_up_area` decimal(6,2) NOT NULL COMMENT '寤虹瓚闈㈢Н',\n" +
+ " `fee_coefficient` decimal(12,2) NOT NULL DEFAULT '1.00' COMMENT '绠楄垂绯绘暟',\n" +
+ " `user_id` varchar(30) NOT NULL COMMENT '鐢ㄦ埛ID',\n" +
+ " `remark` varchar(200) DEFAULT NULL COMMENT '澶囨敞',\n" +
+ " `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿',\n" +
+ " `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '鏁版嵁鐘舵�侊紝璇︾粏鍙傝�僣_status琛紝S 淇濆瓨锛�0, 鍦ㄧ敤 1澶辨晥',\n" +
+ " `state` varchar(4) NOT NULL COMMENT '鎴垮眿鐘舵�侊紝濡傛埧灞嬪嚭鍞瓑锛岃鏌ョ湅state 琛�',\n" +
+ " `community_id` varchar(30) DEFAULT NULL COMMENT '灏忓尯ID',\n" +
+ " `room_type` varchar(12) NOT NULL DEFAULT '1010301' COMMENT '鎴垮眿绫诲瀷',\n" +
+ " `room_sub_type` varchar(12) NOT NULL DEFAULT '110' COMMENT '鎴垮眿绫诲瀷 110 浣忓畢鎴垮眿锛�119 鍔炲叕瀹� 120 瀹胯垗',\n" +
+ " `room_area` decimal(6,2) NOT NULL COMMENT '瀹ゅ唴闈㈢Н',\n" +
+ " `room_rent` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '绉熼噾',\n" +
+ " UNIQUE KEY `room_id` (`room_id`) USING BTREE,\n" +
+ " UNIQUE KEY `idx_room_id` (`room_id`) USING BTREE,\n" +
+ " KEY `idx_room_b_id` (`b_id`) USING BTREE,\n" +
+ " KEY `i_br_unit_id` (`unit_id`)\n" +
+ ")";
+
+ public static void main(String[] args) {
+ //涓氬姟鍚嶇О desc 涓氬姟缂栫爜鍚嶇О鐢熸垚鍚庣被鍚� name 涓婚敭 id 闇�瑕佹斁鍒伴偅涓湇鍔� shareName
+ String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")"));
+ String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("("));
+ tableName = tableName.replaceAll("`", "").trim();
+ newSql = newSql.replaceAll("\n", "");
+ String[] rowSqls = newSql.split("',");
+ JSONObject param = new JSONObject();
+ param.put("autoMove", true);
+ param.put("desc", "");
+ param.put("id", "");
+ param.put("name", "");
+ param.put("shareColumn", "community_id");
+ param.put("shareName", "");
+ param.put("shareParam", "communityId");
+ param.put("tableName", tableName);
+ JSONObject paramColumn = new JSONObject();
+ JSONArray requireds = new JSONArray();
+ JSONObject required = null;
+ String key = "";
+ for (String rowSql : rowSqls) {
+ required = new JSONObject();
+ key = rowSql.trim();
+ key = key.substring(0, key.indexOf(" "));
+ key = key.replaceAll("`", "");
+ if ("UNIQUE".equals(key)) {
+ continue;
+ }
+ if ("KEY".equals(key)) {
+ continue;
+ }
+ if ("b_id".equals(key)) {
+ continue;
+ }
+ if ("create_time".equals(key)) {
+ continue;
+ }
+ if (rowSql.toLowerCase().contains("not null")) {
+ required.put("code", StringUtil.lineToHump(key));
+ String comment = rowSql.contains("COMMENT") ? rowSql.substring(rowSql.indexOf("COMMENT '") + 9) : StringUtil.lineToHump(key);
+ comment = comment.trim();
+ if(comment.contains("锛�")){
+ comment = comment.split("锛�")[0];
+ }
+ if(comment.contains(" ")){
+ comment = comment.split(" ")[0];
+ }
+
+ required.put("msg", comment + "涓嶈兘涓虹┖");
+ requireds.add(required);
+ }
+ paramColumn.put(StringUtil.lineToHump(key), key);
+ }
+ param.put("param", paramColumn);
+ param.put("required", requireds);
+ System.out.println(param.toJSONString());
+
+ }
+
+}
diff --git a/java110-generator/src/main/java/com/java110/code/TableToJsonWeb.java b/java110-generator/src/main/java/com/java110/code/TableToJsonWeb.java
new file mode 100644
index 0000000..a8b877b
--- /dev/null
+++ b/java110-generator/src/main/java/com/java110/code/TableToJsonWeb.java
@@ -0,0 +1,117 @@
+package com.java110.code;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.util.StringUtil;
+
+public class TableToJsonWeb {
+
+ //show create table c_orders 鐢ㄨ繖涓鍙ヨ幏鍙�
+ public static final String createTableSql = "CREATE TABLE `building_room` (\n" +
+ " `room_id` varchar(30) NOT NULL COMMENT '鎴垮眿ID',\n" +
+ " `b_id` varchar(30) NOT NULL COMMENT '涓氬姟Id',\n" +
+ " `room_num` varchar(12) NOT NULL COMMENT '鎴垮眿缂栧彿',\n" +
+ " `unit_id` varchar(30) NOT NULL COMMENT '鍗曞厓ID',\n" +
+ " `layer` int(11) NOT NULL COMMENT '灞傛暟',\n" +
+ " `section` int(11) DEFAULT NULL COMMENT '瀹�',\n" +
+ " `apartment` varchar(20) NOT NULL COMMENT '鎴峰瀷',\n" +
+ " `built_up_area` decimal(6,2) NOT NULL COMMENT '寤虹瓚闈㈢Н',\n" +
+ " `fee_coefficient` decimal(12,2) NOT NULL DEFAULT '1.00' COMMENT '绠楄垂绯绘暟',\n" +
+ " `user_id` varchar(30) NOT NULL COMMENT '鐢ㄦ埛ID',\n" +
+ " `remark` varchar(200) DEFAULT NULL COMMENT '澶囨敞',\n" +
+ " `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿',\n" +
+ " `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '鏁版嵁鐘舵�侊紝璇︾粏鍙傝�僣_status琛紝S 淇濆瓨锛�0, 鍦ㄧ敤 1澶辨晥',\n" +
+ " `state` varchar(4) NOT NULL COMMENT '鎴垮眿鐘舵�侊紝濡傛埧灞嬪嚭鍞瓑锛岃鏌ョ湅state 琛�',\n" +
+ " `community_id` varchar(30) DEFAULT NULL COMMENT '灏忓尯ID',\n" +
+ " `room_type` varchar(12) NOT NULL DEFAULT '1010301' COMMENT '鎴垮眿绫诲瀷',\n" +
+ " `room_sub_type` varchar(12) NOT NULL DEFAULT '110' COMMENT '鎴垮眿绫诲瀷 110 浣忓畢鎴垮眿锛�119 鍔炲叕瀹� 120 瀹胯垗',\n" +
+ " `room_area` decimal(6,2) NOT NULL COMMENT '瀹ゅ唴闈㈢Н',\n" +
+ " `room_rent` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '绉熼噾',\n" +
+ " UNIQUE KEY `room_id` (`room_id`) USING BTREE,\n" +
+ " UNIQUE KEY `idx_room_id` (`room_id`) USING BTREE,\n" +
+ " KEY `idx_room_b_id` (`b_id`) USING BTREE,\n" +
+ " KEY `i_br_unit_id` (`unit_id`)\n" +
+ ")";
+
+ public static void main(String[] args) {
+
+ // templateName 涓氬姟鍚嶇О 涓氬姟缂栫爜鍚嶇О鐢熸垚鍚庢枃浠跺悕 templateCode 涓婚敭 templateKey
+ // 涓氬姟涓婚敭鍚嶇О templateKeyName=templateName+ID 涓绘満椹煎嘲 searchCode 涓婚敭鍚嶇О searchName
+ // directories 鏀惧湪鍓嶇閭d釜鐩綍涓�
+ String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")"));
+ String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("("));
+ tableName = tableName.replaceAll("`", "").trim();
+ newSql = newSql.replaceAll("\n", "");
+ String[] rowSqls = newSql.split("',");
+ JSONObject param = new JSONObject();
+ param.put("templateName", "");
+ param.put("templateCode", "");
+ param.put("templateKey", "");
+ param.put("templateKeyName", "");
+ param.put("searchCode", "");
+ param.put("searchName", "");
+ param.put("directories", "");
+ JSONObject paramColumn = null;
+ JSONArray conditions = new JSONArray();
+ JSONArray paramColumns = new JSONArray();
+ JSONObject condition = null;
+ String key = "";
+ for (String rowSql : rowSqls) {
+ condition = new JSONObject();
+ paramColumn = new JSONObject();
+ key = rowSql.trim();
+ key = key.substring(0, key.indexOf(" "));
+ key = key.replaceAll("`", "");
+ if ("UNIQUE".equals(key)) {
+ continue;
+ }
+ if ("KEY".equals(key)) {
+ continue;
+ }
+ if ("b_id".equals(key)) {
+ continue;
+ }
+ if ("create_time".equals(key)) {
+ continue;
+ }
+ String comment = rowSql.contains("COMMENT") ? rowSql.substring(rowSql.indexOf("COMMENT '") + 9) : StringUtil.lineToHump(key);
+ comment = comment.trim();
+ if(comment.contains("锛�")){
+ comment = comment.split("锛�")[0];
+ }
+ if(comment.contains(" ")){
+ comment = comment.split(" ")[0];
+ }
+ paramColumn.put("desc", comment);
+ if (rowSql.toLowerCase().contains("not null")) {
+
+ condition.put("name", comment);
+ condition.put("inputType", "input");
+ condition.put("code", StringUtil.lineToHump(key));
+ condition.put("whereCondition", "equal");
+ conditions.add(condition);
+ paramColumn.put("desc", "蹇呭~锛�"+comment);
+ }
+ String limit = rowSql.substring(rowSql.indexOf("(") + 1,rowSql.indexOf(")"));
+ if(limit.contains(",")){
+ limit = limit.split(",")[0];
+ }
+
+ paramColumn.put("code", StringUtil.lineToHump(key));
+ paramColumn.put("cnCode", comment);
+ paramColumn.put("required", true);
+ paramColumn.put("hasDefaultValue", false);
+ paramColumn.put("inputType", "input");
+ paramColumn.put("limit", "maxLength");
+ paramColumn.put("limitParam",limit );
+ paramColumn.put("limitErrInfo", comment+"涓嶈兘瓒呰繃"+limit);
+ paramColumn.put("show", true);
+ paramColumns.add(paramColumn);
+ }
+ param.put("columns", paramColumns);
+ param.put("conditions", conditions);
+ System.out.println(param.toJSONString());
+
+ }
+
+}
diff --git a/java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java b/java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java
index b3a30df..f1ffd4f 100755
--- a/java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java
+++ b/java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java
@@ -70,7 +70,7 @@
generatorInnerServiceSMOImpl.generator(data);
GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean();
- generatorDtoBean.generator(data);
+ //generatorDtoBean.generator(data);
GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO();
generatorIInnerServiceSMO.generator(data);
diff --git a/java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java b/java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java
index f306bdb..6ed30ec 100755
--- a/java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java
+++ b/java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java
@@ -14,7 +14,7 @@
* @param data
*/
public void generator(Data data) throws Exception {
- genneratorPo(data); //API DataVo瀵硅薄
+ //genneratorPo(data); //API DataVo瀵硅薄
genneratorSaveCmd(data); //Api BmoImpl
genneratorUpdateBmoImpl(data); //Api BmoImpl
genneratorDeleteBmoImpl(data); //Api BmoImpl
diff --git a/java110-generator/src/main/resources/newBack/template_1.json b/java110-generator/src/main/resources/newBack/template_1.json
index 5f60756..96cf449 100755
--- a/java110-generator/src/main/resources/newBack/template_1.json
+++ b/java110-generator/src/main/resources/newBack/template_1.json
@@ -1,40 +1,87 @@
{
- "autoMove": true,
- "id": "userId",
- "name": "user",
- "desc": "鐢ㄦ埛",
- "shareParam": "userId",
- "shareColumn": "user_id",
- "shareName": "user",
- "tableName": "u_user",
"param": {
+ "section": "section",
+ "remark": "remark",
+ "statusCd": "status_cd",
+ "roomSubType": "room_sub_type",
+ "roomArea": "room_area",
"userId": "user_id",
- "name": "name",
- "email": "email",
- "address": "address",
- "password": "password",
- "locationCd": "location_cd",
- "age": "age",
- "sex": "sex",
- "tel": "tel",
- "levelCd": "level_cd",
- "bId": "b_id",
- "score": "score",
- "statusCd": "status_cd"
+ "roomId": "room_id",
+ "layer": "layer",
+ "feeCoefficient": "fee_coefficient",
+ "builtUpArea": "built_up_area",
+ "roomNum": "room_num",
+ "unitId": "unit_id",
+ "state": "state",
+ "communityId": "community_id",
+ "apartment": "apartment",
+ "roomType": "room_type",
+ "roomRent": "room_rent"
},
+ "name": "room",
+ "shareColumn": "community_id",
+ "id": "roomId",
+ "shareName": "community",
+ "autoMove": true,
"required": [
{
- "code": "name",
- "msg": "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖"
+ "msg": "鎴垮眿ID涓嶈兘涓虹┖",
+ "code": "roomId"
},
{
- "code": "password",
- "msg": "瀵嗙爜涓嶈兘涓虹┖"
+ "msg": "鎴垮眿缂栧彿涓嶈兘涓虹┖",
+ "code": "roomNum"
},
{
- "code": "tel",
- "msg": "鎵嬫満鍙蜂笉鑳戒负绌�"
+ "msg": "鍗曞厓ID涓嶈兘涓虹┖",
+ "code": "unitId"
+ },
+ {
+ "msg": "灞傛暟涓嶈兘涓虹┖",
+ "code": "layer"
+ },
+ {
+ "msg": "鎴峰瀷涓嶈兘涓虹┖",
+ "code": "apartment"
+ },
+ {
+ "msg": "寤虹瓚闈㈢Н涓嶈兘涓虹┖",
+ "code": "builtUpArea"
+ },
+ {
+ "msg": "绠楄垂绯绘暟涓嶈兘涓虹┖",
+ "code": "feeCoefficient"
+ },
+ {
+ "msg": "鐢ㄦ埛ID涓嶈兘涓虹┖",
+ "code": "userId"
+ },
+ {
+ "msg": "鏁版嵁鐘舵�侊紝璇︾粏鍙傝�僣_status琛紝S 淇濆瓨锛�0, 鍦ㄧ敤 1澶辨晥涓嶈兘涓虹┖",
+ "code": "statusCd"
+ },
+ {
+ "msg": "鎴垮眿鐘舵�侊紝濡傛埧灞嬪嚭鍞瓑锛岃鏌ョ湅state 琛ㄤ笉鑳戒负绌�",
+ "code": "state"
+ },
+ {
+ "msg": "鎴垮眿绫诲瀷涓嶈兘涓虹┖",
+ "code": "roomType"
+ },
+ {
+ "msg": "鎴垮眿绫诲瀷 110 浣忓畢鎴垮眿锛�119 鍔炲叕瀹� 120 瀹胯垗涓嶈兘涓虹┖",
+ "code": "roomSubType"
+ },
+ {
+ "msg": "瀹ゅ唴闈㈢Н涓嶈兘涓虹┖",
+ "code": "roomArea"
+ },
+ {
+ "msg": "绉熼噾涓嶈兘涓虹┖",
+ "code": "roomRent"
}
- ]
+ ],
+ "desc": "鎴垮眿",
+ "shareParam": "communityId",
+ "tableName": "building_room"
}
-
diff --git a/java110-generator/src/main/resources/newTemplate/DeleteCmd.txt b/java110-generator/src/main/resources/newTemplate/DeleteCmd.txt
index 5e4b06b..a0c3a54 100644
--- a/java110-generator/src/main/resources/newTemplate/DeleteCmd.txt
+++ b/java110-generator/src/main/resources/newTemplate/DeleteCmd.txt
@@ -22,7 +22,7 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
+import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -49,16 +49,16 @@
private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@validateTemplateColumns@@
}
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
@@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Po.class);
- int flag = @@templateCode@@V1InnerServiceSMOImpl.delete@@TemplateCode@@(businessTableHisPo);
+ int flag = @@templateCode@@V1InnerServiceSMOImpl.delete@@TemplateCode@@(@@templateCode@@Po);
if (flag < 1) {
throw new CmdException("鍒犻櫎鏁版嵁澶辫触");
diff --git a/java110-generator/src/main/resources/newTemplate/ListCmd.txt b/java110-generator/src/main/resources/newTemplate/ListCmd.txt
index 3ce2474..fc2a440 100644
--- a/java110-generator/src/main/resources/newTemplate/ListCmd.txt
+++ b/java110-generator/src/main/resources/newTemplate/ListCmd.txt
@@ -22,7 +22,7 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
+import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -56,13 +56,13 @@
private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
super.validatePageInfo(reqJson);
}
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
@@TemplateCode@@Dto @@templateCode@@Dto = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Dto.class);
diff --git a/java110-generator/src/main/resources/newTemplate/SaveCmd.txt b/java110-generator/src/main/resources/newTemplate/SaveCmd.txt
index 67d3d36..67ab114 100644
--- a/java110-generator/src/main/resources/newTemplate/SaveCmd.txt
+++ b/java110-generator/src/main/resources/newTemplate/SaveCmd.txt
@@ -22,7 +22,7 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
+import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -53,17 +53,17 @@
private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@validateTemplateColumns@@
}
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
@@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Po.class);
@@templateCode@@Po.set@@TemplateKey@@(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
- int flag = @@templateCode@@V1InnerServiceSMOImpl.save@@TemplateCode@@(businessTableHisPo);
+ int flag = @@templateCode@@V1InnerServiceSMOImpl.save@@TemplateCode@@(@@templateCode@@Po);
if (flag < 1) {
throw new CmdException("淇濆瓨鏁版嵁澶辫触");
diff --git a/java110-generator/src/main/resources/newTemplate/UpdateCmd.txt b/java110-generator/src/main/resources/newTemplate/UpdateCmd.txt
index 42dc873..390f560 100644
--- a/java110-generator/src/main/resources/newTemplate/UpdateCmd.txt
+++ b/java110-generator/src/main/resources/newTemplate/UpdateCmd.txt
@@ -22,7 +22,7 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
+import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -53,16 +53,16 @@
private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@validateTemplateColumns@@
}
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
@@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Po.class);
- int flag = @@templateCode@@V1InnerServiceSMOImpl.update@@TemplateCode@@(businessTableHisPo);
+ int flag = @@templateCode@@V1InnerServiceSMOImpl.update@@TemplateCode@@(@@templateCode@@Po);
if (flag < 1) {
throw new CmdException("鏇存柊鏁版嵁澶辫触");
diff --git a/java110-generator/src/main/resources/web/template_1.json b/java110-generator/src/main/resources/web/template_1.json
index a836734..1d0a8ee 100755
--- a/java110-generator/src/main/resources/web/template_1.json
+++ b/java110-generator/src/main/resources/web/template_1.json
@@ -1,96 +1,301 @@
{
- "templateName": "涓氬姟杞ㄨ抗",
- "templateCode": "businessTableHis",
- "templateKey": "hisId",
- "templateKeyName": "杞ㄨ抗ID",
- "searchCode": "hisId",
- "searchName": "杞ㄨ抗ID",
- "directories": "dev",
- "conditions": [
- {
- "name": "鍔ㄤ綔",
- "inputType": "select",
- "selectValue":"ADD,MOD,DEL",
- "selectValueName":"娣诲姞,淇敼,鍒犻櫎",
- "code": "action",
- "whereCondition": "equal"
- },
- {
- "name": "琛ㄥ悕",
- "inputType": "input",
- "code": "actionObj",
- "whereCondition": "equal"
- },
- {
- "name": "涓氬姟绫诲瀷",
- "inputType": "input",
- "code": "businessTypeCd",
- "whereCondition": "equal"
- }
- ],
+ "templateKeyName": "",
+ "templateName": "",
"columns": [
{
- "code": "businessTypeCd",
- "cnCode": "涓氬姟绫诲瀷",
- "desc": "蹇呭~锛岃濉啓涓氬姟绫诲瀷",
- "required": true,
"hasDefaultValue": false,
- "inputType": "input",
- "limit": "maxLength",
"limitParam": "30",
- "limitErrInfo": "涓氬姟绫诲瀷瓒呰繃30浣�",
- "show": true
+ "code": "roomId",
+ "limitErrInfo": "鎴垮眿ID涓嶈兘瓒呰繃30",
+ "cnCode": "鎴垮眿ID",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屾埧灞婭D"
},
{
- "code": "action",
- "cnCode": "鍔ㄤ綔",
- "desc": "蹇呭~锛岃閫夋嫨鍔ㄤ綔",
- "required": true,
"hasDefaultValue": false,
- "inputType": "select",
- "selectValue":"ADD,MOD,DEL",
- "selectValueName":"娣诲姞,淇敼,鍒犻櫎",
- "limit": "maxLength",
"limitParam": "12",
- "limitErrInfo": "鍔ㄤ綔涓嶈兘涓虹┖",
- "show": true
- },
- {
- "code": "actionObj",
- "cnCode": "琛ㄥ悕",
- "desc": "蹇呭~锛岃濉啓琛ㄥ悕",
+ "code": "roomNum",
+ "limitErrInfo": "鎴垮眿缂栧彿涓嶈兘瓒呰繃12",
+ "cnCode": "鎴垮眿缂栧彿",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
"required": true,
- "hasDefaultValue": false,
- "inputType": "input",
- "limit": "maxLength",
- "limitParam": "64",
- "limitErrInfo": "琛ㄥ悕瓒呰繃64浣�",
- "show": true
+ "desc": "蹇呭~锛屾埧灞嬬紪鍙�"
},
{
- "code": "actionObjHis",
- "cnCode": "杞ㄨ抗琛ㄥ悕",
- "desc": "蹇呭~锛岃濉啓杞ㄨ抗琛ㄥ悕",
+ "hasDefaultValue": false,
+ "limitParam": "30",
+ "code": "unitId",
+ "limitErrInfo": "鍗曞厓ID涓嶈兘瓒呰繃30",
+ "cnCode": "鍗曞厓ID",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
"required": true,
- "hasDefaultValue": false,
- "inputType": "input",
- "limit": "maxLength",
- "limitParam": "64",
- "limitErrInfo": "杞ㄨ抗琛ㄥ悕瓒呰繃64浣�",
- "show": true
+ "desc": "蹇呭~锛屽崟鍏僆D"
},
{
- "code": "remark",
- "cnCode": "澶囨敞",
- "desc": "鍙~锛岃濉啓澶囨敞",
- "required": false,
"hasDefaultValue": false,
- "defaultValue": "",
- "inputType": "input",
+ "limitParam": "11",
+ "code": "layer",
+ "limitErrInfo": "灞傛暟涓嶈兘瓒呰繃11",
+ "cnCode": "灞傛暟",
"limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屽眰鏁�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "11",
+ "code": "section",
+ "limitErrInfo": "瀹や笉鑳借秴杩�11",
+ "cnCode": "瀹�",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "瀹�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "20",
+ "code": "apartment",
+ "limitErrInfo": "鎴峰瀷涓嶈兘瓒呰繃20",
+ "cnCode": "鎴峰瀷",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屾埛鍨�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "6",
+ "code": "builtUpArea",
+ "limitErrInfo": "寤虹瓚闈㈢Н涓嶈兘瓒呰繃6",
+ "cnCode": "寤虹瓚闈㈢Н",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屽缓绛戦潰绉�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "12",
+ "code": "feeCoefficient",
+ "limitErrInfo": "绠楄垂绯绘暟涓嶈兘瓒呰繃12",
+ "cnCode": "绠楄垂绯绘暟",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛岀畻璐圭郴鏁�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "30",
+ "code": "userId",
+ "limitErrInfo": "鐢ㄦ埛ID涓嶈兘瓒呰繃30",
+ "cnCode": "鐢ㄦ埛ID",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛岀敤鎴稩D"
+ },
+ {
+ "hasDefaultValue": false,
"limitParam": "200",
- "limitErrInfo": "澶囨敞鍐呭涓嶈兘瓒呰繃200",
- "show": false
+ "code": "remark",
+ "limitErrInfo": "澶囨敞涓嶈兘瓒呰繃200",
+ "cnCode": "澶囨敞",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "澶囨敞"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "2",
+ "code": "statusCd",
+ "limitErrInfo": "鏁版嵁鐘舵�佷笉鑳借秴杩�2",
+ "cnCode": "鏁版嵁鐘舵��",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屾暟鎹姸鎬�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "4",
+ "code": "state",
+ "limitErrInfo": "鎴垮眿鐘舵�佷笉鑳借秴杩�4",
+ "cnCode": "鎴垮眿鐘舵��",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屾埧灞嬬姸鎬�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "30",
+ "code": "communityId",
+ "limitErrInfo": "灏忓尯ID涓嶈兘瓒呰繃30",
+ "cnCode": "灏忓尯ID",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "灏忓尯ID"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "12",
+ "code": "roomType",
+ "limitErrInfo": "鎴垮眿绫诲瀷涓嶈兘瓒呰繃12",
+ "cnCode": "鎴垮眿绫诲瀷",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屾埧灞嬬被鍨�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "12",
+ "code": "roomSubType",
+ "limitErrInfo": "鎴垮眿绫诲瀷涓嶈兘瓒呰繃12",
+ "cnCode": "鎴垮眿绫诲瀷",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屾埧灞嬬被鍨�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "6",
+ "code": "roomArea",
+ "limitErrInfo": "瀹ゅ唴闈㈢Н涓嶈兘瓒呰繃6",
+ "cnCode": "瀹ゅ唴闈㈢Н",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛屽鍐呴潰绉�"
+ },
+ {
+ "hasDefaultValue": false,
+ "limitParam": "10",
+ "code": "roomRent",
+ "limitErrInfo": "绉熼噾涓嶈兘瓒呰繃10",
+ "cnCode": "绉熼噾",
+ "limit": "maxLength",
+ "show": true,
+ "inputType": "input",
+ "required": true,
+ "desc": "蹇呭~锛岀閲�"
}
- ]
-}
\ No newline at end of file
+ ],
+ "searchName": "",
+ "directories": "",
+ "searchCode": "",
+ "templateCode": "",
+ "conditions": [
+ {
+ "whereCondition": "equal",
+ "code": "roomId",
+ "name": "鎴垮眿ID",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "roomNum",
+ "name": "鎴垮眿缂栧彿",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "unitId",
+ "name": "鍗曞厓ID",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "layer",
+ "name": "灞傛暟",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "apartment",
+ "name": "鎴峰瀷",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "builtUpArea",
+ "name": "寤虹瓚闈㈢Н",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "feeCoefficient",
+ "name": "绠楄垂绯绘暟",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "userId",
+ "name": "鐢ㄦ埛ID",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "statusCd",
+ "name": "鏁版嵁鐘舵��",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "state",
+ "name": "鎴垮眿鐘舵��",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "roomType",
+ "name": "鎴垮眿绫诲瀷",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "roomSubType",
+ "name": "鎴垮眿绫诲瀷",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "roomArea",
+ "name": "瀹ゅ唴闈㈢Н",
+ "inputType": "input"
+ },
+ {
+ "whereCondition": "equal",
+ "code": "roomRent",
+ "name": "绉熼噾",
+ "inputType": "input"
+ }
+ ],
+ "templateKey": ""
+}
diff --git a/java110-interface/src/main/java/com/java110/intf/community/IFloorV1InnerServiceSMO.java b/java110-interface/src/main/java/com/java110/intf/community/IFloorV1InnerServiceSMO.java
new file mode 100644
index 0000000..a1fef3a
--- /dev/null
+++ b/java110-interface/src/main/java/com/java110/intf/community/IFloorV1InnerServiceSMO.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.community;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.FloorDto;
+import com.java110.po.floor.FloorPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙g被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/floorV1Api")
+public interface IFloorV1InnerServiceSMO {
+
+
+ @RequestMapping(value = "/saveFloor", method = RequestMethod.POST)
+ public int saveFloor(@RequestBody FloorPo floorPo);
+
+ @RequestMapping(value = "/updateFloor", method = RequestMethod.POST)
+ public int updateFloor(@RequestBody FloorPo floorPo);
+
+ @RequestMapping(value = "/deleteFloor", method = RequestMethod.POST)
+ public int deleteFloor(@RequestBody FloorPo floorPo);
+
+ /**
+ * <p>鏌ヨ灏忓尯妤间俊鎭�</p>
+ *
+ *
+ * @param floorDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return FloorDto 瀵硅薄鏁版嵁
+ */
+ @RequestMapping(value = "/queryFloors", method = RequestMethod.POST)
+ List<FloorDto> queryFloors(@RequestBody FloorDto floorDto);
+
+ /**
+ * 鏌ヨ<p>灏忓尯妤�</p>鎬昏褰曟暟
+ *
+ * @param floorDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return 灏忓尯涓嬬殑灏忓尯妤艰褰曟暟
+ */
+ @RequestMapping(value = "/queryFloorsCount", method = RequestMethod.POST)
+ int queryFloorsCount(@RequestBody FloorDto floorDto);
+}
diff --git a/java110-interface/src/main/java/com/java110/intf/community/IRoomV1InnerServiceSMO.java b/java110-interface/src/main/java/com/java110/intf/community/IRoomV1InnerServiceSMO.java
new file mode 100644
index 0000000..10d020a
--- /dev/null
+++ b/java110-interface/src/main/java/com/java110/intf/community/IRoomV1InnerServiceSMO.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.community;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.RoomDto;
+import com.java110.po.room.RoomPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙g被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/roomV1Api")
+public interface IRoomV1InnerServiceSMO {
+
+
+ @RequestMapping(value = "/saveRoom", method = RequestMethod.POST)
+ public int saveRoom(@RequestBody RoomPo roomPo);
+
+ @RequestMapping(value = "/updateRoom", method = RequestMethod.POST)
+ public int updateRoom(@RequestBody RoomPo roomPo);
+
+ @RequestMapping(value = "/deleteRoom", method = RequestMethod.POST)
+ public int deleteRoom(@RequestBody RoomPo roomPo);
+
+ /**
+ * <p>鏌ヨ灏忓尯妤间俊鎭�</p>
+ *
+ *
+ * @param roomDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return RoomDto 瀵硅薄鏁版嵁
+ */
+ @RequestMapping(value = "/queryRooms", method = RequestMethod.POST)
+ List<RoomDto> queryRooms(@RequestBody RoomDto roomDto);
+
+ /**
+ * 鏌ヨ<p>灏忓尯妤�</p>鎬昏褰曟暟
+ *
+ * @param roomDto 鏁版嵁瀵硅薄鍒嗕韩
+ * @return 灏忓尯涓嬬殑灏忓尯妤艰褰曟暟
+ */
+ @RequestMapping(value = "/queryRoomsCount", method = RequestMethod.POST)
+ int queryRoomsCount(@RequestBody RoomDto roomDto);
+}
diff --git a/service-common/src/main/java/com/java110/common/bmo/workflow/impl/QueryWorkFlowFirstStaffBMOImpl.java b/service-common/src/main/java/com/java110/common/bmo/workflow/impl/QueryWorkFlowFirstStaffBMOImpl.java
index c4458b3..9b0bc11 100755
--- a/service-common/src/main/java/com/java110/common/bmo/workflow/impl/QueryWorkFlowFirstStaffBMOImpl.java
+++ b/service-common/src/main/java/com/java110/common/bmo/workflow/impl/QueryWorkFlowFirstStaffBMOImpl.java
@@ -164,9 +164,6 @@
Model modelData = repositoryService.getModel(workflowModelDto.getModelId());
byte[] bpmnBytes = null;
bpmnBytes = repositoryService.getModelEditorSource(workflowModelDto.getModelId());
- String encoded = Base64Convert.byteToBase64(bpmnBytes);
- byte[] decoded = Base64Convert.base64ToByte(encoded);
- String xml = new String(decoded);
String processName = modelData.getName() + ".bpmn20.xml";
ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes);
Deployment deployment = repositoryService.createDeployment().name(oaWorkflowDtos.get(0).getFlowName())
diff --git a/service-community/src/main/java/com/java110/community/cmd/dict/QueryDictCmd.java b/service-community/src/main/java/com/java110/community/cmd/dict/QueryDictCmd.java
index 673eb24..541dcea 100644
--- a/service-community/src/main/java/com/java110/community/cmd/dict/QueryDictCmd.java
+++ b/service-community/src/main/java/com/java110/community/cmd/dict/QueryDictCmd.java
@@ -29,12 +29,12 @@
private DictInnerServiceSMO dictInnerServiceSMO;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
}
@Override
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
List<DictDto> dictDtos = this.dictInnerServiceSMO.queryDict(BeanConvertUtil.covertBean(reqJson, DictQueryDto.class));
ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(dictDtos), HttpStatus.OK);
cmdDataFlowContext.setResponseEntity(responseEntity);
diff --git a/service-community/src/main/java/com/java110/community/cmd/floor/DeleteFloorCmd.java b/service-community/src/main/java/com/java110/community/cmd/floor/DeleteFloorCmd.java
new file mode 100644
index 0000000..d9cadef
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/floor/DeleteFloorCmd.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.floor;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IFloorV1InnerServiceSMO;
+import com.java110.po.floor.FloorPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 绫昏〃杩帮細鍒犻櫎
+ * 鏈嶅姟缂栫爜锛歠loor.deleteFloor
+ * 璇锋眰璺姴锛�/app/floor.DeleteFloor
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "floor.deleteFloorV1")
+public class DeleteFloorCmd extends AbstractServiceCmdListener {
+ private static Logger logger = LoggerFactory.getLogger(DeleteFloorCmd.class);
+
+ @Autowired
+ private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "floorId", "floorId涓嶈兘涓虹┖");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ FloorPo floorPo = BeanConvertUtil.covertBean(reqJson, FloorPo.class);
+ int flag = floorV1InnerServiceSMOImpl.deleteFloor(floorPo);
+
+ if (flag < 1) {
+ throw new CmdException("鍒犻櫎鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/floor/ListFloorCmd.java b/service-community/src/main/java/com/java110/community/cmd/floor/ListFloorCmd.java
new file mode 100644
index 0000000..70786f2
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/floor/ListFloorCmd.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.floor;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.FloorDto;
+import com.java110.intf.community.IFloorV1InnerServiceSMO;
+import com.java110.po.floor.FloorPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 绫昏〃杩帮細鏌ヨ
+ * 鏈嶅姟缂栫爜锛歠loor.listFloor
+ * 璇锋眰璺姴锛�/app/floor.ListFloor
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "floor.listFloorV1")
+public class ListFloorCmd extends AbstractServiceCmdListener {
+
+ private static Logger logger = LoggerFactory.getLogger(ListFloorCmd.class);
+ @Autowired
+ private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ super.validatePageInfo(reqJson);
+ }
+
+ @Override
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ FloorDto floorDto = BeanConvertUtil.covertBean(reqJson, FloorDto.class);
+
+ int count = floorV1InnerServiceSMOImpl.queryFloorsCount(floorDto);
+
+ List<FloorDto> floorDtos = null;
+
+ if (count > 0) {
+ floorDtos = floorV1InnerServiceSMOImpl.queryFloors(floorDto);
+ } else {
+ floorDtos = new ArrayList<>();
+ }
+
+ ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, floorDtos);
+
+ ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+ cmdDataFlowContext.setResponseEntity(responseEntity);
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/floor/SaveFloorCmd.java b/service-community/src/main/java/com/java110/community/cmd/floor/SaveFloorCmd.java
new file mode 100644
index 0000000..ce210c9
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/floor/SaveFloorCmd.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.floor;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IFloorAttrInnerServiceSMO;
+import com.java110.intf.community.IFloorV1InnerServiceSMO;
+import com.java110.po.floor.FloorPo;
+import com.java110.po.floorAttr.FloorAttrPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 绫昏〃杩帮細淇濆瓨
+ * 鏈嶅姟缂栫爜锛歠loor.saveFloor
+ * 璇锋眰璺姴锛�/app/floor.SaveFloor
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "floor.saveFloorV1")
+public class SaveFloorCmd extends AbstractServiceCmdListener {
+
+ private static Logger logger = LoggerFactory.getLogger(SaveFloorCmd.class);
+
+ public static final String CODE_PREFIX_ID = "10";
+
+ @Autowired
+ private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
+ @Autowired
+ private IFloorAttrInnerServiceSMO floorAttrInnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "floorNum", "璇锋眰鎶ユ枃涓湭鍖呭惈floorNum");
+ Assert.hasKeyAndValue(reqJson, "name", "璇锋眰鎶ユ枃涓湭鍖呭惈name");
+ Assert.hasKeyAndValue(reqJson, "communityId", "璇锋眰鎶ユ枃涓湭鍖呭惈communityId");
+ Assert.hasKeyAndValue(reqJson, "floorArea", "璇锋眰鎶ユ枃涓湭鍖呭惈floorArea");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ FloorPo floorPo = BeanConvertUtil.covertBean(reqJson, FloorPo.class);
+ floorPo.setFloorId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+ floorPo.setbId("-1");
+ floorPo.setUserId(cmdDataFlowContext.getReqHeaders().get("user-id"));
+ int flag = floorV1InnerServiceSMOImpl.saveFloor(floorPo);
+
+ if (flag < 1) {
+ throw new CmdException("淇濆瓨鏁版嵁澶辫触");
+ }
+
+ FloorAttrPo floorAttrPo = new FloorAttrPo();
+ floorAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+ floorAttrPo.setSpecCd(FloorPo.FLOOR_ATTR_LARGE);
+ floorAttrPo.setFloorId(floorPo.getFloorId());
+ floorAttrPo.setCommunityId(floorPo.getCommunityId());
+ floorAttrPo.setValue(FloorPo.FLOOR_ATTR_VALUE);
+ flag = floorAttrInnerServiceSMOImpl.saveFloorAttr(floorAttrPo);
+ if (flag < 1) {
+ throw new CmdException("淇濆瓨澶у帵灞炴�ф暟鎹け璐�");
+ }
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/floor/UpdateFloorCmd.java b/service-community/src/main/java/com/java110/community/cmd/floor/UpdateFloorCmd.java
new file mode 100644
index 0000000..ad39023
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/floor/UpdateFloorCmd.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.floor;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IFloorV1InnerServiceSMO;
+import com.java110.po.floor.FloorPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 绫昏〃杩帮細鏇存柊
+ * 鏈嶅姟缂栫爜锛歠loor.updateFloor
+ * 璇锋眰璺姴锛�/app/floor.UpdateFloor
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "floor.updateFloorV1")
+public class UpdateFloorCmd extends AbstractServiceCmdListener {
+
+ private static Logger logger = LoggerFactory.getLogger(UpdateFloorCmd.class);
+
+
+ @Autowired
+ private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "floorId", "floorId涓嶈兘涓虹┖");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ FloorPo floorPo = BeanConvertUtil.covertBean(reqJson, FloorPo.class);
+ int flag = floorV1InnerServiceSMOImpl.updateFloor(floorPo);
+
+ if (flag < 1) {
+ throw new CmdException("鏇存柊鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/room/DeleteRoomCmd.java b/service-community/src/main/java/com/java110/community/cmd/room/DeleteRoomCmd.java
new file mode 100644
index 0000000..e1b8f27
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/room/DeleteRoomCmd.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.room;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IRoomV1InnerServiceSMO;
+import com.java110.po.room.RoomPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 绫昏〃杩帮細鍒犻櫎
+ * 鏈嶅姟缂栫爜锛歳oom.deleteRoom
+ * 璇锋眰璺姴锛�/app/room.DeleteRoom
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "room.DeleteRoom")
+public class DeleteRoomCmd extends AbstractServiceCmdListener {
+ private static Logger logger = LoggerFactory.getLogger(DeleteRoomCmd.class);
+
+ @Autowired
+ private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "roomId", "roomId涓嶈兘涓虹┖");
+ Assert.hasKeyAndValue(reqJson, "communityId", "communityId涓嶈兘涓虹┖");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class);
+ int flag = roomV1InnerServiceSMOImpl.deleteRoom(roomPo);
+
+ if (flag < 1) {
+ throw new CmdException("鍒犻櫎鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/room/ListRoomCmd.java b/service-community/src/main/java/com/java110/community/cmd/room/ListRoomCmd.java
new file mode 100644
index 0000000..edde16e
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/room/ListRoomCmd.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.room;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.RoomDto;
+import com.java110.intf.community.IRoomV1InnerServiceSMO;
+import com.java110.po.room.RoomPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 绫昏〃杩帮細鏌ヨ
+ * 鏈嶅姟缂栫爜锛歳oom.listRoom
+ * 璇锋眰璺姴锛�/app/room.ListRoom
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "room.ListRoom")
+public class ListRoomCmd extends AbstractServiceCmdListener {
+
+ private static Logger logger = LoggerFactory.getLogger(ListRoomCmd.class);
+ @Autowired
+ private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ super.validatePageInfo(reqJson);
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ RoomDto roomDto = BeanConvertUtil.covertBean(reqJson, RoomDto.class);
+
+ int count = roomV1InnerServiceSMOImpl.queryRoomsCount(roomDto);
+
+ List<RoomDto> roomDtos = null;
+
+ if (count > 0) {
+ roomDtos = roomV1InnerServiceSMOImpl.queryRooms(roomDto);
+ } else {
+ roomDtos = new ArrayList<>();
+ }
+
+ ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, roomDtos);
+
+ ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+ cmdDataFlowContext.setResponseEntity(responseEntity);
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/room/SaveRoomCmd.java b/service-community/src/main/java/com/java110/community/cmd/room/SaveRoomCmd.java
new file mode 100644
index 0000000..83254f8
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/room/SaveRoomCmd.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.room;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IRoomV1InnerServiceSMO;
+import com.java110.po.room.RoomPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 绫昏〃杩帮細淇濆瓨
+ * 鏈嶅姟缂栫爜锛歳oom.saveRoom
+ * 璇锋眰璺姴锛�/app/room.SaveRoom
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "room.SaveRoom")
+public class SaveRoomCmd extends AbstractServiceCmdListener {
+
+ private static Logger logger = LoggerFactory.getLogger(SaveRoomCmd.class);
+
+ public static final String CODE_PREFIX_ID = "10";
+
+ @Autowired
+ private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "roomNum", "璇锋眰鎶ユ枃涓湭鍖呭惈roomNum");
+ Assert.hasKeyAndValue(reqJson, "unitId", "璇锋眰鎶ユ枃涓湭鍖呭惈unitId");
+ Assert.hasKeyAndValue(reqJson, "layer", "璇锋眰鎶ユ枃涓湭鍖呭惈layer");
+ Assert.hasKeyAndValue(reqJson, "apartment", "璇锋眰鎶ユ枃涓湭鍖呭惈apartment");
+ Assert.hasKeyAndValue(reqJson, "builtUpArea", "璇锋眰鎶ユ枃涓湭鍖呭惈builtUpArea");
+ Assert.hasKeyAndValue(reqJson, "feeCoefficient", "璇锋眰鎶ユ枃涓湭鍖呭惈feeCoefficient");
+ Assert.hasKeyAndValue(reqJson, "userId", "璇锋眰鎶ユ枃涓湭鍖呭惈userId");
+ Assert.hasKeyAndValue(reqJson, "statusCd", "璇锋眰鎶ユ枃涓湭鍖呭惈statusCd");
+ Assert.hasKeyAndValue(reqJson, "state", "璇锋眰鎶ユ枃涓湭鍖呭惈state");
+ Assert.hasKeyAndValue(reqJson, "roomType", "璇锋眰鎶ユ枃涓湭鍖呭惈roomType");
+ Assert.hasKeyAndValue(reqJson, "roomSubType", "璇锋眰鎶ユ枃涓湭鍖呭惈roomSubType");
+ Assert.hasKeyAndValue(reqJson, "roomArea", "璇锋眰鎶ユ枃涓湭鍖呭惈roomArea");
+ Assert.hasKeyAndValue(reqJson, "roomRent", "璇锋眰鎶ユ枃涓湭鍖呭惈roomRent");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class);
+ roomPo.setRoomId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+ int flag = roomV1InnerServiceSMOImpl.saveRoom(roomPo);
+
+ if (flag < 1) {
+ throw new CmdException("淇濆瓨鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java b/service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java
new file mode 100644
index 0000000..c06b8f0
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.cmd.room;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IRoomV1InnerServiceSMO;
+import com.java110.po.room.RoomPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 绫昏〃杩帮細鏇存柊
+ * 鏈嶅姟缂栫爜锛歳oom.updateRoom
+ * 璇锋眰璺姴锛�/app/room.UpdateRoom
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "room.UpdateRoom")
+public class UpdateRoomCmd extends AbstractServiceCmdListener {
+
+ private static Logger logger = LoggerFactory.getLogger(UpdateRoomCmd.class);
+
+
+ @Autowired
+ private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
+
+ @Override
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "roomId", "roomId涓嶈兘涓虹┖");
+ Assert.hasKeyAndValue(reqJson, "communityId", "communityId涓嶈兘涓虹┖");
+
+ }
+
+ @Override
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+ RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class);
+ int flag = roomV1InnerServiceSMOImpl.updateRoom(roomPo);
+
+ if (flag < 1) {
+ throw new CmdException("鏇存柊鏁版嵁澶辫触");
+ }
+
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ }
+}
diff --git a/service-community/src/main/java/com/java110/community/dao/IFloorV1ServiceDao.java b/service-community/src/main/java/com/java110/community/dao/IFloorV1ServiceDao.java
new file mode 100644
index 0000000..86d451b
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/dao/IFloorV1ServiceDao.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+public interface IFloorV1ServiceDao {
+
+
+ /**
+ * 淇濆瓨 妤兼爧淇℃伅
+ * @param info
+ * @throws DAOException DAO寮傚父
+ */
+ int saveFloorInfo(Map info) throws DAOException;
+
+
+
+
+ /**
+ * 鏌ヨ妤兼爧淇℃伅锛坕nstance杩囩▼锛�
+ * 鏍规嵁bId 鏌ヨ妤兼爧淇℃伅
+ * @param info bId 淇℃伅
+ * @return 妤兼爧淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ List<Map> getFloorInfo(Map info) throws DAOException;
+
+
+
+ /**
+ * 淇敼妤兼爧淇℃伅
+ * @param info 淇敼淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ int updateFloorInfo(Map info) throws DAOException;
+
+
+ /**
+ * 鏌ヨ妤兼爧鎬绘暟
+ *
+ * @param info 妤兼爧淇℃伅
+ * @return 妤兼爧鏁伴噺
+ */
+ int queryFloorsCount(Map info);
+
+}
diff --git a/service-community/src/main/java/com/java110/community/dao/IRoomV1ServiceDao.java b/service-community/src/main/java/com/java110/community/dao/IRoomV1ServiceDao.java
new file mode 100644
index 0000000..7e97d20
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/dao/IRoomV1ServiceDao.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+public interface IRoomV1ServiceDao {
+
+
+ /**
+ * 淇濆瓨 鎴垮眿淇℃伅
+ * @param info
+ * @throws DAOException DAO寮傚父
+ */
+ int saveRoomInfo(Map info) throws DAOException;
+
+
+
+
+ /**
+ * 鏌ヨ鎴垮眿淇℃伅锛坕nstance杩囩▼锛�
+ * 鏍规嵁bId 鏌ヨ鎴垮眿淇℃伅
+ * @param info bId 淇℃伅
+ * @return 鎴垮眿淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ List<Map> getRoomInfo(Map info) throws DAOException;
+
+
+
+ /**
+ * 淇敼鎴垮眿淇℃伅
+ * @param info 淇敼淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ int updateRoomInfo(Map info) throws DAOException;
+
+
+ /**
+ * 鏌ヨ鎴垮眿鎬绘暟
+ *
+ * @param info 鎴垮眿淇℃伅
+ * @return 鎴垮眿鏁伴噺
+ */
+ int queryRoomsCount(Map info);
+
+}
diff --git a/service-community/src/main/java/com/java110/community/dao/impl/FloorV1ServiceDaoImpl.java b/service-community/src/main/java/com/java110/community/dao/impl/FloorV1ServiceDaoImpl.java
new file mode 100644
index 0000000..f499126
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/dao/impl/FloorV1ServiceDaoImpl.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.community.dao.IFloorV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Service("floorV1ServiceDaoImpl")
+public class FloorV1ServiceDaoImpl extends BaseServiceDao implements IFloorV1ServiceDao {
+
+ private static Logger logger = LoggerFactory.getLogger(FloorV1ServiceDaoImpl.class);
+
+
+
+
+
+ /**
+ * 淇濆瓨妤兼爧淇℃伅 鍒� instance
+ * @param info bId 淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public int saveFloorInfo(Map info) throws DAOException {
+ logger.debug("淇濆瓨 saveFloorInfo 鍏ュ弬 info : {}",info);
+
+ int saveFlag = sqlSessionTemplate.insert("floorV1ServiceDaoImpl.saveFloorInfo",info);
+
+ return saveFlag;
+ }
+
+
+ /**
+ * 鏌ヨ妤兼爧淇℃伅锛坕nstance锛�
+ * @param info bId 淇℃伅
+ * @return List<Map>
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public List<Map> getFloorInfo(Map info) throws DAOException {
+ logger.debug("鏌ヨ getFloorInfo 鍏ュ弬 info : {}",info);
+
+ List<Map> businessFloorInfos = sqlSessionTemplate.selectList("floorV1ServiceDaoImpl.getFloorInfo",info);
+
+ return businessFloorInfos;
+ }
+
+
+ /**
+ * 淇敼妤兼爧淇℃伅
+ * @param info 淇敼淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public int updateFloorInfo(Map info) throws DAOException {
+ logger.debug("淇敼 updateFloorInfo 鍏ュ弬 info : {}",info);
+
+ int saveFlag = sqlSessionTemplate.update("floorV1ServiceDaoImpl.updateFloorInfo",info);
+
+ return saveFlag;
+ }
+
+ /**
+ * 鏌ヨ妤兼爧鏁伴噺
+ * @param info 妤兼爧淇℃伅
+ * @return 妤兼爧鏁伴噺
+ */
+ @Override
+ public int queryFloorsCount(Map info) {
+ logger.debug("鏌ヨ queryFloorsCount 鍏ュ弬 info : {}",info);
+
+ List<Map> businessFloorInfos = sqlSessionTemplate.selectList("floorV1ServiceDaoImpl.queryFloorsCount", info);
+ if (businessFloorInfos.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(businessFloorInfos.get(0).get("count").toString());
+ }
+
+
+}
diff --git a/service-community/src/main/java/com/java110/community/dao/impl/RoomV1ServiceDaoImpl.java b/service-community/src/main/java/com/java110/community/dao/impl/RoomV1ServiceDaoImpl.java
new file mode 100644
index 0000000..d9b0393
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/dao/impl/RoomV1ServiceDaoImpl.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.community.dao.IRoomV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Service("roomV1ServiceDaoImpl")
+public class RoomV1ServiceDaoImpl extends BaseServiceDao implements IRoomV1ServiceDao {
+
+ private static Logger logger = LoggerFactory.getLogger(RoomV1ServiceDaoImpl.class);
+
+
+
+
+
+ /**
+ * 淇濆瓨鎴垮眿淇℃伅 鍒� instance
+ * @param info bId 淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public int saveRoomInfo(Map info) throws DAOException {
+ logger.debug("淇濆瓨 saveRoomInfo 鍏ュ弬 info : {}",info);
+
+ int saveFlag = sqlSessionTemplate.insert("roomV1ServiceDaoImpl.saveRoomInfo",info);
+
+ return saveFlag;
+ }
+
+
+ /**
+ * 鏌ヨ鎴垮眿淇℃伅锛坕nstance锛�
+ * @param info bId 淇℃伅
+ * @return List<Map>
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public List<Map> getRoomInfo(Map info) throws DAOException {
+ logger.debug("鏌ヨ getRoomInfo 鍏ュ弬 info : {}",info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomV1ServiceDaoImpl.getRoomInfo",info);
+
+ return businessRoomInfos;
+ }
+
+
+ /**
+ * 淇敼鎴垮眿淇℃伅
+ * @param info 淇敼淇℃伅
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public int updateRoomInfo(Map info) throws DAOException {
+ logger.debug("淇敼 updateRoomInfo 鍏ュ弬 info : {}",info);
+
+ int saveFlag = sqlSessionTemplate.update("roomV1ServiceDaoImpl.updateRoomInfo",info);
+
+ return saveFlag;
+ }
+
+ /**
+ * 鏌ヨ鎴垮眿鏁伴噺
+ * @param info 鎴垮眿淇℃伅
+ * @return 鎴垮眿鏁伴噺
+ */
+ @Override
+ public int queryRoomsCount(Map info) {
+ logger.debug("鏌ヨ queryRoomsCount 鍏ュ弬 info : {}",info);
+
+ List<Map> businessRoomInfos = sqlSessionTemplate.selectList("roomV1ServiceDaoImpl.queryRoomsCount", info);
+ if (businessRoomInfos.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(businessRoomInfos.get(0).get("count").toString());
+ }
+
+
+}
diff --git a/service-community/src/main/java/com/java110/community/smo/impl/FloorV1InnerServiceSMOImpl.java b/service-community/src/main/java/com/java110/community/smo/impl/FloorV1InnerServiceSMOImpl.java
new file mode 100644
index 0000000..bc06672
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/smo/impl/FloorV1InnerServiceSMOImpl.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.smo.impl;
+
+
+import com.java110.community.dao.IFloorV1ServiceDao;
+import com.java110.dto.FloorDto;
+import com.java110.intf.community.IFloorV1InnerServiceSMO;
+import com.java110.po.floor.FloorPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙e疄鐜扮被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2021-09-13 16:41:17 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@RestController
+public class FloorV1InnerServiceSMOImpl extends BaseServiceSMO implements IFloorV1InnerServiceSMO {
+
+ @Autowired
+ private IFloorV1ServiceDao floorV1ServiceDaoImpl;
+
+
+ @Override
+ public int saveFloor(@RequestBody FloorPo floorPo) {
+ int saveFlag = floorV1ServiceDaoImpl.saveFloorInfo(BeanConvertUtil.beanCovertMap(floorPo));
+ return saveFlag;
+ }
+
+ @Override
+ public int updateFloor(@RequestBody FloorPo floorPo) {
+ int saveFlag = floorV1ServiceDaoImpl.updateFloorInfo(BeanConvertUtil.beanCovertMap(floorPo));
+ return saveFlag;
+ }
+
+ @Override
+ public int deleteFloor(@RequestBody FloorPo floorPo) {
+ floorPo.setStatusCd("1");
+ int saveFlag = floorV1ServiceDaoImpl.updateFloorInfo(BeanConvertUtil.beanCovertMap(floorPo));
+ return saveFlag;
+ }
+
+ @Override
+ public List<FloorDto> queryFloors(@RequestBody FloorDto floorDto) {
+
+ //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+ int page = floorDto.getPage();
+
+ if (page != PageDto.DEFAULT_PAGE) {
+ floorDto.setPage((page - 1) * floorDto.getRow());
+ }
+
+ List<FloorDto> floors = BeanConvertUtil.covertBeanList(floorV1ServiceDaoImpl.getFloorInfo(BeanConvertUtil.beanCovertMap(floorDto)), FloorDto.class);
+
+ return floors;
+ }
+
+
+ @Override
+ public int queryFloorsCount(@RequestBody FloorDto floorDto) {
+ return floorV1ServiceDaoImpl.queryFloorsCount(BeanConvertUtil.beanCovertMap(floorDto)); }
+
+}
diff --git a/service-community/src/main/java/com/java110/community/smo/impl/RoomV1InnerServiceSMOImpl.java b/service-community/src/main/java/com/java110/community/smo/impl/RoomV1InnerServiceSMOImpl.java
new file mode 100644
index 0000000..570da09
--- /dev/null
+++ b/service-community/src/main/java/com/java110/community/smo/impl/RoomV1InnerServiceSMOImpl.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.community.smo.impl;
+
+
+import com.java110.community.dao.IRoomV1ServiceDao;
+import com.java110.dto.RoomDto;
+import com.java110.intf.community.IRoomV1InnerServiceSMO;
+import com.java110.po.room.RoomPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙e疄鐜扮被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2021-09-14 14:28:56 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@RestController
+public class RoomV1InnerServiceSMOImpl extends BaseServiceSMO implements IRoomV1InnerServiceSMO {
+
+ @Autowired
+ private IRoomV1ServiceDao roomV1ServiceDaoImpl;
+
+
+ @Override
+ public int saveRoom(@RequestBody RoomPo roomPo) {
+ int saveFlag = roomV1ServiceDaoImpl.saveRoomInfo(BeanConvertUtil.beanCovertMap(roomPo));
+ return saveFlag;
+ }
+
+ @Override
+ public int updateRoom(@RequestBody RoomPo roomPo) {
+ int saveFlag = roomV1ServiceDaoImpl.updateRoomInfo(BeanConvertUtil.beanCovertMap(roomPo));
+ return saveFlag;
+ }
+
+ @Override
+ public int deleteRoom(@RequestBody RoomPo roomPo) {
+ roomPo.setStatusCd("1");
+ int saveFlag = roomV1ServiceDaoImpl.updateRoomInfo(BeanConvertUtil.beanCovertMap(roomPo));
+ return saveFlag;
+ }
+
+ @Override
+ public List<RoomDto> queryRooms(@RequestBody RoomDto roomDto) {
+
+ //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+ int page = roomDto.getPage();
+
+ if (page != PageDto.DEFAULT_PAGE) {
+ roomDto.setPage((page - 1) * roomDto.getRow());
+ }
+
+ List<RoomDto> rooms = BeanConvertUtil.covertBeanList(roomV1ServiceDaoImpl.getRoomInfo(BeanConvertUtil.beanCovertMap(roomDto)), RoomDto.class);
+
+ return rooms;
+ }
+
+
+ @Override
+ public int queryRoomsCount(@RequestBody RoomDto roomDto) {
+ return roomV1ServiceDaoImpl.queryRoomsCount(BeanConvertUtil.beanCovertMap(roomDto)); }
+
+}
diff --git a/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java b/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java
index 03ca3a1..d00cc30 100644
--- a/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java
+++ b/service-dev/src/main/java/com/java110/dev/DevServiceApplicationStart.java
@@ -19,6 +19,7 @@
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.http.converter.StringHttpMessageConverter;
import java.nio.charset.Charset;
@@ -34,7 +35,7 @@
* @tag
*/
@SpringBootApplication(scanBasePackages = {"com.java110.service", "com.java110.dev",
- "com.java110.core", "com.java110.config.properties.code", "com.java110.db"},
+ "com.java110.core", "com.java110.config.properties.code", "com.java110.db", "com.java110.utils.factory"},
exclude = {LiquibaseAutoConfiguration.class,
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})
@EnableDiscoveryClient
@@ -81,6 +82,16 @@
//鍒锋柊缂撳瓨
flushMainCache(args);
+//
+// //鎵�鏈夌殑bean,鍙傝�冿細http://412887952-qq-com.iteye.com/blog/2314051
+// String[] beanNames = context.getBeanDefinitionNames();
+// //String[] beanNames = ctx.getBeanNamesForAnnotation(RestController.class);//鎵�鏈夋坊鍔犺娉ㄨВ鐨刡ean
+// logger.info("bean鎬绘暟:{}", context.getBeanDefinitionCount());
+// int i = 0;
+// for (String str : beanNames) {
+// logger.info("{},beanName:{}", ++i, str);
+// }
+
}
/**
diff --git a/service-dev/src/main/java/com/java110/dev/cmd/SaveMappingCmd.java b/service-dev/src/main/java/com/java110/dev/cmd/SaveMappingCmd.java
index e0fc0f9..7f344e6 100644
--- a/service-dev/src/main/java/com/java110/dev/cmd/SaveMappingCmd.java
+++ b/service-dev/src/main/java/com/java110/dev/cmd/SaveMappingCmd.java
@@ -14,12 +14,12 @@
public class SaveMappingCmd extends AbstractServiceCmdListener {
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
}
@Override
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
}
}
diff --git a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/DeleteBusinessTableHisCmd.java b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/DeleteBusinessTableHisCmd.java
index 554b1fe..ad08f73 100644
--- a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/DeleteBusinessTableHisCmd.java
+++ b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/DeleteBusinessTableHisCmd.java
@@ -21,16 +21,16 @@
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.dev.IBusinessTableHisV1InnerServiceSMO;
import com.java110.po.businessTableHis.BusinessTableHisPo;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
/**
* 绫昏〃杩帮細鍒犻櫎
* 鏈嶅姟缂栫爜锛歜usinessTableHis.DeleteBusinessTableHis
@@ -43,23 +43,23 @@
*/
@Java110Cmd(serviceCode = "businessTableHis.deleteBusinessTableHis")
public class DeleteBusinessTableHisCmd extends AbstractServiceCmdListener {
- private static Logger logger = LoggerFactory.getLogger(DeleteBusinessTableHisCmd.class);
+ private static Logger logger = LoggerFactory.getLogger(DeleteBusinessTableHisCmd.class);
@Autowired
private IBusinessTableHisV1InnerServiceSMO businessTableHisV1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
Assert.hasKeyAndValue(reqJson, "hisId", "hisId涓嶈兘涓虹┖");
-Assert.hasKeyAndValue(reqJson, "hisId", "hisId涓嶈兘涓虹┖");
+ Assert.hasKeyAndValue(reqJson, "hisId", "hisId涓嶈兘涓虹┖");
}
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
- BusinessTableHisPo businessTableHisPo = BeanConvertUtil.covertBean(reqJson, BusinessTableHisPo.class);
+ BusinessTableHisPo businessTableHisPo = BeanConvertUtil.covertBean(reqJson, BusinessTableHisPo.class);
int flag = businessTableHisV1InnerServiceSMOImpl.deleteBusinessTableHis(businessTableHisPo);
if (flag < 1) {
diff --git a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/ListBusinessTableHisCmd.java b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/ListBusinessTableHisCmd.java
index 73215f9..6f71dce 100644
--- a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/ListBusinessTableHisCmd.java
+++ b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/ListBusinessTableHisCmd.java
@@ -56,13 +56,12 @@
private IBusinessTableHisV1InnerServiceSMO businessTableHisV1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
super.validatePageInfo(reqJson);
}
@Override
- @Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
BusinessTableHisDto businessTableHisDto = BeanConvertUtil.covertBean(reqJson, BusinessTableHisDto.class);
diff --git a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/SaveBusinessTableHisCmd.java b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/SaveBusinessTableHisCmd.java
index 4794e73..9c57e78 100644
--- a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/SaveBusinessTableHisCmd.java
+++ b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/SaveBusinessTableHisCmd.java
@@ -53,7 +53,7 @@
private IBusinessTableHisV1InnerServiceSMO businessTableHisV1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
Assert.hasKeyAndValue(reqJson, "action", "璇锋眰鎶ユ枃涓湭鍖呭惈action");
Assert.hasKeyAndValue(reqJson, "actionObj", "璇锋眰鎶ユ枃涓湭鍖呭惈actionObj");
Assert.hasKeyAndValue(reqJson, "actionObjHis", "璇锋眰鎶ユ枃涓湭鍖呭惈actionObjHis");
@@ -63,7 +63,7 @@
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
BusinessTableHisPo businessTableHisPo = BeanConvertUtil.covertBean(reqJson, BusinessTableHisPo.class);
businessTableHisPo.setHisId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
diff --git a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/UpdateBusinessTableHisCmd.java b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/UpdateBusinessTableHisCmd.java
index 49172e9..e082907 100644
--- a/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/UpdateBusinessTableHisCmd.java
+++ b/service-dev/src/main/java/com/java110/dev/cmd/businessTableHis/UpdateBusinessTableHisCmd.java
@@ -53,7 +53,7 @@
private IBusinessTableHisV1InnerServiceSMO businessTableHisV1InnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
Assert.hasKeyAndValue(reqJson, "hisId", "hisId涓嶈兘涓虹┖");
Assert.hasKeyAndValue(reqJson, "hisId", "hisId涓嶈兘涓虹┖");
@@ -61,7 +61,7 @@
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
BusinessTableHisPo businessTableHisPo = BeanConvertUtil.covertBean(reqJson, BusinessTableHisPo.class);
int flag = businessTableHisV1InnerServiceSMOImpl.updateBusinessTableHis(businessTableHisPo);
diff --git a/service-dev/src/main/java/com/java110/dev/cmd/cache/FlushCacheCmd.java b/service-dev/src/main/java/com/java110/dev/cmd/cache/FlushCacheCmd.java
index 5b0fad3..e38cd70 100644
--- a/service-dev/src/main/java/com/java110/dev/cmd/cache/FlushCacheCmd.java
+++ b/service-dev/src/main/java/com/java110/dev/cmd/cache/FlushCacheCmd.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
@@ -26,12 +27,13 @@
IDevServiceCacheSMO devServiceCacheSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
}
@Override
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ @Java110Transactional
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
devServiceCacheSMOImpl.flush(reqJson.toJavaObject(Map.class));
diff --git a/service-dev/src/main/java/com/java110/dev/smo/impl/DevServiceCacheSMOImpl.java b/service-dev/src/main/java/com/java110/dev/smo/impl/DevServiceCacheSMOImpl.java
index 7d2c41f..bcc7b74 100644
--- a/service-dev/src/main/java/com/java110/dev/smo/impl/DevServiceCacheSMOImpl.java
+++ b/service-dev/src/main/java/com/java110/dev/smo/impl/DevServiceCacheSMOImpl.java
@@ -1,6 +1,7 @@
package com.java110.dev.smo.impl;
import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Transactional;
import com.java110.core.factory.DataTransactionFactory;
import com.java110.db.dao.IQueryServiceDAO;
import com.java110.dev.dao.IDevServiceDAO;
diff --git a/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java b/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java
index 53773bc..6097a1a 100755
--- a/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java
+++ b/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java
@@ -72,9 +72,9 @@
@Override
public void updateOrderItem(Map orderItem) throws DAOException {
int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateOrderItem", orderItem);
- if (saveFlag < 1) {
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇敼璁㈠崟椤瑰け璐ワ細" + JSONObject.toJSONString(orderItem));
- }
+// if (saveFlag < 1) {
+// throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇敼璁㈠崟椤瑰け璐ワ細" + JSONObject.toJSONString(orderItem));
+// }
}
@Override
diff --git a/service-user/src/main/java/com/java110/user/cmd/login/PcUserLoginCmd.java b/service-user/src/main/java/com/java110/user/cmd/login/PcUserLoginCmd.java
index 8ee4f29..83b1978 100644
--- a/service-user/src/main/java/com/java110/user/cmd/login/PcUserLoginCmd.java
+++ b/service-user/src/main/java/com/java110/user/cmd/login/PcUserLoginCmd.java
@@ -46,7 +46,7 @@
@Autowired
private IUserInnerServiceSMO userInnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
String paramIn = cmdDataFlowContext.getReqData();
Assert.isJsonObject(paramIn, "鐢ㄦ埛娉ㄥ唽璇锋眰鍙傛暟鏈夎锛屼笉鏄湁鏁堢殑json鏍煎紡 " + paramIn);
Assert.jsonObjectHaveKey(paramIn, "username", "鐢ㄦ埛鐧诲綍锛屾湭鍖呭惈username鑺傜偣锛岃妫�鏌�" + paramIn);
@@ -54,7 +54,7 @@
}
@Override
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
ResponseEntity responseEntity = null;
JSONObject paramInJson = JSONObject.parseObject(cmdDataFlowContext.getReqData());
diff --git a/service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java b/service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java
index 30a323c..783c0c9 100644
--- a/service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java
+++ b/service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java
@@ -34,13 +34,13 @@
private IUserInnerServiceSMO userInnerServiceSMOImpl;
@Override
- protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+ public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
}
@Override
@Java110Transactional
- protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+ public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
reqJson.put("userId", "-1");
reqJson.put("levelCd", UserLevelConstant.USER_LEVEL_ADMIN);
--
Gitblit v1.8.0