| | |
| | | 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.init.UserCacheManager; |
| | | import com.matrix.system.shopXcx.dao.ShopSearchRecordDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private ShopSearchRecordDao shopSearchRecordDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | /** |
| | | * 查询搜索记录 |
| | |
| | | @RequestMapping(value = "/getSearchRecordList") |
| | | @ResponseBody |
| | | public AjaxResult getSearchRecordList(){ |
| | | BizUser bigUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo bigUser = userCacheManager.getLoginUser(); |
| | | if(bigUser == null){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL,"用户未授权"); |
| | | } |
| | |
| | | @RequestMapping(value = "/deleteSearchRecord") |
| | | @ResponseBody |
| | | public AjaxResult deleteSearchRecord(){ |
| | | BizUser bigUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo bigUser = userCacheManager.getLoginUser(); |
| | | shopSearchRecordDao.deleteByUserId(bigUser.getOpenId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS,"删除成功"); |
| | | } |