whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/service/PageParamService.java
@@ -1,5 +1,6 @@
package com.whyc.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.pagehelper.PageInfo;
@@ -89,4 +90,21 @@
    public PageParam getParam(int id) {
        return mapper.selectById(id);
    }
    public Response updateStatusList(List<PageParam> pageParamList) {
        mapper.updateStatusList(pageParamList);
        return new Response().set(1, "更新完成");
    }
    //更新放电优化时间
    public Response updateHisTime(int id, int status) {
        int flag = mapper.update(id, status);
        return new Response().set(1, flag > 0 ? true : false);
    }
    public List<PageParam> getList2ByCategoryId(int categoryId) {
        QueryWrapper<PageParam> query = Wrappers.query();
        query.eq("categoryId",categoryId);
        return mapper.selectList(query);
    }
}