From 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期一, 09 六月 2025 11:54:00 +0800 Subject: [PATCH] 6.9新增登录失败冻结逻辑 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerCreditsExchangeServiceImpl.java | 38 +++++++++++--------------------------- 1 files changed, 11 insertions(+), 27 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerCreditsExchangeServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerCreditsExchangeServiceImpl.java index 9300e0c..56ee325 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerCreditsExchangeServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerCreditsExchangeServiceImpl.java @@ -46,11 +46,11 @@ @Override public R getList(int pageNum, int pageSize, String goodsId, String orderNumber, String goodsName, String condition, String userName,String communityId, - String userId,String orderType) { + String userId,String orderType,String merchantId) { Page page=new Page<VolunteerCreditsExchange>(pageNum,pageSize); return R.ok(baseMapper.getList(page,goodsId,orderNumber,goodsName,condition, - userName,communityId,userId,orderType)); + userName,communityId,userId,orderType,merchantId)); } @Override @@ -118,6 +118,12 @@ // goodsService.updateById(vo); // } + int num1=integral-Integer.valueOf(goods.getIntegral()); + loginUserInfoVOR.setLoveIntegral(num1+""); + userService.putUser(loginUserInfoVOR); + + item.setPalyIntegral(goods.getIntegral()); + //增加积分明细记录 VolunteerIntegralRecordVO virvo=new VolunteerIntegralRecordVO(); @@ -128,11 +134,6 @@ virService.insertVolunteer(virvo); - int num1=integral-Integer.valueOf(goods.getIntegral()); - loginUserInfoVOR.setLoveIntegral(num1+""); - userService.putUser(loginUserInfoVOR); - - item.setPalyIntegral(goods.getIntegral()); //设置订单号 item.setOrderNumber(Snowflake.getId()+""); int num= baseMapper.insertData(item); @@ -156,14 +157,7 @@ return R.fail("商家id不能为空"); } - VolunteerIntegralMerchant goods=goodsService.queryById(item.getGoodsId()); - LoginUserInfoVO loginUserInfoVOR=userService.getUserInfoByUserId(item.getUserId()).getData(); - - if(goods==null) - { - return R.fail("商品不存在"); - } if(StringUtils.isEmpty(item.getPalyIntegral())) { @@ -180,8 +174,6 @@ { return R.fail("剩余积分不足!无法支付"); } - - item.setNeedScore(goods.getIntegral()); if(StringUtils.isEmpty(item.getUserId())) { @@ -220,11 +212,12 @@ item.setCondition("3"); //设置订单号 - item.setOrderNumber(Snowflake.getId()+""); + String orderNum=Snowflake.getId()+""; + item.setOrderNumber(orderNum); int num= baseMapper.insertData(item); if(num>0) { - return R.ok(); + return R.ok(orderNum); } return R.fail("操作失败"); } @@ -237,15 +230,6 @@ return R.fail("参数不能为空"); } - if(StringUtils.isEmpty(item.getNeedScore())) - { - return R.fail("所需积分不能为空"); - } - - if(StringUtils.isEmpty(item.getUserId())) - { - return R.fail("兑换用户id不能为空"); - } int num= baseMapper.update(item); if(num>0) { -- Gitblit v1.7.1