|
|
@@ -1,6 +1,9 @@
|
|
|
-/* */ package com.suyuan.service.impl;
|
|
|
-/* */
|
|
|
-/* */ import com.suyuan.dao.RentInfoMapper;
|
|
|
+/* */
|
|
|
+package com.suyuan.service.impl;
|
|
|
+/* */
|
|
|
+/* */
|
|
|
+
|
|
|
+import com.suyuan.dao.RentInfoMapper;
|
|
|
/* */ import com.suyuan.dto.Page;
|
|
|
/* */ import com.suyuan.model.RentInfo;
|
|
|
/* */ import com.suyuan.service.RentInfoService;
|
|
|
@@ -11,143 +14,234 @@
|
|
|
/* */ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
/* */ import org.springframework.stereotype.Service;
|
|
|
/* */ import org.springframework.transaction.annotation.Transactional;
|
|
|
-/* */
|
|
|
-/* */ @Service
|
|
|
+
|
|
|
+/* */
|
|
|
+/* */
|
|
|
+@Service
|
|
|
/* */ public class RentInfoServiceImpl
|
|
|
-/* */ implements RentInfoService
|
|
|
-/* */ {
|
|
|
-/* 27 */ private static Logger logger = Logger.getLogger(RentInfoServiceImpl.class);
|
|
|
-/* */
|
|
|
-/* */ @Autowired
|
|
|
-/* */ private RentInfoMapper rentInfoMapper;
|
|
|
-/* */
|
|
|
-/* */ public List<RentInfo> getRentInfoList(RentInfo record)
|
|
|
-/* */ {
|
|
|
-/* 35 */ logger.info("getRentInfoList");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 38 */ return this.rentInfoMapper.queryAllRentInfo(record);
|
|
|
-/* */ } catch (Exception e) {
|
|
|
-/* 40 */ logger.error("getRentInfoList", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 43 */ return null;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public List<RentInfo> getRentInfoByPage(Page page, RentInfo record)
|
|
|
-/* */ {
|
|
|
-/* 50 */ logger.info("getRentInfoByPage");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 53 */ Map parameter = new HashMap();
|
|
|
-/* 54 */ parameter.put("record", record);
|
|
|
-/* 55 */ parameter.put("page", page);
|
|
|
-/* */
|
|
|
-/* 57 */ return this.rentInfoMapper.queryRentInfosByPage(parameter);
|
|
|
-/* */ } catch (Exception e) {
|
|
|
-/* 59 */ logger.error("getRentInfoByPage", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 62 */ return null;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public RentInfo getRentInfoById(String id)
|
|
|
-/* */ {
|
|
|
-/* 69 */ logger.info("getRentInfoById");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 72 */ return this.rentInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
|
|
|
-/* */ } catch (Exception e) {
|
|
|
-/* 74 */ logger.error("getRentInfoById", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 77 */ return null;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public RentInfo getRentInfo(RentInfo record)
|
|
|
-/* */ {
|
|
|
-/* 84 */ logger.info("getRentInfo");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 87 */ return this.rentInfoMapper.queryRentInfo(record);
|
|
|
-/* */ } catch (Exception e) {
|
|
|
-/* 89 */ logger.error("getRentInfo", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 92 */ return null;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public boolean createRentInfo(RentInfo record)
|
|
|
-/* */ {
|
|
|
-/* 99 */ logger.info("createRentInfo");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 102 */ int updates = this.rentInfoMapper.insertSelective(record);
|
|
|
-/* */
|
|
|
-/* 104 */ if (updates > 0)
|
|
|
-/* 105 */ return true;
|
|
|
-/* */ }
|
|
|
-/* */ catch (Exception e) {
|
|
|
-/* 108 */ logger.error("createRentInfo", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 111 */ return false;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public boolean deleteRentInfo(String id)
|
|
|
-/* */ {
|
|
|
-/* 118 */ logger.info("deleteRentInfo");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 121 */ int updates = this.rentInfoMapper.delete(id);
|
|
|
-/* */
|
|
|
-/* 123 */ if (updates > 0)
|
|
|
-/* 124 */ return true;
|
|
|
-/* */ }
|
|
|
-/* */ catch (Exception e) {
|
|
|
-/* 127 */ logger.error("deleteRentInfo", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 130 */ return false;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public boolean updateRentInfo(RentInfo record)
|
|
|
-/* */ {
|
|
|
-/* 137 */ logger.info("updateRentInfo");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 140 */ int updates = this.rentInfoMapper.updateByPrimaryKeySelective(record);
|
|
|
-/* */
|
|
|
-/* 142 */ if (updates > 0)
|
|
|
-/* 143 */ return true;
|
|
|
-/* */ }
|
|
|
-/* */ catch (Exception e) {
|
|
|
-/* 146 */ logger.error("updateRentInfo", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 149 */ return false;
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* */ @Transactional(rollbackFor={Exception.class})
|
|
|
-/* */ public List<RentInfo> getRentInfoByLike(RentInfo record)
|
|
|
-/* */ {
|
|
|
-/* 156 */ logger.info("getRentInfoByLike");
|
|
|
-/* */ try
|
|
|
-/* */ {
|
|
|
-/* 160 */ return this.rentInfoMapper.queryByLike(record);
|
|
|
-/* */ } catch (Exception e) {
|
|
|
-/* 162 */ logger.error("getRentInfoByLike", e);
|
|
|
-/* */ }
|
|
|
-/* */
|
|
|
-/* 165 */ return null;
|
|
|
-/* */ }
|
|
|
-/* */ }
|
|
|
+ /* */ implements RentInfoService
|
|
|
+ /* */ {
|
|
|
+ /* 27 */ private static Logger logger = Logger.getLogger(RentInfoServiceImpl.class);
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Autowired
|
|
|
+ /* */ private RentInfoMapper rentInfoMapper;
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ public List<RentInfo> getRentInfoList(RentInfo record)
|
|
|
+ /* */ {
|
|
|
+ /* 35 */
|
|
|
+ logger.info("getRentInfoList");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 38 */
|
|
|
+ return this.rentInfoMapper.queryAllRentInfo(record);
|
|
|
+ /* */
|
|
|
+ } catch (Exception e) {
|
|
|
+ /* 40 */
|
|
|
+ logger.error("getRentInfoList", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 43 */
|
|
|
+ return null;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public List<RentInfo> getRentInfoByPage(Page page, RentInfo record)
|
|
|
+ /* */ {
|
|
|
+ /* 50 */
|
|
|
+ logger.info("getRentInfoByPage");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 53 */
|
|
|
+ Map parameter = new HashMap();
|
|
|
+ /* 54 */
|
|
|
+ parameter.put("record", record);
|
|
|
+ /* 55 */
|
|
|
+ parameter.put("page", page);
|
|
|
+ /* */
|
|
|
+ /* 57 */
|
|
|
+ return this.rentInfoMapper.queryRentInfosByPage(parameter);
|
|
|
+ /* */
|
|
|
+ } catch (Exception e) {
|
|
|
+ /* 59 */
|
|
|
+ logger.error("getRentInfoByPage", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 62 */
|
|
|
+ return null;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public RentInfo getRentInfoById(String id)
|
|
|
+ /* */ {
|
|
|
+ /* 69 */
|
|
|
+ logger.info("getRentInfoById");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 72 */
|
|
|
+ return this.rentInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
|
|
|
+ /* */
|
|
|
+ } catch (Exception e) {
|
|
|
+ /* 74 */
|
|
|
+ logger.error("getRentInfoById", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 77 */
|
|
|
+ return null;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public RentInfo getRentInfo(RentInfo record)
|
|
|
+ /* */ {
|
|
|
+ /* 84 */
|
|
|
+ logger.info("getRentInfo");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 87 */
|
|
|
+ return this.rentInfoMapper.queryRentInfo(record);
|
|
|
+ /* */
|
|
|
+ } catch (Exception e) {
|
|
|
+ /* 89 */
|
|
|
+ logger.error("getRentInfo", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 92 */
|
|
|
+ return null;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public boolean createRentInfo(RentInfo record)
|
|
|
+ /* */ {
|
|
|
+ /* 99 */
|
|
|
+ logger.info("createRentInfo");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 102 */
|
|
|
+ int updates = this.rentInfoMapper.insertSelective(record);
|
|
|
+ /* */
|
|
|
+ /* 104 */
|
|
|
+ if (updates > 0)
|
|
|
+ /* 105 */ return true;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */ catch (Exception e) {
|
|
|
+ /* 108 */
|
|
|
+ logger.error("createRentInfo", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 111 */
|
|
|
+ return false;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public boolean deleteRentInfo(String id)
|
|
|
+ /* */ {
|
|
|
+ /* 118 */
|
|
|
+ logger.info("deleteRentInfo");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 121 */
|
|
|
+ int updates = this.rentInfoMapper.delete(id);
|
|
|
+ /* */
|
|
|
+ /* 123 */
|
|
|
+ if (updates > 0)
|
|
|
+ /* 124 */ return true;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */ catch (Exception e) {
|
|
|
+ /* 127 */
|
|
|
+ logger.error("deleteRentInfo", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 130 */
|
|
|
+ return false;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public boolean updateRentInfo(RentInfo record)
|
|
|
+ /* */ {
|
|
|
+ /* 137 */
|
|
|
+ logger.info("updateRentInfo");
|
|
|
+ /* */
|
|
|
+ try
|
|
|
+ /* */ {
|
|
|
+ /* 140 */
|
|
|
+ int updates = this.rentInfoMapper.updateByPrimaryKeySelective(record);
|
|
|
+ /* */
|
|
|
+ /* 142 */
|
|
|
+ if (updates > 0)
|
|
|
+ /* 143 */ return true;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */ catch (Exception e) {
|
|
|
+ /* 146 */
|
|
|
+ logger.error("updateRentInfo", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 149 */
|
|
|
+ return false;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* */
|
|
|
+ /* */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ /* */ public List<RentInfo> getRentInfoByLike(Page page, RentInfo record)
|
|
|
+ /* */ {
|
|
|
+ /* 156 */
|
|
|
+ logger.info("getRentInfoByLike");
|
|
|
+ /* */
|
|
|
+ try {
|
|
|
+
|
|
|
+ Map parameter = new HashMap();
|
|
|
+ parameter.put("record", record);
|
|
|
+ parameter.put("page", page);
|
|
|
+ return this.rentInfoMapper.queryByLikeByPage(parameter);
|
|
|
+ } catch (Exception e) {
|
|
|
+ /* 162 */
|
|
|
+ logger.error("getRentInfoByLike", e);
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+ /* 165 */
|
|
|
+ return null;
|
|
|
+ /* */
|
|
|
+ }
|
|
|
+ /* */
|
|
|
+}
|
|
|
|
|
|
/* Location: C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
|
|
|
* Qualified Name: com.suyuan.service.impl.RentInfoServiceImpl
|