Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
a7f21235
Commit
a7f21235
authored
Dec 13, 2023
by
LiuLin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ymt):恢复丢失代码
parent
4a8c0a41
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
199 additions
and
0 deletions
+199
-0
BaseEntity.java
...m/yeejoin/amos/boot/module/ymt/api/common/BaseEntity.java
+32
-0
BizCommonConstant.java
...in/amos/boot/module/ymt/api/common/BizCommonConstant.java
+14
-0
DesUtil.java
.../com/yeejoin/amos/boot/module/ymt/api/common/DesUtil.java
+0
-0
StringUtil.java
...m/yeejoin/amos/boot/module/ymt/api/common/StringUtil.java
+153
-0
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-common/src/main/java/com/yeejoin/amos/boot/module/ymt/api/common/BaseEntity.java
0 → 100644
View file @
a7f21235
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
common
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @description: 公共实体
* @author: duanwei
**/
@Data
public
class
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
5464322936854328207L
;
@TableId
(
type
=
IdType
.
ID_WORKER
)
private
Long
id
;
/**
* 创建时间
*/
@TableField
(
value
=
"create_date"
,
fill
=
FieldFill
.
INSERT
)
private
Date
createDate
;
/**
* 更新时间
*/
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
UPDATE
)
private
Date
updateTime
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-common/src/main/java/com/yeejoin/amos/boot/module/ymt/api/common/BizCommonConstant.java
0 → 100644
View file @
a7f21235
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
common
;
/**
* @Description: 通用常量类
* @Author: DELL
* @Date: 2021/5/26
*/
public
interface
BizCommonConstant
{
/**
* 所有平台企业数据redisKey
*/
String
COMPANY_TREE_REDIS_KEY
=
"REGULATOR_UNIT_TREE"
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-common/src/main/java/com/yeejoin/amos/boot/module/ymt/api/common/DesUtil.java
0 → 100644
View file @
a7f21235
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-common/src/main/java/com/yeejoin/amos/boot/module/ymt/api/common/StringUtil.java
0 → 100644
View file @
a7f21235
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
common
;
import
java.math.BigDecimal
;
import
java.util.Collection
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* 字符串工具类
*
* @author as-youjun
*/
public
class
StringUtil
{
private
static
Pattern
NOT_ZERO_AT_THE_END
=
Pattern
.
compile
(
"[1-9](\\d*[1-9])?"
);
private
static
Pattern
numericPattern
=
Pattern
.
compile
(
"-?[0-9]+\\.?[0-9]*"
);
private
static
Pattern
NUMBER_PATTERN
=
Pattern
.
compile
(
"-?[0-9]+(\\.[0-9]+)?"
);
/**
* 判断对象是否为空
*
* @param str
* @return
*/
public
static
boolean
isNotEmpty
(
Object
str
)
{
boolean
flag
=
true
;
if
(
str
!=
null
&&
!
""
.
equals
(
str
))
{
if
(
str
.
toString
().
length
()
>
0
)
{
flag
=
true
;
}
}
else
{
flag
=
false
;
}
return
flag
;
}
/***************************************************************************
* repeat - 通过源字符串重复生成N次组成新的字符串。
*
* @param src
* - 源字符串 例如: 空格(" "), 星号("*"), "浙江" 等等...
* @param num
* - 重复生成次数
* @return 返回已生成的重复字符串
* @version 1.0 (2006.10.10) Wilson Lin
**************************************************************************/
public
static
String
repeat
(
String
src
,
int
num
)
{
StringBuffer
s
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
num
;
i
++)
{
s
.
append
(
src
);
}
return
s
.
toString
();
}
/**
* 判断是否数字表示
*
* @param str 源字符串
* @return 是否数字的标志
*/
public
static
boolean
isNumeric
(
String
str
)
{
// 该正则表达式可以匹配所有的数字 包括负数
String
bigStr
;
try
{
bigStr
=
new
BigDecimal
(
str
).
toString
();
}
catch
(
Exception
e
)
{
return
false
;
//异常 说明包含非数字。
}
Matcher
isNum
=
NUMBER_PATTERN
.
matcher
(
bigStr
);
// matcher是全匹配
if
(!
isNum
.
matches
())
{
return
false
;
}
return
true
;
}
public
static
int
toInt
(
String
s
)
{
if
(
s
!=
null
&&
!
""
.
equals
(
s
.
trim
()))
{
try
{
return
Integer
.
parseInt
(
s
);
}
catch
(
Exception
e
)
{
return
0
;
}
}
return
0
;
}
public
static
boolean
isEmpty
(
Collection
collection
)
{
return
collection
==
null
||
collection
.
isEmpty
();
}
public
static
boolean
isNotEmpty
(
Collection
collection
)
{
return
collection
!=
null
&&
collection
.
size
()
>
0
;
}
public
static
boolean
isEmpty
(
Map
map
)
{
return
map
==
null
||
map
.
isEmpty
();
}
/**
* 截取前后都不是0的数字字符串
* <p>
* 12010102 => 12010102 12010100 => 120101 ab1201100b => 12011
*
* @param str
* @return
*/
public
static
String
delEndZero
(
String
str
)
{
Matcher
mat
=
NOT_ZERO_AT_THE_END
.
matcher
(
str
);
boolean
rs
=
mat
.
find
();
if
(
rs
)
{
return
mat
.
group
(
0
);
}
return
null
;
}
/**
* <pre>
* 移除字符串后面的0
* </pre>
*
* @param s
* @return
*/
public
static
String
removeSufixZero
(
String
s
)
{
if
(
s
==
null
)
{
return
""
;
}
while
(
s
.
endsWith
(
"0"
))
{
if
(
"0"
.
equals
(
s
))
{
s
=
""
;
break
;
}
s
=
s
.
substring
(
0
,
s
.
length
()
-
1
);
}
return
s
;
}
public
static
String
transforCode
(
String
code
)
{
if
(
code
.
endsWith
(
"0000000"
))
{
code
=
code
.
substring
(
0
,
1
);
}
else
if
(
code
.
endsWith
(
"000000"
))
{
code
=
code
.
substring
(
0
,
2
);
}
else
if
(
code
.
endsWith
(
"0000"
))
{
code
=
code
.
substring
(
0
,
4
);
}
else
if
(
code
.
endsWith
(
"00"
))
{
code
=
code
.
substring
(
0
,
6
);
}
return
code
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment