| | |
| | | import com.ruoyi.common.core.enums.AuctionTypeEnum; |
| | | import com.ruoyi.common.core.enums.AuthenticationEnum; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class MemberAuctionSalesroomInfoVO { |
| | |
| | | @JsonInclude(JsonInclude.Include.ALWAYS) |
| | | private Integer isApply; |
| | | |
| | | @ApiModelProperty(value = "竞拍协议") |
| | | private String auctionAgreement; |
| | | |
| | | @ApiModelProperty(value = "拍卖会的商品") |
| | | @JsonInclude(JsonInclude.Include.ALWAYS) |
| | | List<ForepartAuctionSalesroomGoodsVO> forepartAuctionSalesroomGoodsVO; |
| | |
| | | package com.ruoyi.auth.utils; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | |
| | | |
| | | public static void smsSendBatch(List<String> mobileList, String content, |
| | | String ext, String attime) { |
| | | log.info("发送短信:号码{},内容:{}", JSONObject.toJSONString(mobileList), content); |
| | | for (String mobile : mobileList) { |
| | | String errMess = ""; |
| | | StringBuffer sendData = new StringBuffer(""); |
| | |
| | | import com.ruoyi.common.core.enums.AuctionOrderTypeEnum; |
| | | import com.ruoyi.common.core.enums.AuctionStartStatusEnum; |
| | | import com.ruoyi.common.core.enums.BidStatusEnum; |
| | | import com.ruoyi.common.core.enums.ClientTypeEnum; |
| | | import com.ruoyi.common.core.enums.OrderFromEnum; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | |
| | | auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.ENDED); |
| | | this.updateById(auctionSalesroomGoods); |
| | | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM_GOODS); |
| | | map.put("notification_time", DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); |
| | | map.put("goodsSkuId", auctionSalesroomGoods.getId().toString()); |
| | |
| | | map.put("success_flag", successFlag); |
| | | map.put("order_id", successFlag == 1 ? userIdMap.getOrDefault(member.getId(), "") : ""); |
| | | map.put("auction_bid_record_id", bidMap.getOrDefault(member.getId(), "0")); |
| | | map.put("member_id", member.getId().toString()); |
| | | String msg = JSONObject.toJSONString(map); |
| | | sysUserClient.pushBatch( |
| | | WebsocketMessageDTO.builder().message(msg).userId(member.getUserId()).build(), |
| | | sysUserClient.pushByClientType( |
| | | WebsocketMessageDTO.builder().message(msg).clientType(ClientTypeEnum.MEMBER) |
| | | .userId(member.getUserId()).build(), |
| | | SecurityConstants.INNER); |
| | | log.info("===================>发送websocket通知,消息体{}", msg); |
| | | } |
| | |
| | | memberAuctionSalesroomInfoVO.setType(byId.getType()); |
| | | memberAuctionSalesroomInfoVO.setDescription(byId.getDescription()); |
| | | memberAuctionSalesroomInfoVO.setShareTitle(byId.getShareTitle()); |
| | | memberAuctionSalesroomInfoVO.setAuctionAgreement(byId.getAuctionAgreement()); |
| | | if (StringUtils.isNotBlank(byId.getShareTitle())) { |
| | | memberAuctionSalesroomInfoVO.setShareTitle(byId.getShareTitle()); |
| | | } else { |
| | |
| | | forepartAuctionSalesroomGoodsVO.setDealQuantity(salesroomGoods.getDealQuantity()); |
| | | forepartAuctionSalesroomGoodsVO.setMaxAmount(salesroomGoods.getMaxAmount()); |
| | | forepartAuctionSalesroomGoodsVO.setBidNum(salesroomGoods.getBidNum()); |
| | | forepartAuctionSalesroomGoodsVO.setUnit(goodsSku.getUnit()); |
| | | LambdaQueryWrapper<AuctionBidRecord> wrapper1=Wrappers.lambdaQuery(); |
| | | wrapper1.eq(AuctionBidRecord::getMemberId,memberAuctionSalesroomDTO.getMemberId()); |
| | | wrapper1.eq(AuctionBidRecord::getAuctionSalesroomId,byId.getId()); |
| | |
| | | if (CollUtils.isNotEmpty(successMemberList)) { |
| | | // 推送websocket消息 |
| | | sendWebsocketMsg(auctionSalesroomGoods.getId(), successMemberList, |
| | | goodsSku, 1, |
| | | orderIdMap, bidMap); |
| | | goodsSku, 1, orderIdMap, bidMap); |
| | | // 发送短信通知 |
| | | List<String> mobileList = successMemberList.stream() |
| | | .map(Member::getPhone) |
| | |
| | | if (CollUtils.isNotEmpty(failedMemberList)) { |
| | | // 推送websocket消息 |
| | | sendWebsocketMsg(auctionSalesroomGoods.getId(), failedMemberList, |
| | | goodsSku, 0, |
| | | orderIdMap, bidMap); |
| | | goodsSku, 0, orderIdMap, bidMap); |
| | | // 发送短信通知 |
| | | List<String> mobileList = failedMemberList.stream() |
| | | .map(Member::getPhone) |
| | |
| | | map.put("success_flag", successFlag); |
| | | map.put("order_id", successFlag == 1 ? userIdMap.getOrDefault(member.getId(), "") : ""); |
| | | map.put("auction_bid_record_id", bidMap.getOrDefault(member.getId(), "0")); |
| | | map.put("member_id", member.getId().toString()); |
| | | String msg = com.alibaba.fastjson2.JSONObject.toJSONString(map); |
| | | sysUserClient.pushBatch( |
| | | WebsocketMessageDTO.builder().message(msg).userId(member.getUserId()).build(), |
| | | SecurityConstants.INNER); |
| | | sysUserClient.pushByClientType( |
| | | WebsocketMessageDTO.builder().message(msg).clientType(ClientTypeEnum.MEMBER) |
| | | .build(), SecurityConstants.INNER); |
| | | log.info("===================>发送websocket通知,消息体{}", msg); |
| | | } |
| | | } |
| | |
| | | return wxAppletsAccessToken.toString(); |
| | | } |
| | | String appletsAccessToken = getAppletsAccessToken(); |
| | | redisService.setCacheObject("wxAppletsAccessToken", appletsAccessToken, 7000L, TimeUnit.SECONDS); |
| | | redisService.setCacheObject("wxAppletsAccessToken", appletsAccessToken, 6900L, |
| | | TimeUnit.SECONDS); |
| | | return appletsAccessToken; |
| | | } |
| | | |
| | |
| | | /** |
| | | * 保存保证金退还 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public void saveRefundOfDeposit(String refundOfDeposit) { |
| | | CustomConfig wishDescription = getCustomConfigByKey( |
| | | ConfigEnum.WISH_DESCRIPTION.getKey()).orElseGet(() -> { |
| | | ConfigEnum.REFUND_OF_DEPOSIT.getKey()).orElseGet(() -> { |
| | | CustomConfig customConfig = new CustomConfig(); |
| | | customConfig.setConfigKey(ConfigEnum.REFUND_OF_DEPOSIT.getKey()); |
| | | customConfig.setConfigName(ConfigEnum.REFUND_OF_DEPOSIT.getKeyName()); |
| | |
| | | public String getRefundOfDeposit() { |
| | | AtomicReference<String> refundOfDeposit = new AtomicReference<>(""); |
| | | getCustomConfigByKey( |
| | | ConfigEnum.WISH_DESCRIPTION.getKey()).ifPresent( |
| | | ConfigEnum.REFUND_OF_DEPOSIT.getKey()).ifPresent( |
| | | customConfig -> |
| | | refundOfDeposit.set(customConfig.getConfigValue()) |
| | | ); |