1、修改所有Mapper的删除功能
2、用户添加批量修改密码功能
3、添加Java的GDAL操作类
| | |
| | | select a.*,b.menuid,c.name from lf.sys_role_menu_auth a inner join lf.sys_menu_auth b on a.menu_auth_id = b.id |
| | | inner join lf.sys_auth c on b.authid = c.id where a.roleid = 1 and b.menuid = 1 order by c.id; |
| | | ----------------------------------------------------------------------------------------------------- |
| | | |
| | | select * from lf.sys_user; |
| | | |
| | | |
| | | |
| | |
| | | depid integer default 1, |
| | | name varchar(100), |
| | | descr varchar(100), |
| | | is_admin integer default 0, |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | |
| | | comment on column lf.sys_role.depid is 'åä½ID'; |
| | | comment on column lf.sys_role.name is 'åç§°'; |
| | | comment on column lf.sys_role.descr is 'æè¿°'; |
| | | comment on column lf.sys_role.is_admin is 'æ¯å¦ä¸ºç®¡çåï¼0-å¦,1-æ¯'; |
| | | comment on column lf.sys_role.create_user is 'å建人ID'; |
| | | comment on column lf.sys_role.create_time is 'å建æ¶é´'; |
| | | comment on column lf.sys_role.update_user is 'æ´æ°äººID'; |
| | | comment on column lf.sys_role.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column lf.sys_role.bak is '夿³¨'; |
| | | --insert into lf.sys_role (id,depid,name,descr) values (1,1,'Admin','ç³»ç»ç®¡çå'); |
| | | --insert into lf.sys_role (id,depid,name,descr,is_admin) values (1,1,'Admin','ç³»ç»ç®¡çå',1); |
| | | |
| | | select * from lf.sys_role; |
| | | select a.*,b.name depname from lf.sys_role a inner join lf.sys_dep b on a.depid = b.id order by a.id limit 10 offset 0; |
| | |
| | | comment on column lf.sys_args.create_time is 'å建æ¶é´'; |
| | | comment on column lf.sys_args.update_user is 'æ´æ°äººID'; |
| | | comment on column lf.sys_args.update_time is 'æ´æ°æ¶é´'; |
| | | /* insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('èªå¨ç»åºæ¶é´',15,15,3,1440,1,'é»è®¤ç¨æ·15åé䏿ä½ï¼å°±èªå¨ç»åºç³»ç»ã','AUTO_LOGOUT'); |
| | | /* insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('å¯ç åºé次æ°',5,5,3,20,1,'é»è®¤ç¨æ·å¯ç è¿ç»è¾å
¥åºé5次ï¼å°±ææ¶æç»ç»å½ã','PWD_ERR_COUNT'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('å¯ç åºéçå¾
æ¶é´',5,5,1,60,1,'é»è®¤ç¨æ·å¯ç è¿ç»è¾å
¥å¤æ¬¡åºéæ¶ï¼5åéå
æç»ç»å½ã','PWD_ERR_TIME'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('èªå¨ç»åºæ¶é´',15,15,3,1440,1,'é»è®¤ç¨æ·15åé䏿ä½ï¼å°±èªå¨ç»åºç³»ç»ã','AUTO_LOGOUT'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('ä»¤çæææ',240,240,60,1440,1,'令çé»è®¤æææä¸º240åéï¼è¶
æ¶å°å¤±æã','TOKEN_EXPIRE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('ç¼åæææ',240,240,60,1440,1,'ç¼åé»è®¤æææä¸º240åéï¼è¶
æ¶å°å¤±æã','CACHE_EXPIRE'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,times,descr,mark) values ('æå¤§æä»¶æ°',2000,2000,500,2500,1,'å个æä»¶å¤¹ä¸é»è®¤æå¤§åå¨æä»¶çæ°ç®ä¸º2000个ã','MAX_FILES'); |
| | |
| | | <parent> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-parent</artifactId> |
| | | <version>2.3.0.RELEASE</version> |
| | | <version>2.3.6.RELEASE</version> |
| | | <relativePath/> |
| | | </parent> |
| | | |
| | |
| | | <artifactId>commons-io</artifactId> |
| | | <version>2.5</version> |
| | | </dependency> |
| | | <!--GDAL--> |
| | | <dependency> |
| | | <groupId>org.gdal</groupId> |
| | | <artifactId>gdal</artifactId> |
| | | <version>3.2.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <version>2.3.0.RELEASE</version> |
| | | <!--<version>2.3.0.RELEASE</version>--> |
| | | <configuration> |
| | | <mainClass>com.lf.server.LfApplication</mainClass> |
| | | </configuration> |
| | |
| | | package com.lf.server.config; |
| | | |
| | | import com.lf.server.helper.GdalHelper; |
| | | import com.lf.server.helper.PathHelper; |
| | | import com.lf.server.service.sys.ArgsService; |
| | | import org.apache.commons.logging.Log; |
| | |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) { |
| | | // noinspection AlibabaRemoveCommentedCode |
| | | try { |
| | | // "E:\\data\\7.Insar\\insartest.tif","E:\\data\\6.é«å
è°±\\GF5_Cut_1.img","E:\\data\\22.tif\\110.747 sq km.tif","E:\\Test\\Test.gdb" |
| | | //GdalHelper.readTif("E:\\data\\7.Insar\\insartest.tif") |
| | | //GdalHelper.readShp("E:\\data\\13.cppe\\shps\\addr.shp"); |
| | | //GdalHelper.readGdb("E:\\Test\\addr.gdb"); |
| | | |
| | | pathHelper.init(); |
| | | |
| | | argsService.initSettingData(); |
| | |
| | | } |
| | | |
| | | HttpClient httpClient = HttpClientBuilder.create().setMaxConnTotal(this.maxTotalConnect).setMaxConnPerRoute(this.maxConnectPerRoute).build(); |
| | | |
| | | HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); |
| | | factory.setConnectTimeout(this.connectTimeout); |
| | | factory.setReadTimeout(this.readTimeout); |
| | | |
| | | return factory; |
| | | } |
| | | |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.Md5Helper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.entity.ctrl.UserUpdateEntity; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import com.lf.server.service.sys.UserService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/insertUser", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertUser(@RequestBody UserEntity entity, HttpServletRequest req) { |
| | | try { |
| | | String str = userService.ValidateNewPwd(entity); |
| | | String str = userService.validateNewPwd(entity); |
| | | if (str != null) { |
| | | return fail(str, -1); |
| | | } |
| | |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | for (UserEntity entity : list) { |
| | | String str = userService.ValidateNewPwd(entity); |
| | | String str = userService.validateNewPwd(entity); |
| | | if (str != null) { |
| | | return fail(str, -1); |
| | | } |
| | |
| | | @PostMapping(value = "/updateUser", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateUser(@RequestBody UserEntity entity, HttpServletRequest req) { |
| | | try { |
| | | String str = userService.ValidateOldPwd(entity); |
| | | String str = userService.validateOldPwd(entity); |
| | | if (str != null) { |
| | | return fail(str, -1); |
| | | } |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ´æ°ç¨æ·å¯ç ") |
| | | @ApiOperation(value = "æ´æ°å¤ä¸ªç¨æ·å¯ç ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "user", value = "ç¨æ·å®ä½ç±»", dataType = "UsersEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "adminPwd", value = "管çåå¯ç ", dataType = "String", paramType = "body", example = ""), |
| | | @ApiImplicitParam(name = "newPwd", value = "æ°å¯ç ", dataType = "String", paramType = "body", example = ""), |
| | | @ApiImplicitParam(name = "ids", value = "ç¨æ·IDéå", dataType = "List<Integer>", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/updateUserPwd") |
| | | public ResponseMsg<Boolean> updateUserPwd(@RequestBody UserEntity user, HttpServletRequest req, HttpServletResponse res) { |
| | | @PostMapping(value = "/updateUsersPwd", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Boolean> updateUsersPwd(@RequestBody UserUpdateEntity uue, HttpServletRequest req) { |
| | | try { |
| | | if (user == null) { |
| | | return fail("请æäº¤ç¨æ·ä¿¡æ¯ï¼", false); |
| | | } |
| | | if (StringHelper.isEmpty(user.getPwd())) { |
| | | return fail("请è¾å
¥ç¨æ·å¯ç ï¼", false); |
| | | } |
| | | if (StringHelper.isEmpty(user.getSalt())) { |
| | | return fail("请è¾å
¥ç®¡çåå¯ç ï¼", false); |
| | | } |
| | | if (!StringHelper.checkPwdValid(user.getPwd())) { |
| | | return fail("æ°å¯ç ä¸ç¬¦åè§åè¦æ±ï¼", false); |
| | | if (uue == null || uue.getIds() == null || uue.getIds().isEmpty()) { |
| | | return fail("æ²¡ææ¾å°æ°æ®", false); |
| | | } |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue == null) { |
| | | return fail("没æç»å½æç»å½è¶
æ¶ï¼", false); |
| | | } |
| | | if (!Md5Helper.validatePassword(user.getSalt(), ue.getPwd())) { |
| | | return fail("管çåå¯ç 䏿£ç¡®ï¼", false); |
| | | String str = userService.validateAdminPwd(ue, uue.getAdminPwd()); |
| | | if (str != null) { |
| | | return fail(str, false); |
| | | } |
| | | |
| | | UserEntity userEntity = userService.selectUser(user.getId()); |
| | | if (userEntity == null) { |
| | | return fail("æ²¡ææ¾å°è¦ä¿®æ¹çç¨æ·ï¼", false); |
| | | str = userService.validateNewPwd(ue, uue.getNewPwd()); |
| | | if (str != null) { |
| | | return fail(str, false); |
| | | } |
| | | // 设置æ°å¯ç |
| | | String md5 = Md5Helper.reverse(Md5Helper.generate(user.getPwd())); |
| | | userEntity.setPwd(md5); |
| | | // è®¾ç½®æ´æ°ä¿¡æ¯ |
| | | userEntity.setUpdateUser(ue.getId()); |
| | | |
| | | Integer rows = userService.updateUsers(userEntity); |
| | | Integer rows = userService.updateUsersPwd(ue.getId(), ue.getSalt(), uue.getIds()); |
| | | |
| | | return success(rows > 0 ? "æ´æ°æå" : "æ´æ°å¤±è´¥", rows > 0); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | public class SettingData { |
| | | /** |
| | | * å¯ç åºéæ¬¡æ° |
| | | */ |
| | | public static int PWD_ERR_COUNT = 5; |
| | | |
| | | /** |
| | | * åºéçå¾
æ¶é´ |
| | | */ |
| | | public static int PWD_ERR_TIME = 5; |
| | | |
| | | /** |
| | | * èªå¨ç»åºæ¶é´ |
| | | */ |
| | | public static int AUTO_LOGOUT = 15; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.ctrl; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * å¾å±ä¿¡æ¯ |
| | | * @author WWW |
| | | */ |
| | | public class LayerDto { |
| | | private long count; |
| | | |
| | | private String layerName; |
| | | |
| | | private List<Map> list; |
| | | |
| | | private List<Map<String, String>> map; |
| | | |
| | | public long getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(long count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public String getLayerName() { |
| | | return layerName; |
| | | } |
| | | |
| | | public void setLayerName(String layerName) { |
| | | this.layerName = layerName; |
| | | } |
| | | |
| | | public List<Map> getList() { |
| | | return list; |
| | | } |
| | | |
| | | public void setList(List<Map> list) { |
| | | this.list = list; |
| | | } |
| | | |
| | | public List<Map<String, String>> getMap() { |
| | | return map; |
| | | } |
| | | |
| | | public void setMap(List<Map<String, String>> map) { |
| | | this.map = map; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.ctrl; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨æ·æ´æ°ç±» |
| | | * @author WWW |
| | | */ |
| | | public class UserUpdateEntity implements Serializable { |
| | | private static final long serialVersionUID = 8390219588267518254L; |
| | | |
| | | private String adminPwd; |
| | | |
| | | private String newPwd; |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | public UserUpdateEntity() { |
| | | |
| | | } |
| | | |
| | | public String getAdminPwd() { |
| | | return adminPwd; |
| | | } |
| | | |
| | | public void setAdminPwd(String adminPwd) { |
| | | this.adminPwd = adminPwd; |
| | | } |
| | | |
| | | public String getNewPwd() { |
| | | return newPwd; |
| | | } |
| | | |
| | | public void setNewPwd(String newPwd) { |
| | | this.newPwd = newPwd; |
| | | } |
| | | |
| | | public List<Integer> getIds() { |
| | | return ids; |
| | | } |
| | | |
| | | public void setIds(List<Integer> ids) { |
| | | this.ids = ids; |
| | | } |
| | | } |
| | |
| | | |
| | | private String descr; |
| | | |
| | | private int isAdmin; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | |
| | | this.descr = descr; |
| | | } |
| | | |
| | | public int getIsAdmin() { |
| | | return isAdmin; |
| | | } |
| | | |
| | | public void setIsAdmin(int isAdmin) { |
| | | this.isAdmin = isAdmin; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.helper; |
| | | |
| | | import com.lf.server.entity.ctrl.LayerDto; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.gdal.gdal.Band; |
| | | import org.gdal.gdal.Driver; |
| | | import org.gdal.gdal.gdal; |
| | | import org.gdal.gdal.Dataset; |
| | | import org.gdal.gdalconst.gdalconstConstants; |
| | | import org.gdal.ogr.*; |
| | | import org.gdal.osr.SpatialReference; |
| | | |
| | | import java.sql.Time; |
| | | import java.sql.Timestamp; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * GDAL帮å©ç±» |
| | | * @author WWW |
| | | */ |
| | | @SuppressWarnings("ALL") |
| | | public class GdalHelper { |
| | | private final static Log log = LogFactory.getLog(GdalHelper.class); |
| | | |
| | | static { |
| | | // æ³¨åææçé©±å¨ |
| | | gdal.AllRegister(); |
| | | |
| | | // ä¸ºäºæ¯æä¸æè·¯å¾ï¼è¯·æ·»å ä¸é¢è¿å¥ä»£ç |
| | | gdal.SetConfigOption("GDAL_FILENAME_IS_UTF8", "YES"); |
| | | |
| | | // é
ç½®GDAL_DATAè·¯å¾ï¼gdalæ ¹ç®å½ä¸çbin\gdal-dataï¼ |
| | | // gdal.SetConfigOption("GDAL_DATA", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\gdal-data"); |
| | | // gdal.SetConfigOption("PROJ_LIB", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\proj7\\share"); |
| | | |
| | | // 为äºä½¿å±æ§è¡¨åæ®µæ¯æä¸æï¼è¯·æ·»å ä¸é¢è¿å¥ï¼CP936 |
| | | gdal.SetConfigOption("SHAPE_ENCODING", ""); |
| | | } |
| | | |
| | | /** |
| | | * 读åtifæä»¶ |
| | | * |
| | | * @param fileName |
| | | */ |
| | | public static void readTif(String fileName) { |
| | | // 读åå½±åæ°æ® |
| | | Dataset dataset = gdal.Open(fileName, gdalconstConstants.GA_ReadOnly); |
| | | if (dataset == null) { |
| | | System.out.println("read fail!"); |
| | | return; |
| | | } |
| | | |
| | | // providing various methods for a format specific driver. |
| | | Driver driver = dataset.GetDriver(); |
| | | System.out.println("driver name: " + driver.getLongName()); |
| | | |
| | | // 读åå½±åä¿¡æ¯ |
| | | int xSize = dataset.getRasterXSize(); |
| | | int ySzie = dataset.getRasterYSize(); |
| | | int rasterCount = dataset.getRasterCount(); |
| | | System.out.println("dataset xSize: " + xSize + ", ySzie = " + ySzie + ", rasterCount = " + rasterCount); |
| | | |
| | | Band band = dataset.GetRasterBand(1); |
| | | // the data type of the band. |
| | | int type = band.GetRasterDataType(); |
| | | System.out.println("data type = " + type + ", " + (type == gdalconstConstants.GDT_Byte)); |
| | | |
| | | // Frees the native resource associated to a Dataset object and close the file. |
| | | dataset.delete(); |
| | | |
| | | gdal.GDALDestroyDriverManager(); |
| | | } |
| | | |
| | | private static void writeShp(String filePath) { |
| | | try { |
| | | org.gdal.ogr.Driver driver = ogr.GetDriverByName("ESRI shapefile"); |
| | | if (driver == null) { |
| | | System.out.println(" ESRI shapefile驱å¨ä¸å¯ç¨ï¼\n"); |
| | | System.out.println("fail"); |
| | | } |
| | | |
| | | // Open()ç第äºä¸ªåæ°é»è®¤ä¸º0ï¼æ¯ä»¥åªè¯»æ¹å¼æå¼æä»¶ï¼1æ¯è¯»åæ¹å¼æå¼ |
| | | DataSource dSource = driver.Open(filePath, 0); |
| | | |
| | | Layer layer = dSource.GetLayerByIndex(0); |
| | | FieldDefn fieldDefn = new FieldDefn("name", ogr.OFTString); |
| | | fieldDefn.SetWidth(50); |
| | | layer.CreateField(fieldDefn, 1); |
| | | layer.DeleteField(layer.FindFieldIndex("name", 1)); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 读åshpæä»¶ |
| | | * @param filePath |
| | | */ |
| | | public static void readShp(String filePath) { |
| | | try { |
| | | org.gdal.ogr.Driver driver = ogr.GetDriverByName("ESRI shapefile"); |
| | | if (driver == null) { |
| | | System.out.println(" ESRI shapefile驱å¨ä¸å¯ç¨ï¼\n"); |
| | | System.out.println("fail"); |
| | | } |
| | | |
| | | DataSource dataSource = driver.Open(filePath); |
| | | Layer layer = dataSource.GetLayer(0); |
| | | |
| | | String layerName = layer.GetName(); |
| | | System.out.println("å¾å±åç§°ï¼" + layerName); |
| | | |
| | | SpatialReference spatialReference = layer.GetSpatialRef(); |
| | | // System.out.println(spatialReference) |
| | | System.out.println("空é´åèåæ ç³»ï¼" + spatialReference.GetAttrValue("AUTHORITY", 0) + spatialReference.GetAttrValue("AUTHORITY", 1)); |
| | | |
| | | double[] layerExtent = layer.GetExtent(); |
| | | System.out.println("å¾å±èå´ï¼minx:" + layerExtent[0] + ",maxx:" + layerExtent[1] + ",miny:" + layerExtent[2] + ",maxy:" + layerExtent[3]); |
| | | |
| | | FeatureDefn featureDefn = layer.GetLayerDefn(); |
| | | Map<String, Object> fieldMap = new HashMap(5); |
| | | for (int i = 0, count = featureDefn.GetFieldCount(); i < count; i++) { |
| | | FieldDefn fieldDefn = featureDefn.GetFieldDefn(i); |
| | | //å¾å°å±æ§å段类å |
| | | int fieldType = fieldDefn.GetFieldType(); |
| | | String fieldTypeName = fieldDefn.GetFieldTypeName(fieldType); |
| | | //å¾å°å±æ§å段åç§° |
| | | String fieldName = fieldDefn.GetName(); |
| | | |
| | | fieldMap.put(fieldTypeName, fieldName); |
| | | } |
| | | |
| | | long featureCount = layer.GetFeatureCount(); |
| | | System.out.println("å¾å±è¦ç´ 个æ°ï¼" + featureCount); |
| | | for (int i = 0; i < featureCount; i++) { |
| | | Feature feature = layer.GetFeature(i); |
| | | Object[] arr = fieldMap.values().toArray(); |
| | | for (int k = 0; k < arr.length; k++) { |
| | | String value = feature.GetFieldAsString(arr[k].toString()); |
| | | System.out.print(" 屿§åç§°:" + arr[k].toString() + ",屿§å¼:" + value); |
| | | } |
| | | System.out.println(); |
| | | break; |
| | | } |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public static LayerDto getLayerDto(String filePath) { |
| | | org.gdal.ogr.Driver driver = ogr.GetDriverByName("OpenFileGDB"); |
| | | if (driver == null) { |
| | | return null; |
| | | } |
| | | List<Map> list = new ArrayList<>(); |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | LayerDto layerDto = new LayerDto(); |
| | | DataSource dataSource = null; |
| | | try { |
| | | dataSource = driver.Open(filePath, 0); |
| | | int num = dataSource.GetLayerCount(); |
| | | for (int i = 0; i < num; i++) { |
| | | // è·åå¾å± |
| | | Layer layer = dataSource.GetLayer(i); |
| | | // 表åç§° |
| | | String strlayerName = layer.GetName(); |
| | | // è·åå¾å±è¦æ°ä¸ªæ° |
| | | long count = layer.GetFeatureCount(); |
| | | if (0 != count) { |
| | | do { |
| | | // è·åå¾å±ä¸çè¦ç´ |
| | | Feature feature = layer.GetNextFeature(); |
| | | if (null == feature) { |
| | | break; |
| | | } |
| | | // è·åè¾¹çåæ |
| | | Geometry geometry = feature.GetGeometryRef(); |
| | | if (geometry != null) { |
| | | String geometryJson = geometry.ExportToJson(); |
| | | String str = geometryJson.substring(geometryJson.lastIndexOf(":") + 1, geometryJson.length()); |
| | | if (!" [ [ ] ] }".equals(str)) { |
| | | String s1 = str.substring(7, str.length() - 8); |
| | | String[] split = s1.replaceAll(" ", "").replaceAll("\\[", "").replaceAll("]", "").split(","); |
| | | List<String> xList = new ArrayList(); |
| | | List<String> yList = new ArrayList(); |
| | | Map<String, String> map1 = new HashMap(5); |
| | | for (int j = 0; j < split.length; j++) { |
| | | if (j != (split.length - 1) && j % 2 == 0) { |
| | | map1.put(split[j], split[j + 1]); |
| | | } |
| | | } |
| | | mapList.add(map1); |
| | | } |
| | | } |
| | | Map map = new HashMap(5); |
| | | //è·å屿§ |
| | | for (int p = 0; p < feature.GetFieldCount(); p++) { |
| | | map.put(feature.GetFieldDefnRef(p).GetName(), getProperty(feature, p)); |
| | | } |
| | | list.add(map); |
| | | feature.delete(); |
| | | } while (true); |
| | | } |
| | | layerDto.setLayerName(strlayerName); |
| | | layerDto.setList(list); |
| | | layerDto.setCount(count); |
| | | layerDto.setMap(mapList); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (dataSource != null) { |
| | | dataSource.delete(); |
| | | } |
| | | } |
| | | return layerDto; |
| | | } |
| | | |
| | | /** |
| | | * 读ågdbæä»¶ |
| | | * @param filePath |
| | | */ |
| | | public static void readGdb(String filePath) { |
| | | try { |
| | | org.gdal.ogr.Driver driver = ogr.GetDriverByName("OpenFileGDB"); |
| | | if (driver == null) { |
| | | return; |
| | | } |
| | | DataSource dataSource = driver.Open(filePath, 0); |
| | | |
| | | for (int i = 0, count = dataSource.GetLayerCount(); i < count; i++) { |
| | | // è·åå¾å± |
| | | Layer layer = dataSource.GetLayer(i); |
| | | System.out.println(i + "\t" + layer.GetName()); |
| | | do { |
| | | // è·åå¾å±ä¸çè¦ç´ |
| | | Feature feature = layer.GetNextFeature(); |
| | | if (null == feature) { |
| | | break; |
| | | } |
| | | // è·åæ ·å¼ï¼è¿éæ¯ç©ºï¼å¾
ç¡®å® |
| | | System.out.println(feature.GetStyleString()); |
| | | // è·ågeometryï¼ä¹å¯ä»¥ExportToWkb() gmlçç |
| | | System.out.println(feature.GetGeometryRef().ExportToWkt()); |
| | | // è·å屿§ |
| | | System.out.println("----------------------------------"); |
| | | for (int p = 0; p < feature.GetFieldCount(); p++) { |
| | | System.out.println(feature.GetFieldDefnRef(p).GetName() + "\t" + getProperty(feature, p)); |
| | | } |
| | | System.out.println("----------------------------------"); |
| | | break; |
| | | } while (true); |
| | | } |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private static Object getProperty(Feature feature, int index) { |
| | | int type = feature.GetFieldType(index); |
| | | |
| | | PropertyGetter propertyGetter; |
| | | if (type < 0 || type >= PROPERTY_GETTERS.length) { |
| | | propertyGetter = STRING_PROPERTY_GETTER; |
| | | } else { |
| | | propertyGetter = PROPERTY_GETTERS[type]; |
| | | } |
| | | |
| | | try { |
| | | return propertyGetter.get(feature, index); |
| | | } catch (Exception ex) { |
| | | // ex.printStackTrace() |
| | | log.error(ex.getMessage() + ex.getStackTrace() + "\n"); |
| | | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 屿§è·åå¨ |
| | | */ |
| | | @FunctionalInterface |
| | | private interface PropertyGetter { |
| | | /** |
| | | * è·å屿§ |
| | | * |
| | | * @param feature |
| | | * @param index |
| | | * @return |
| | | */ |
| | | Object get(Feature feature, int index); |
| | | } |
| | | |
| | | private static final PropertyGetter STRING_PROPERTY_GETTER = (feature, index) -> feature.GetFieldAsString(index); |
| | | |
| | | /** |
| | | * feature.GetFieldType(index)å¾å°ä¸ä¸ªå±æ§ç±»åçintå¼,该å¼å¯¹åºå
·ä½ç±»å |
| | | */ |
| | | private static final PropertyGetter[] PROPERTY_GETTERS = new PropertyGetter[]{ |
| | | // 0-Integer |
| | | (feature, index) -> feature.GetFieldAsInteger(index), |
| | | // 1-IntegerList |
| | | (feature, index) -> feature.GetFieldAsIntegerList(index), |
| | | // 2-Real |
| | | (feature, index) -> feature.GetFieldAsDouble(index), |
| | | // 3-RealList |
| | | (feature, index) -> feature.GetFieldAsDoubleList(index), |
| | | // 4-String |
| | | STRING_PROPERTY_GETTER, |
| | | // 5-StringList |
| | | (feature, index) -> feature.GetFieldAsStringList(index), |
| | | // 6-unknown |
| | | STRING_PROPERTY_GETTER, |
| | | // 7-unknown |
| | | STRING_PROPERTY_GETTER, |
| | | // 8-Binary |
| | | (feature, index) -> feature.GetFieldAsBinary(index), |
| | | // 9-Date |
| | | (feature, index) -> { |
| | | int[] pnYear = new int[1]; |
| | | int[] pnMonth = new int[1]; |
| | | int[] pnDay = new int[1]; |
| | | int[] pnHour = new int[1]; |
| | | int[] pnMinute = new int[1]; |
| | | float[] pfSecond = new float[1]; |
| | | int[] pnTZFlag = new int[1]; |
| | | feature.GetFieldAsDateTime(index, pnYear, pnMonth, pnDay, pnHour, pnMinute, pfSecond, pnTZFlag); |
| | | java.sql.Date date = java.sql.Date.valueOf(LocalDate.of(pnYear[0], pnMonth[0], pnDay[0])); |
| | | return date; |
| | | }, |
| | | // 10-Time |
| | | (feature, index) -> { |
| | | int[] pnYear = new int[1]; |
| | | int[] pnMonth = new int[1]; |
| | | int[] pnDay = new int[1]; |
| | | int[] pnHour = new int[1]; |
| | | int[] pnMinute = new int[1]; |
| | | float[] pfSecond = new float[1]; |
| | | int[] pnTZFlag = new int[1]; |
| | | feature.GetFieldAsDateTime(index, pnYear, pnMonth, pnDay, pnHour, pnMinute, pfSecond, pnTZFlag); |
| | | float fSecond = pfSecond[0]; |
| | | int s = (int) fSecond; |
| | | int ns = (int) (1000000000 * fSecond - s); |
| | | Time time = Time.valueOf(LocalTime.of(pnHour[0], pnMinute[0], s, ns)); |
| | | return time; |
| | | }, |
| | | // 11-DateTime |
| | | (feature, index) -> { |
| | | int[] pnYear = new int[1]; |
| | | int[] pnMonth = new int[1]; |
| | | int[] pnDay = new int[1]; |
| | | int[] pnHour = new int[1]; |
| | | int[] pnMinute = new int[1]; |
| | | float[] pfSecond = new float[1]; |
| | | int[] pnTZFlag = new int[1]; |
| | | feature.GetFieldAsDateTime(index, pnYear, pnMonth, pnDay, pnHour, pnMinute, pfSecond, pnTZFlag); |
| | | float fSecond = pfSecond[0]; |
| | | int s = (int) fSecond; |
| | | int ns = (int) (1000000000 * fSecond - s); |
| | | LocalDateTime localDateTime = LocalDateTime.of( |
| | | LocalDate.of(pnYear[0], pnMonth[0], pnDay[0]), |
| | | LocalTime.of(pnHour[0], pnMinute[0], s, ns) |
| | | ); |
| | | Timestamp timestamp = Timestamp.valueOf(localDateTime); |
| | | return timestamp; |
| | | }, |
| | | // 12-Integer64 |
| | | (feature, index) -> feature.GetFieldAsInteger64(index), |
| | | // 13 Integer64List |
| | | (feature, index) -> feature.GetFieldAsIntegerList(index) |
| | | // >=14 (unknown) |
| | | }; |
| | | } |
| | |
| | | * @param jsonPack |
| | | * @throws Exception |
| | | */ |
| | | public static void write2Page(HttpServletResponse response, String jsonPack) throws IOException { |
| | | public static boolean write2Page(HttpServletResponse response, String jsonPack) throws IOException { |
| | | response.setContentType("application/json;charset=UTF-8"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | response.setHeader("Pragma", "No-cache"); |
| | |
| | | |
| | | out.flush(); |
| | | out.close(); |
| | | |
| | | return false; |
| | | } |
| | | } |
| | |
| | | package com.lf.server.interceptor; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.lf.server.entity.all.HttpStatus; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.all.*; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | | import com.lf.server.service.all.RedisService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.data.redis.cache.RedisCache; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | import org.springframework.web.servlet.HandlerInterceptor; |
| | | |
| | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { |
| | | try { |
| | | System.out.println(request.getRequestURI().toLowerCase() + "," + (handler instanceof HandlerMethod)); |
| | | |
| | | // éæ¹æ³ï¼æ éæ¦æª |
| | | if (!(handler instanceof HandlerMethod)) { |
| | | return true; |
| | | } |
| | | |
| | | // æ éææ |
| | | if (noNeedAuth(request)) { |
| | | System.out.println(request.getRequestURI().toLowerCase() + ", " + (handler instanceof HandlerMethod)); |
| | | // éæ¹æ³ æ æ éææï¼æ éæ¦æª |
| | | if (!(handler instanceof HandlerMethod) || noNeedAuth(request)) { |
| | | return true; |
| | | } |
| | | |
| | | String token = WebHelper.getToken(request); |
| | | if (StringHelper.isNull(token)) { |
| | | WebHelper.write2Page(response, NO_TOKEN); |
| | | return false; |
| | | return WebHelper.write2Page(response, NO_TOKEN); |
| | | } |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(request); |
| | | if (ue == null) { |
| | | WebHelper.write2Page(response, NO_LOGIN); |
| | | return false; |
| | | return WebHelper.write2Page(response, NO_LOGIN); |
| | | } |
| | | |
| | | //noinspection AlibabaRemoveCommentedCode |
| | | Object objCount = tokenService.redisService.get(RedisCacheKey.signPwdError(ue.getUid())); |
| | | if (objCount != null && (int) objCount > SettingData.PWD_ERR_COUNT) { |
| | | return WebHelper.write2Page(response, JSON.toJSONString(new ResponseMsg<String>(HttpStatus.NO_LOGIN_ERROR, SettingData.PWD_ERR_TIME + "åéå
ç¦æ¢ç»å½"))); |
| | | } |
| | | |
| | | // noinspection AlibabaRemoveCommentedCode |
| | | // æéæ ¡éª |
| | | |
| | | return true; |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param dictEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertDicts(List<DictEntity> dictEntity); |
| | | public Integer insertDicts(List<DictEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * @param dirEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertDirs(List<DirEntity> dirEntity); |
| | | public Integer insertDirs(List<DirEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | |
| | | /** |
| | | * æ´æ°å¤æ¡ |
| | | * @param dirEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updateDirs(List<DirEntity> dirEntity); |
| | | public Integer updateDirs(List<DirEntity> list); |
| | | |
| | | /** |
| | | * æ¥è¯¢åæ¡æ°æ® |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param styleEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertStyles(List<StyleEntity> styleEntity); |
| | | public Integer insertStyles(List<StyleEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param verEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertVersions(List<VerEntity> verEntity); |
| | | public Integer insertVersions(List<VerEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param authEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertAuths(List<AuthEntity> authEntity); |
| | | public Integer insertAuths(List<AuthEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * @param depEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertDeps(List<DepEntity> depEntity); |
| | | public Integer insertDeps(List<DepEntity> list); |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | | * @param id |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param loginEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertLogins(List<LoginEntity> loginEntity); |
| | | public Integer insertLogins(List<LoginEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * @param menuEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertMenus(List<MenuEntity> menuEntity); |
| | | public Integer insertMenus(List<MenuEntity> list); |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | | * @param id |
| | |
| | | |
| | | /** |
| | | * æ´æ°å¤æ¡ |
| | | * @param menuEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updateMenus(List<MenuEntity> menuEntity); |
| | | public Integer updateMenus(List<MenuEntity> list); |
| | | |
| | | /** |
| | | * é彿¥è¯¢ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param operateEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertOperates(List<OperateEntity> operateEntity); |
| | | public Integer insertOperates(List<OperateEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param resEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertRess(List<ResEntity> resEntity); |
| | | public Integer insertRess(List<ResEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param resOpEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertResOps(List<ResOpEntity> resOpEntity); |
| | | public Integer insertResOps(List<ResOpEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param roleEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertRoles(List<RoleEntity> roleEntity); |
| | | public Integer insertRoles(List<RoleEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | /** |
| | | * æå
¥å¤æ¡ |
| | | * |
| | | * @param tokenEntity |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertTokens(List<TokenEntity> tokenEntity); |
| | | public Integer insertTokens(List<TokenEntity> list); |
| | | |
| | | /** |
| | | * å é¤ä¸æ¡ |
| | |
| | | * @return |
| | | */ |
| | | public List<UserEntity> selectByPageForRole(String uname, Integer roleid, Integer depid, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ´æ°å¤ä¸ªç¨æ·å¯ç |
| | | * |
| | | * @param updateUser |
| | | * @param pwd |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer updateUsersPwd(Integer updateUser, String pwd, List<Integer> ids); |
| | | } |
| | |
| | | @Service |
| | | public class TokenService implements TokenMapper { |
| | | @Autowired |
| | | private RedisService redisService; |
| | | public RedisService redisService; |
| | | |
| | | @Autowired |
| | | TokenMapper tokenMapper; |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.all.RedisCacheKey; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.Md5Helper; |
| | | import com.lf.server.helper.RsaHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.UserMapper; |
| | | import com.lf.server.service.all.RedisService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.cache.RedisCache; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * ç¨æ·è¡¨ |
| | |
| | | public class UserService implements UserMapper { |
| | | @Autowired |
| | | UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | RedisService redisService; |
| | | |
| | | @Override |
| | | public Integer selectCount(String uname) { |
| | |
| | | return userMapper.selectByPageForRole(uname, roleid, depid, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateUsersPwd(Integer updateUser, String pwd, List<Integer> ids) { |
| | | return userMapper.updateUsersPwd(updateUser, pwd, ids); |
| | | } |
| | | |
| | | /** |
| | | * éªè¯æ°ç¨æ·å¯ç |
| | | */ |
| | | public String ValidateNewPwd(UserEntity entity) { |
| | | public String validateNewPwd(UserEntity entity) { |
| | | if (entity == null) { |
| | | return "æ²¡ææ¾å°ç¨æ·"; |
| | | } |
| | |
| | | /** |
| | | * éªè¯èç¨æ·å¯ç |
| | | */ |
| | | public String ValidateOldPwd(UserEntity entity) { |
| | | public String validateOldPwd(UserEntity entity) { |
| | | if (entity == null) { |
| | | return "æ²¡ææ¾å°ç¨æ·"; |
| | | } |
| | |
| | | return "æ²¡ææ¾å°ç¨æ·"; |
| | | } |
| | | if (!Md5Helper.validatePassword(pwd, ue.getPwd())) { |
| | | // |
| | | return "æ§å¯ç è¾å
¥é误"; |
| | | } |
| | | if (!StringHelper.checkPwdValid(salt)) { |
| | |
| | | return "å¯ç è§£å¯å¤±è´¥"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éªè¯ç®¡çåå¯ç |
| | | */ |
| | | public String validateAdminPwd(UserEntity ue, String adminPwd) { |
| | | if (ue == null) { |
| | | return "没æç»å½æè¶
æ¶"; |
| | | } |
| | | if (StringHelper.isEmpty(adminPwd)) { |
| | | return "管çåå¯ç ä¸è½ä¸ºç©º"; |
| | | } |
| | | |
| | | try { |
| | | String pwd = RsaHelper.decrypt(adminPwd); |
| | | if (!Md5Helper.validatePassword(pwd, ue.getPwd())) { |
| | | return "管çåå¯ç 䏿£ç¡®"; |
| | | } |
| | | |
| | | return null; |
| | | } catch (Exception ex) { |
| | | return "å¯ç è§£å¯å¤±è´¥"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éªè¯æ°å¯ç |
| | | */ |
| | | public String validateNewPwd(UserEntity ue, String newPwd) { |
| | | if (StringHelper.isEmpty(newPwd)) { |
| | | return "æ°å¯ç ä¸è½ä¸ºç©º"; |
| | | } |
| | | |
| | | try { |
| | | String pwd = RsaHelper.decrypt(newPwd); |
| | | if (!StringHelper.checkPwdValid(pwd)) { |
| | | return "å¯ç ä¸ç¬¦åè¦æ±"; |
| | | } |
| | | |
| | | String dbPwd = Md5Helper.reverse(Md5Helper.generate(pwd)); |
| | | ue.setSalt(dbPwd); |
| | | |
| | | return null; |
| | | } catch (Exception ex) { |
| | | return "å¯ç è§£å¯å¤±è´¥"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设置å¯ç é误ç¼å |
| | | * |
| | | * @param ue |
| | | */ |
| | | public void setPwdErrCache(UserEntity ue) { |
| | | String key = RedisCacheKey.signPwdError(ue.getUid()); |
| | | Object objCount = redisService.get(key); |
| | | |
| | | int count = objCount == null ? 1 : (int) objCount + 1; |
| | | redisService.put(key, count, SettingData.PWD_ERR_TIME, TimeUnit.MINUTES); |
| | | } |
| | | } |
| | |
| | | name: land |
| | | |
| | | spring: |
| | | # redis |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: rediS_5L#F4_Server |
| | | timeout: 6000 # è¿æ¥è¶
æ¶æ¶é¿ï¼æ¯«ç§ï¼ |
| | | pool: |
| | | max-active: 1000 # è¿æ¥æ± æå¤§è¿æ¥æ°ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1 # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-idle: 10 # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | min-idle: 5 # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | # session |
| | | session: |
| | | timeout: PT20M # 20åé |
| | | |
| | | # jackson |
| | | jackson: |
| | | time-zone: GMT+8 |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | locale: zh_CN |
| | | # datasource |
| | | datasource: |
| | | name: prod |
| | | # JDBC åºæ¬é
ç½® |
| | | url: jdbc:postgresql://192.168.20.39:5433/langfang?useAffectedRows=true |
| | | url: jdbc:postgresql://127.0.0.1:5432/langfang?useAffectedRows=true |
| | | username : postgres |
| | | password: postgres |
| | | driver-class-name: org.postgresql.Driver |
| | |
| | | removeAbandonedTimeout: 180 |
| | | # å
³é abanded è¿æ¥æ¶è¾åºé误æ¥å¿ |
| | | logAbandoned: true |
| | | |
| | | # é
ç½®è¿æ¥æ± ä¿¡æ¯ |
| | | druid: |
| | | ## åå§å大å°ï¼æå°ï¼æå¤§ |
| | |
| | | test-on-borrow: false |
| | | # å¦æä¸ºtrueï¼é»è®¤falseï¼ï¼å½åºç¨ä½¿ç¨å®è¿æ¥ï¼è¿æ¥æ± åæ¶è¿æ¥çæ¶åä¼å¤æè¯¥è¿æ¥æ¯å¦è¿å¯ç¨ |
| | | test-on-return: false |
| | | |
| | | # servleté
ç½® |
| | | stat-view-servlet: |
| | | # sqlçæ§å¼å
³ |
| | | enabled: true |
| | |
| | | log-slow-sql: true |
| | | slow-sql-millis: 2000 |
| | | |
| | | redis: |
| | | host: 192.168.20.39 |
| | | port: 6379 |
| | | password: rediS_5L#F4_Server |
| | | database: 1 |
| | | jackson: |
| | | time-zone: GMT+8 |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | |
| | | # mybatis |
| | | mybatis: |
| | | type-aliases-package: com.lf.server.mapper |
| | | config-location: classpath:mybatis.xml |
| | | mapper-locations: classpath:mapper/**/*.xml |
| | | |
| | | # logging |
| | | logging: |
| | | config: classpath:logback-spring.xml |
| | | |
| | |
| | | # å
±äº«ç®å½ |
| | | share: D:\LF\share |
| | | # 临æ¶ç®å½ |
| | | temp: D:\LF\temp |
| | | temp: D:\LF\temp |
| | |
| | | select * from lf.sys_dict where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDict" parameterType="com.lf.server.entity.data.DictEntity"> |
| | | <insert id="insertDict" parameterType="com.lf.server.entity.data.DictEntity"> |
| | | insert into lf.sys_dict |
| | | (ns,tab,tab_desc,field,alias,type,len,precision,order_num,create_user,create_time,bak) |
| | | values |
| | |
| | | now(),#{bak}); |
| | | </insert> |
| | | |
| | | <insert id="insertDicts" > |
| | | <insert id="insertDicts"> |
| | | insert into lf.sys_dict |
| | | (ns,tab,tab_desc,field,alias,type,len,precision,order_num,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.ns},#{item.tab},#{item.tabDesc},#{item.field},#{item.alias},#{item.type},#{item.len}, |
| | | #{item.precision},#{item.orderNum},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteDict" > |
| | | <delete id="deleteDict"> |
| | | delete from lf.sys_dict where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDicts" > |
| | | <delete id="deleteDicts"> |
| | | delete from lf.sys_dict where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | insert into lf.sys_dir |
| | | (pid,name,code,descr,level,order_num,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.pid},#{item.name},#{item.code},#{item.descr},#{item.level} |
| | | ,#{item.orderNum},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | |
| | | delete from lf.sys_dir where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDirs" > |
| | | <delete id="deleteDirs"> |
| | | delete from lf.sys_dir where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | update lf.sys_dir set pid=#{pid},name=#{name},code=#{code},descr=#{descr},level=#{level},order_num=#{orderNum}, |
| | | update_user=#{updateUser},update_time=now(),bak=#{bak} where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateDirs"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_download where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_meta_file where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_meta where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | insert into lf.sys_style |
| | | (name,type,dirid,depid,ver,status,precision,descr,file_guid,view_guid,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.name},#{item.type},#{item.dirid},#{item.depid},#{item.ver},#{item.status},#{item.precision},#{item.descr}, |
| | | #{item.fileGuid},#{item.viewGuid},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteStyle" > |
| | | <delete id="deleteStyle"> |
| | | delete from lf.sys_style where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteStyles" > |
| | | delete from lf.sys_style where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | insert into lf.sys_ver |
| | | (dirid,name,descr,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.dirid},#{item.name},#{item.descr},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | |
| | | |
| | | <delete id="deleteVersions" > |
| | | delete from lf.sys_ver where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_args where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_attach where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | insert into lf.sys_auth |
| | | (name,tag,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.name},#{item.tag},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | |
| | | |
| | | <delete id="deleteAuths" > |
| | | delete from lf.sys_auth where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_blacklist where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | #{level},#{orderNum},#{createUser},now(),#{bak}); |
| | | </insert> |
| | | |
| | | <insert id="insertDeps" > |
| | | <insert id="insertDeps"> |
| | | insert into lf.sys_dep |
| | | (pid,name,sname,code,uncode,addr,contact,fax,email,post,website,level,order_num,create_user,create_time,bak) |
| | | values |
| | |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteDep" > |
| | | <delete id="deleteDep"> |
| | | delete from lf.sys_dep where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDeps" > |
| | | <delete id="deleteDeps"> |
| | | delete from lf.sys_dep where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deleteLogins"> |
| | | delete from lf.sys_login where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_menu_auth where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deleteMenus" > |
| | | delete from lf.sys_menu where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_msg where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | select * from lf.sys_operate where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertOperate" parameterType="com.lf.server.entity.sys.OperateEntity"> |
| | | <insert id="insertOperate" parameterType="com.lf.server.entity.sys.OperateEntity"> |
| | | insert into lf.sys_operate |
| | | (modular1,modular2,url,ip,exec,clazz,type,userid,optime,bak) |
| | | values |
| | | (#{modular1},#{modular2},#{url},#{ip},#{exec},#{clazz},#{type},#{userid},now(),#{bak}); |
| | | </insert> |
| | | |
| | | <insert id="insertOperates" > |
| | | insert into lf.sys_operate |
| | | (modular1,modular2,url,ip,exec,clazz,type,userid,optime,bak) |
| | | values |
| | | <insert id="insertOperates"> |
| | | insert into lf.sys_operate (modular1,modular2,url,ip,exec,clazz,type,userid,optime,bak) values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{modular1},#{modular2},#{url},#{ip},#{exec},#{clazz},#{type},#{userid},now(),#{bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteOperate" > |
| | | <delete id="deleteOperate"> |
| | | delete from lf.sys_operate where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteOperates" > |
| | | <delete id="deleteOperates"> |
| | | delete from lf.sys_operate where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | insert into lf.sys_res |
| | | (name,server,source,depid,dirid,code,descr,img,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | #{item.name},#{item.server},#{item.source},#{item.depid},#{item.dirid},#{item.code},#{item.descr},#{item.img},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | |
| | | |
| | | <delete id="deleteRess"> |
| | | delete from lf.sys_res where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectResOpAll" resultType="com.lf.server.entity.sys.ResOpEntity"> |
| | | select * from lf.sys_res_op order by id; |
| | | </select> |
| | |
| | | select * from lf.sys_res_op where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertResOp" parameterType="com.lf.server.entity.sys.ResOpEntity"> |
| | | <insert id="insertResOp" parameterType="com.lf.server.entity.sys.ResOpEntity"> |
| | | insert into lf.sys_res_op |
| | | (resid,type,ip,userid,optime) |
| | | values |
| | | (#{resid},#{type},#{ip},#{userid},now()); |
| | | </insert> |
| | | |
| | | <insert id="insertResOps" > |
| | | <insert id="insertResOps"> |
| | | insert into lf.sys_res_op |
| | | (resid,type,ip,userid,optime) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.resid},#{item.type},#{item.ip},#{item.userid},now()); |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteResOp" > |
| | | <delete id="deleteResOp"> |
| | | delete from lf.sys_res_op where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteResOps" > |
| | | <delete id="deleteResOps"> |
| | | delete from lf.sys_res_op where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | select a.*,fn_rec_query(a.depid, 'dep') depName,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_role a where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="com.lf.server.entity.sys.RoleEntity"> |
| | | <insert id="insertRole" parameterType="com.lf.server.entity.sys.RoleEntity"> |
| | | insert into lf.sys_role |
| | | (depid,name,descr,create_user,create_time,bak) |
| | | (depid,name,descr,is_admin,create_user,create_time,bak) |
| | | values |
| | | (#{depid},#{name},#{descr},#{createUser},now(),#{bak}); |
| | | (#{depid},#{name},#{descr},#{isAdmin},#{createUser},now(),#{bak}) |
| | | </insert> |
| | | |
| | | <insert id="insertRoles" > |
| | | <insert id="insertRoles"> |
| | | insert into lf.sys_role |
| | | (depid,name,descr,create_user,create_time,bak) |
| | | (depid,name,descr,is_admin,create_user,create_time,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.depid},#{item.name},#{item.descr},#{item.createUser},now(),#{item.bak}) |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.depid},#{item.name},#{item.descr},#{item.isAdmin},#{item.createUser},now(),#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteRole" > |
| | | <delete id="deleteRole"> |
| | | delete from lf.sys_role where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteRoles" > |
| | | <delete id="deleteRoles"> |
| | | delete from lf.sys_role where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateRole"> |
| | | update lf.sys_role set depid=#{depid}, name=#{name},descr=#{descr},update_user=#{id},update_time=now(),bak=#{bak} where id=#{id} |
| | | update lf.sys_role set depid=#{depid},name=#{name},descr=#{descr},is_admin=#{isAdmin},update_user=#{id},update_time=now(),bak=#{bak} where id=#{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_role_menu_auth where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_role_res where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_role_user where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | <if test="name != null"> |
| | | and token = #{name} |
| | | </if> |
| | | |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteToken" > |
| | | <delete id="deleteToken"> |
| | | delete from lf.sys_token where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteTokens" > |
| | | <delete id="deleteTokens"> |
| | | delete from lf.sys_token where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | select create_user from lf.sys_token where token=#{token} and expire > now() limit 1) |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="com.lf.server.entity.sys.UserEntity"> |
| | | <insert id="insertUser" parameterType="com.lf.server.entity.sys.UserEntity"> |
| | | insert into lf.sys_user |
| | | (depid,uid,uname,pwd,salt,sex,native,contact,job,email,addr,edu,idcard,status,create_user,create_time,bak) |
| | | values |
| | |
| | | #{status},#{createUser},now(),#{bak}) |
| | | </insert> |
| | | |
| | | <insert id="insertUsers" > |
| | | <insert id="insertUsers"> |
| | | insert into lf.sys_user |
| | | (depid,uid,uname,pwd,salt,sex,native,contact,job,email,addr,edu,idcard,status,create_user,create_time,bak) |
| | | values |
| | |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteUser" > |
| | | <delete id="deleteUser"> |
| | | delete from lf.sys_user where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteUsers" > |
| | | <delete id="deleteUsers"> |
| | | delete from lf.sys_user where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" |
| | | separator="," close=")"> |
| | | #{ids} |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | |
| | | update lf.sys_user set depid=#{depid},uid=#{uid},uname=#{uname},pwd=#{pwd},salt=#{salt},sex=#{sex},native=#{natives},contact=#{contact},job=#{job},email=#{email}, |
| | | addr=#{addr},edu=#{edu},idcard=#{idcard},status=#{status},update_user=#{updateUser},update_time=now(),bak=#{bak} where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updateUsersPwd"> |
| | | update lf.sys_user set pwd=#{pwd},update_user=#{updateUser},update_time=now() where id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
| | |
| | | ---------------------------------------------------------------------------------------------------- |
| | | 1.ä¿®æ¹èåãæ°æ®ç®å½ãåä½çxlsæ°æ®ï¼ç¼åé彿¥è¯¢SQL |
| | | 2.ç»å½æ¶éªè¯ä½¿ç¨MD5+Saltå¯ç |
| | | 3.ç»å½æ¶çç¨æ·ååå¯ç 使ç¨RSAå å¯ãè§£å¯ |
| | | 4.WebSocketæå¡ |
| | | 5.èµæºå®æ¶çæ§ï¼CPUä¿¡æ¯+å
åä¿¡æ¯+å¨çº¿ç¨æ·+èµæºç¶æï¼ |
| | | |
| | | 3.ä¿®æ¹ç¨æ·å¯ç æ¶ä½¿ç¨MD5+Saltå¯ç |
| | | 4.è§£å³Swagger-UIæ æ³ä¼ éCookieä¿¡æ¯ |
| | | 6.å¯ç å¤æåº¦éªè¯(8-20ä½å
å«åæ¯ãæ°ååç¹æ®å符) |
| | | 7.åå°æå¡è®¿é®æ·»å ç»å½éªè¯æ¦æªå¨ |
| | | 8.å¼åå颿¥å¿åè½ |
| | | 9.æ°æ®åºçæ§(Druid Monitor)+èªå¨ç»å½ |
| | | 12.ä¸è½½æä»¶å¹¶è®¾ç½®MIMEç±»å |
| | | 13.ä¸ä¼ æä»¶ï¼commons-fileuploadï¼ * |
| | | .ä¿®æ¹ç¨æ·å¯ç æ¶ä½¿ç¨MD5+Saltå¯ç |
| | | .è§£å³Swagger-UIæ æ³ä¼ éCookieä¿¡æ¯ |
| | | .å¯ç å¤æåº¦éªè¯(8-20ä½å
å«åæ¯ãæ°ååç¹æ®å符) |
| | | .åå°æå¡è®¿é®æ·»å ç»å½éªè¯æ¦æªå¨ |
| | | .å¼åå颿¥å¿åè½ |
| | | .æ°æ®åºçæ§(Druid Monitor)+èªå¨ç»å½ |
| | | .ä¸è½½æä»¶å¹¶è®¾ç½®MIMEç±»å |
| | | |
| | | 1.Redisæå¡é
置强å¯ç ï¼SpringBootå¯ç¨å¯ç |
| | | 2.æ¹éä¿®æ¹ç¨æ·å¯ç |
| | | 3.ä¿®æ¹ææçæ¹éæ°å¢ãå é¤ãä¿®æ¹æ¥å£ |
| | | 4.使ç¨GDAL读åtifãshpãgdbæä»¶ |
| | | 5.5åéå¯ç é误5次æç»ç»å½ * << |
| | | 6.ä¸ä¼ æä»¶ï¼commons-fileuploadï¼ * |
| | | ---------------------------------------------------------------------------------------------------- |
| | | java è°ç¨gdal读ågdbæ°æ®ï¼linuxä¸javaè°ç¨gdalï¼ |
| | | https://blog.csdn.net/weixin_53853459/article/details/120954597 |
| | |
| | | http://localhost:12316/sign/toIndex |
| | | http://localhost:12316/sign/toLogin |
| | | http://127.0.0.1:12316/sign/toLogin?service=http://www.sina.com.cn |
| | | |
| | | .gdb > HFCP+LRRL + TFCA |
| | | .shp > F5004_WT.shp + F5004_WL.shp + F5004.shp |
| | | ---------------------------------------------------------------------------------------------------- |
| | | String path = System.getProperty("user.dir"); |
| | | |