From 120136539788c9bc347d35c80de2cb93f35469ed Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 06 十月 2023 13:30:31 +0800 Subject: [PATCH] 1 --- src/main/java/com/smartearth/poiexcel/config/InitConfig.java | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/smartearth/poiexcel/config/InitConfig.java b/src/main/java/com/smartearth/poiexcel/config/InitConfig.java index ceea9e7..3fbbfd8 100644 --- a/src/main/java/com/smartearth/poiexcel/config/InitConfig.java +++ b/src/main/java/com/smartearth/poiexcel/config/InitConfig.java @@ -3,11 +3,9 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.smartearth.poiexcel.entity.EntEntity; -import com.smartearth.poiexcel.entity.EntResult; -import com.smartearth.poiexcel.entity.Result; -import com.smartearth.poiexcel.entity.TokenResult; +import com.smartearth.poiexcel.entity.*; import com.smartearth.poiexcel.mapper.EntMapper; +import com.smartearth.poiexcel.mapper.QiYeMapper; import com.smartearth.poiexcel.service.EntService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -30,6 +28,9 @@ @Resource EntMapper entMapper; + @Resource + QiYeMapper qiYeMapper; + private final static Log log = LogFactory.getLog(InitConfig.class); @Override @@ -48,7 +49,16 @@ * 娴嬭瘯 */ private void test() { - List<EntEntity> list = entMapper.selectList(new QueryWrapper<>()); + int count = qiYeMapper.selectCount(); + int pages = (count - 1) / StaticData.I100 + 1; + int pageSize = 2, pageIndex = 1; + List<EntEntity> list = qiYeMapper.selectByPage(pageSize, pageSize * (pageIndex - 1)); + list.get(0).setX(119.0); + list.get(0).setY(39.0); + //qiYeMapper.update(list.get(0)); + int cc = qiYeMapper.updates(list); + + // List<EntEntity> list = entMapper.selectList(new QueryWrapper<>()) String tokenJson = "{\"success\":true,\"code\":200,\"message\":\"鎴愬姛\",\"data\":{\"ctoken\":\"ZmYxZTgyN2QxZTYyNDMxMDhjZjgzNDNiNDZiN2RjMDVAYTc3ZmFlOGE5ZGM0OGQ1Y2ZmODY4ZTFmNWYwZTEzM2E=\",\"userInfo\":{\"loginLogId\":\"1ab1675c3632428a84dc0ebe579cd66f\",\"phoneNumber\":\"\",\"displayName\":\"鏃剁┖涓�寮犲浘\",\"userMail\":\"\",\"departLevel\":\"5-1\",\"id\":\"ff1e827d1e6243108cf8343b46b7dc05\",\"userID\":\"shikong001\",\"uniqueID\":\"\",\"departName\":\"姹借溅鍜屾櫤鑳藉埗閫犱骇涓氫笓鐝璡"},\"expires\":3600,\"roles\":[]}}"; Result rsToken = JSON.parseObject(tokenJson, Result.class); -- Gitblit v1.9.3