package com.java110.community.smo.impl;
|
|
import com.java110.core.base.smo.BaseServiceSMO;
|
import com.java110.core.client.RestTemplate;
|
import com.java110.core.log.LoggerFactory;
|
import com.java110.dto.PropertyWhiteListFlowDto;
|
import com.java110.dto.importData.ImportOwnerRoomDto;
|
import com.java110.intf.IImportPropertyWhiteListfFlowServiceSMO;
|
import com.java110.intf.user.IUserV1InnerServiceSMO;
|
import com.java110.utils.util.BeanConvertUtil;
|
import org.mybatis.spring.SqlSessionTemplate;
|
import org.slf4j.Logger;
|
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.Collections;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 小区服务内部类
|
*/
|
@RestController
|
public class IImportPropertyWhiteListfFlowServiceSMOImpl extends BaseServiceSMO implements IImportPropertyWhiteListfFlowServiceSMO {
|
private static Logger logger = LoggerFactory.getLogger(IImportPropertyWhiteListfFlowServiceSMOImpl.class);
|
|
@Autowired
|
protected SqlSessionTemplate sqlSessionTemplate;
|
|
@Override
|
public int savePropertyWhiteListFlow(@RequestBody PropertyWhiteListFlowDto importOwnerRoomDto) {
|
return sqlSessionTemplate.insert("propertyWhiteListFlowDaoImplMapper.savePropertyWhiteListFlow",BeanConvertUtil.beanCovertMap(importOwnerRoomDto));
|
}
|
|
@Override
|
public List<PropertyWhiteListFlowDto> queryPropertyWhiteListFlow(PropertyWhiteListFlowDto importOwnerRoomDtos) {
|
importOwnerRoomDtos.setPage((importOwnerRoomDtos.getPage()-1)* importOwnerRoomDtos.getRow());
|
return sqlSessionTemplate.selectList("propertyWhiteListFlowDaoImplMapper.queryPropertyWhiteListFlow",BeanConvertUtil.beanCovertMap(importOwnerRoomDtos));
|
}
|
|
public int countPropertyWhiteListFlow(PropertyWhiteListFlowDto importOwnerRoomDtos) {
|
List<Map> businessPaymentPoolConfigInfos = sqlSessionTemplate.selectList("propertyWhiteListFlowDaoImplMapper.countPropertyWhiteListFlow", BeanConvertUtil.beanCovertMap(importOwnerRoomDtos));
|
if (businessPaymentPoolConfigInfos.size() < 1) {
|
return 0;
|
}
|
|
return Integer.parseInt(businessPaymentPoolConfigInfos.get(0).get("count(1)").toString());
|
}
|
|
public int countPropertyWhiteListFlowFilter(PropertyWhiteListFlowDto importOwnerRoomDtos) {
|
List<Map> businessPaymentPoolConfigInfos = sqlSessionTemplate.selectList("propertyWhiteListFlowDaoImplMapper.countPropertyWhiteListFlowFilter", BeanConvertUtil.beanCovertMap(importOwnerRoomDtos));
|
if (businessPaymentPoolConfigInfos.size() < 1) {
|
return 0;
|
}
|
|
return Integer.parseInt(businessPaymentPoolConfigInfos.get(0).get("count(1)").toString());
|
}
|
|
}
|