| | |
| | | |
| | | import com.nq.dao.MoneyLogMapper; |
| | | import com.nq.dao.StockConfigMapper; |
| | | import com.nq.enums.EConfigKey; |
| | | import com.nq.pojo.MoneyLog; |
| | | import com.nq.pojo.SiteSpread; |
| | | import com.nq.pojo.StockConfig; |
| | |
| | | @RequestMapping({"queryStockConfig.do"}) |
| | | @ResponseBody |
| | | public ServerResponse updateConfig(){ |
| | | StockConfig stockConfig = stockConfigMapper.selectOne(new LambdaQueryWrapper<StockConfig>().eq(StockConfig::getCKey, "buy_handling_charge")); |
| | | StockConfig stockConfig = stockConfigMapper.selectOne(new LambdaQueryWrapper<StockConfig>().eq(StockConfig::getCKey, EConfigKey.BUY_HANDLING_CHARGE.getCode())); |
| | | return ServerResponse.createBySuccess(stockConfig); |
| | | } |
| | | |
| | | @RequestMapping({"queryStockConfigTwo.do"}) |
| | | @ResponseBody |
| | | public ServerResponse queryStockConfigTwo(){ |
| | | StockConfig stockConfig = stockConfigMapper.selectOne(new LambdaQueryWrapper<StockConfig>().eq(StockConfig::getCKey, EConfigKey.EXCHANGE_HANDLING_CHARGE.getCode())); |
| | | return ServerResponse.createBySuccess(stockConfig); |
| | | } |
| | | |
| | | @RequestMapping({"moneylogAll.do"}) |
| | |
| | | @ResponseBody |
| | | public ServerResponse transfer(@RequestParam("fromType") String fromType, @RequestParam("toType") String toType, |
| | | @RequestParam("amt") String amt, HttpServletRequest request) { |
| | | if (fromType.equals(toType)) { |
| | | return ServerResponse.createByErrorMsg("货币类型不能相同", request); |
| | | } |
| | | return iUserService.transfer(fromType, toType, amt,request); |
| | | } |
| | | |
| | |
| | | LIMIT_DOWN_IS_SELL("limit_down_is_sell","跌停是否可以平仓"), |
| | | AGENT_MAX_GRADE("agent_max_grade","最大代理等级"), |
| | | |
| | | LOAN_INTEREST("loan_interest", "贷款利息"), |
| | | EXCHANGE_HANDLING_CHARGE("exchange_handling_charge", "货币兑换手续费"), |
| | | |
| | | INDICES("indices","指数数据"); |
| | | |
| | | private String code; |
| | |
| | | * */ |
| | | UserAssets assetsByTypeAndUserId(String accetType,Integer userId); |
| | | |
| | | |
| | | /** |
| | | * 根据id新增所有资产 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | void addUserAssetsListByUserId(Integer userId); |
| | | |
| | | ServerResponse updateUserAssets(Integer id, String amt,String type); |
| | | |
| | |
| | | Boolean aiAvailableBalanceChange(String accetType, Integer userId, EUserAssets eUserAssets, BigDecimal amount) throws Exception; |
| | | |
| | | /** |
| | | * 根据汇率转换MEX金额 |
| | | * @param accetType 账户类型 |
| | | * @param amount 转换金额 |
| | | * 根据汇率转换 |
| | | * @param fromType |
| | | * @param toType |
| | | * @param amount |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | BigDecimal exchangeAmountByRate(String accetType, BigDecimal amount) throws Exception; |
| | | BigDecimal exchangeAmountByRate(String fromType, String toType, BigDecimal amount) throws Exception; |
| | | } |
| | |
| | | import com.nq.dao.DkMapper; |
| | | import com.nq.dao.StockConfigMapper; |
| | | import com.nq.dao.UserMapper; |
| | | import com.nq.enums.EConfigKey; |
| | | import com.nq.enums.EStockType; |
| | | import com.nq.enums.EUserAssets; |
| | | import com.nq.pojo.*; |
| | |
| | | } |
| | | dkModel.setDkRefundState(1); |
| | | //查看贷款利息 |
| | | StockConfig stockConfig = stockConfigMapper.selectOne(new QueryWrapper<StockConfig>().eq("c_key", "loan_interest")); |
| | | StockConfig stockConfig = stockConfigMapper.selectOne(new QueryWrapper<StockConfig>().eq("c_key", EConfigKey.LOAN_INTEREST.getCode())); |
| | | if (stockConfig != null) { |
| | | long day = DateTimeUtil.getDaysRoundedUp(dkModel.getLoanTime()); |
| | | //利息 利率*贷款金额*借款天数 |
| | |
| | | return ServerResponse.createByErrorMsg("最低购买数量" + stockAI.getMinPrice(), request); |
| | | } |
| | | //获取用户账户 |
| | | UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.getDefault().getCode(), user.getId()); |
| | | BigDecimal finalBuyNum = buyNum; |
| | | UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(stockAI.getStockType(), user.getId()); |
| | | /*BigDecimal finalBuyNum = buyNum; |
| | | //如果不是默认货币需要转换金额 |
| | | if (!stockAI.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | buyNum = userAssetsServices.exchangeAmountByRate(stockAI.getStockType(), buyNum); |
| | | } |
| | | }*/ |
| | | if(buyNum.compareTo(userAssets.getAvailableBalance()) > 0){ |
| | | return ServerResponse.createByErrorMsg("可用余额不足" + userAssets.getAvailableBalance(), request); |
| | | } |
| | |
| | | if(userAssets.getAmountToBeCovered().compareTo(BigDecimal.ZERO) > 0){ |
| | | return ServerResponse.createByErrorMsg("请先缴清待补资金", request); |
| | | } |
| | | //已经转化 直接穿默认类型 |
| | | iUserAssetsServices.aiAvailableBalanceChange(EStockType.getDefault().getCode(), user.getId(), EUserAssets.BUY_AI, buyNum); |
| | | iUserAssetsServices.aiAvailableBalanceChange(stockAI.getStockType(), user.getId(), EUserAssets.BUY_AI, buyNum); |
| | | StockAIOrder stockAIOrder = new StockAIOrder(); |
| | | stockAIOrder.setUserId(user.getId()); |
| | | stockAIOrder.setStockAiId(id.intValue()); |
| | | stockAIOrder.setBuyDate(new Date()); |
| | | stockAIOrder.setBuyAmount(finalBuyNum); |
| | | stockAIOrder.setRemainAmount(finalBuyNum); |
| | | stockAIOrder.setBuyAmount(buyNum); |
| | | stockAIOrder.setRemainAmount(buyNum); |
| | | stockAIOrder.setRealEarning(BigDecimal.valueOf(0)); |
| | | stockAIOrder.setStatus(EStockAIOrderStatus.wait.getStatus()); //等待审核 |
| | | stockAiOrderMapper.insert(stockAIOrder); |
| | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | |
| | | @Override |
| | | public UserAssets assetsByTypeAndUserId(String accetType, Integer userId) { |
| | | if(!accetType.equals(EStockType.US.getCode())){ |
| | | /*if(!accetType.equals(EStockType.US.getCode())){ |
| | | accetType = EStockType.US.getCode(); |
| | | } |
| | | }*/ |
| | | QueryWrapper<UserAssets> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("accect_type",accetType); |
| | | queryWrapper.eq("user_id",userId); |
| | |
| | | } |
| | | userAssets = userAssetsMapper.selectOne(queryWrapper); |
| | | return userAssets; |
| | | } |
| | | |
| | | @Override |
| | | public void addUserAssetsListByUserId(Integer userId) { |
| | | QueryWrapper<UserAssets> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("user_id",userId); |
| | | List<UserAssets> userAssetsList = userAssetsMapper.selectList(queryWrapper); |
| | | List<EStockType> stockTypes = Arrays.asList( |
| | | EStockType.US, |
| | | EStockType.HK, |
| | | EStockType.IN, |
| | | EStockType.TW |
| | | ); |
| | | for (EStockType stockType : stockTypes) { |
| | | //是否存在记录 |
| | | boolean isExist = false; |
| | | if (!userAssetsList.isEmpty()) { |
| | | boolean hasType = userAssetsList.stream() |
| | | .anyMatch(assets -> stockType.getCode().equals(assets.getAccectType())); |
| | | if (hasType) { |
| | | isExist = true; |
| | | } |
| | | } |
| | | if (!isExist) { //不存在账户新增 |
| | | UserAssets userAssets = new UserAssets(); |
| | | userAssets.setUserId(userId); |
| | | userAssets.setAccectType(stockType.getCode()); |
| | | userAssetsMapper.insert(userAssets); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public Boolean availablebalanceChange(String accetType, Integer userId, EUserAssets eUserAssets, BigDecimal amount, String desc, String descType) throws Exception { |
| | | //查询账户 |
| | | UserAssets userAssets = assetsByTypeAndUserId(EStockType.getDefault().getCode(), userId); |
| | | /*UserAssets userAssets = assetsByTypeAndUserId(EStockType.getDefault().getCode(), userId); |
| | | //是否需要转换金额 |
| | | if (!accetType.equals(EStockType.getDefault().getCode())) { |
| | | amount = exchangeAmountByRate(accetType, amount); |
| | | } |
| | | |
| | | }*/ |
| | | UserAssets userAssets = assetsByTypeAndUserId(accetType, userId); |
| | | UserPosition userPosition = userPositionMapper.selectOne(new LambdaQueryWrapper<UserPosition>().gt(UserPosition::getAmountToBeCovered, BigDecimal.ZERO).eq(UserPosition::getUserId,userAssets.getUserId())); |
| | | String type = eUserAssets.getDesc(); |
| | | String before = userAssets.getAvailableBalance().toString(); |
| | |
| | | |
| | | public Boolean aiAvailableBalanceChange(String accetType, Integer userId, EUserAssets eUserAssets, BigDecimal amount) throws Exception { |
| | | //查询账户 |
| | | UserAssets userAssets = assetsByTypeAndUserId(EStockType.getDefault().getCode(), userId); |
| | | /*UserAssets userAssets = assetsByTypeAndUserId(EStockType.getDefault().getCode(), userId); |
| | | //是否需要转换金额 |
| | | if (!accetType.equals(EStockType.getDefault().getCode())) { |
| | | amount = exchangeAmountByRate(accetType, amount); |
| | | } |
| | | }*/ |
| | | UserAssets userAssets = assetsByTypeAndUserId(accetType, userId); |
| | | String before = userAssets.getAvailableBalance().toString(); |
| | | if (eUserAssets.getCode().equals(EUserAssets.BUY_AI.getCode())) { |
| | | //冻结金额 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal exchangeAmountByRate(String accetType, BigDecimal amount) throws Exception { |
| | | EStockType stockType = EStockType.getEStockTypeByCode(accetType); |
| | | public BigDecimal exchangeAmountByRate(String fromType, String toType, BigDecimal amount) throws Exception { |
| | | EStockType stockType = EStockType.getEStockTypeByCode(fromType); |
| | | EStockType toStockType = EStockType.getEStockTypeByCode(toType); |
| | | ExchangeRate exchangeRate = exchangeRateRepository.findExchangeRateByCurrencyAndConversionCurrency( |
| | | stockType.getSymbol(), EStockType.getDefault().getSymbol()).orElse(null); |
| | | stockType.getSymbol(), toStockType.getSymbol()).orElse(null); |
| | | if (exchangeRate != null) { |
| | | //转换为默认货币 保留5位小数 |
| | | return amount.multiply(exchangeRate.getRata()).setScale(5, RoundingMode.HALF_UP); |
| | | } else { |
| | | log.error("exchangeAmountByRate is null:{}>>{}", stockType.getSymbol(), EStockType.getDefault().getSymbol()); |
| | | log.error("exchangeAmountByRate is null:{}>>{}", stockType.getSymbol(), toStockType.getSymbol()); |
| | | throw new Exception("货币转换汇率未设置"); |
| | | } |
| | | |
| | |
| | | BigDecimal orderFree = siteSettingBuyFee.multiply(buyAmt); |
| | | BigDecimal needBuyAmt = buyAmt.add(orderFree); |
| | | //资金校验 |
| | | if (!stock.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | /*if (!stock.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | needBuyAmt = userAssetsServices.exchangeAmountByRate(stock.getStockType(), buyAmt); |
| | | } |
| | | }*/ |
| | | BigDecimal fundratio = new BigDecimal(user.getFundRatio()).divide(new BigDecimal(100)); |
| | | BigDecimal availableBalance = fundratio.multiply(userAssets.getAvailableBalance()); |
| | | if (availableBalance.compareTo(needBuyAmt) < 0) { |
| | |
| | | |
| | | BigDecimal newBuyAmt = buyAmt; |
| | | //如果不是默认货币需要转换金额 |
| | | if (!stock.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | /*if (!stock.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | newBuyAmt = userAssetsServices.exchangeAmountByRate(stock.getStockType(), buyAmt); |
| | | } |
| | | }*/ |
| | | if(newBuyAmt.compareTo(userAssets.getAvailableBalance()) > 0){ |
| | | return ServerResponse.createByErrorMsg("可用余额不足" + userAssets.getAvailableBalance(), request); |
| | | } |
| | |
| | | UserPosition userPosition = getUserPosition(dzId,num, user, stockDz, nowPrice, stock, buyAmt); |
| | | userPositionMapper.insert(userPosition); |
| | | BigDecimal buy_fee_amt = siteSettingBuyFee.multiply(newBuyAmt); |
| | | //已经转化 直接传默认类型 |
| | | userAssetsServices.availablebalanceChange(EStockType.getDefault().getCode(), user.getId(), EUserAssets.BUY, newBuyAmt.negate(),"",""); |
| | | iUserAssetsServices.availablebalanceChange(EStockType.getDefault().getCode(), userAssets.getUserId(), EUserAssets.HANDLING_CHARGE, buy_fee_amt, "", ""); |
| | | |
| | | userAssetsServices.availablebalanceChange(stock.getStockType(), user.getId(), EUserAssets.BUY, newBuyAmt.negate(),"",""); |
| | | iUserAssetsServices.availablebalanceChange(stock.getStockType(), userAssets.getUserId(), EUserAssets.HANDLING_CHARGE, buy_fee_amt, "", ""); |
| | | return ServerResponse.createBySuccess("购买成功", request); |
| | | } catch (Exception e) { |
| | | log.error("大宗下单异常{}", e.getMessage()); |
| | |
| | | PageInfo pageInfo = new PageInfo(userRecharges); |
| | | |
| | | for (int i = 0; i <userRecharges.size() ; i++) { |
| | | SitePay s = sitePayMapper.selectById(userRecharges.get(i).getPayId()); |
| | | //SitePay s = sitePayMapper.selectById(userRecharges.get(i).getPayId()); |
| | | userRecharges.get(i).setAssetsType(EStockType.getDefault().getSymbol1()); |
| | | userRecharges.get(i).setChannelName(EStockType.getDefault().getSymbol()); |
| | | } |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.dao.*; |
| | | import com.nq.enums.EConfigKey; |
| | | import com.nq.enums.EStockType; |
| | | import com.nq.enums.EUserAssets; |
| | | import com.nq.pojo.*; |
| | |
| | | @Autowired |
| | | IUserService iUserService; |
| | | |
| | | @Autowired |
| | | IStockConfigServices iStockConfigServices; |
| | | |
| | | |
| | | public ServerResponse reg(String yzmCode, String agentCode, String phone, String userPwd, HttpServletRequest request) { |
| | | if (StringUtils.isBlank(agentCode) || StringUtils.isBlank(phone) || |
| | |
| | | if (user.getIsLogin().intValue() == 1) { |
| | | return ServerResponse.createByErrorMsg("登录失败。账户锁定",request); |
| | | } |
| | | //默认资产 |
| | | userAssetsServices.assetsByTypeAndUserId(EStockType.getDefault().getCode(),user.getId()); |
| | | //新增账号资产 |
| | | userAssetsServices.addUserAssetsListByUserId(user.getId()); |
| | | this.iSiteLoginLogService.saveLog(user, request); |
| | | return ServerResponse.createBySuccess(user); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | RUserAssets rUserAssets = new RUserAssets(); |
| | | /*RUserAssets rUserAssets = new RUserAssets(); |
| | | rUserAssets.setAccectType("ALL"); |
| | | rUserAssets.setProfitAndLoss(AllProfitAndLose.setScale(s,BigDecimal.ROUND_DOWN).toString()); |
| | | rUserAssets.setProfitAndLossUSD(AllProfitAndLose.setScale(s,BigDecimal.ROUND_DOWN).toString()); |
| | |
| | | rUserAssets.setFreezeMoneyUSD(allFreeMoney.setScale(s,BigDecimal.ROUND_DOWN).toString()); |
| | | rUserAssets.setSymbol("$"); |
| | | rUserAssets.setSymbolCode("USD"); |
| | | rUserAssetsList.add(rUserAssets); |
| | | rUserAssetsList.add(rUserAssets);*/ |
| | | |
| | | return ServerResponse.createBySuccess(rUserAssetsList); |
| | | } |
| | |
| | | try { |
| | | User user = userService.getCurrentUser(request); |
| | | UserAssets formAssets = userAssetsServices.assetsByTypeAndUserId(fromType,user.getId()); |
| | | BigDecimal amtBig = new BigDecimal(amt); |
| | | if(formAssets.getAvailableBalance().compareTo(amtBig)<0){ |
| | | return ServerResponse.createByErrorMsg("余额不足",request); |
| | | BigDecimal amtBig = new BigDecimal(amt).abs(); |
| | | |
| | | // 转换手续费率 |
| | | BigDecimal siteSettingBuyFee = new BigDecimal(iStockConfigServices.queryByKey(EConfigKey.EXCHANGE_HANDLING_CHARGE.getCode()).getCValue()) ; |
| | | BigDecimal orderFree = siteSettingBuyFee.multiply(amtBig); |
| | | //资金校验 |
| | | BigDecimal needAmt = amtBig.add(orderFree); |
| | | if(formAssets.getAvailableBalance().compareTo(needAmt)<0){ |
| | | return ServerResponse.createByErrorMsg("余额不足", request); |
| | | } |
| | | userAssetsServices.availablebalanceChange(fromType,user.getId(), EUserAssets.TRANSFER,amtBig.negate(),fromType+"/"+toType,""); |
| | | amtBig = rateServices.currencyRate(EStockType.getEStockTypeByCode(fromType),EStockType.getEStockTypeByCode(toType)).multiply(amtBig); |
| | | |
| | | userAssetsServices.availablebalanceChange(fromType, user.getId(), EUserAssets.HANDLING_CHARGE, orderFree, "", ""); |
| | | userAssetsServices.availablebalanceChange(fromType, user.getId(), EUserAssets.TRANSFER, amtBig.negate(),fromType+"/"+toType,""); |
| | | //转换金额 |
| | | amtBig = userAssetsServices.exchangeAmountByRate(fromType, toType, amtBig); |
| | | userAssetsServices.availablebalanceChange(toType,user.getId(),EUserAssets.TRANSFER,amtBig.setScale(5,RoundingMode.HALF_DOWN),fromType+"/"+toType,""); |
| | | |
| | | return ServerResponse.createBySuccess(); |
| | | } catch (Exception e) { |
| | | return ServerResponse.createByErrorMsg(e.getMessage()); |
| | |
| | | }else{ |
| | | bound = new BigDecimal(model.getApplyNums()).multiply(stockSubscribe.getPrice()); |
| | | } |
| | | //如果不是默认货币需要转换金额 |
| | | /*//如果不是默认货币需要转换金额 |
| | | if (!stockSubscribe.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | bound = iUserAssetsServices.exchangeAmountByRate(stockSubscribe.getStockType(), bound); |
| | | } |
| | | }*/ |
| | | if(userAssets.getAvailableBalance().compareTo(bound) < 0){ |
| | | return ServerResponse.createByErrorMsg("账户余额不足", request); |
| | | } |
| | |
| | | userAssets.setAmountToBeCovered(userAssets.getAmountToBeCovered().add(subtract.abs())); |
| | | } |
| | | userAssetsMapper.updateById(userAssets); |
| | | //交易记录MEX |
| | | //交易记录 |
| | | MoneyLog moneyLog = new MoneyLog(); |
| | | EUserAssets eUserAssets = EUserAssets.BUY; |
| | | moneyLog.setDescs(eUserAssets.getDesc()); |
| | | moneyLog.setBeFore(before); |
| | | moneyLog.setAfter(userAssets.getAvailableBalance().toString()); |
| | | moneyLog.setAmount(bound.negate().toString()); |
| | | moneyLog.setAccectType(EStockType.getDefault().getCode()); |
| | | moneyLog.setAccectType(stockSubscribe.getStockType()); |
| | | moneyLog.setType(eUserAssets.getCode()); |
| | | moneyLog.setUserId(user.getId()+""); |
| | | moneyLog.setSymbol(EStockType.getDefault().getSymbol()); |
| | | moneyLog.setSymbol(EStockType.getEStockTypeByCode(stockSubscribe.getStockType()).getSymbol()); |
| | | moneyLog.setCreateTime(new Date()); |
| | | moneyLogMapper.insert(moneyLog); |
| | | if (ret > 0) { |
| | |
| | | if(applyNumber > 0){ |
| | | //需要退回的资金 |
| | | refundPrice = userStockSubscribe.getBuyPrice().multiply(new BigDecimal(applyNumber)); |
| | | //如果不是默认货币需要转换金额 |
| | | /*//如果不是默认货币需要转换金额 |
| | | if (!stockSubscribe.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | refundPrice = iUserAssetsServices.exchangeAmountByRate(stockSubscribe.getStockType(), refundPrice); |
| | | } |
| | | }*/ |
| | | userAssets.setAvailableBalance(userAssets.getAvailableBalance().add(refundPrice)); |
| | | userAssets.setFreezeMoney(userAssets.getFreezeMoney().subtract(refundPrice)); |
| | | } |
| | | }else{ |
| | | if(applyNumber > 0){ |
| | | refundPrice = userStockSubscribe.getBuyPrice().multiply(new BigDecimal(applyNumber)); |
| | | //如果不是默认货币需要转换金额 |
| | | /*//如果不是默认货币需要转换金额 |
| | | if (!stockSubscribe.getStockType().equals(EStockType.getDefault().getCode())) { |
| | | refundPrice = iUserAssetsServices.exchangeAmountByRate(stockSubscribe.getStockType(), refundPrice); |
| | | } |
| | | }*/ |
| | | BigDecimal subtract = refundPrice.subtract(userAssets.getAmountToBeCovered()); |
| | | if(subtract.compareTo(BigDecimal.ZERO) <= 0){//如果退回的资金不足补足待补则直接减 |
| | | userAssets.setAmountToBeCovered(userAssets.getAmountToBeCovered().subtract(refundPrice)); |
| | |
| | | moneyLog.setBeFore(before); |
| | | moneyLog.setAfter(userAssets.getAvailableBalance().toString()); |
| | | moneyLog.setAmount(refundPrice.toString()); |
| | | moneyLog.setAccectType(EStockType.getDefault().getCode()); |
| | | moneyLog.setAccectType(stockSubscribe.getStockType()); |
| | | moneyLog.setType(eUserAssets.getCode()); |
| | | moneyLog.setUserId(userAssets.getUserId()+""); |
| | | moneyLog.setSymbol(EStockType.getDefault().getSymbol()); |
| | | moneyLog.setSymbol(EStockType.getEStockTypeByCode(stockSubscribe.getStockType()).getSymbol()); |
| | | moneyLog.setCreateTime(new Date()); |
| | | moneyLogMapper.insert(moneyLog); |
| | | } |
| | |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:6306/stock_ci?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://127.0.0.1:3306/cgstock?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://127.0.0.1:3306/stock_ci?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: stock_ci |
| | | password: 123456 |
| | | druid: |