| | |
| | | |
| | | ServerResponse buyVipQc(String stockCode, Integer buyNum, Integer buyType, Integer lever, BigDecimal profitTarget, BigDecimal stopTarget, HttpServletRequest request) throws Exception; |
| | | |
| | | ServerResponse buyDz(Integer dzId, String password, Integer num, HttpServletRequest request) throws Exception; |
| | | ServerResponse buyDz(Integer dzId, String password, Integer num, HttpServletRequest request); |
| | | |
| | | ServerResponse buyStockDzList(HttpServletRequest request); |
| | | |
| | |
| | | // stockListVO.setNowPrice(stockListVO.getNowPrice()); |
| | | // } |
| | | // } |
| | | |
| | | if (stockListVO != null) { |
| | | stockAdminListVO.setNowPrice(stockListVO.getNowPrice()); |
| | | stockAdminListVO.setHcrate(stockListVO.getHcrate()); |
| | | } |
| | | stockAdminListVO.setSpreadRate(stock.getSpreadRate()); |
| | | ServerResponse serverResponse = selectRateByDaysAndStockCode(stock.getStockCode(), 3); |
| | | BigDecimal day3Rate = new BigDecimal("0"); |
| | |
| | | * @return |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse buyDz(Integer dzId, String password, Integer num, HttpServletRequest request) throws Exception { |
| | | public ServerResponse buyDz(Integer dzId, String password, Integer num, HttpServletRequest request){ |
| | | try { |
| | | /*实名认证开关开启*/ |
| | | SiteProduct siteProduct = iSiteProductService.getProductSetting(); |
| | | User user = this.iUserService.getCurrentRefreshUser(request); |
| | |
| | | userAssetsServices.availablebalanceChange(EStockType.MX.getCode(), user.getId(), EUserAssets.BUY, newBuyAmt.negate(),"",""); |
| | | iUserAssetsServices.availablebalanceChange(EStockType.MX.getCode(), userAssets.getUserId(), EUserAssets.HANDLING_CHARGE, buy_fee_amt, "", ""); |
| | | return ServerResponse.createBySuccess("购买成功", request); |
| | | } catch (Exception e) { |
| | | log.error("大宗下单异常{}", e.getMessage()); |
| | | } |
| | | return ServerResponse.createByError(); |
| | | } |
| | | |
| | | private UserPosition getUserPosition(Integer dzId,Integer num, User user, StockDz stockDz, BigDecimal nowPrice, Stock stock, BigDecimal buyAmt) { |
| | |
| | | } |
| | | } |
| | | } |
| | | //退回资金 交易记录MEX |
| | | //如果退回资金 add交易记录MEX |
| | | if (refundPrice.compareTo(BigDecimal.ZERO) > 0) { |
| | | MoneyLog moneyLog = new MoneyLog(); |
| | | EUserAssets eUserAssets = EUserAssets.BUY_RT; |
| | | moneyLog.setDescs(eUserAssets.getDesc()); |
| | |
| | | moneyLog.setSymbol(EStockType.MX.getSymbol()); |
| | | moneyLog.setCreateTime(new Date()); |
| | | moneyLogMapper.insert(moneyLog); |
| | | } |
| | | ret = userStockSubscribeMapper.update1(model); |
| | | userAssetsMapper.updateById(userAssets); |
| | | iUserPositionService.newStockToPosition(model.getId(),userAssets.getAmountToBeCovered());//转持仓 |
| | |
| | | */ |
| | | |
| | | public String translate(String content,String lang) { |
| | | return content; |
| | | /*StringBuilder result = new StringBuilder(); |
| | | //return content; |
| | | StringBuilder result = new StringBuilder(); |
| | | if (content.length() > 1000) { |
| | | int size = content.length() /1000 ; |
| | | for (int i = 0; i < size; i++) { |
| | |
| | | } |
| | | } |
| | | |
| | | return result.toString();*/ |
| | | return result.toString(); |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | |
| | | |
| | | @Override |
| | | public void onClose(int i, String s, boolean b) { |
| | | log.info("websocket 墨西哥股票 关闭"+1); |
| | | log.info("websocket 墨西哥股票 关闭 {} ", i); |
| | | } |
| | | |
| | | @Override |
| | | public void onError(Exception e) { |
| | | log.info("websocket 墨西哥股票 错误"); |
| | | log.info("websocket 墨西哥股票 错误{}", e.getMessage()); |
| | | } |
| | | |
| | | public void sendLoca(String message) { |
| | |
| | | package com.nq.ws; |
| | | |
| | | |
| | | import com.nq.enums.EStockType; |
| | | import com.nq.utils.PropertiesUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Override |
| | | public void onClose(int i, String s, boolean b) { |
| | | log.info("websocket 美国股票 关闭"+1); |
| | | log.info("websocket 美国股票 关闭 {} ", i); |
| | | } |
| | | |
| | | @Override |
| | | public void onError(Exception e) { |
| | | log.info("websocket 美国股票 错误" + e.getMessage()); |
| | | log.info("websocket 美国股票 错误{}", e.getMessage()); |
| | | } |
| | | |
| | | public void sendLoca(String message) { |
| | |
| | | ftp.user=ftp_stock |
| | | ftp.pass=123456 |
| | | ftp.address =/www/wwwroot/ftp_stock/ |
| | | ftp.server.http.prefix=https://img.durocaspitall.com/ |
| | | ftp.server.http.prefix=https://img.kuspitai.com/ |
| | | |
| | | redis1.ip=localhost |
| | | redis1.port=6379 |
| | |
| | | agent.key.prefix=Mi |
| | | admin.super.name=18916320007 |
| | | |
| | | |
| | | #股票key的地址 |
| | | #IN_HTTP_API = https://data.is4vc.com/v1 |
| | | #IN_WS_URL =ws://ws.is4vc.com:8001/websocket-server/v1 |
| | | #IN_KEY = r3ZAgtcYzuBizmqge2hK |
| | | #IN_NEW_HTTP_API = http://api-in-2.js-stock.top/ |
| | | #IN_NEW_KEY = eVKtHt7aG4m6ozwWL9qG |
| | | |
| | | JS_IN_HTTP_API = http://api-in-3-socket.js-stock.top |
| | | JS_IN_HTTP_URL = http://api-in-pro.js-stock.top/ |
| | | JS_IN_WS_URL = ws://api-in-pro-ws.js-stock.top |
| | | JS_IN_KEY = xKChgi47AP1NMwMeYI3c |
| | | |
| | | #US_HTTP_API = http://api-us.js-stock.top/ |
| | | #US_WS_URL = ws://ws-us.js-stock.top |
| | | #US_KEY = jZFrku4RGQjP87Hmq5tm |
| | | |
| | | HK_HTTP_API = http://test.js-stock.top/ |
| | | HK_WS_URL = ws://test-ws.js-stock.top |
| | | HK_KEY = mG8QQDdjGuLjLnrryd0B |
| | | |
| | | US_HTTP_API = http://api-us-v2.js-stock.top/ |
| | | US_WS_URL = ws://api-us-v2-ws.js-stock.top |
| | | US_KEY = Or066PtXGwrgsYt0kscq |
| | | US_KEY = AKoSBQXFrcs02dgcRKde |
| | | |
| | | MX_HTTP_API = http://api-mx.js-stock.top/ |
| | | MX_WS_URL = ws://api-mx-ws.js-stock.top |
| | | MX_KEY = 45cXikMKv49SuPIOemiF |
| | | |
| | | |
| | | #HK_HTTP_API = http://api-v1.js-stock.top/ |
| | | #HK_WS_URL = ws://api-v1-ws.js-stock.top |
| | | #HK_KEY = QgiqrYYZem1WWXWbHeT7 |
| | | |
| | | |
| | | HG_HTTP_API = http://test.js-stock.top/ |
| | | HG_WS_URL = ws://test-ws.js-stock.top |
| | | HG_KEY = mG8QQDdjGuLjLnrryd0B |
| | | |
| | | |
| | | |
| | | TH_HTTP_API = http://test.js-stock.top/ |
| | | TH_WS_URL = ws://api-in-ws.js-stock.top |
| | | TH_KEY = GBZAcUPLKZzDMDjvV9Ea |
| | | |
| | | MAS_HTTP_API = http://api-ms.js-stock.top/ |
| | | MAS_WS_URL = ws://api-ms-ws.js-stock.top |
| | | MAS_KEY = PQWyZGrw7wRqdoWrvnY9 |
| | | |
| | | SZHB_HTTP_API = https://api.huobi.pro/ |
| | | SZHB_WS_URL = ws://api-in-ws.js-stock.top |
| | | SZHB_KEY = GBZAcUPLKZzDMDjvV9Ea |
| | | MX_KEY = 1A4SY039JchL2y3UIFh8 |
| | | |
| | | #默认首页显示指数code |
| | | us_home_indices_code=15882,15881,16571 |
| | |
| | | null agent_id, |
| | | s.stock_name, |
| | | s.stock_code, |
| | | s.stock_gid, |
| | | s.stock_type stock_gid, |
| | | s.stock_spell, |
| | | p.stock_ai_order_id buy_order_id, |
| | | p.creat_date buy_order_time, |