|
@@ -7,6 +7,7 @@ import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -55,6 +56,8 @@ public class StoreInfoController {
|
|
|
private final StoreImgMapper storeImgMapper;
|
|
private final StoreImgMapper storeImgMapper;
|
|
|
|
|
|
|
|
private final StoreCommentMapper storeCommentMapper;
|
|
private final StoreCommentMapper storeCommentMapper;
|
|
|
|
|
+ private final StoreClockInMapper storeClockInMapper;
|
|
|
|
|
+ private final LifeUserMapper lifeUserMapper;
|
|
|
|
|
|
|
|
@ApiOperation("获取所有门店")
|
|
@ApiOperation("获取所有门店")
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
@@ -860,6 +863,31 @@ public class StoreInfoController {
|
|
|
return R.data(list);
|
|
return R.data(list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "门店趣味信息-打卡方式")
|
|
|
|
|
+ @GetMapping("/getStoreClockIn")
|
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
|
+ @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query")
|
|
|
|
|
+ })
|
|
|
|
|
+ public R<List<StoreClockInVo>> getStoreClockIn(int storeId) {
|
|
|
|
|
+ log.info("StoreInfoController.getStoreClockIn?storeId={}", storeId);
|
|
|
|
|
+ List<StoreClockIn> list = storeClockInMapper.selectList(
|
|
|
|
|
+ new LambdaQueryWrapper<StoreClockIn>()
|
|
|
|
|
+ .eq(StoreClockIn::getStoreId, storeId)
|
|
|
|
|
+ .isNotNull(StoreClockIn::getMaybeAiContent)
|
|
|
|
|
+ .last("ORDER BY RAND() LIMIT 1") // 随机排序并只取第一条
|
|
|
|
|
+ );
|
|
|
|
|
+ List result= new ArrayList<>();
|
|
|
|
|
+ if( list.size()>0) {
|
|
|
|
|
+ StoreClockInVo storeClockInVo = new StoreClockInVo();
|
|
|
|
|
+ BeanUtils.copyProperties(list.get(0), storeClockInVo);
|
|
|
|
|
+ LifeUser lifeUser = lifeUserMapper.selectById(list.get(0).getUserId());
|
|
|
|
|
+ storeClockInVo.setUserImg(lifeUser.getUserImage());
|
|
|
|
|
+ result.add(storeClockInVo);
|
|
|
|
|
+ }
|
|
|
|
|
+ return R.data(result);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@ApiOperation(value = "AI服务-店铺审核")
|
|
@ApiOperation(value = "AI服务-店铺审核")
|
|
|
@ApiOperationSupport(order = 15)
|
|
@ApiOperationSupport(order = 15)
|
|
|
@PostMapping("/aiApproveStoreInfo")
|
|
@PostMapping("/aiApproveStoreInfo")
|