Merge remote-tracking branch 'origin/bingx' into bingx
# Conflicts:
# src/main/java/project/web/api/ChannelBlockchainController.java
# src/main/java/project/web/api/UserWalletAddressController.java
| | |
| | | } |
| | | |
| | | public Map<String, Object> bulidOne(ContractOrder order) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a", Locale.ENGLISH); |
| | | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("America/New_York")); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | |
| | | package project.exchange.internal; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import kernel.exception.BusinessException; |
| | | import kernel.util.Arith; |
| | |
| | | return bulidData(list); |
| | | } |
| | | } |
| | | |
| | | private List<Map<String, Object>> entrustBulidData(List<ExchangeApplyOrder> list) { |
| | | List<Map<String, Object>> data = new ArrayList<Map<String, Object>>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | ExchangeApplyOrder order = list.get(i); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | map.put("order_no", order.getOrder_no()); |
| | | map.put("name", itemService.cacheBySymbol(order.getSymbol(), false).getName()); |
| | | map.put("symbol", order.getSymbol()); |
| | | map.put("create_time", DateUtils.format(order.getCreate_time(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | map.put("create_time", simpleDateFormat.format(order.getCreate_time())); |
| | | map.put("volume", order.getVolume()); |
| | | map.put("offset", order.getOffset()); |
| | | map.put("price", order.getPrice()); |
| | |
| | | |
| | | import java.math.RoundingMode; |
| | | import java.text.DecimalFormat; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | |
| | |
| | | } |
| | | DecimalFormat df_symbol = new DecimalFormat(decimals); |
| | | df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整 |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | | map.put("name", item.getName()); |
| | | map.put("symbol", order.getSymbol()); |
| | | map.put("open_time", DateUtils.format(order.getCreate_time(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | map.put("open_time", sdf.format(order.getCreate_time())); |
| | | if (order.getClose_time() != null) { |
| | | map.put("close_time", DateUtils.format(order.getClose_time(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | map.put("close_time", sdf.format(order.getClose_time())); |
| | | } else { |
| | | map.put("close_time", "--"); |
| | | } |
| | |
| | | System.out.println(simpleDateFormat.format(new Date())); |
| | | } |
| | | public Map<String, Object> bulidOne(FuturesOrder order) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a", Locale.ENGLISH); |
| | | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("America/New_York")); |
| | | FuturesOrder order_cache = (FuturesOrder) redisHandler.get(FuturesRedisKeys.FUTURES_SUBMITTED_ORDERNO + order.getOrder_no()); |
| | | if (order_cache != null) order = order_cache; |
| | | |
| | | |
| | | Item item = this.itemService.cacheBySymbol(order.getSymbol(), false); |
| | | if (item == null) throw new BusinessException("参数错误"); |
| | | String decimals = "#."; |
| | | |
| | | |
| | | for (int i = 0; i < item.getDecimals(); i++) { |
| | | decimals = decimals + "#"; |
| | | } |
| | | |
| | | |
| | | if (item.getDecimals() == 0) { |
| | | decimals = "#"; |
| | | } |
| | | |
| | | |
| | | DecimalFormat df_symbol = new DecimalFormat(decimals); |
| | | df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整 |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | | map.put("name", item.getName()); |
| | | map.put("symbol", order.getSymbol()); |
| | | map.put("open_time", simpleDateFormat.format(order.getCreate_time())); |
| | | map.put("open_time", sdf.format(order.getCreate_time())); |
| | | if (order.getClose_time() != null) { |
| | | map.put("close_time", DateUtils.format(order.getClose_time(), "yyyy-MM-dd hh:mm:ss")); |
| | | map.put("close_time", sdf.format(order.getClose_time())); |
| | | } else { |
| | | map.put("close_time", "--"); |
| | | } |
| | |
| | | map.put("state", order.getState()); |
| | | map.put("amount", order.getVolume()); |
| | | map.put("fee", order.getFee()); |
| | | |
| | | |
| | | // 收益 |
| | | if (order.getProfit() > 0) { |
| | | map.put("profit", df.format(order.getProfit())); |
| | |
| | | } |
| | | |
| | | map.put("volume", order.getVolume()); |
| | | map.put("settlement_time", simpleDateFormat.format(order.getSettlement_time()));// 交割时间 |
| | | map.put("settlement_time", sdf.format(order.getSettlement_time()));// 交割时间 |
| | | map.put("close_price", df_symbol.format(order.getClose_avg_price())); |
| | | map.put("remain_time", StringUtils.isEmptyString(order.getRemain_time()) ? "0:0:0" : order.getRemain_time()); |
| | | map.put("time_num", order.getTimeNum()); |
| | |
| | | lock = true; |
| | | Map<String, Object> param = new HashMap<String, Object>(); |
| | | param.put("symbol", symbol); |
| | | param.put("type", "step1"); |
| | | param.put("type", "step0"); |
| | | |
| | | String result = HttpHelper.getJSONFromHttp(Config.url + Config.depth, param, HttpMethodType.GET); |
| | | JSONObject resultJson = JSON.parseObject(result); |
| | |
| | | return; |
| | | } |
| | | String updateSql = "UPDATE T_NEWS SET TITLE=?,CONTENT=?,LANGUAGE=?,INDEX_TOP=?,PARTY_ID=?,IMG_URL=?,IMG_JUMP_URL=?,CLICK=?,POP_UP=?,START_TIME=?,END_TIME=? WHERE UUID=?"; |
| | | jdbcTemplate.update(updateSql,entity.getTitle(),entity.getContent(),entity.getLanguage(),entity.getIndex(),entity.getPartyId(), |
| | | entity.getImgUrl(),entity.getImgJumpUrl(),entity.getClick(),entity.getPopUp(),entity.getStartTime(),entity.getEndTime(),entity.getId()); |
| | | jdbcTemplate.update(updateSql, entity.getTitle(), entity.getContent(), entity.getLanguage(), entity.getIndex(), entity.getPartyId(), |
| | | entity.getImgUrl(), entity.getImgJumpUrl(), entity.getClick(), entity.getPopUp(), entity.getStartTime(), entity.getEndTime(), entity.getId()); |
| | | |
| | | redisHandler.setSync(RedisKeys.NEWS_ID + entity.getId().toString(), entity); |
| | | |
| | |
| | | package project.user.internal; |
| | | |
| | | import java.io.File; |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | |
| | | public String generate(String content,String imgName) { |
| | | String image_uri = "/qr/" + imgName + ".png"; |
| | | |
| | | // 定义文件夹路径 |
| | | Path directoryPath = Paths.get(Constants.IMAGES_DIR + "/qr/"); |
| | | |
| | | // 检查文件夹是否存在,如果不存在则创建文件夹 |
| | | File directory = directoryPath.toFile(); |
| | | if (!directory.exists()) { |
| | | directory.mkdirs(); // 创建文件夹 |
| | | } |
| | | |
| | | try { |
| | | // 生成二维码图像并保存 |
| | | MatrixToImageWriter.writeToPath( |
| | | new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, 260, 260, Collections.singletonMap(EncodeHintType.CHARACTER_SET,"UTF-8")), |
| | | "png", |
| | | new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, 260, 260, |
| | | Collections.singletonMap(EncodeHintType.CHARACTER_SET, "UTF-8")), |
| | | "PNG", |
| | | new File(Constants.IMAGES_DIR + image_uri).toPath()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | if (!StringUtils.isEmptyString(end_time)) { |
| | | end_date = sdf.parse(end_time); |
| | | } |
| | | String path = Constants.WEB_URL + "/public/showimg!showImg.action?imagePath="; |
| | | news.setId(ApplicationUtil.getCurrentTimeUUID()); |
| | | news.setImgUrl(img_url); |
| | | news.setImgUrl(path+img_url); |
| | | news.setImgJumpUrl(img_jump_url); |
| | | news.setClick(click_int); |
| | | news.setPopUp(pop_up_int); |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import kernel.web.Page; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import okhttp3.Request; |
| | | import okhttp3.RequestBody; |
| | | import okhttp3.Response; |
| | | import org.web3j.abi.datatypes.Int; |
| | | import project.Constants; |
| | | import project.blockchain.ChannelBlockchain; |
| | | import project.blockchain.ChannelBlockchainService; |
| | |
| | | |
| | | try { |
| | | if(data.isEmpty()) data=this.channelBlockchainService.findByCoin(coin); |
| | | |
| | | for (int i = 0; i < data.size(); i++) { |
| | | if (1 == this.sysparaService.find("can_recharge").getInteger()) { |
| | | |
| | |
| | | data.get(i).setAddress(null); |
| | | } |
| | | } |
| | | List<Map<String, Object>> listMap = getStringListMap(); |
| | | // resultObject.setData(data); |
| | | resultObject.setData(listMap); |
| | | |
| | | Map<String, List<Map<String, Object>>> coinMap = getStringListMap(); |
| | | List<Map<String, Object>> result = getCoinData(coinMap, coin); |
| | | resultObject.setData(result); |
| | | |
| | | } catch (BusinessException e) { |
| | | resultObject.setCode("1"); |
| | | resultObject.setMsg(e.getMessage()); |
| | |
| | | } |
| | | |
| | | @NotNull |
| | | private static List<Map<String, Object>> getStringListMap() { |
| | | private static Map<String, List<Map<String, Object>>> getStringListMap() { |
| | | List<Map<String, Object>> ethData = new ArrayList<>(); |
| | | ethData.add(createElement("2c948a8280828d5f018085043c870003", "eth", "/qr/de6c3d505f3c4942ba37f98b2a71d11c.png", "0x887c3253bC8a1Bf36985F9919CD4D9F98C719a3C","ETH")); |
| | | |
| | | List<Map<String, Object>> btcData = new ArrayList<>(); |
| | | btcData.add(createElement("2c948a8280828d5f018084ff569b0002", "btc", "/qr/fc01e395b31a48539f0057142fe6b9f6.png", "19yJBFdSNM4PUD9G9Mi4agzYEVEdpK9KbN","BTC")); |
| | | |
| | | List<Map<String, Object>> usdtData = new ArrayList<>(); |
| | | usdtData.add(createElement("2c948a8280828d5f01808203eacd0004", 0,null, "USDT","ERC20","https://www.bingxz.com/wap/public/showimg!showImg.action?imagePath=/qr/7745a981e92448e7bc9660033ddb558b.png","/public/showimg!showImg.action?imagePath=/qr/7745a981e92448e7bc9660033ddb558b.png","TBA4W8wtt7eZuGUDMBzdpFT4gQTVtznmQY",false)); |
| | | usdtData.add(createElement("2c948a8280828d5f01808203eacd0004", 0,null, "USDT","TRC20","https://www.bingxz.com/wap/public/showimg!showImg.action?imagePath=/qr/9a00130ae16d41afa33416183ce2ac55.png","/public/showimg!showImg.action?imagePath=/qr/9a00130ae16d41afa33416183ce2ac55.png","TBA4W8wtt7eZuGUDMBzdpFT4gQTVtznmQY",false)); |
| | | return usdtData; |
| | | usdtData.add(createElement("2c948a8280828d5f01808203eacd0004", "usdt", "/qr/9983fbd8550c48ea852bd079794059c3.png", "0x887c3253bC8a1Bf36985F9919CD4D9F98C719a3C","ERC20")); |
| | | usdtData.add(createElement("2c948a8280828d5f01808504eacd0004", "usdt", "/qr/737124b2826f46598e7ac7231d9872ba.png", "TESGCY3weZJgqH64NPMTRL5AXCfNKVR4Tw","TRC20")); |
| | | |
| | | List<Map<String, Object>> usdcData = new ArrayList<>(); |
| | | usdcData.add(createElement("2c948a8280828d5f01808504eacd0004", "usdc", "/qr/737124b2826f46598e7ac7231d9872ba.png", "TFms9AcjHNS6DRVn7xc3gTi5xwnvaxgBTP","TRC20")); |
| | | usdcData.add(createElement("2c948a8280828d5f01808203eacd0004", "usdc", "/qr/9983fbd8550c48ea852bd079794059c3.png", "0x887c3253bC8a1Bf36985F9919CD4D9F98C719a3C","ERC20")); |
| | | |
| | | Map<String, List<Map<String, Object>>> coinMap = new HashMap<>(); |
| | | coinMap.put("eth", ethData); |
| | | coinMap.put("btc", btcData); |
| | | coinMap.put("usdt", usdtData); |
| | | coinMap.put("usdc", usdcData); |
| | | return coinMap; |
| | | } |
| | | |
| | | private static Map<String, Object> createElement(String id, int entityVersion, String timestamp, String coin, String blockchainName, String img, String imgStr , String address, boolean auto) { |
| | | private static Map<String, Object> createElement(String id, String coin, String img, String address,String blockchain_name) { |
| | | Map<String, Object> element = new HashMap<>(); |
| | | element.put("id", id); |
| | | element.put("entityVersion", entityVersion); |
| | | element.put("timestamp", timestamp); |
| | | element.put("coin", coin); |
| | | element.put("blockchain_name", blockchainName); |
| | | element.put("img", img); |
| | | element.put("img_str", imgStr); |
| | | element.put("address", address); |
| | | element.put("auto", auto); |
| | | element.put("blockchain_name", blockchain_name); |
| | | return element; |
| | | } |
| | | |
| | | private static List<Map<String, Object>> getCoinData(Map<String, List<Map<String, Object>>> coinMap, String coin) { |
| | | return coinMap.getOrDefault(coin, new ArrayList<>()); |
| | | } |
| | | |
| | | /** |
| | | * 根据第三方充值链接 |
| | | */ |
| | |
| | | package project.web.api; |
| | | |
| | | import java.net.URLDecoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | content = Constants.WEB_URL + "/public/showimg!showImg.action?imagePath=" + content; |
| | | } |
| | | map.put("content", content); |
| | | map.put("createtime", DateUtils.format(list.get(i).getCreateTime(), "MM-dd HH:mm")); |
| | | // map.put("createtime", DateUtils.format(list.get(i).getCreateTime(), "MM-dd HH:mm")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | map.put("createtime", sdf.format(list.get(i).getCreateTime())); |
| | | map.put("delete_status", list.get(i).getDelete_status()); |
| | | data.add(map); |
| | | } |
| | |
| | | |
| | | import java.math.RoundingMode; |
| | | import java.text.DecimalFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private List<Map<String, Object>> revise(List<Realtime> data) { |
| | | private List<Map<String, Object>> revise(List<Realtime> data) throws ParseException { |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| | | for (int i = 0; i < data.size(); i++) { |
| | | Realtime realtime = data.get(i); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("symbol", realtime.getSymbol()); |
| | | map.put("ts", realtime.getTs()); |
| | | map.put("current_time", realtime.getCurrent_time()); |
| | | String currentTime = realtime.getCurrent_time(); |
| | | // 设置时区为纽约的冬令时(Eastern Standard Time, EST) |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | Date parsedDate = sdf.parse(currentTime); |
| | | map.put("current_time",sdf.format(parsedDate)); |
| | | map.put("name", realtime.getName()); |
| | | map.put("change_ratio", realtime.getChange_ratio()); |
| | | Item item = this.itemService.cacheBySymbol(realtime.getSymbol(), true); |
| | |
| | | |
| | | import kernel.exception.BusinessException; |
| | | import kernel.util.StringUtils; |
| | | import kernel.web.ApplicationUtil; |
| | | import kernel.web.Page; |
| | | import kernel.web.PagedQueryDao; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import project.blockchain.AdminChannelBlockchainService; |
| | | import project.user.UserWalletAddress; |
| | | import project.user.UserWalletAddressService; |
| | | import project.web.admin.AdminChannelBlockchainController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | |
| | | |
| | | 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); |
| | | Map<String, List<Map<String, Object>>> coinMap = getStringListMap(); |
| | | List<Map<String, Object>> result = getCoinData(coinMap, coin_para,page); |
| | | List<Map<String, Object>> result = getCoinData(coinMap, coin_para); |
| | | page.setElements(result); |
| | | } catch (BusinessException e) { |
| | | logger.error(" error ", e); |
| | |
| | | |
| | | @NotNull |
| | | private static Map<String, List<Map<String, Object>>> getStringListMap() { |
| | | List<Map<String, Object>> usdtData = new ArrayList<>(); |
| | | usdtData.add(createElement("2c948a8280828d5f01808203eacd0004", "usdt", "/qr/c2b42ee106cf408baf7b1ecc877f2dd4.png", "TBA4W8wtt7eZuGUDMBzdpFT4gQTVtznmQY","ERC20")); |
| | | usdtData.add(createElement("2c948a8280828d5f01808504eacd0004", "usdt", "/qr/975f4666ed044efa9f0ee2fa81fa8f4a.png", "TBA4W8wtt7eZuGUDMBzdpFT4gQTVtznmQY","TRC20")); |
| | | List<Map<String, Object>> ethData = new ArrayList<>(); |
| | | ethData.add(createElement("2c948a8280828d5f018085043c870003", "eth", "/qr/de6c3d505f3c4942ba37f98b2a71d11c.png", "0x887c3253bC8a1Bf36985F9919CD4D9F98C719a3C","ETH")); |
| | | |
| | | List<Map<String, Object>> btcData = new ArrayList<>(); |
| | | btcData.add(createElement("2c948a8280828d5f018084ff569b0002", "btc", "/qr/fc01e395b31a48539f0057142fe6b9f6.png", "19yJBFdSNM4PUD9G9Mi4agzYEVEdpK9KbN","BTC")); |
| | | |
| | | List<Map<String, Object>> usdtData = new ArrayList<>(); |
| | | usdtData.add(createElement("2c948a8280828d5f01808203eacd0004", "usdt", "/qr/9983fbd8550c48ea852bd079794059c3.png", "0x887c3253bC8a1Bf36985F9919CD4D9F98C719a3C","ERC20")); |
| | | usdtData.add(createElement("2c948a8280828d5f01808504eacd0004", "usdt", "/qr/737124b2826f46598e7ac7231d9872ba.png", "TESGCY3weZJgqH64NPMTRL5AXCfNKVR4Tw","TRC20")); |
| | | |
| | | List<Map<String, Object>> usdcData = new ArrayList<>(); |
| | | usdcData.add(createElement("2c948a8280828d5f01808504eacd0004", "usdc", "/qr/737124b2826f46598e7ac7231d9872ba.png", "TFms9AcjHNS6DRVn7xc3gTi5xwnvaxgBTP","TRC20")); |
| | | usdcData.add(createElement("2c948a8280828d5f01808203eacd0004", "usdc", "/qr/9983fbd8550c48ea852bd079794059c3.png", "0x887c3253bC8a1Bf36985F9919CD4D9F98C719a3C","ERC20")); |
| | | |
| | | Map<String, List<Map<String, Object>>> coinMap = new HashMap<>(); |
| | | coinMap.put("eth", ethData); |
| | | coinMap.put("btc", btcData); |
| | | coinMap.put("usdt", usdtData); |
| | | coinMap.put("usdc", usdcData); |
| | | return coinMap; |
| | | } |
| | | |
| | |
| | | return element; |
| | | } |
| | | |
| | | private static List<Map<String, Object>> getCoinData(Map<String, List<Map<String, Object>>> coinMap, String coin, Page page) { |
| | | private static List<Map<String, Object>> getCoinData(Map<String, List<Map<String, Object>>> coinMap, String coin) { |
| | | return coinMap.getOrDefault(coin, new ArrayList<>()); |
| | | } |
| | | |
| | | |
| | | protected int pageNo = 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; |
| | | } |
| | | |
| | | } |
| | |
| | | email.host=smtp.mxhichina.com |
| | | email.username=post@usdtone.com |
| | | email.password=qxq&w7ery |
| | | email.username=coinzne.com@gmail.com |
| | | email.password=pqupwyxoqedhxlfq |
| | | email.from=smtp.mxhichina.com |