| | |
| | | //先把激活状态的改为非激活状态 |
| | | UpdateWrapper<MapOutline> wrapper = Wrappers.update(); |
| | | UpdateWrapper<MapOutline> wrapper2 = wrapper.clone(); |
| | | wrapper.set("status",0).eq("status",1); |
| | | mapper.update(null,wrapper); |
| | | wrapper.set("status", 0).eq("status", 1); |
| | | mapper.update(null, wrapper); |
| | | //再激活当前id说对应的记录 |
| | | wrapper2.set("status",1).eq("id",id); |
| | | mapper.update(null,wrapper2); |
| | | wrapper2.set("status", 1).eq("id", id); |
| | | mapper.update(null, wrapper2); |
| | | } |
| | | |
| | | public void add(MapOutline mapOutline) { |
| | | mapper.insert(mapOutline); |
| | | } |
| | | |
| | | |
| | | //查询激活的地图 |
| | | public String selectMapName() { |
| | | String mapName = mapper.selectMapName(); |
| | | if (mapName == null) { |
| | | mapName = "zhongguo"; |
| | | } |
| | | return mapName; |
| | | } |
| | | } |