rename to budd
parent
2254853ef4
commit
e3afda9ffa
|
@ -12,4 +12,4 @@ target
|
||||||
/useful-code.iml
|
/useful-code.iml
|
||||||
/.idea
|
/.idea
|
||||||
/resources/debug.log
|
/resources/debug.log
|
||||||
java-utils.iml
|
*.iml
|
|
@ -1,9 +1,9 @@
|
||||||
# java-utils
|
# Budd
|
||||||
|
|
||||||
[![license](https://badgen.net/badge/license/MIT/blue)](./LICENSE)
|
[![license](https://badgen.net/badge/license/MIT/blue)](./LICENSE)
|
||||||
[![](https://badgen.net/github/commits/ehlxr/java-utils)](https://github.com/ehlxr/java-utils/commits/)
|
[![](https://badgen.net/github/commits/ehlxr/budd)](https://github.com/ehlxr/budd/commits/)
|
||||||
[![](https://badgen.net/github/last-commit/ehlxr/java-utils)]((https://github.com/ehlxr/java-utils/commits/))
|
[![](https://badgen.net/github/last-commit/ehlxr/budd)]((https://github.com/ehlxr/budd/commits/))
|
||||||
[![](https://badgen.net/github/releases/ehlxr/java-utils)](https://github.com/ehlxr/java-utils/releases)
|
[![](https://badgen.net/github/releases/ehlxr/budd)](https://github.com/ehlxr/budd/releases)
|
||||||
|
|
||||||
common utils of java
|
common utils of java
|
||||||
|
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -1,12 +1,12 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>osc.git.eh3</groupId>
|
<groupId>io.github.budd</groupId>
|
||||||
<artifactId>java-utils</artifactId>
|
<artifactId>budd</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>java-utils</name>
|
<name>budd</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -323,7 +323,7 @@
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<finalName>java-utils</finalName>
|
<finalName>budd</finalName>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- mybatis-generator 插件; Run AS——>Maven Build… ——>在Goals框中输入:mybatis-generator:generate -->
|
<!-- mybatis-generator 插件; Run AS——>Maven Build… ——>在Goals框中输入:mybatis-generator:generate -->
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
package com.lk.phr.dao;
|
|
||||||
|
|
||||||
import com.lk.phr.model.UserQuotaModel;
|
|
||||||
|
|
||||||
public interface UserQuotaDao {
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method corresponds to the database table user_quota
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method corresponds to the database table user_quota
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
int insert(UserQuotaModel record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method corresponds to the database table user_quota
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
int insertSelective(UserQuotaModel record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method corresponds to the database table user_quota
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
UserQuotaModel selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method corresponds to the database table user_quota
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(UserQuotaModel record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method corresponds to the database table user_quota
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKey(UserQuotaModel record);
|
|
||||||
}
|
|
|
@ -1,240 +0,0 @@
|
||||||
<?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">
|
|
||||||
<!--suppress SqlDialectInspection -->
|
|
||||||
<mapper namespace="com.lk.phr.dao.UserQuotaDao">
|
|
||||||
<resultMap id="BaseResultMap" type="com.lk.phr.model.UserQuotaModel">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
||||||
<result column="medical" jdbcType="BIT" property="medical"/>
|
|
||||||
<result column="user_history_seq_no" jdbcType="BIGINT" property="userHistorySeqNo"/>
|
|
||||||
<result column="user_id" jdbcType="BIGINT" property="userId"/>
|
|
||||||
<result column="quota_code" jdbcType="VARCHAR" property="quotaCode"/>
|
|
||||||
<result column="quota_value" jdbcType="VARCHAR" property="quotaValue"/>
|
|
||||||
<result column="min_value" jdbcType="DOUBLE" property="minValue"/>
|
|
||||||
<result column="max_value" jdbcType="DOUBLE" property="maxValue"/>
|
|
||||||
<result column="flag" jdbcType="INTEGER" property="flag"/>
|
|
||||||
<result column="updated" jdbcType="TIMESTAMP" property="updated"/>
|
|
||||||
<result column="created" jdbcType="TIMESTAMP" property="created"/>
|
|
||||||
<result column="check_date" jdbcType="TIMESTAMP" property="checkDate"/>
|
|
||||||
<result column="device_sn" jdbcType="VARCHAR" property="deviceSn"/>
|
|
||||||
<result column="device_no" jdbcType="VARCHAR" property="deviceNo"/>
|
|
||||||
<result column="phr_uid" jdbcType="BIGINT" property="phrUid"/>
|
|
||||||
<result column="device_brand" jdbcType="VARCHAR" property="deviceBrand"/>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, medical, user_history_seq_no, user_id, quota_code, quota_value, min_value, max_value,
|
|
||||||
flag, updated, created, check_date, device_sn, device_no, phr_uid, device_brand
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
<!--
|
|
||||||
WARNING - @mbg.generated
|
|
||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
|
||||||
-->
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from user_quota
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
<!--
|
|
||||||
WARNING - @mbg.generated
|
|
||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
|
||||||
-->
|
|
||||||
delete from user_quota
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
||||||
insert into user_quota (id, medical, user_history_seq_no,
|
|
||||||
user_id, quota_code, quota_value,
|
|
||||||
min_value, max_value, flag,
|
|
||||||
updated, created, check_date,
|
|
||||||
device_sn, device_no, phr_uid,
|
|
||||||
device_brand)
|
|
||||||
values (#{id,jdbcType=BIGINT}, #{medical,jdbcType=BIT}, #{userHistorySeqNo,jdbcType=BIGINT},
|
|
||||||
#{userId,jdbcType=BIGINT}, #{quotaCode,jdbcType=VARCHAR}, #{quotaValue,jdbcType=VARCHAR},
|
|
||||||
#{minValue,jdbcType=DOUBLE}, #{maxValue,jdbcType=DOUBLE}, #{flag,jdbcType=INTEGER},
|
|
||||||
#{updated,jdbcType=TIMESTAMP}, #{created,jdbcType=TIMESTAMP}, #{checkDate,jdbcType=TIMESTAMP},
|
|
||||||
#{deviceSn,jdbcType=VARCHAR}, #{deviceNo,jdbcType=VARCHAR}, #{phrUid,jdbcType=BIGINT},
|
|
||||||
#{deviceBrand,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
||||||
insert into user_quota
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="medical != null">
|
|
||||||
medical,
|
|
||||||
</if>
|
|
||||||
<if test="userHistorySeqNo != null">
|
|
||||||
user_history_seq_no,
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="quotaCode != null">
|
|
||||||
quota_code,
|
|
||||||
</if>
|
|
||||||
<if test="quotaValue != null">
|
|
||||||
quota_value,
|
|
||||||
</if>
|
|
||||||
<if test="minValue != null">
|
|
||||||
min_value,
|
|
||||||
</if>
|
|
||||||
<if test="maxValue != null">
|
|
||||||
max_value,
|
|
||||||
</if>
|
|
||||||
<if test="flag != null">
|
|
||||||
flag,
|
|
||||||
</if>
|
|
||||||
<if test="updated != null">
|
|
||||||
updated,
|
|
||||||
</if>
|
|
||||||
<if test="created != null">
|
|
||||||
created,
|
|
||||||
</if>
|
|
||||||
<if test="checkDate != null">
|
|
||||||
check_date,
|
|
||||||
</if>
|
|
||||||
<if test="deviceSn != null">
|
|
||||||
device_sn,
|
|
||||||
</if>
|
|
||||||
<if test="deviceNo != null">
|
|
||||||
device_no,
|
|
||||||
</if>
|
|
||||||
<if test="phrUid != null">
|
|
||||||
phr_uid,
|
|
||||||
</if>
|
|
||||||
<if test="deviceBrand != null">
|
|
||||||
device_brand,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
#{id,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="medical != null">
|
|
||||||
#{medical,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="userHistorySeqNo != null">
|
|
||||||
#{userHistorySeqNo,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
#{userId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="quotaCode != null">
|
|
||||||
#{quotaCode,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="quotaValue != null">
|
|
||||||
#{quotaValue,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="minValue != null">
|
|
||||||
#{minValue,jdbcType=DOUBLE},
|
|
||||||
</if>
|
|
||||||
<if test="maxValue != null">
|
|
||||||
#{maxValue,jdbcType=DOUBLE},
|
|
||||||
</if>
|
|
||||||
<if test="flag != null">
|
|
||||||
#{flag,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="updated != null">
|
|
||||||
#{updated,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="created != null">
|
|
||||||
#{created,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="checkDate != null">
|
|
||||||
#{checkDate,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="deviceSn != null">
|
|
||||||
#{deviceSn,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deviceNo != null">
|
|
||||||
#{deviceNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="phrUid != null">
|
|
||||||
#{phrUid,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="deviceBrand != null">
|
|
||||||
#{deviceBrand,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
||||||
<!--
|
|
||||||
WARNING - @mbg.generated
|
|
||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
|
||||||
-->
|
|
||||||
update user_quota
|
|
||||||
<set>
|
|
||||||
<if test="medical != null">
|
|
||||||
medical = #{medical,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="userHistorySeqNo != null">
|
|
||||||
user_history_seq_no = #{userHistorySeqNo,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id = #{userId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="quotaCode != null">
|
|
||||||
quota_code = #{quotaCode,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="quotaValue != null">
|
|
||||||
quota_value = #{quotaValue,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="minValue != null">
|
|
||||||
min_value = #{minValue,jdbcType=DOUBLE},
|
|
||||||
</if>
|
|
||||||
<if test="maxValue != null">
|
|
||||||
max_value = #{maxValue,jdbcType=DOUBLE},
|
|
||||||
</if>
|
|
||||||
<if test="flag != null">
|
|
||||||
flag = #{flag,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="updated != null">
|
|
||||||
updated = #{updated,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="created != null">
|
|
||||||
created = #{created,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="checkDate != null">
|
|
||||||
check_date = #{checkDate,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="deviceSn != null">
|
|
||||||
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deviceNo != null">
|
|
||||||
device_no = #{deviceNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="phrUid != null">
|
|
||||||
phr_uid = #{phrUid,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="deviceBrand != null">
|
|
||||||
device_brand = #{deviceBrand,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
||||||
<!--
|
|
||||||
WARNING - @mbg.generated
|
|
||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
|
||||||
-->
|
|
||||||
update user_quota
|
|
||||||
set medical = #{medical,jdbcType=BIT},
|
|
||||||
user_history_seq_no = #{userHistorySeqNo,jdbcType=BIGINT},
|
|
||||||
user_id = #{userId,jdbcType=BIGINT},
|
|
||||||
quota_code = #{quotaCode,jdbcType=VARCHAR},
|
|
||||||
quota_value = #{quotaValue,jdbcType=VARCHAR},
|
|
||||||
min_value = #{minValue,jdbcType=DOUBLE},
|
|
||||||
max_value = #{maxValue,jdbcType=DOUBLE},
|
|
||||||
flag = #{flag,jdbcType=INTEGER},
|
|
||||||
updated = #{updated,jdbcType=TIMESTAMP},
|
|
||||||
created = #{created,jdbcType=TIMESTAMP},
|
|
||||||
check_date = #{checkDate,jdbcType=TIMESTAMP},
|
|
||||||
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
||||||
device_no = #{deviceNo,jdbcType=VARCHAR},
|
|
||||||
phr_uid = #{phrUid,jdbcType=BIGINT},
|
|
||||||
device_brand = #{deviceBrand,jdbcType=VARCHAR}
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
|
@ -1,570 +0,0 @@
|
||||||
package com.lk.phr.model;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* This class was generated by MyBatis Generator.
|
|
||||||
* This class corresponds to the database table user_quota
|
|
||||||
*/
|
|
||||||
public class UserQuotaModel {
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* id
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.id
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* medical
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.medical
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Boolean medical;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* user_history序列号
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.user_history_seq_no
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Long userHistorySeqNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* user_id
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.user_id
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 指标Code
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.quota_code
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private String quotaCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 指标值
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.quota_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private String quotaValue;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 指标最小值
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.min_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Double minValue;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 指标最大值
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.max_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Double maxValue;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* flag
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.flag
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Integer flag;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* updated
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.updated
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Date updated;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* created
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.created
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Date created;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 监测日期
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.check_date
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Date checkDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 设备编码
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.device_sn
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private String deviceSn;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 设备序列号
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.device_no
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private String deviceNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* phr体系内用户id
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.phr_uid
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private Long phrUid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database Column Remarks:
|
|
||||||
* 设备品牌
|
|
||||||
*
|
|
||||||
* This field was generated by MyBatis Generator.
|
|
||||||
* This field corresponds to the database column user_quota.device_brand
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
private String deviceBrand;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.id
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.id
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.id
|
|
||||||
*
|
|
||||||
* @param id the value for user_quota.id
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.medical
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.medical
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Boolean getMedical() {
|
|
||||||
return medical;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.medical
|
|
||||||
*
|
|
||||||
* @param medical the value for user_quota.medical
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setMedical(Boolean medical) {
|
|
||||||
this.medical = medical;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.user_history_seq_no
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.user_history_seq_no
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Long getUserHistorySeqNo() {
|
|
||||||
return userHistorySeqNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.user_history_seq_no
|
|
||||||
*
|
|
||||||
* @param userHistorySeqNo the value for user_quota.user_history_seq_no
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setUserHistorySeqNo(Long userHistorySeqNo) {
|
|
||||||
this.userHistorySeqNo = userHistorySeqNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.user_id
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.user_id
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Long getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.user_id
|
|
||||||
*
|
|
||||||
* @param userId the value for user_quota.user_id
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setUserId(Long userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.quota_code
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.quota_code
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public String getQuotaCode() {
|
|
||||||
return quotaCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.quota_code
|
|
||||||
*
|
|
||||||
* @param quotaCode the value for user_quota.quota_code
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setQuotaCode(String quotaCode) {
|
|
||||||
this.quotaCode = quotaCode == null ? null : quotaCode.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.quota_value
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.quota_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public String getQuotaValue() {
|
|
||||||
return quotaValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.quota_value
|
|
||||||
*
|
|
||||||
* @param quotaValue the value for user_quota.quota_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setQuotaValue(String quotaValue) {
|
|
||||||
this.quotaValue = quotaValue == null ? null : quotaValue.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.min_value
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.min_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Double getMinValue() {
|
|
||||||
return minValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.min_value
|
|
||||||
*
|
|
||||||
* @param minValue the value for user_quota.min_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setMinValue(Double minValue) {
|
|
||||||
this.minValue = minValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.max_value
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.max_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Double getMaxValue() {
|
|
||||||
return maxValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.max_value
|
|
||||||
*
|
|
||||||
* @param maxValue the value for user_quota.max_value
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setMaxValue(Double maxValue) {
|
|
||||||
this.maxValue = maxValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.flag
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.flag
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Integer getFlag() {
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.flag
|
|
||||||
*
|
|
||||||
* @param flag the value for user_quota.flag
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setFlag(Integer flag) {
|
|
||||||
this.flag = flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.updated
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.updated
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Date getUpdated() {
|
|
||||||
return updated;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.updated
|
|
||||||
*
|
|
||||||
* @param updated the value for user_quota.updated
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setUpdated(Date updated) {
|
|
||||||
this.updated = updated;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.created
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.created
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Date getCreated() {
|
|
||||||
return created;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.created
|
|
||||||
*
|
|
||||||
* @param created the value for user_quota.created
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setCreated(Date created) {
|
|
||||||
this.created = created;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.check_date
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.check_date
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Date getCheckDate() {
|
|
||||||
return checkDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.check_date
|
|
||||||
*
|
|
||||||
* @param checkDate the value for user_quota.check_date
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setCheckDate(Date checkDate) {
|
|
||||||
this.checkDate = checkDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.device_sn
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.device_sn
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public String getDeviceSn() {
|
|
||||||
return deviceSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.device_sn
|
|
||||||
*
|
|
||||||
* @param deviceSn the value for user_quota.device_sn
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setDeviceSn(String deviceSn) {
|
|
||||||
this.deviceSn = deviceSn == null ? null : deviceSn.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.device_no
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.device_no
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public String getDeviceNo() {
|
|
||||||
return deviceNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.device_no
|
|
||||||
*
|
|
||||||
* @param deviceNo the value for user_quota.device_no
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setDeviceNo(String deviceNo) {
|
|
||||||
this.deviceNo = deviceNo == null ? null : deviceNo.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.phr_uid
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.phr_uid
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public Long getPhrUid() {
|
|
||||||
return phrUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.phr_uid
|
|
||||||
*
|
|
||||||
* @param phrUid the value for user_quota.phr_uid
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setPhrUid(Long phrUid) {
|
|
||||||
this.phrUid = phrUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method returns the value of the database column user_quota.device_brand
|
|
||||||
*
|
|
||||||
* @return the value of user_quota.device_brand
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public String getDeviceBrand() {
|
|
||||||
return deviceBrand;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method was generated by MyBatis Generator.
|
|
||||||
* This method sets the value of the database column user_quota.device_brand
|
|
||||||
*
|
|
||||||
* @param deviceBrand the value for user_quota.device_brand
|
|
||||||
*
|
|
||||||
* @mbg.generated
|
|
||||||
*/
|
|
||||||
public void setDeviceBrand(String deviceBrand) {
|
|
||||||
this.deviceBrand = deviceBrand == null ? null : deviceBrand.trim();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2017/8/3.
|
* Created by ehlxr on 2017/8/3.
|
||||||
|
@ -68,7 +68,7 @@ public class CharToHex {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String toUnicode(String s) {
|
public static String toUnicode(String s) {
|
||||||
String as[] = new String[s.length()];
|
String[] as = new String[s.length()];
|
||||||
StringBuilder s1 = new StringBuilder();
|
StringBuilder s1 = new StringBuilder();
|
||||||
for (int i = 0; i < s.length(); i++) {
|
for (int i = 0; i < s.length(); i++) {
|
||||||
as[i] = Integer.toHexString(s.charAt(i) & 0xffff);
|
as[i] = Integer.toHexString(s.charAt(i) & 0xffff);
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
//
|
//
|
||||||
// import cn.ceres.did.client.SdkClient;
|
// import cn.ceres.did.client.SdkClient;
|
||||||
// import cn.ceres.did.sdk.SdkProto;
|
// import cn.ceres.did.sdk.SdkProto;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.management.*;
|
import java.lang.management.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ import java.io.*;
|
||||||
* @author ehlxr
|
* @author ehlxr
|
||||||
*/
|
*/
|
||||||
public class FindRequestMapping {
|
public class FindRequestMapping {
|
||||||
private static int total = 0;
|
private static final int total = 0;
|
||||||
private static int unDeal = 0;
|
private static final int unDeal = 0;
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
File dir = new File("/Users/ehlxr/WorkSpaces/enncloud/ceres-epns/ceres-epns-web/src/main/java/com/ceres/epns/web");
|
File dir = new File("/Users/ehlxr/WorkSpaces/enncloud/ceres-epns/ceres-epns-web/src/main/java/com/ceres/epns/web");
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ public class Modify {
|
||||||
|
|
||||||
private final String target;
|
private final String target;
|
||||||
private final String newContent;
|
private final String newContent;
|
||||||
private String path;
|
private final String path;
|
||||||
|
|
||||||
public Modify(String path, String target, String newContent) {
|
public Modify(String path, String target, String newContent) {
|
||||||
// 操作目录。从该目录开始。该文件目录下及其所有子目录的文件都将被替换。
|
// 操作目录。从该目录开始。该文件目录下及其所有子目录的文件都将被替换。
|
||||||
|
@ -33,7 +33,7 @@ public class Modify {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
//代码测试:假设有一个test文件夹,test文件夹下含有若干文件或者若干子目录,子目录下可能也含有若干文件或者若干子目录(意味着可以递归操作)。
|
//代码测试:假设有一个test文件夹,test文件夹下含有若干文件或者若干子目录,子目录下可能也含有若干文件或者若干子目录(意味着可以递归操作)。
|
||||||
//把test目录下以及所有子目录下(如果有)中文件含有"hi"的字符串行替换成新的"hello,world!"字符串行。
|
//把test目录下以及所有子目录下(如果有)中文件含有"hi"的字符串行替换成新的"hello,world!"字符串行。
|
||||||
new Modify("/Users/ehlxr/WorkSpaces/java-utils/src/main/java/me/ehlxr/test.txt", "hi", "hello,world!");
|
new Modify("/Users/ehlxr/WorkSpaces/budd/src/main/java/me/ehlxr/test.txt", "hi", "hello,world!");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void operation() {
|
private void operation() {
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2018/2/13.
|
* Created by ehlxr on 2018/2/13.
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ehlxr
|
* @author ehlxr
|
||||||
|
@ -10,7 +10,7 @@ public class ReferenceCountingGC {
|
||||||
/**
|
/**
|
||||||
* 这个成员属性的唯一意义就是占点内存,以便在能在 GC 日志中看清楚是否有回收过
|
* 这个成员属性的唯一意义就是占点内存,以便在能在 GC 日志中看清楚是否有回收过
|
||||||
*/
|
*/
|
||||||
private byte[] bigSize = new byte[2 * _1MB];
|
private final byte[] bigSize = new byte[2 * _1MB];
|
||||||
|
|
||||||
public static void testGC() {
|
public static void testGC() {
|
||||||
ReferenceCountingGC objA = new ReferenceCountingGC();
|
ReferenceCountingGC objA = new ReferenceCountingGC();
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,12 +64,12 @@ public class SnowflakeIdWorker {
|
||||||
/**
|
/**
|
||||||
* 工作机器ID(0~31)
|
* 工作机器ID(0~31)
|
||||||
*/
|
*/
|
||||||
private long workerId;
|
private final long workerId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据中心ID(0~31)
|
* 数据中心ID(0~31)
|
||||||
*/
|
*/
|
||||||
private long datacenterId;
|
private final long datacenterId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 毫秒内序列(0~4095)
|
* 毫秒内序列(0~4095)
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2018/1/16.
|
* Created by ehlxr on 2018/1/16.
|
|
@ -1,15 +1,9 @@
|
||||||
package me.ehlxr.activemq;
|
package io.github.ehlxr.activemq;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnection;
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
|
|
||||||
import javax.jms.Connection;
|
import javax.jms.*;
|
||||||
import javax.jms.ConnectionFactory;
|
|
||||||
import javax.jms.Destination;
|
|
||||||
import javax.jms.JMSException;
|
|
||||||
import javax.jms.MessageConsumer;
|
|
||||||
import javax.jms.Session;
|
|
||||||
import javax.jms.TextMessage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息的消费者(接受者)
|
* 消息的消费者(接受者)
|
|
@ -1,15 +1,9 @@
|
||||||
package me.ehlxr.activemq;
|
package io.github.ehlxr.activemq;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnection;
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
|
|
||||||
import javax.jms.Connection;
|
import javax.jms.*;
|
||||||
import javax.jms.ConnectionFactory;
|
|
||||||
import javax.jms.Destination;
|
|
||||||
import javax.jms.JMSException;
|
|
||||||
import javax.jms.MessageProducer;
|
|
||||||
import javax.jms.Session;
|
|
||||||
import javax.jms.TextMessage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息的生产者(发送者)
|
* 消息的生产者(发送者)
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package me.ehlxr.annotation;
|
package io.github.ehlxr.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.annotation;
|
package io.github.ehlxr.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@PkgAnnotation
|
@PkgAnnotation
|
||||||
package me.ehlxr.annotation;
|
package io.github.ehlxr.annotation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 包内方法
|
* 包内方法
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
public class Test {
|
public class Test {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.cache;
|
package io.github.ehlxr.cache;
|
||||||
|
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr;
|
package io.github.ehlxr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2016/12/23.
|
* Created by ehlxr on 2016/12/23.
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.hashing;
|
package io.github.ehlxr.hashing;
|
||||||
|
|
||||||
public class Cluster {
|
public class Cluster {
|
||||||
private static final int SERVER_SIZE_MAX = 1024;
|
private static final int SERVER_SIZE_MAX = 1024;
|
||||||
|
|
||||||
private Server[] servers = new Server[SERVER_SIZE_MAX];
|
private final Server[] servers = new Server[SERVER_SIZE_MAX];
|
||||||
private int size = 0;
|
private int size = 0;
|
||||||
|
|
||||||
public void put(Entry e) {
|
public void put(Entry e) {
|
|
@ -1,7 +1,7 @@
|
||||||
package me.ehlxr.hashing;
|
package io.github.ehlxr.hashing;
|
||||||
|
|
||||||
public class Entry {
|
public class Entry {
|
||||||
private String key;
|
private final String key;
|
||||||
|
|
||||||
Entry(String key) {
|
Entry(String key) {
|
||||||
this.key = key;
|
this.key = key;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.hashing;
|
package io.github.ehlxr.hashing;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package me.ehlxr.hashing;
|
package io.github.ehlxr.hashing;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class Server {
|
public class Server {
|
||||||
private String name;
|
private final String name;
|
||||||
private Map<Entry, Entry> entries;
|
private final Map<Entry, Entry> entries;
|
||||||
|
|
||||||
Server(String name) {
|
Server(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.hashing.consistent;
|
package io.github.ehlxr.hashing.consistent;
|
||||||
|
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
@ -6,7 +6,7 @@ import java.util.TreeMap;
|
||||||
public class Cluster {
|
public class Cluster {
|
||||||
private static final int SERVER_SIZE_MAX = 1024;
|
private static final int SERVER_SIZE_MAX = 1024;
|
||||||
|
|
||||||
private SortedMap<Integer, Server> servers = new TreeMap<>();
|
private final SortedMap<Integer, Server> servers = new TreeMap<>();
|
||||||
private int size = 0;
|
private int size = 0;
|
||||||
|
|
||||||
public void put(Entry e) {
|
public void put(Entry e) {
|
|
@ -1,7 +1,7 @@
|
||||||
package me.ehlxr.hashing.consistent;
|
package io.github.ehlxr.hashing.consistent;
|
||||||
|
|
||||||
public class Entry {
|
public class Entry {
|
||||||
private String key;
|
private final String key;
|
||||||
|
|
||||||
Entry(String key) {
|
Entry(String key) {
|
||||||
this.key = key;
|
this.key = key;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.hashing.consistent;
|
package io.github.ehlxr.hashing.consistent;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
|
@ -1,10 +1,11 @@
|
||||||
package me.ehlxr.hashing.consistent;
|
package io.github.ehlxr.hashing.consistent;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class Server {
|
public class Server {
|
||||||
private String name;
|
private final String name;
|
||||||
private Map<Entry, Entry> entries;
|
private final Map<Entry, Entry> entries;
|
||||||
|
|
||||||
Server(String name) {
|
Server(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
|
@ -1,6 +1,6 @@
|
||||||
package me.ehlxr.hbase;
|
package io.github.ehlxr.hbase;
|
||||||
|
|
||||||
import me.ehlxr.utils.Pair;
|
import io.github.ehlxr.utils.Pair;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
import org.apache.hadoop.hbase.HBaseConfiguration;
|
||||||
import org.apache.hadoop.hbase.HColumnDescriptor;
|
import org.apache.hadoop.hbase.HColumnDescriptor;
|
|
@ -1,6 +1,6 @@
|
||||||
package me.ehlxr.hbase;
|
package io.github.ehlxr.hbase;
|
||||||
|
|
||||||
import me.ehlxr.utils.Pair;
|
import io.github.ehlxr.utils.Pair;
|
||||||
import org.apache.hadoop.hbase.client.Result;
|
import org.apache.hadoop.hbase.client.Result;
|
||||||
import org.apache.hadoop.hbase.client.ResultScanner;
|
import org.apache.hadoop.hbase.client.ResultScanner;
|
||||||
import org.apache.hadoop.hbase.filter.CompareFilter;
|
import org.apache.hadoop.hbase.filter.CompareFilter;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.leetcode;
|
package io.github.ehlxr.leetcode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4. 寻找两个正序数组的中位数
|
* 4. 寻找两个正序数组的中位数
|
|
@ -1,7 +1,6 @@
|
||||||
package me.ehlxr.leetcode;
|
package io.github.ehlxr.leetcode;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.PriorityQueue;
|
import java.util.PriorityQueue;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.pack;
|
package io.github.ehlxr.pack;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.pack;
|
package io.github.ehlxr.pack;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.powermock;
|
package io.github.ehlxr.powermock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2017/11/3.
|
* Created by ehlxr on 2017/11/3.
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.powermock;
|
package io.github.ehlxr.powermock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2017/11/3.
|
* Created by ehlxr on 2017/11/3.
|
||||||
|
@ -10,7 +10,7 @@ import java.io.File;
|
||||||
* Created by ehlxr on 2017/7/21.
|
* Created by ehlxr on 2017/7/21.
|
||||||
*/
|
*/
|
||||||
public class ClassUnderTest {
|
public class ClassUnderTest {
|
||||||
private String f1 = "test";
|
private final String f1 = "test";
|
||||||
|
|
||||||
public boolean callArgumentInstance(File file) {
|
public boolean callArgumentInstance(File file) {
|
||||||
return file.exists();
|
return file.exists();
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.powermock;
|
package io.github.ehlxr.powermock;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -41,7 +41,7 @@ public class TestClassUnderTest {
|
||||||
public void testCallFinalMethod() {
|
public void testCallFinalMethod() {
|
||||||
ClassDependency depencency = mock(ClassDependency.class);
|
ClassDependency depencency = mock(ClassDependency.class);
|
||||||
ClassUnderTest underTest = new ClassUnderTest();
|
ClassUnderTest underTest = new ClassUnderTest();
|
||||||
PowerMockito.when(depencency.isAlive()).thenReturn(true);
|
when(depencency.isAlive()).thenReturn(true);
|
||||||
Assert.assertTrue(underTest.callFinalMethod(depencency));
|
Assert.assertTrue(underTest.callFinalMethod(depencency));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ public class TestClassUnderTest {
|
||||||
public void testCallStaticMethod() {
|
public void testCallStaticMethod() {
|
||||||
ClassUnderTest underTest = new ClassUnderTest();
|
ClassUnderTest underTest = new ClassUnderTest();
|
||||||
PowerMockito.mockStatic(ClassDependency.class);
|
PowerMockito.mockStatic(ClassDependency.class);
|
||||||
PowerMockito.when(ClassDependency.isExist()).thenReturn(true);
|
when(ClassDependency.isExist()).thenReturn(true);
|
||||||
Assert.assertTrue(underTest.callStaticMethod());
|
Assert.assertTrue(underTest.callStaticMethod());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ public class TestClassUnderTest {
|
||||||
@PrepareForTest(ClassUnderTest.class)
|
@PrepareForTest(ClassUnderTest.class)
|
||||||
public void testCallPrivateMethod() throws Exception {
|
public void testCallPrivateMethod() throws Exception {
|
||||||
ClassUnderTest underTest = mock(ClassUnderTest.class);
|
ClassUnderTest underTest = mock(ClassUnderTest.class);
|
||||||
PowerMockito.when(underTest.callPrivateMethod()).thenCallRealMethod();
|
when(underTest.callPrivateMethod()).thenCallRealMethod();
|
||||||
PowerMockito.when(underTest, "isExist").thenReturn(true);
|
when(underTest, "isExist").thenReturn(true);
|
||||||
Assert.assertTrue(underTest.callPrivateMethod());
|
Assert.assertTrue(underTest.callPrivateMethod());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class TestClassUnderTest {
|
||||||
@PrepareForTest(ClassUnderTest.class)
|
@PrepareForTest(ClassUnderTest.class)
|
||||||
public void testCallVoidPrivateMethod() throws Exception {
|
public void testCallVoidPrivateMethod() throws Exception {
|
||||||
ClassUnderTest underTest = mock(ClassUnderTest.class);
|
ClassUnderTest underTest = mock(ClassUnderTest.class);
|
||||||
PowerMockito.when(underTest.callVoidPrivateMethod()).thenCallRealMethod();
|
when(underTest.callVoidPrivateMethod()).thenCallRealMethod();
|
||||||
PowerMockito.doNothing().when(underTest, "testVoid");
|
PowerMockito.doNothing().when(underTest, "testVoid");
|
||||||
Assert.assertTrue(underTest.callVoidPrivateMethod());
|
Assert.assertTrue(underTest.callVoidPrivateMethod());
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public class TestClassUnderTest {
|
||||||
@Test
|
@Test
|
||||||
@PrepareForTest(ClassUnderTest.class)
|
@PrepareForTest(ClassUnderTest.class)
|
||||||
public void testInvokPrivate() throws Exception {
|
public void testInvokPrivate() throws Exception {
|
||||||
ClassUnderTest underTest = spy(new ClassUnderTest());
|
ClassUnderTest underTest = PowerMockito.spy(new ClassUnderTest());
|
||||||
|
|
||||||
Whitebox.invokeMethod(underTest, "isExist");
|
Whitebox.invokeMethod(underTest, "isExist");
|
||||||
verifyPrivate(underTest).invoke("isExist");
|
verifyPrivate(underTest).invoke("isExist");
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.proxy;
|
package io.github.ehlxr.proxy;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.proxy;
|
package io.github.ehlxr.proxy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ehlxr
|
* @author ehlxr
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.proxy;
|
package io.github.ehlxr.proxy;
|
||||||
|
|
||||||
import java.lang.reflect.Proxy;
|
import java.lang.reflect.Proxy;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.proxy;
|
package io.github.ehlxr.proxy;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationHandler;
|
import java.lang.reflect.InvocationHandler;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
@ -9,7 +9,7 @@ import java.lang.reflect.Method;
|
||||||
* @since 2019-06-28.
|
* @since 2019-06-28.
|
||||||
*/
|
*/
|
||||||
public class MyInvocationHandler implements InvocationHandler {
|
public class MyInvocationHandler implements InvocationHandler {
|
||||||
private Bird bird;
|
private final Bird bird;
|
||||||
|
|
||||||
public MyInvocationHandler(Bird bird) {
|
public MyInvocationHandler(Bird bird) {
|
||||||
this.bird = bird;
|
this.bird = bird;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.rabbitmq;
|
package io.github.ehlxr.rabbitmq;
|
||||||
|
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.ConnectionFactory;
|
import com.rabbitmq.client.ConnectionFactory;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.routing;
|
package io.github.ehlxr.rabbitmq.routing;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.routing;
|
package io.github.ehlxr.rabbitmq.routing;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,8 +1,8 @@
|
||||||
package me.ehlxr.rabbitmq.routing;
|
package io.github.ehlxr.rabbitmq.routing;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.simple;
|
package io.github.ehlxr.rabbitmq.simple;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,8 +1,8 @@
|
||||||
package me.ehlxr.rabbitmq.simple;
|
package io.github.ehlxr.rabbitmq.simple;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.topic;
|
package io.github.ehlxr.rabbitmq.topic;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.topic;
|
package io.github.ehlxr.rabbitmq.topic;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,8 +1,8 @@
|
||||||
package me.ehlxr.rabbitmq.topic;
|
package io.github.ehlxr.rabbitmq.topic;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.worker;
|
package io.github.ehlxr.rabbitmq.worker;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,9 +1,9 @@
|
||||||
package me.ehlxr.rabbitmq.worker;
|
package io.github.ehlxr.rabbitmq.worker;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import com.rabbitmq.client.QueueingConsumer;
|
import com.rabbitmq.client.QueueingConsumer;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,8 +1,8 @@
|
||||||
package me.ehlxr.rabbitmq.worker;
|
package io.github.ehlxr.rabbitmq.worker;
|
||||||
|
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import com.rabbitmq.client.Connection;
|
import com.rabbitmq.client.Connection;
|
||||||
import me.ehlxr.rabbitmq.ConnectionUtil;
|
import io.github.ehlxr.rabbitmq.ConnectionUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.rate;
|
package io.github.ehlxr.rate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ehlxr
|
* @author ehlxr
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.rate;
|
package io.github.ehlxr.rate;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
import rx.Observable;
|
import rx.Observable;
|
||||||
import rx.Subscriber;
|
import rx.Subscriber;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
|
|
||||||
import io.reactivex.Flowable;
|
import io.reactivex.Flowable;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
@ -17,7 +17,7 @@ import java.util.concurrent.Future;
|
||||||
*/
|
*/
|
||||||
public class TestFuture {
|
public class TestFuture {
|
||||||
// https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html
|
// https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html
|
||||||
private static ExecutorService executor = Executors.newCachedThreadPool();
|
private static final ExecutorService executor = Executors.newCachedThreadPool();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestFuture test = new TestFuture();
|
TestFuture test = new TestFuture();
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ehlxr on 2018/1/16.
|
* Created by ehlxr on 2018/1/16.
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
import rx.Observable;
|
import rx.Observable;
|
||||||
import rx.schedulers.Schedulers;
|
import rx.schedulers.Schedulers;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
|
|
||||||
import rx.Observable;
|
import rx.Observable;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.reactive;
|
package io.github.ehlxr.reactive;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
@ -8,9 +8,9 @@ import java.util.concurrent.Callable;
|
||||||
*/
|
*/
|
||||||
public class TimeConsumingService implements Callable<String> {
|
public class TimeConsumingService implements Callable<String> {
|
||||||
|
|
||||||
private String service_name;
|
private final String service_name;
|
||||||
private int wait_ms;
|
private final int wait_ms;
|
||||||
private Object[] depandencies;
|
private final Object[] depandencies;
|
||||||
|
|
||||||
TimeConsumingService(String name, Integer waiting, Object[] depandencies) {
|
TimeConsumingService(String name, Integer waiting, Object[] depandencies) {
|
||||||
this.service_name = name;
|
this.service_name = name;
|
|
@ -0,0 +1,9 @@
|
||||||
|
package io.github.ehlxr.readlogs;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface IReadLogs {
|
||||||
|
String readFile(Date startDate, Date endDate, List<String> mapids, String groupid, Map<String, Double> adxs);
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.redis;
|
package io.github.ehlxr.redis;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
|
@ -1,4 +1,9 @@
|
||||||
package me.ehlxr.redis;
|
package io.github.ehlxr.redis;
|
||||||
|
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
import redis.clients.jedis.Jedis;
|
||||||
|
import redis.clients.jedis.JedisPool;
|
||||||
|
import redis.clients.jedis.JedisPoolConfig;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -6,12 +11,6 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import redis.clients.jedis.Jedis;
|
|
||||||
import redis.clients.jedis.JedisPool;
|
|
||||||
import redis.clients.jedis.JedisPoolConfig;
|
|
||||||
|
|
||||||
|
|
||||||
public class JedisUtil {
|
public class JedisUtil {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.redis;
|
package io.github.ehlxr.redis;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sftp;
|
package io.github.ehlxr.sftp;
|
||||||
|
|
||||||
import com.jcraft.jsch.*;
|
import com.jcraft.jsch.*;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.shiro;
|
package io.github.ehlxr.shiro;
|
||||||
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
import org.apache.shiro.authc.AuthenticationException;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.PriorityQueue;
|
import java.util.PriorityQueue;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.sort;
|
package io.github.ehlxr.sort;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package me.ehlxr.springamq.controller;
|
package io.github.ehlxr.springamq.controller;
|
||||||
|
|
||||||
|
import io.github.ehlxr.springamq.mq.producer.queue.QueueSender;
|
||||||
|
import io.github.ehlxr.springamq.mq.producer.topic.TopicSender;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import me.ehlxr.springamq.mq.producer.queue.QueueSender;
|
|
||||||
import me.ehlxr.springamq.mq.producer.topic.TopicSender;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
package me.ehlxr.springamq.mq.consumer.queue;
|
package io.github.ehlxr.springamq.mq.consumer.queue;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
package me.ehlxr.springamq.mq.consumer.queue;
|
package io.github.ehlxr.springamq.mq.consumer.queue;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.springamq.mq.consumer.topic;
|
package io.github.ehlxr.springamq.mq.consumer.topic;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.springamq.mq.consumer.topic;
|
package io.github.ehlxr.springamq.mq.consumer.topic;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.springamq.mq.producer.queue;
|
package io.github.ehlxr.springamq.mq.producer.queue;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.springamq.mq.producer.topic;
|
package io.github.ehlxr.springamq.mq.producer.topic;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
@ -1,4 +1,4 @@
|
||||||
package me.ehlxr.test;
|
package io.github.ehlxr.test;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue