| | |
| | | |
| | | import kernel.exception.BusinessException; |
| | | import kernel.util.StringUtils; |
| | | import kernel.web.ApplicationUtil; |
| | | import kernel.web.Page; |
| | | import kernel.web.PagedQueryDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | private final String action = "/api/user!"; |
| | | |
| | | @Autowired |
| | | private AdminChannelBlockchainService adminChannelBlockchainService; |
| | | |
| | | /** |
| | | * 未生成钱包地址的用户 |
| | |
| | | int pageSize=300; |
| | | try { |
| | | pageNo=checkAndSetPageNo(pageNoStr); |
| | | page = this.adminChannelBlockchainService.pagedQuery(pageNo, pageSize, name_para, coin_para); |
| | | page = pagedQuery(pageNo, pageSize, name_para, coin_para); |
| | | } catch (BusinessException e) { |
| | | logger.error(" error ", e); |
| | | resultObject.setCode("1"); |
| | |
| | | } |
| | | } |
| | | |
| | | public Page pagedQuery(int pageNo, int pageSize, String name_para, String coin_para) { |
| | | PagedQueryDao pagedQueryDao = ApplicationUtil.getBean(PagedQueryDao.class); |
| | | StringBuffer queryString = new StringBuffer( |
| | | " SELECT channelblockchain.UUID id,channelblockchain.BLOCKCHAIN_NAME blockchain_name," |
| | | + "channelblockchain.IMG img ,channelblockchain.COIN coin, " |
| | | + " channelblockchain.ADDRESS address "); |
| | | |
| | | queryString.append(" FROM T_CHANNEL_BLOCKCHAIN channelblockchain WHERE 1 = 1 "); |
| | | Map<String, Object> parameters = new HashMap<>(); |
| | | if (!StringUtils.isNullOrEmpty(name_para)) { |
| | | queryString.append(" and channelblockchain.BLOCKCHAIN_NAME like :name "); |
| | | parameters.put("name", "%" + name_para + "%"); |
| | | } |
| | | if (!StringUtils.isNullOrEmpty(coin_para)) { |
| | | queryString.append(" and channelblockchain.COIN like :coin "); |
| | | parameters.put("coin", "%" + coin_para + "%"); |
| | | } |
| | | Page page = pagedQueryDao.pagedQuerySQL(pageNo, pageSize, queryString.toString(), parameters); |
| | | return page; |
| | | } |
| | | |
| | | } |