# GroupPickupController.java

    package cloud.wconnect.rateshop.controller.rateshop;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.component.SessionContext;
    import cloud.wconnect.commonlib.pojo.dto.ListPagedDTO;
    import cloud.wconnect.commonlib.pojo.dto.PropertyDTO;
    import cloud.wconnect.commonlib.redis.PropertyI18nRedisService;
    import cloud.wconnect.rateshop.pojo.dto.rateshop.GroupPickupLatestUpdateInfoDTO;
    import cloud.wconnect.rateshop.pojo.query.rateshop.GroupPickupLatestUpdateInfoQuery;
    import cloud.wconnect.rateshop.pojo.query.rateshop.GroupPickupQuery;
    import cloud.wconnect.rateshop.pojo.vo.rateshop.GroupPickupVO;
    import cloud.wconnect.rateshop.service.rateshop.IGroupPickupDataSourceService;
    import cloud.wconnect.rateshop.service.rateshop.IGroupPickupService;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RequestParam;
    import org.springframework.web.bind.annotation.RestController;

    import jakarta.validation.Valid;
    import java.util.List;

    /**
     * 资产 Group pickup 数据控制层
     *
     * @author zc
     * @date 2024/03/25
     */
    @RestController
    @RequestMapping("/rate-shop/group-pickup")
    public class GroupPickupController {

        @Autowired
        private IGroupPickupService groupPickupService;
        @Autowired
        private IGroupPickupDataSourceService groupPickupDataSourceService;
        @Autowired
        private SessionContext sessionContext;
        @Autowired
        private PropertyI18nRedisService propertyI18nRedisService;

        /**
         * 获取 Group Pickup
         *
         * @param property 资产标识
         * @param query    查询条件
         * @return GroupPickupVO 集合
         * @author zc
         * @date 2024/3/25
         */
        @ApiId(1115)
        @GetMapping
        public ListPagedDTO<GroupPickupVO> list(@RequestParam String property, @Valid GroupPickupQuery query) {
            int propertyId = sessionContext.getPropertyId(property);
            PropertyDTO propertyDTO = propertyI18nRedisService.get(propertyId);

            return groupPickupService.pageList(propertyDTO, query);
        }

        /**
         * 1535 - 获取 group pickup 最新更新信息
         *
         * @param property 资产标识
         * @return group pickup 最新更新信息
         * @author yyt
         * @date 2025/6/24
         **/
        @ApiId(1535)
        @GetMapping("/latest-update-info")
        public List<GroupPickupLatestUpdateInfoDTO> listLatestUpdateInfo(String property, @Valid GroupPickupLatestUpdateInfoQuery query) {
            int propertyId = sessionContext.getPropertyId(property);
            return groupPickupDataSourceService.listLatestUpdateInfo(propertyId, Integer.parseInt(query.getTargetDate()));
        }

    }