| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.smartearth.poiexcel.entity.*; |
| | | import com.smartearth.poiexcel.mapper.DkMapper; |
| | | 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; |
| | |
| | | * @author WWW |
| | | */ |
| | | @Component |
| | | @SuppressWarnings("ALL") |
| | | public class InitConfig implements ApplicationRunner { |
| | | @Resource |
| | | EntService entService; |
| | |
| | | EntMapper entMapper; |
| | | |
| | | @Resource |
| | | QiYeMapper qiYeMapper; |
| | | DkMapper dkMapper; |
| | | |
| | | private final static Log log = LogFactory.getLog(InitConfig.class); |
| | | |
| | |
| | | * 测试 |
| | | */ |
| | | private void test() { |
| | | int count = qiYeMapper.selectCount(); |
| | | /*int count = entMapper.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.selectByPage(pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | // List<EntEntity> list = entMapper.selectList(new QueryWrapper<>()) |
| | | int c1 = entMapper.update(list.get(0)); |
| | | int c2 = entMapper.updates(list);*/ |
| | | |
| | | /*QueryWrapper dkWrapper = new QueryWrapper(); |
| | | dkWrapper.eq("dikuaibianhao", "N86G1"); |
| | | List<DkEntity> dkList = dkMapper.selectList(dkWrapper); |
| | | dkList.get(0).setPoint_area(""); |
| | | int c3 = dkMapper.updateBatch(dkList);*/ |
| | | |
| | | 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); |