selectone 修复
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ public class YxStoreVisitServiceImpl extends BaseServiceImpl<YxStoreVisitMapper,
|
|||||||
public void addStoreVisit(Long uid, Long productId) {
|
public void addStoreVisit(Long uid, Long productId) {
|
||||||
|
|
||||||
LambdaQueryWrapper<YxStoreVisit> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<YxStoreVisit> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(YxStoreVisit::getUid, uid).eq(YxStoreVisit::getProductId, productId);
|
wrapper.eq(YxStoreVisit::getUid, uid).eq(YxStoreVisit::getProductId, productId).last("limit 1");
|
||||||
YxStoreVisit storeVisit = this.baseMapper.selectOne(wrapper);
|
YxStoreVisit storeVisit = this.baseMapper.selectOne(wrapper);
|
||||||
|
|
||||||
if (ObjectUtil.isNull(storeVisit)) {
|
if (ObjectUtil.isNull(storeVisit)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user