| | |
| | | auctionSalesroomVO.setNextAuctionSalesroomGoods(nextAuctionSalesroomGoods); |
| | | } |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery(); |
| | | wrapper2.notIn(AuctionSalesroomGoods::getSortNum,list); |
| | | wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | if(list.size()>0){ |
| | | wrapper2.notIn(AuctionSalesroomGoods::getSortNum,list); |
| | | } |
| | | wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | wrapper2.orderByAsc(AuctionSalesroomGoods::getSortNum); |
| | | wrapper2.orderByAsc(AuctionSalesroomGoods::getStatus); |
| | |
| | | wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | AuctionSalesroomGoods auctionSalesroomGoods=this.getOne(wrapper2); |
| | | auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.IN_PROGRESS); |
| | | auctionSalesroomGoods.setStartTime(LocalDateTime.now()); |
| | | this.updateById(auctionSalesroomGoods); |
| | | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | |
| | | map.put("notification_time", DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); |
| | | map.put("goodsSkuId", auctionSalesroomGoods.getId()); |
| | | map.put("message_type", "start"); |
| | | map.put("type",2); |
| | | map.put("type",1); |
| | | map.put("AuctionGoodsStatusEnum",auctionSalesroomGoods.getStatus()); |
| | | String msg = null; |
| | | try { |
| | |
| | | } catch (JsonProcessingException e) { |
| | | } |
| | | String finalMsg = msg; |
| | | Thread socketSender=new Thread(()->{ |
| | | try { |
| | | Thread.sleep(1000);//先休眠1秒 |
| | | sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(finalMsg) |
| | | .clientType(ClientTypeEnum.MEMBER).build(), SecurityConstants.INNER); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } catch (JsonProcessingException e) { |
| | | } |
| | | String finalMsg = msg; |
| | | Thread socketSender=new Thread(()->{ |
| | | try { |
| | | Thread.sleep(1000);//先休眠1秒 |
| | | sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(finalMsg) |
| | | sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(finalMsg) |
| | | .clientType(ClientTypeEnum.MEMBER).build(), SecurityConstants.INNER); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM); |
| | | map.put("auctionSalesroomId", auctionSalesroom.getId()); |
| | | map.put("AuctionTypeEnum",auctionSalesroom.getStatus()); |
| | | map.put("message_type", "start"); |
| | | map.put("type", "1"); |
| | | String msg = objectMapper.writeValueAsString(map); |
| | | sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(msg) |
| | | .clientType(ClientTypeEnum.AUCTIONEER).build(), SecurityConstants.INNER); |
| | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM); |
| | | map.put("auctionSalesroomId", auctionSalesroom.getId()); |
| | | map.put("AuctionTypeEnum",auctionSalesroom.getStatus()); |
| | | map.put("message_type", "end"); |
| | | map.put("type", "1"); |
| | | String msg = objectMapper.writeValueAsString(map); |
| | | sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(msg) |
| | | .clientType(ClientTypeEnum.AUCTIONEER).build(), SecurityConstants.INNER); |
| | |
| | | return R.ok(iMemberService.getMembeid(memberDTO)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/saveUserImg") |
| | | @ApiOperation(value = "用户端-修改头像") |
| | | public R<Member> saveNotice(HttpServletRequest request) { |
| | |
| | | member.setUserId(sysUser.getUserId()); |
| | | member.setDelFlag(0); |
| | | member.setNickname("白酒用户"); |
| | | member.setPhone(appMiniLoginDto.getPhone()); |
| | | member.setAvatar("https://hongruitang.oss-cn-beijing.aliyuncs.com/default.png"); |
| | | member.setZfbOpenid(response.getOpenId()); |
| | | this.save(member); |
| | |
| | | member.setNickname("白酒用户"); |
| | | member.setAvatar("https://hongruitang.oss-cn-beijing.aliyuncs.com/default.png"); |
| | | member.setWxUnionid(unionid); |
| | | member.setPhone(appMiniLoginDto.getPhone()); |
| | | member.setMiniOpenid(openid); |
| | | this.save(member); |
| | | appMiniLoginVo.setMiniOpenid(member.getMiniOpenid()); |
| | |
| | | return this.getById(memberDTO.getMemberid()); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void updateMembeid(MemberDTO memberDTO) { |
| | | Member member= this.getById(memberDTO.getMemberid()); |
| | |
| | | import com.alipay.api.domain.AlipayTradeAppPayModel; |
| | | import com.alipay.api.request.AlipayTradeAppPayRequest; |
| | | import com.alipay.api.response.AlipayTradeAppPayResponse; |
| | | import com.jpay.alipay.AliPayApi; |
| | | import com.jpay.alipay.AliPayApiConfig; |
| | | import com.jpay.alipay.AliPayApiConfigKit; |
| | | import com.ruoyi.order.util.alipay.config.AlipayConfig; |
| | | |
| | | |
| | |
| | | |
| | | //实例化客户端 |
| | | private static AlipayClient alipayClient = new DefaultAlipayClient(serverUrl, APP_ID, APP_PRIVATE_KEY, format, charset, ALIPAY_PUBLIC_KEY, signType); |
| | | |
| | | |
| | | |
| | | private static AliPayApiConfig aliPayApiConfig = null; |
| | | |
| | | static { |
| | | aliPayApiConfig = AliPayApiConfig.New() |
| | | .setAppId(APP_ID) |
| | | .setCharset("UTF-8") |
| | | .setPrivateKey(APP_PRIVATE_KEY) |
| | | .setAlipayPublicKey(ALIPAY_PUBLIC_KEY) |
| | | .setServiceUrl("https://openapi.alipay.com/gateway.do") |
| | | .setSignType("RSA2") |
| | | .build(); |
| | | } |
| | | |
| | | /** |
| | | * @throws AlipayApiException |
| | |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | try { |
| | | |
| | | AliPayApiConfigKit.setThreadLocalAppId(APP_ID); |
| | | AliPayApiConfigKit.setThreadLocalAliPayApiConfig(aliPayApiConfig); |
| | | |
| | | //实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.trade.app.pay |
| | | AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest(); |
| | |
| | | request.setBizModel(model); |
| | | request.setNotifyUrl(NOTIFY_URL); |
| | | // 这里和普通的接口调用不同,使用的是sdkExecute |
| | | AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request); |
| | | String string = response.getBody(); |
| | | String orderInfo = ""; |
| | | orderInfo = AliPayApi.startAppPay(model, NOTIFY_URL); |
| | | |
| | | |
| | | int one = string.lastIndexOf("&"); |
| | | String s=string.substring(0,(one)); |
| | | |
| | | map.put("orderInfo", s); |
| | | System.out.println(java.net.URLDecoder.decode(s, "UTF-8")); |
| | | System.out.println(java.net.URLDecoder.decode(response.getBody(), "UTF-8")); |
| | | map.put("orderInfo", orderInfo); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | return R.ok(user); |
| | | } |
| | | |
| | | // @PostMapping("/queryUserByPhone1") |
| | | // public R<SysUser> queryUserByPhone1(@RequestBody String phone){ |
| | | // SysUser user = userService.getOne(Wrappers.lambdaQuery(SysUser.class) |
| | | // .eq(SysUser::getPhonenumber, phone) |
| | | // .eq(SysUser::get, phone) |
| | | // .last("LIMIT 1")); |
| | | // return R.ok(user); |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * 通过账号查询用户 |