935090232@qq.com
2022-02-22 bbe0a2fd03063316e50cf141986bda984599bbda
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java
@@ -3,7 +3,7 @@
import com.matrix.core.pojo.AjaxResult;
import com.matrix.system.hive.bean.SysVipInfo;
import com.matrix.component.redis.RedisUserLoginUtils;
import com.matrix.system.common.init.UserCacheManager;
import com.matrix.system.shopXcx.dao.ShopSearchRecordDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -30,7 +30,7 @@
    private ShopSearchRecordDao shopSearchRecordDao;
    @Autowired
    private RedisUserLoginUtils redisUserLoginUtils;
    private UserCacheManager userCacheManager;
    /**
     * 查询搜索记录
@@ -39,7 +39,7 @@
    @RequestMapping(value = "/getSearchRecordList")
    @ResponseBody
    public AjaxResult getSearchRecordList(){
        SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
        SysVipInfo bigUser = userCacheManager.getLoginUser();
        if(bigUser == null){
            return new AjaxResult(AjaxResult.STATUS_FAIL,"用户未授权");
        }
@@ -54,7 +54,7 @@
    @RequestMapping(value = "/deleteSearchRecord")
    @ResponseBody
    public AjaxResult deleteSearchRecord(){
        SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
        SysVipInfo bigUser = userCacheManager.getLoginUser();
        shopSearchRecordDao.deleteByUserId(bigUser.getOpenId());
        return new AjaxResult(AjaxResult.STATUS_SUCCESS,"删除成功");
    }