ard-work/pom.xml
@@ -35,11 +35,15 @@ <groupId>net.java.jna</groupId> <artifactId>jna</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath> </dependency> <dependency> <groupId>net.java.examples</groupId> <artifactId>examples</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/examples.jar</systemPath> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -103,6 +107,33 @@ <artifactId>forest-spring-boot-starter</artifactId> <version>1.5.28</version> </dependency> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-common</artifactId> </dependency> <!--mybatis-plusä¾èµ--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.4.2</version> </dependency> <!--lombokä¾èµ--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> </build> </project> ard-work/src/main/java/com/ruoyi/client/ARDCarGPSLogInClient.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ package com.ruoyi.client; import com.alibaba.fastjson.JSON; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import com.squareup.okhttp.ResponseBody; import org.apache.commons.codec.digest.DigestUtils; import java.io.IOException; import java.util.HashMap; import java.util.Map; public class ARDCarGPSLogInClient { public static Map<String,Object> loginIn(String syURL,String userId,String password){ OkHttpClient okHttpClient = new OkHttpClient(); String passwordMd5 = DigestUtils.md5Hex(password); /*Request request = new Request.Builder() .url("http://116.182.15.14:9999/gps-web/api/login.jsp?"+"password="+passwordMd5+"&userId="+userId+"&loginType=user&loginWay=interface&loginLang=zh_CN") .build();*/ Request request = new Request.Builder() .url(syURL + "/gps-web/api/login.jsp?"+"password="+passwordMd5+"&userId="+userId+"&loginType=user&loginWay=interface&loginLang=zh_CN") .build(); Response response = null; try { response = okHttpClient.newCall(request).execute(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } response.headers(); //ååºå¤´ ResponseBody responseBody = response.body(); try { String message = responseBody.string();// ååºä½ Map<String,Object> map = (Map<String, Object>) JSON.parse(message); map.put("passwordMd5", passwordMd5); //System.out.println(message); return map; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return new HashMap(); } } } ard-work/src/main/java/com/ruoyi/client/ARDCarSYGPSClient.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,96 @@ package com.ruoyi.client; import com.alibaba.fastjson.JSON; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import com.squareup.okhttp.ResponseBody; import java.io.IOException; import java.util.HashMap; import java.util.Map; public class ARDCarSYGPSClient { /*private static String syURL; public static String getSyURL() { return syURL; } public static void setSyURL(String syURL) { syURL = syURL; }*/ //æ¥è¯¢æéå å ¨é¨è½¦é --车éå表 public static Map<String,Object> getCarGPSTeamList(String syURL,String userId,String sessionId){ OkHttpClient okHttpClient = new OkHttpClient(); /*Request request = new Request.Builder() .url("http://106.14.186.44:9999/gps-web/api/get_team_list.jsp?teamId=&userId="+userId+"&loginType=user&loginWay=interface&loginLang=zh_CN&appDevId=&appId=android&sessionId="+sessionId) .build();*/ /*Request request = new Request.Builder() .url("http://116.182.15.14:9999/gps-web/api/get_team_list.jsp?teamId=&userId="+userId+"&loginType=user&loginWay=interface&loginLang=zh_CN&appDevId=&appId=android&sessionId="+sessionId) .build();*/ Request request = new Request.Builder() .url(syURL + "/gps-web/api/get_team_list.jsp?teamId=&userId="+userId+"&loginType=user&loginWay=interface&loginLang=zh_CN&appDevId=&appId=android&sessionId="+sessionId) .build(); Response response = null; try { response = okHttpClient.newCall(request).execute(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } response.headers(); //ååºå¤´ ResponseBody responseBody = response.body(); try { String message = responseBody.string();// ååºä½ Map<String,Object> map = (Map<String, Object>) JSON.parse(message); //System.out.println(message); return map; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return new HashMap(); } } //æ ¹æ®è½¦éidæ¥è¯¢è½¦è¾ --车éè½¦è¾æ é级æ¥è¯¢ public static Map<String,Object> getCarListByTeamId(String syURL,String teamId,String sessionId){ OkHttpClient okHttpClient = new OkHttpClient(); /*Request request = new Request.Builder() .url("http://116.182.15.14:9999/gps-web/api/get_team_car_list.jsp?teamId="+teamId+"&video=false&sessionId="+sessionId) .build();*/ Request request = new Request.Builder() .url(syURL + "/gps-web/api/get_team_car_list.jsp?teamId="+teamId+"&video=false&sessionId="+sessionId) .build(); Response response = null; try { response = okHttpClient.newCall(request).execute(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } response.headers(); //ååºå¤´ ResponseBody responseBody = response.body(); try { String message = responseBody.string();// ååºä½ Map<String,Object> map = (Map<String, Object>) JSON.parse(message); return map; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return new HashMap(); } } } ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
@@ -1,13 +1,18 @@ package com.ruoyi.sy.controller; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.ruoyi.client.ARDCarGPSLogInClient; import com.ruoyi.client.ARDCarSYGPSClient; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.uuid.IdUtils; import com.ruoyi.sy.service.IArdSyUserService; import com.ruoyi.sy.service.SysParaService; import com.ruoyi.system.domain.SysConfig; import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.utils.httpclient.SYCarClient; @@ -45,6 +50,14 @@ @Autowired private ISysConfigService sysConfigService; private Map<Integer,Map<String,String>> logInMap = new HashMap(); @Autowired private SysParaService sysParaService; @Autowired private IArdSyUserService iArdSyUserService; /** * æ¥è¯¢ä¸ä¸è½¦è¾å表 @@ -208,4 +221,54 @@ } } @PreAuthorize("@ss.hasPermi('sy:syCar:allListByUser')") @PostMapping("allListByUser") @ApiOperation("æ ¹æ®ç¨æ·è·åä¸ä¸å表") public Map<String,Object> allListByUser(){ String usersId = SecurityUtils.getUserId(); Map<String, String> result = logInMap.get(Integer.parseInt(usersId)); String syURL = sysParaService.getSYURL(); if(result == null){ Map<String,Object> m = iArdSyUserService.selectArdSyUserByUsersId(Integer.parseInt(usersId)); if(m == null){ Map<String,Object> map0 = new HashMap(); map0.put("rspDesc", "å½åç»å½ç¨æ·æªææ¥è½¦è¾æé"); map0.put("rspCode", "0"); return map0; } Map<String, Object> result0 = ARDCarGPSLogInClient.loginIn(syURL,(String) m.get("userId"), (String) m.get("password")); result = new HashMap(); result.put("userId", (String) m.get("userId")); result.put("sessionId", (String) result0.get("sessionId")); } Map<String,Object> result0 = new HashMap(); try { result0 = ARDCarSYGPSClient.getCarGPSTeamList(syURL,result.get("userId"),result.get("sessionId"));// } catch (Exception e) { Map<String,Object> map = new HashMap(); map.put("rspCode", 0); map.put("list", new ArrayList()); return map; } int online = 0; for(Map<String,Object> map : (List<Map<String,Object>>) result0.get("list")){ Map<String,Object> resultMap = (Map<String, Object>) ARDCarSYGPSClient.getCarListByTeamId(syURL,(String)map.get("teamId"),result.get("sessionId")); List<Map<String,Object>> carList = (List<Map<String, Object>>) resultMap.get("carList"); for(Map<String,Object> m : carList){ if(((String) m.get("stateCn")).contains("å¨çº¿")){ online = online + 1; }else{ continue; } } for(Map<String,Object> m : (List<Map<String,Object>>) result0.get("list")){ if(((String) m.get("teamId")).equals(((String) map.get("teamId")))){ map.put("count", Integer.parseInt((String) m.get("carNum"))); } } map.put("online", online); online = 0; } return result0; } } ard-work/src/main/java/com/ruoyi/sy/domain/SysPara.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ package com.ruoyi.sy.domain; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; /** * @author 11441 */ @Data @TableName("sys_para") public class SysPara { private String sysId; private String sysName; private String sysType; private String sysContent; } ard-work/src/main/java/com/ruoyi/sy/domain/SysParaExample.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,480 @@ package com.ruoyi.sy.domain; import java.util.ArrayList; import java.util.List; public class SysParaExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public SysParaExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andSysIdIsNull() { addCriterion("sys_id is null"); return (Criteria) this; } public Criteria andSysIdIsNotNull() { addCriterion("sys_id is not null"); return (Criteria) this; } public Criteria andSysIdEqualTo(String value) { addCriterion("sys_id =", value, "sysId"); return (Criteria) this; } public Criteria andSysIdNotEqualTo(String value) { addCriterion("sys_id <>", value, "sysId"); return (Criteria) this; } public Criteria andSysIdGreaterThan(String value) { addCriterion("sys_id >", value, "sysId"); return (Criteria) this; } public Criteria andSysIdGreaterThanOrEqualTo(String value) { addCriterion("sys_id >=", value, "sysId"); return (Criteria) this; } public Criteria andSysIdLessThan(String value) { addCriterion("sys_id <", value, "sysId"); return (Criteria) this; } public Criteria andSysIdLessThanOrEqualTo(String value) { addCriterion("sys_id <=", value, "sysId"); return (Criteria) this; } public Criteria andSysIdLike(String value) { addCriterion("sys_id like", value, "sysId"); return (Criteria) this; } public Criteria andSysIdNotLike(String value) { addCriterion("sys_id not like", value, "sysId"); return (Criteria) this; } public Criteria andSysIdIn(List<String> values) { addCriterion("sys_id in", values, "sysId"); return (Criteria) this; } public Criteria andSysIdNotIn(List<String> values) { addCriterion("sys_id not in", values, "sysId"); return (Criteria) this; } public Criteria andSysIdBetween(String value1, String value2) { addCriterion("sys_id between", value1, value2, "sysId"); return (Criteria) this; } public Criteria andSysIdNotBetween(String value1, String value2) { addCriterion("sys_id not between", value1, value2, "sysId"); return (Criteria) this; } public Criteria andSysNameIsNull() { addCriterion("sys_name is null"); return (Criteria) this; } public Criteria andSysNameIsNotNull() { addCriterion("sys_name is not null"); return (Criteria) this; } public Criteria andSysNameEqualTo(String value) { addCriterion("sys_name =", value, "sysName"); return (Criteria) this; } public Criteria andSysNameNotEqualTo(String value) { addCriterion("sys_name <>", value, "sysName"); return (Criteria) this; } public Criteria andSysNameGreaterThan(String value) { addCriterion("sys_name >", value, "sysName"); return (Criteria) this; } public Criteria andSysNameGreaterThanOrEqualTo(String value) { addCriterion("sys_name >=", value, "sysName"); return (Criteria) this; } public Criteria andSysNameLessThan(String value) { addCriterion("sys_name <", value, "sysName"); return (Criteria) this; } public Criteria andSysNameLessThanOrEqualTo(String value) { addCriterion("sys_name <=", value, "sysName"); return (Criteria) this; } public Criteria andSysNameLike(String value) { addCriterion("sys_name like", value, "sysName"); return (Criteria) this; } public Criteria andSysNameNotLike(String value) { addCriterion("sys_name not like", value, "sysName"); return (Criteria) this; } public Criteria andSysNameIn(List<String> values) { addCriterion("sys_name in", values, "sysName"); return (Criteria) this; } public Criteria andSysNameNotIn(List<String> values) { addCriterion("sys_name not in", values, "sysName"); return (Criteria) this; } public Criteria andSysNameBetween(String value1, String value2) { addCriterion("sys_name between", value1, value2, "sysName"); return (Criteria) this; } public Criteria andSysNameNotBetween(String value1, String value2) { addCriterion("sys_name not between", value1, value2, "sysName"); return (Criteria) this; } public Criteria andSysTypeIsNull() { addCriterion("sys_type is null"); return (Criteria) this; } public Criteria andSysTypeIsNotNull() { addCriterion("sys_type is not null"); return (Criteria) this; } public Criteria andSysTypeEqualTo(String value) { addCriterion("sys_type =", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeNotEqualTo(String value) { addCriterion("sys_type <>", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeGreaterThan(String value) { addCriterion("sys_type >", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeGreaterThanOrEqualTo(String value) { addCriterion("sys_type >=", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeLessThan(String value) { addCriterion("sys_type <", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeLessThanOrEqualTo(String value) { addCriterion("sys_type <=", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeLike(String value) { addCriterion("sys_type like", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeNotLike(String value) { addCriterion("sys_type not like", value, "sysType"); return (Criteria) this; } public Criteria andSysTypeIn(List<String> values) { addCriterion("sys_type in", values, "sysType"); return (Criteria) this; } public Criteria andSysTypeNotIn(List<String> values) { addCriterion("sys_type not in", values, "sysType"); return (Criteria) this; } public Criteria andSysTypeBetween(String value1, String value2) { addCriterion("sys_type between", value1, value2, "sysType"); return (Criteria) this; } public Criteria andSysTypeNotBetween(String value1, String value2) { addCriterion("sys_type not between", value1, value2, "sysType"); return (Criteria) this; } public Criteria andSysContentIsNull() { addCriterion("sys_content is null"); return (Criteria) this; } public Criteria andSysContentIsNotNull() { addCriterion("sys_content is not null"); return (Criteria) this; } public Criteria andSysContentEqualTo(String value) { addCriterion("sys_content =", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentNotEqualTo(String value) { addCriterion("sys_content <>", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentGreaterThan(String value) { addCriterion("sys_content >", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentGreaterThanOrEqualTo(String value) { addCriterion("sys_content >=", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentLessThan(String value) { addCriterion("sys_content <", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentLessThanOrEqualTo(String value) { addCriterion("sys_content <=", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentLike(String value) { addCriterion("sys_content like", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentNotLike(String value) { addCriterion("sys_content not like", value, "sysContent"); return (Criteria) this; } public Criteria andSysContentIn(List<String> values) { addCriterion("sys_content in", values, "sysContent"); return (Criteria) this; } public Criteria andSysContentNotIn(List<String> values) { addCriterion("sys_content not in", values, "sysContent"); return (Criteria) this; } public Criteria andSysContentBetween(String value1, String value2) { addCriterion("sys_content between", value1, value2, "sysContent"); return (Criteria) this; } public Criteria andSysContentNotBetween(String value1, String value2) { addCriterion("sys_content not between", value1, value2, "sysContent"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ard-work/src/main/java/com/ruoyi/sy/mapper/ArdSyUserMapper.java
@@ -75,4 +75,6 @@ * æ¥è¯¢æªææ¥ä¸ä¸è½¦è¾ç4.0ç¨æ· */ public List<SysUser> getSysUserNoSY(); Map<String,Object> selectArdSyUserByUsersId(Integer usersId); } ard-work/src/main/java/com/ruoyi/sy/mapper/SysParaMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package com.ruoyi.sy.mapper; import com.baomidou.dynamic.datasource.annotation.DS; import com.ruoyi.sy.domain.SysPara; import com.ruoyi.sy.domain.SysParaExample; import java.util.List; /** * @author 11441 */ @DS("slave") public interface SysParaMapper { public List<SysPara> selectByExample(SysParaExample example); } ard-work/src/main/java/com/ruoyi/sy/service/IArdSyUserService.java
@@ -73,4 +73,6 @@ * æ¥è¯¢æªææ¥ä¸ä¸è½¦è¾ç4.0ç¨æ· */ public List<SysUser> getSysUserNoSY(); Map<String,Object> selectArdSyUserByUsersId(Integer usersId); } ard-work/src/main/java/com/ruoyi/sy/service/SysParaService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ package com.ruoyi.sy.service; import java.util.List; import java.util.Map; /** * @author 11441 */ public interface SysParaService { String getSYURL(); } ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyUserServiceImpl.java
@@ -115,4 +115,10 @@ List<SysUser> result = ardSyUserMapper.getSysUserNoSY(); return result; } @Override public Map<String,Object> selectArdSyUserByUsersId(Integer usersId) { Map<String,Object> result = ardSyUserMapper.selectArdSyUserByUsersId(usersId); return result; } } ard-work/src/main/java/com/ruoyi/sy/service/impl/SysParaServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,36 @@ package com.ruoyi.sy.service.impl; import com.ruoyi.sy.domain.SysPara; import com.ruoyi.sy.domain.SysParaExample; import com.ruoyi.sy.mapper.SysParaMapper; import com.ruoyi.sy.service.SysParaService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; /** * @author 11441 */ @Service public class SysParaServiceImpl implements SysParaService { @Resource private SysParaMapper sysParaMapper; @Override public String getSYURL() { SysParaExample example = new SysParaExample(); example.createCriteria().andSysTypeEqualTo("syCarPT"); List<SysPara> result = sysParaMapper.selectByExample(example); if(result.size() > 0){ String SYURL = result.get(0).getSysContent(); return SYURL; }else{ return ""; } } } ard-work/src/main/resources/lib/examples.jarBinary files differ
ard-work/src/main/resources/lib/jna.jarBinary files differ
ard-work/src/main/resources/mapper/sy/ArdSyUserMapper.xml
@@ -124,4 +124,12 @@ select * from sys_user su where su.del_flag = '0' and su.user_id not in (select asu.sys_user_id from ard_sy_user asu) </select> <select id="selectArdSyUserByUsersId" resultType="java.util.Map" parameterType="java.lang.Integer" > select asu.id,asu.user_id as userId,asu.password, aus.users_id as usersId,au.name from ard_sy_user asu inner join ard_users_sy aus on asu.id = aus.sy_user_id inner join ard_users au on aus.users_id = au.id where aus.users_id = #{usersId} </select> </mapper> ard-work/src/main/resources/mapper/sy/SysParaMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,57 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper namespace="com.ruoyi.sy.mapper.SysParaMapper" > <resultMap id="BaseResultMap" type="com.ruoyi.sy.domain.SysPara" > <id column="sys_id" property="sysId" jdbcType="VARCHAR" /> <result column="sys_name" property="sysName" jdbcType="VARCHAR" /> <result column="sys_type" property="sysType" jdbcType="VARCHAR" /> <result column="sys_content" property="sysContent" jdbcType="VARCHAR" /> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > sys_id, sys_name, sys_type, sys_content </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.ruoyi.sy.domain.SysParaExample" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from sys_para <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> </select> </mapper> ruoyi-admin/pom.xml
@@ -75,6 +75,10 @@ <artifactId>ard-work</artifactId> <version>3.8.5</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> </dependency> </dependencies> <build> ruoyi-admin/src/main/resources/application-ard.yml
@@ -17,10 +17,12 @@ #mqtt mqtt: host: tcp://192.168.1.15:1883 clientId: m3 clientId: m241 username: admin password: xzx12345 topic: tube,stealelec,radar timeout: 100 keepalive: 60 enabled: true mediamtx: host: 127.0.0.1 ruoyi-admin/src/main/resources/application-druid.yml
@@ -15,10 +15,10 @@ # ä»åºæ°æ®æº slave: # 仿°æ®æºå¼å ³/é»è®¤å ³é enabled: false url: username: password: # enabled: true url: jdbc:postgresql://112.98.126.2:35432/ard732 username: postgres password: Yykj.2017 # åå§è¿æ¥æ° initialSize: 5 # æå°è¿æ¥æ± æ°é ruoyi-admin/src/main/resources/application.yml
@@ -109,6 +109,8 @@ mapperLocations: classpath*:mapper/**/*Mapper.xml # å è½½å ¨å±çé ç½®æä»¶ configLocation: classpath:mybatis/mybatis-config.xml mybatis-plus: mapper-locations: classpath:mapper/*.xml #æ«æmapperä¸çææxmlæä»¶ # PageHelperå页æä»¶ pagehelper: ruoyi-common/pom.xml
@@ -14,6 +14,18 @@ <description> commonéç¨å·¥å · </description> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>8</source> <target>8</target> </configuration> </plugin> </plugins> </build> <dependencies>