| | |
| | | |
| | | import com.yami.trading.bean.model.FileUploadParamsModel; |
| | | import com.yami.trading.bean.vo.FileInfoVo; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.exception.YamiShopBindException; |
| | | import com.yami.trading.common.util.StringUtils; |
| | |
| | | } |
| | | String path= awsS3OSSFileService.uploadFile(model.getModuleName(), model.getFile()); |
| | | FileInfoVo fileInfoVo=new FileInfoVo(); |
| | | fileInfoVo.setHttpUrl(awsS3OSSFileService.getUrl(path)); |
| | | fileInfoVo.setHttpUrl(Constants.IMAGES_HTTP+path); |
| | | fileInfoVo.setPath(path); |
| | | return Result.ok(fileInfoVo); |
| | | } |
| | |
| | | import com.yami.trading.bean.user.dto.RealNameAuthDto; |
| | | import com.yami.trading.bean.user.dto.RealNameAuthUpdateDto; |
| | | import com.yami.trading.common.annotation.SysLog; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.exception.YamiShopBindException; |
| | | import com.yami.trading.service.AwsS3OSSFileService; |
| | |
| | | request.getStatus(),request.getUserName()); |
| | | for (RealNameAuthDto dto:page.getRecords()){ |
| | | if (StrUtil.isNotBlank(dto.getIdBackImg())){ |
| | | dto.setIdBackImg( awsS3OSSFileService.getUrl(dto.getIdBackImg())); |
| | | dto.setIdBackImg( Constants.IMAGES_HTTP+dto.getIdBackImg()); |
| | | } |
| | | if (StrUtil.isNotBlank(dto.getIdFrontImg())){ |
| | | dto.setIdBackImg( awsS3OSSFileService.getUrl(dto.getIdFrontImg())); |
| | | dto.setIdBackImg( Constants.IMAGES_HTTP+dto.getIdFrontImg()); |
| | | } |
| | | } |
| | | return Result.ok(page); |
| | |
| | | realNameAuthDto.setIdName(realNameAuthRecord.getIdName()); |
| | | realNameAuthDto.setIdNumber(realNameAuthRecord.getIdNumber()); |
| | | realNameAuthDto.setNationality(realNameAuthRecord.getNationality()); |
| | | realNameAuthDto.setIdFrontImg(awsS3OSSFileService.getUrl(realNameAuthRecord.getIdFrontImg())); |
| | | realNameAuthDto.setIdBackImg(awsS3OSSFileService.getUrl(realNameAuthRecord.getIdBackImg())); |
| | | realNameAuthDto.setHandheldPhoto(awsS3OSSFileService.getUrl(realNameAuthRecord.getHandheldPhoto())); |
| | | realNameAuthDto.setIdFrontImg(Constants.IMAGES_HTTP+realNameAuthRecord.getIdFrontImg()); |
| | | realNameAuthDto.setIdBackImg(Constants.IMAGES_HTTP+realNameAuthRecord.getIdBackImg()); |
| | | realNameAuthDto.setHandheldPhoto(Constants.IMAGES_HTTP+realNameAuthRecord.getHandheldPhoto()); |
| | | } |
| | | return Result.succeed(realNameAuthDto, "查询成功"); |
| | | } |
| | |
| | | String methodType = String.valueOf((Integer) map.get("method_type")); |
| | | if (map.containsKey("img")) { |
| | | if (map.get("img") != null) { |
| | | map.put("img", awsS3OSSFileService.getUrl(map.get("img").toString())); |
| | | map.put("img", Constants.IMAGES_HTTP+map.get("img").toString()); |
| | | } |
| | | } |
| | | if (map.containsKey("method_img")) { |
| | | if (map.get("method_img") != null) { |
| | | map.put("method_img", awsS3OSSFileService.getUrl(map.get("method_img").toString())); |
| | | map.put("method_img", Constants.IMAGES_HTTP+map.get("method_img").toString()); |
| | | } |
| | | } |
| | | if (map.containsKey("qrcode")) { |
| | | if (map.get("qrcode") != null) { |
| | | if ((!map.get("qrcode").toString().startsWith("http"))){ |
| | | map.put("qrcode", awsS3OSSFileService.getUrl(map.get("qrcode").toString())); |
| | | map.put("qrcode", Constants.IMAGES_HTTP+map.get("qrcode").toString()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | if (null != map.get("img")) { |
| | | map.put("img", awsS3OSSFileService.getUrl(map.get("img").toString())); |
| | | map.put("img", Constants.IMAGES_HTTP+map.get("img").toString()); |
| | | } |
| | | } |
| | | return Result.succeed(page); |
| | |
| | | BeanUtils.copyProperties(paymentMethodConfig, c2cPaymentMethodConfigListDto); |
| | | c2cPaymentMethodConfigListDto.setMethodType(paymentMethodConfig.getMethodType()+""); |
| | | c2cPaymentMethodConfigListDto.setMethodTypeName(map.get(c2cPaymentMethodConfigListDto.getMethodType())); |
| | | //awsS3OSSFileService.getUrl(paymentMethodConfig.getMethodImg()) |
| | | //awsS3OSSFileService.getUrl(paymentMethodConfig.getMethodImg()) |
| | | c2cPaymentMethodConfigListDto.setMethodImgUrl(awsS3OSSFileService.getUrl(paymentMethodConfig.getMethodImg())); |
| | | c2cPaymentMethodConfigListDto.setMethodImgUrl(Constants.IMAGES_HTTP+paymentMethodConfig.getMethodImg()); |
| | | |
| | | c2cPaymentMethodConfigListDto.setMethodImg(paymentMethodConfig.getMethodImg()); |
| | | list.add(c2cPaymentMethodConfigListDto); |
| | |
| | | dto.setMethodName(cfg.getMethodName()); |
| | | dto.setMethodTypeName(map.get(dto.getMethodType())); |
| | | dto.setMethodImg(cfg.getMethodImg()); |
| | | dto.setMethodImgUrl(awsS3OSSFileService.getUrl(cfg.getMethodImg())); |
| | | dto.setMethodImgUrl(Constants.IMAGES_HTTP+cfg.getMethodImg()); |
| | | dto.setParamName1(cfg.getParamName1()); |
| | | dto.setParamName2(cfg.getParamName2()); |
| | | dto.setParamName3(cfg.getParamName3()); |
| | |
| | | List<C2cPaymentMethodDto> list = page.getRecords(); |
| | | for (C2cPaymentMethodDto dto : list) { |
| | | dto.setMethodTypeName(pmtMap.containsKey(dto.getMethodType() + "") ? pmtMap.get(dto.getMethodType() + "") : dto.getMethodType() + ""); |
| | | dto.setQrcodeImg(awsS3OSSFileService.getUrl(dto.getQrcode())); |
| | | dto.setMethodImgUrl(awsS3OSSFileService.getUrl(dto.getMethodImg())); |
| | | dto.setQrcodeImg(Constants.IMAGES_HTTP+dto.getQrcode()); |
| | | dto.setMethodImgUrl(Constants.IMAGES_HTTP+dto.getMethodImg()); |
| | | } |
| | | return Result.ok(page); |
| | | } |
| | |
| | | Map<String, String> pmtMap = this.c2cAdvertService.getC2cSyspara("c2c_payment_method_type"); |
| | | dto.setMethodTypeName(pmtMap.get(dto.getMethodType()+"")); |
| | | dto.setUserName(party.getUserName()); |
| | | dto.setQrcodeImg(awsS3OSSFileService.getUrl(dto.getQrcode())); |
| | | dto.setMethodImgUrl(awsS3OSSFileService.getUrl(dto.getMethodImg())); |
| | | dto.setQrcodeImg(Constants.IMAGES_HTTP+dto.getQrcode()); |
| | | dto.setMethodImgUrl(Constants.IMAGES_HTTP+dto.getMethodImg()); |
| | | return Result.ok(dto); |
| | | } |
| | | |
| | |
| | | |
| | | for (Object o:page.getRecords()){ |
| | | Map m= (Map) o; |
| | | m.put("head_img", awsS3OSSFileService.getUrl(m.get("head_img").toString())); |
| | | m.put("head_img", Constants.IMAGES_HTTP+m.get("head_img").toString()); |
| | | } |
| | | return Result.succeed(page); |
| | | } |
| | |
| | | import com.yami.trading.bean.chat.domain.OnlineChatMessage; |
| | | import com.yami.trading.bean.model.Customer; |
| | | import com.yami.trading.bean.model.User; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.exception.BusinessException; |
| | | import com.yami.trading.common.util.DateUtils; |
| | | import com.yami.trading.common.util.StringUtils; |
| | |
| | | map.put("type", type); |
| | | String content = list.get(i).getContent(); |
| | | if(!content.startsWith("http")){ |
| | | map.put("url", awsS3OSSFileService.getUrl(content)); |
| | | map.put("url", Constants.IMAGES_HTTP+content); |
| | | }else{ |
| | | map.put("url", content); |
| | | } |
| | |
| | | map.put("type", type); |
| | | String content = message.getContent(); |
| | | if ("img".equals(type)) { |
| | | content = awsS3OSSFileService.getUrl(message.getContent()); |
| | | content = Constants.IMAGES_HTTP+message.getContent(); |
| | | } |
| | | map.put("content", content); |
| | | if(!content.startsWith("http")){ |
| | | map.put("url", awsS3OSSFileService.getUrl(content)); |
| | | map.put("url", Constants.IMAGES_HTTP+content); |
| | | }else{ |
| | | map.put("url", content); |
| | | } |
| | |
| | | bannerService.page(page, lambdaQueryWrapper); |
| | | for (Banner banner:page.getRecords()){ |
| | | banner.setLanguageText(Constants.LANGUAGE.get(banner.getLanguage())); |
| | | banner.setHttpImageUrl(awsS3OSSFileService.getUrl(banner.getImage())); |
| | | banner.setHttpImageUrl(Constants.IMAGES_HTTP+banner.getImage()); |
| | | } |
| | | return Result.ok(page); |
| | | } |
| | |
| | | newsSerivce.pageNews(page,request.getTitle(),request.getLanguage(),request.getUserCode()); |
| | | for (NewsDto news:page.getRecords()){ |
| | | news.setLanguageText(Constants.LANGUAGE.get(news.getLanguage())); |
| | | String nUrl = awsS3OSSFileService.getUrl(news.getImgUrl()); |
| | | String nUrl = Constants.IMAGES_HTTP+news.getImgUrl(); |
| | | news.setHttpImgUrl(nUrl); |
| | | } |
| | | return Result.ok(page); |
| | |
| | | import com.yami.trading.admin.model.*; |
| | | import com.yami.trading.bean.user.dto.RechargeBlockchainOrderDto; |
| | | import com.yami.trading.common.annotation.SysLog; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.security.common.util.SecurityUtils; |
| | | import com.yami.trading.security.common.manager.PasswordManager; |
| | |
| | | ,request.getEndTime(),request.getStatus()); |
| | | |
| | | for (RechargeBlockchainOrderDto dto:page.getRecords()){ |
| | | dto.setImg(awsS3OSSFileService.getUrl(dto.getImg())); |
| | | dto.setImg(Constants.IMAGES_HTTP+dto.getImg()); |
| | | } |
| | | return Result.ok(page); |
| | | } |
| | |
| | | import com.yami.trading.admin.model.UserSafewordApplyExamineModel; |
| | | import com.yami.trading.admin.model.UserSafewordApplyModel; |
| | | import com.yami.trading.bean.user.dto.UserSafewordApplyDto; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.service.AwsS3OSSFileService; |
| | | import com.yami.trading.service.RealNameAuthRecordService; |
| | |
| | | |
| | | for(UserSafewordApplyDto safewordApplyDto:page.getRecords()){ |
| | | safewordApplyDto.setIdcardPathFront( |
| | | awsS3OSSFileService.getUrl(safewordApplyDto.getIdcardPathBack())); |
| | | Constants.IMAGES_HTTP+safewordApplyDto.getIdcardPathBack()); |
| | | safewordApplyDto.setIdcardPathBack( |
| | | awsS3OSSFileService.getUrl(safewordApplyDto.getIdcardPathBack())); |
| | | Constants.IMAGES_HTTP+safewordApplyDto.getIdcardPathBack()); |
| | | safewordApplyDto.setIdcardPathHold( |
| | | awsS3OSSFileService.getUrl(safewordApplyDto.getIdcardPathHold())); |
| | | Constants.IMAGES_HTTP+safewordApplyDto.getIdcardPathHold()); |
| | | } |
| | | return Result.ok(page); |
| | | } |
| | |
| | | mso.put("thirty_days_order", thirtyDaysOrderBase + thirtyDaysOrder); |
| | | mso.put("thirty_days_order_ratio", 0 != thirtyDaysOrderRatioBase ? thirtyDaysOrderRatioBase : thirtyDaysOrderRatio); |
| | | if (null != mso.get("head_img") && StringUtils.isNotEmpty(mso.get("head_img").toString())) { |
| | | String path = awsS3OSSFileService.getUrl(mso.get("head_img").toString()); |
| | | String path = Constants.IMAGES_HTTP+mso.get("head_img").toString(); |
| | | mso.put("head_img", path); |
| | | } |
| | | if (mso.get("pay_type") != null && StringUtils.isNotEmpty(mso.get("pay_type").toString())) { |
| | |
| | | data.put("user_code", c2cParty.getUserCode()); |
| | | data.put("user_name", c2cParty.getUserName()); |
| | | if (StringUtils.isNotEmpty(c2cUser.getHeadImg())) { |
| | | String path = awsS3OSSFileService.getUrl(c2cUser.getHeadImg()); |
| | | String path = Constants.IMAGES_HTTP+c2cUser.getHeadImg(); |
| | | data.put("head_img", path); |
| | | } else { |
| | | data.put("head_img", ""); |
| | |
| | | throw new YamiShopBindException("申诉不存在"); |
| | | } |
| | | if (StringUtils.isNotEmpty(c2cAppeal.getImg())) { |
| | | String path = awsS3OSSFileService.getUrl(c2cAppeal.getImg()); |
| | | String path = Constants.IMAGES_HTTP+c2cAppeal.getImg(); |
| | | c2cAppeal.setImg(path); |
| | | } |
| | | return Result.succeed(); |
| | |
| | | |
| | | import com.yami.trading.bean.model.C2cPaymentMethodConfig; |
| | | import com.yami.trading.bean.model.C2cTranslate; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.exception.BusinessException; |
| | | import com.yami.trading.common.util.StringUtils; |
| | |
| | | throw new BusinessException("支付方式模板不存在"); |
| | | } |
| | | if (StringUtils.isNotEmpty(config.getMethodImg())) { |
| | | String path = awsS3OSSFileService.getUrl(config.getMethodImg()); |
| | | String path = Constants.IMAGES_HTTP+config.getMethodImg(); |
| | | config.setMethodImg(path); |
| | | } |
| | | return Result.succeed(this.c2cTranslateService.translatePmc(config, language)); |
| | |
| | | map.put("idname",kyc.getIdName()); |
| | | map.put("idnumber",kyc.getIdNumber()); |
| | | map.put("name",kyc.getName()); |
| | | map.put("idimg_1_path",awsS3OSSFileService.getUrl(kyc.getIdFrontImg())); |
| | | map.put("idimg_2_path",awsS3OSSFileService.getUrl(kyc.getIdBackImg())); |
| | | map.put("idimg_3_path", awsS3OSSFileService.getUrl(kyc.getHandheldPhoto())); |
| | | map.put("idimg_1_path",Constants.IMAGES_HTTP+kyc.getIdFrontImg()); |
| | | map.put("idimg_2_path",Constants.IMAGES_HTTP+kyc.getIdBackImg()); |
| | | map.put("idimg_3_path",Constants.IMAGES_HTTP+kyc.getHandheldPhoto()); |
| | | map.put("idimg_1",kyc.getIdFrontImg()); |
| | | map.put("idimg_2",kyc.getIdBackImg()); |
| | | map.put("idimg_3",kyc.getHandheldPhoto()); |
| | |
| | | import com.yami.trading.bean.chat.query.ChatRecordReqModel; |
| | | import com.yami.trading.bean.chat.query.ChatRecordRespModel; |
| | | import com.yami.trading.bean.model.User; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.util.DateUtils; |
| | | import com.yami.trading.common.util.StringUtils; |
| | |
| | | String content =null; |
| | | String contentType = onlinechatMessage.getContentType(); |
| | | if ("img".equals(contentType) && !onlinechatMessage.getContent().startsWith("http")){ |
| | | content=awsS3OSSFileService.getUrl(onlinechatMessage.getContent()); |
| | | content= Constants.IMAGES_HTTP+onlinechatMessage.getContent(); |
| | | } else { |
| | | content=onlinechatMessage.getContent(); |
| | | } |
| | |
| | | |
| | | } |
| | | if (StringUtils.isNotEmpty(news.getImgUrl())) { |
| | | news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl())); |
| | | news.setImgUrl(Constants.IMAGES_HTTP+news.getImgUrl()); |
| | | } |
| | | |
| | | return Result.succeed(news); |
| | |
| | | list.get(i).setCreateTimeStr(DateUtils.format(list.get(i).getCreateTime(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | News news = list.get(i); |
| | | if (StringUtils.isNotEmpty(news.getImgUrl())) { |
| | | news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl())); |
| | | news.setImgUrl(Constants.IMAGES_HTTP+news.getImgUrl()); |
| | | } |
| | | |
| | | } |
| | |
| | | list.get(i).setCreateTimeStr(DateUtils.format(list.get(i).getCreateTime(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | News news = list.get(i); |
| | | if (StringUtils.isNotEmpty(news.getImgUrl())) { |
| | | news.setImgUrl(awsS3OSSFileService.getUrl(news.getImgUrl())); |
| | | news.setImgUrl(Constants.IMAGES_HTTP+news.getImgUrl()); |
| | | } |
| | | |
| | | } |
| | |
| | | String content = message.getContent(); |
| | | String contentType = message.getContentType(); |
| | | if ("img".equals(contentType) && !message.getContent().startsWith("http")){ |
| | | content=awsS3OSSFileService.getUrl(message.getContent()); |
| | | content=Constants.IMAGES_HTTP+message.getContent(); |
| | | } else { |
| | | content=message.getContent(); |
| | | } |
| | |
| | | for (C2cPaymentMethod method : map.values()) { |
| | | if (null != method) { |
| | | if (StringUtils.isNotEmpty(method.getMethodImg())) { |
| | | String path = awsS3OSSFileService.getUrl(method.getMethodImg()); |
| | | String path = Constants.IMAGES_HTTP+method.getMethodImg(); |
| | | method.setMethodImg(path); |
| | | } |
| | | list.add(this.c2cTranslateService.translatePm(method, language)); |
| | |
| | | throw new BusinessException("支付方式不存在"); |
| | | } |
| | | if (StringUtils.isNotEmpty(method.getMethodImg())) { |
| | | method.setMethodImg(awsS3OSSFileService.getUrl(method.getMethodImg())); |
| | | method.setMethodImg(Constants.IMAGES_HTTP+method.getMethodImg()); |
| | | } |
| | | if (StringUtils.isNotEmpty(method.getQrcode())) { |
| | | String path = method.getQrcode(); |
| | | method.setQrcodePath(awsS3OSSFileService.getUrl(path)); |
| | | method.setQrcodePath(Constants.IMAGES_HTTP+path); |
| | | } |
| | | return Result.succeed(method); |
| | | } |
| | |
| | | C2cPaymentMethod method = resList.get(i); |
| | | if (null != method) { |
| | | if (StringUtils.isNotEmpty(method.getMethodImg())) { |
| | | String path = awsS3OSSFileService.getUrl(method.getMethodImg()); |
| | | String path = Constants.IMAGES_HTTP+method.getMethodImg(); |
| | | method.setMethodImg(path); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.yami.trading.bean.model.FileUploadParamsModel; |
| | | import com.yami.trading.bean.vo.FileInfoVo; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.exception.YamiShopBindException; |
| | | import com.yami.trading.service.AwsS3OSSFileService; |
| | |
| | | } |
| | | String path= awsS3OSSFileService.uploadFile(model.getModuleName(), model.getFile()); |
| | | FileInfoVo fileInfoVo=new FileInfoVo(); |
| | | fileInfoVo.setHttpUrl(awsS3OSSFileService.getUrl(path)); |
| | | fileInfoVo.setHttpUrl(Constants.IMAGES_HTTP+path); |
| | | fileInfoVo.setPath(path); |
| | | return Result.succeed(fileInfoVo); |
| | | } |
| | |
| | | package com.yami.trading.api.controller; |
| | | |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.domain.Result; |
| | | import com.yami.trading.common.exception.YamiShopBindException; |
| | | import com.yami.trading.service.AwsS3OSSFileService; |
| | |
| | | return Result.failed("图片大小不能超过30M"); |
| | | } |
| | | String path = awsS3OSSFileService.uploadFile("chat", file); |
| | | return Result.succeed(awsS3OSSFileService.getUrl(path)); |
| | | return Result.succeed(Constants.IMAGES_HTTP+path); |
| | | } |
| | | } |
| | |
| | | }); |
| | | return Result.ok(data); |
| | | } catch (Exception e) { |
| | | log.error("生成实时数据失败", e); |
| | | log.error("c", e); |
| | | throw new YamiShopBindException("生成实时数据失败"); |
| | | } |
| | | } |
| | |
| | | String methodType = String.valueOf(order.getMethodType()); |
| | | result.put("method_type_name", pmtMap.containsKey(methodType) ? pmtMap.get(methodType) : methodType); |
| | | result.put("method_name", order.getMethodName()); |
| | | result.put("method_img", awsS3OSSFileService.getUrl(order.getMethodImg())); |
| | | result.put("method_img", Constants.IMAGES_HTTP+order.getMethodImg()); |
| | | result.put("real_name", order.getRealName()); |
| | | result.put("param_name1", order.getParamName1()); |
| | | result.put("param_value1", order.getParamValue1()); |
| | |
| | | result.put("param_value15", order.getParamValue15()); |
| | | result.put("qrcode", order.getQrcode()); |
| | | result.put("remark", order.getRemark()); |
| | | result.put("img", awsS3OSSFileService.getUrl(order.getImg())); |
| | | result.put("img", Constants.IMAGES_HTTP+order.getImg()); |
| | | |
| | | result.put("create_time", DateUtils.format(order.getCreateTime(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | result.put("handle_time", DateUtils.format(order.getHandleTime(), DateUtils.DF_yyyyMMddHHmmss)); |
| | |
| | | } |
| | | |
| | | private void getStrongPrice(ContractOrder order, Item item) { |
| | | // 获取当前账户余额并加到收益中 |
| | | Map<String, Object> moneyAll = walletService.getMoneyAll(order.getPartyId()); |
| | | BigDecimal earnings = order.getDepositOpen().add(new BigDecimal(moneyAll.get("money_all_coin").toString())); |
| | | BigDecimal earnings = BigDecimal.ZERO; |
| | | if(order.getLocationType() == 1){//全仓 |
| | | // 获取当前账户余额并加到收益中 |
| | | Map<String, Object> moneyAll = walletService.getMoneyAll(order.getPartyId()); |
| | | earnings = order.getDepositOpen().add(new BigDecimal(moneyAll.get("money_all_coin").toString())); |
| | | }else{ |
| | | earnings = order.getDepositOpen(); |
| | | } |
| | | double faceValue = 0.01; // 合约面值(固定面值不能调整) |
| | | double maintenanceMarginRate = 0.004; // 维持保证金率(固定不变) |
| | | //"buy":买(多) "sell":卖(空) |
| | |
| | | if (userIdWallet.getMoney().doubleValue() < order.getVolume().doubleValue()) { |
| | | throw new YamiShopBindException("余额不足"); |
| | | } |
| | | // this.walletService.update(userIdWallet.getUserId().toString(), Arith.sub(0, order.getVolume())); |
| | | capitaltWalletService.update(userIdWallet, Arith.sub(0, order.getVolume())); |
| | | this.walletService.update(userIdWallet.getUserId().toString(), Arith.sub(0, order.getVolume())); |
| | | // capitaltWalletService.update(userIdWallet, Arith.sub(0, order.getVolume())); |
| | | /* |
| | | * 保存资金日志 |
| | | */ |
| | |
| | | import com.yami.trading.bean.model.User; |
| | | import com.yami.trading.bean.model.UserSafewordApply; |
| | | import com.yami.trading.bean.user.dto.UserSafewordApplyDto; |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.constants.TipConstants; |
| | | import com.yami.trading.common.domain.BaseEntity; |
| | | import com.yami.trading.common.exception.YamiShopBindException; |
| | |
| | | String idcard_path_hold_path = ""; |
| | | |
| | | if (!StringUtils.isNullOrEmpty(apply.getIdcardPathFront())) { |
| | | idcard_path_front_path = awsS3OSSFileService.getUrl(apply.getIdcardPathFront()); |
| | | idcard_path_front_path = Constants.IMAGES_HTTP+apply.getIdcardPathFront(); |
| | | } |
| | | result.put("idcard_path_front_path", idcard_path_front_path); |
| | | |
| | | if (!StringUtils.isNullOrEmpty(apply.getIdcardPathBack())) { |
| | | idcard_path_back_path =awsS3OSSFileService.getUrl(apply.getIdcardPathBack()); |
| | | idcard_path_back_path =Constants.IMAGES_HTTP+apply.getIdcardPathBack(); |
| | | } |
| | | |
| | | result.put("idcard_path_back_path", idcard_path_back_path); |
| | | |
| | | if (!StringUtils.isNullOrEmpty(apply.getIdcardPathHold())) { |
| | | idcard_path_hold_path = awsS3OSSFileService.getUrl(apply.getIdcardPathHold()); |
| | | idcard_path_hold_path = Constants.IMAGES_HTTP+apply.getIdcardPathHold(); |
| | | } |
| | | result.put("idcard_path_hold_path", idcard_path_hold_path); |
| | | |
| | |
| | | <select id="listMenuByUserId" resultType="com.yami.trading.sys.model.SysMenu"> |
| | | SELECT DISTINCT m.menu_id AS menu_id,m.parent_id,m.name,url,m.type,m.icon,m.order_num FROM tz_sys_user_role ur |
| | | LEFT JOIN tz_sys_role_menu rm ON ur.role_id = rm.role_id LEFT JOIN tz_sys_menu m ON m.`menu_id` = rm.`menu_id` |
| | | WHERE ur.user_id = #{userId} and m.type != 2 order by order_num |
| | | WHERE ur.user_id = #{userId} and m.type != 2 and m.is_show = 0 order by order_num |
| | | </select> |
| | | <!-- 查询所有菜单 --> |
| | | <select id="listMenu" resultType="com.yami.trading.sys.model.SysMenu"> |