Helius
2021-04-06 30c2ee7f4e4404063f99b7d6b8d05e5d4cd51e21
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java
@@ -1,10 +1,11 @@
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;
@@ -52,13 +53,16 @@
        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){
@@ -81,6 +85,10 @@
        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, "保存成功");
    }
@@ -92,7 +100,7 @@
    @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);