ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsEvaluate.java
@@ -90,5 +90,8 @@ @TableField(exist = false) private String idStr; public void setId(Long id) { this.id = id; this.idStr = String.valueOf(id); } } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -88,7 +88,7 @@ @ResponseBody @PostMapping("/shoppingCartPayment") @ApiOperation(value = "购物车订单支付", tags = {"商城-购物车-小程序"}) public R<Void> shoppingCartPayment(@RequestBody ShoppingCartPayment shoppingCartPayment){ public R<String> shoppingCartPayment(@RequestBody ShoppingCartPayment shoppingCartPayment){ return shoppingCartService.shoppingCartPayment(shoppingCartPayment); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -127,13 +127,14 @@ orderDetailVO.setDistributionMode(goods.getDistributionMode()); } R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId()); if (shopdetail.getCode() != R.SUCCESS){ throw new ServiceException("获取技师信息失败"); Technician technician = new Technician(); if (order.getTechnicianId() != null){ R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId()); if (shopdetail.getCode() != R.SUCCESS){ throw new ServiceException("获取技师信息失败"); } technician = shopdetail.getData(); } Technician technician = shopdetail.getData(); Shop shop = shopR.getData(); orderDetailVO.setId(order.getId()); orderDetailVO.setOrderStatus(order.getOrderStatus()); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -1039,7 +1039,7 @@ this.removeBatchByIds(ids); } } return R.ok(); return R.ok(order.getId().toString()); } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java
@@ -5,11 +5,13 @@ import com.ruoyi.account.api.feignClient.AppUserClient; import com.ruoyi.account.api.model.AppUser; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.other.api.domain.Goods; import com.ruoyi.other.api.domain.GoodsEvaluate; import com.ruoyi.other.service.GoodsEvaluateService; import com.ruoyi.other.service.GoodsService; import com.ruoyi.other.vo.GoodsEvaluateVO; import com.ruoyi.system.api.model.LoginUser; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -37,6 +39,8 @@ private AppUserClient appUserClient; @Resource private GoodsService goodsService; @Resource private TokenService tokenService; @GetMapping("/goodsList") @ApiOperation(value = "获取商品评价", tags = {"小程序-获取商品评价"}) @@ -67,8 +71,10 @@ @GetMapping("/detail/{orderId}") @ApiOperation(value = "评论详情", tags = {"小程序-评论详情"}) public R<List<GoodsEvaluate>> detail(@PathVariable("orderId") Long orderId){ LoginUser loginUserApplet = tokenService.getLoginUserApplet(); List<GoodsEvaluate> list = goodsEvaluateService.list(new LambdaQueryWrapper<GoodsEvaluate>() .eq(GoodsEvaluate::getStatus, 2) .eq(GoodsEvaluate::getAppUserId,loginUserApplet.getUserid()) .eq(GoodsEvaluate::getOrderId, orderId)); for (GoodsEvaluate goodsEvaluate : list) { Goods goods = goodsService.getById(goodsEvaluate.getGoodsId()); ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -144,7 +144,7 @@ @ApiOperation(value = "列表", tags = {"后台-分享管理"}) @GetMapping("/manage/list") public R<Page<Share>> managelist(String name,Integer addType,@RequestParam Integer PageNum,Integer pageSize){ Page<Share> page = shareService.lambdaQuery().like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageSize, pageSize)); Page<Share> page = shareService.lambdaQuery().like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(PageNum, pageSize)); return R.ok(page); } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java
@@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.feignClient.RemoteOrderGoodsClient; import com.ruoyi.order.model.Order; import com.ruoyi.other.mapper.GoodsEvaluateMapper; import com.ruoyi.other.api.domain.GoodsEvaluate; import com.ruoyi.other.service.GoodsEvaluateService; import com.ruoyi.other.vo.GoodsEvaluateVO; import com.ruoyi.system.api.model.LoginUser; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -28,6 +30,8 @@ public class GoodsEvaluateServiceImpl extends ServiceImpl<GoodsEvaluateMapper, GoodsEvaluate> implements GoodsEvaluateService { @Resource private RemoteOrderGoodsClient remoteOrderGoodsClient; @Resource private TokenService tokenService; @Override @Transactional(rollbackFor = Exception.class) @@ -39,6 +43,8 @@ goodsEvaluate.setId(Long.valueOf(goodsEvaluate.getIdStr())); updateById(goodsEvaluate); }else { LoginUser loginUserApplet = tokenService.getLoginUserApplet(); goodsEvaluate.setAppUserId(loginUserApplet.getUserid()); save(goodsEvaluate); } }