| | |
| | | import com.fgkj.dto.*; |
| | | import com.fgkj.mapper.impl.User_logMapper; |
| | | import com.fgkj.util.ActionUtil; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return model; |
| | | } |
| | | //5.4用户操作记录查询(根据用户名和操作类型) |
| | | public ServiceModel serchByCondition(Batt_User_Permit obj) { |
| | | public ServiceModel serchByCondition(Batt_User_Permit bmd) { |
| | | ServiceModel model = new ServiceModel(); |
| | | PageBean pageBean = obj.getPageBean(); |
| | | int curr = (pageBean.getPageCurr() - 1) * pageBean.getPageSize(); |
| | | obj.getPageBean().setPageCurr(curr); //处理 limit 两个参数 |
| | | List<Batt_User_Permit> list = mapper.serchByCondition(obj); |
| | | //分页 |
| | | PageBean pageBean = bmd.getPageBean(); |
| | | PageHelper.startPage(pageBean.getPageNum(),pageBean.getPageSize(),true); |
| | | List<Batt_User_Permit> list = mapper.serchByCondition(bmd); |
| | | for (Batt_User_Permit b : list) { |
| | | System.out.println(b.getUlog()); |
| | | } |
| | | |
| | | if (list != null && list.size() > 0) { |
| | | PageInfo<Batt_User_Permit> pageInfo = new PageInfo<>(list); |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | model.setData(pageInfo); |
| | | } |
| | | // System.out.println(model); |
| | | return model; |