|
|
@@ -21,7 +21,6 @@ import shop.alien.store.config.WebSocketProcess;
|
|
|
import shop.alien.store.service.StoreClockInService;
|
|
|
import shop.alien.store.service.StoreCommentService;
|
|
|
import shop.alien.store.util.ai.AiContentModerationUtil;
|
|
|
-import shop.alien.store.util.ai.AiVideoModerationUtil;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.annotation.PreDestroy;
|
|
|
@@ -431,11 +430,14 @@ public class StoreClockInServiceImpl extends ServiceImpl<StoreClockInMapper, Sto
|
|
|
@Override
|
|
|
public StoreClockInVo getStoreClockInById(Integer id, Integer userId) {
|
|
|
StoreClockIn storeClockIn = storeClockInMapper.selectById(id);
|
|
|
- StoreClockInVo storeClockInVo = BeanUtil.copyProperties(storeClockIn, StoreClockInVo.class);
|
|
|
if (null == storeClockIn) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ // 查看详情时自动增加浏览数
|
|
|
+ increaseViewCount(id);
|
|
|
+
|
|
|
+ StoreClockInVo storeClockInVo = BeanUtil.copyProperties(storeClockIn, StoreClockInVo.class);
|
|
|
StoreInfo storeInfo = storeInfoMapper.selectById(storeClockIn.getStoreId());
|
|
|
// 店铺名称
|
|
|
storeClockInVo.setStoreName(storeInfo.getStoreName());
|
|
|
@@ -471,4 +473,12 @@ public class StoreClockInServiceImpl extends ServiceImpl<StoreClockInMapper, Sto
|
|
|
}
|
|
|
return storeClockInVo;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int increaseViewCount(Integer id) {
|
|
|
+ LambdaUpdateWrapper<StoreClockIn> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(StoreClockIn::getId, id);
|
|
|
+ wrapper.setSql("view_count = IFNULL(view_count, 0) + 1");
|
|
|
+ return storeClockInMapper.update(null, wrapper);
|
|
|
+ }
|
|
|
}
|