# VariableController.java

    package cloud.wconnect.finance.controller.pl;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.component.SessionContext;
    import cloud.wconnect.finance.pojo.dto.pl.M3VariableDTO;
    import cloud.wconnect.finance.service.pl.IM3VariableService;
    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.RestController;

    import java.util.List;

    /**
     * variable控制层
     *
     * @author lichen
     * @date 2025/9/29
     */
    @RestController
    @RequestMapping("/pl/variable")
    public class VariableController {

        @Autowired
        private SessionContext sessionContext;
        @Autowired
        private IM3VariableService m3VariableService;

        /**
         * 查询variable列表
         *
         * @param property 资产标识
         * @return java.util.List<cloud.wconnect.finance.pojo.dto.pl.M3VariableDTO>
         * @author lichen
         * @date 2025/12/24
         */
        @ApiId(1604)
        @GetMapping
        public List<M3VariableDTO> pageList(String property) {
            int propertyId = sessionContext.getPropertyId(property);

            return m3VariableService.listDTO(propertyId);
        }

    }