From 768a42166035e34360e92f90852f38301aab25ca Mon Sep 17 00:00:00 2001
From: wuxw7 <wuxw7@asiainfo.com>
Date: 星期二, 22 五月 2018 17:29:13 +0800
Subject: [PATCH] 订单受理 同步 异步 逻辑处理完成待测试
---
CenterService/src/main/java/com/java110/center/dao/impl/CenterServiceDAOImpl.java | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/CenterService/src/main/java/com/java110/center/dao/impl/CenterServiceDAOImpl.java b/CenterService/src/main/java/com/java110/center/dao/impl/CenterServiceDAOImpl.java
index bf6221d..0bf5add 100644
--- a/CenterService/src/main/java/com/java110/center/dao/impl/CenterServiceDAOImpl.java
+++ b/CenterService/src/main/java/com/java110/center/dao/impl/CenterServiceDAOImpl.java
@@ -10,6 +10,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -54,6 +55,20 @@
throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"淇濆瓨璁㈠崟灞炴�т俊鎭け璐ワ細"+ JSONObject.toJSONString(orderAttr));
}
}
+ }
+
+ /**
+ * 淇濆瓨璁㈠崟椤逛俊鎭�
+ * @param business 璁㈠崟椤逛俊鎭�
+ */
+ @Override
+ public void saveBusiness(Map business) throws DAOException {
+
+ LoggerEngine.debug("----銆怌enterServiceDAOImpl.saveBusiness銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(business));
+ int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveBusiness", business);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟椤逛俊鎭け璐ワ細" + JSONObject.toJSONString(business));
+ }
}
/**
@@ -150,6 +165,25 @@
}
/**
+ * 鍒ゆ柇 business 杩囩▼鏄惁瀹屾垚 1 琛ㄧず瀹屾垚 0琛ㄧず鏈畬鎴�
+ * @param oId
+ * @return
+ * @throws DAOException
+ */
+ public int judgeAllBusinessCompleted(String oId,String statusCd) throws DAOException{
+ LoggerEngine.debug("----銆怌enterServiceDAOImpl.judgeAllBusinessCompleted銆戞暟鎹叆鍙� :oId= " + oId + ",statusCd = " + statusCd);
+ Map paramIn = new HashMap();
+ paramIn.put("oId",oId);
+ paramIn.put("statusCd",statusCd);
+
+ Map paramOut = sqlSessionTemplate.selectOne("centerServiceDAOImpl.judgeAllBusinessCompleted",paramIn);
+ if(paramOut == null || paramOut.isEmpty()){
+ return 0;
+ }
+ return 1;
+ }
+
+ /**
* 鏍规嵁bId鏌ヨ璁㈠崟淇℃伅
* @param bId
* @return
@@ -162,6 +196,21 @@
}
return null;
}
+ /**
+ * 鏍规嵁oId鏌ヨ璁㈠崟淇℃伅
+ * @param oId
+ * @return
+ * @throws DAOException
+ */
+ public Map getDeleteOrderBusinessByOId(String oId)throws DAOException{
+ List<Map> orders = sqlSessionTemplate.selectList("centerServiceDAOImpl.getDeleteOrderBusinessByOId",oId);
+ if(orders !=null){
+ return orders.get(0);
+ }
+ return null;
+ }
+
+
/**
* 鑾峰彇鍚屼釜璁㈠崟涓凡缁忓畬鎴愮殑璁㈠崟椤�
* @param bId
@@ -188,5 +237,17 @@
return sqlSessionTemplate.selectList("centerServiceDAOImpl.getMappingInfoAll");
}
+ /**
+ * 鏍规嵁oId 鏌ヨBusiness
+ * @param info
+ * @return
+ * @throws DAOException
+ */
+ public List<Map> getBusinessByOId(Map info) throws DAOException{
+ LoggerEngine.debug("----銆怌enterServiceDAOImpl.getBusinessByOId銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(info));
+
+ return sqlSessionTemplate.selectList("centerServiceDAOImpl.getBusinessByOId",info);
+ }
+
}
--
Gitblit v1.8.0