| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | |
| | | import com.matrix.system.score.service.ScoreVipDetailService; |
| | | import com.matrix.system.shopXcx.bean.ShopOrder; |
| | | import com.matrix.system.shopXcx.bean.ShopProductComment; |
| | | import com.matrix.system.shopXcx.dao.ShopOrderDao; |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "删除成功"); |
| | | } |
| | | |
| | | @Autowired |
| | | ScoreVipDetailService scoreVipDetailService; |
| | | |
| | | /** |
| | | * 接收保存产品评价数据 |
| | | */ |
| | | @PostMapping(value = "/saveProductComment") |
| | | public @ResponseBody |
| | | AjaxResult saveProductComment(@RequestBody List<ShopProductComment> commentList) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | int flag = 0; |
| | | if(CollectionUtils.isNotEmpty(commentList)){ |
| | | for(ShopProductComment productComment : commentList){ |
| | |
| | | modifyMap.put("id", orderId); |
| | | modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_ALREADY_REMARK); |
| | | shopOrderDao.updateByMap(modifyMap); |
| | | |
| | | //scoreVipDetailService.addScoreByParamSetting(loginUser.getId(),null,); |
| | | |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | |
| | | @PostMapping("/findProductComment") |
| | | @ResponseBody |
| | | public AjaxResult getProductCommentByUserId(@RequestBody ShopProductComment productComment) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | String userId = loginUser.getOpenId(); |
| | | productComment.setUserId(userId); |
| | | List<ShopProductComment> list = productCommentDao.selectByUserId(productComment); |