From e546f6e157e79e4074ca23f7e4e48a5c9aea4fdb Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 09 五月 2019 14:30:08 +0800
Subject: [PATCH] 房屋管理开发测试完成

---
 ShopService/src/main/java/com/java110/shop/dao/impl/ShopServiceDaoImpl.java |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 103 insertions(+), 3 deletions(-)

diff --git a/ShopService/src/main/java/com/java110/shop/dao/impl/ShopServiceDaoImpl.java b/ShopService/src/main/java/com/java110/shop/dao/impl/ShopServiceDaoImpl.java
index 09ef448..b440b4c 100644
--- a/ShopService/src/main/java/com/java110/shop/dao/impl/ShopServiceDaoImpl.java
+++ b/ShopService/src/main/java/com/java110/shop/dao/impl/ShopServiceDaoImpl.java
@@ -363,6 +363,40 @@
 
 
     /**
+     * 淇濆瓨璐拱璁板綍
+     * @param businessBuyShop
+     * @throws DAOException
+     */
+    @Override
+    public void saveBuyShopInstance(Map businessBuyShop) throws DAOException {
+        businessBuyShop.put("month", DateUtil.getCurrentMonth());
+        logger.debug("淇濆瓨鍟嗗搧璐拱璁板綍淇℃伅 鍏ュ弬 businessBuyShop : {}",businessBuyShop);
+
+        int saveFlag = sqlSessionTemplate.insert("shopServiceDaoImpl.saveBuyShopInstance",businessBuyShop);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇濆瓨鍟嗗搧璐拱璁板綍鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(businessBuyShop));
+        }
+    }
+
+    /**
+     * 璐拱鍟嗗搧灞炴�т繚瀛�
+     * @param businessBuyShopAttr
+     * @throws DAOException
+     */
+    @Override
+    public void saveBuyShopAttrInstance(Map businessBuyShopAttr) throws DAOException {
+        businessBuyShopAttr.put("month", DateUtil.getCurrentMonth());
+        logger.debug("淇濆瓨鍟嗗搧璐拱璁板綍灞炴�т俊鎭� 鍏ュ弬 businessBuyShopAttr : {}",businessBuyShopAttr);
+
+        int saveFlag = sqlSessionTemplate.insert("shopServiceDaoImpl.saveBuyShopAttrInstance",businessBuyShopAttr);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇濆瓨鍟嗗搧璐拱璁板綍灞炴�ф暟鎹け璐ワ細"+ JSONObject.toJSONString(businessBuyShopAttr));
+        }
+    }
+
+    /**
      * 鏌ヨ鍟嗗搧淇℃伅锛坕nstance锛�
      * @param info bId 淇℃伅
      * @return
@@ -469,14 +503,14 @@
     }
 
     /**
-     * 鍟嗗搧鎻忚堪鏌ヨ锛坕nstance锛�
+     * 鍟嗗搧鐩綍鏌ヨ锛坕nstance锛�
      * @param info bId 淇℃伅
      * @return
      * @throws DAOException
      */
     @Override
     public Map getShopCatalog(Map info) throws DAOException {
-        logger.debug("鏌ヨ鍟嗗搧璇佷欢淇℃伅 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ鍟嗗搧鐩綍淇℃伅 鍏ュ弬 info : {}",info);
 
         List<Map> shopCatalogs = sqlSessionTemplate.selectList("shopServiceDaoImpl.getShopCatalog",info);
         if(shopCatalogs == null || shopCatalogs.size() == 0){
@@ -488,6 +522,40 @@
         return shopCatalogs.get(0);
     }
 
+    /**
+     * 鍟嗗搧鎻忚堪鏌ヨ锛坕nstance锛�
+     * @param info bId 淇℃伅
+     * @return
+     * @throws DAOException
+     */
+    @Override
+    public Map getBuyShop(Map info) throws DAOException {
+        logger.debug("鏌ヨ鍟嗗搧璐拱淇℃伅 鍏ュ弬 info : {}",info);
+
+        List<Map> getBuyShops = sqlSessionTemplate.selectList("shopServiceDaoImpl.getBuyShop",info);
+        if(getBuyShops == null || getBuyShops.size() == 0){
+            return null;
+        }
+        if(getBuyShops.size() >1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"鏍规嵁鏉′欢鏌ヨ鏈夊鏉℃暟鎹�,鏁版嵁寮傚父锛岃妫�鏌ワ細getShopCatalog锛�"+ JSONObject.toJSONString(info));
+        }
+        return getBuyShops.get(0);
+    }
+
+    /**
+     * 鍟嗗搧灞炴�ф煡璇紙instance锛�
+     * @param info bId 淇℃伅
+     * @return
+     * @throws DAOException
+     */
+    @Override
+    public List<Map> getBuyShopAttrs(Map info) throws DAOException {
+        logger.debug("鏌ヨ鍟嗗搧璐拱灞炴�т俊鎭� 鍏ュ弬 info : {}",info);
+
+        List<Map> buyShopAttrs = sqlSessionTemplate.selectList("shopServiceDaoImpl.getBuyShopAttrs",info);
+
+        return buyShopAttrs;
+    }
 
     /**
      * 淇敼鍟嗗搧淇℃伅
@@ -592,7 +660,7 @@
      */
     @Override
     public void updateShopCatalogInstance(Map info) throws DAOException {
-        logger.debug("淇敼鍟嗗搧鎻忚堪淇℃伅Instance 鍏ュ弬 info : {}",info);
+        logger.debug("淇敼鍟嗗搧鐩綍淇℃伅Instance 鍏ュ弬 info : {}",info);
 
         int saveFlag = sqlSessionTemplate.update("shopServiceDaoImpl.updateShopCatalogInstance",info);
 
@@ -600,4 +668,36 @@
             throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇敼鍟嗗搧鐩綍淇℃伅Instance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
         }
     }
+
+    /**
+     * 淇敼鍟嗗搧璐拱淇℃伅
+     * @param info 淇敼淇℃伅
+     * @throws DAOException
+     */
+    @Override
+    public void updateBuyShopInstance(Map info) throws DAOException {
+        logger.debug("淇敼鍟嗗搧璐拱淇℃伅Instance 鍏ュ弬 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("shopServiceDaoImpl.updateBuyShopInstance",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇敼鍟嗗搧璐拱淇℃伅Instance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
+        }
+    }
+
+    /**
+     * 淇敼鍟嗗搧璐拱灞炴�т俊鎭紙instance锛�
+     * @param info 淇敼淇℃伅
+     * @throws DAOException
+     */
+    @Override
+    public void updateBuyShopAttrInstance(Map info) throws DAOException {
+        logger.debug("淇敼鍟嗗搧璐拱灞炴�т俊鎭疘nstance 鍏ュ弬 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("shopServiceDaoImpl.updateBuyShopAttrInstance",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇敼鍟嗗搧璐拱灞炴�т俊鎭疘nstance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
+        }
+    }
 }

--
Gitblit v1.8.0