Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
7c365873
Commit
7c365873
authored
May 12, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务时间管理优化,
省市区贼全字典表实体及树级接口
parent
83c656f5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
10 deletions
+130
-10
src/main/java/cn/timer/api/bean/clazz/SysRegion.java
+80
-0
src/main/java/cn/timer/api/controller/oss/OSSController.java
+17
-7
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+0
-0
src/main/java/cn/timer/api/dao/clazz/SysRegionMapper.java
+28
-0
src/main/java/cn/timer/api/utils/schedule/CronUtil.java
+4
-2
src/main/java/cn/timer/api/utils/schedule/RemindUtil.java
+1
-1
No files found.
src/main/java/cn/timer/api/bean/clazz/SysRegion.java
0 → 100644
View file @
7c365873
/**
* <p>Title: China.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
package
cn
.
timer
.
api
.
bean
.
clazz
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* <p>
* Title: China.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"地区字典表(全)"
)
public
class
SysRegion
extends
Model
<
SysRegion
>{
private
static
final
long
serialVersionUID
=
-
3184372953004418673L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"区域主键"
,
example
=
"1"
)
private
Integer
keyId
;
@ApiModelProperty
(
value
=
"区域名称"
,
example
=
"10"
)
private
String
regionName
;
@ApiModelProperty
(
value
=
"区域编码"
,
example
=
"1"
)
private
String
regionCode
;
@ApiModelProperty
(
value
=
"地名简称"
,
example
=
"1"
)
private
String
simpleName
;
@ApiModelProperty
(
value
=
"区域等级"
,
example
=
"1"
)
private
Integer
level
;
@ApiModelProperty
(
value
=
"城市编码"
,
example
=
"1"
)
private
String
cityCode
;
@ApiModelProperty
(
value
=
"邮政编码"
,
example
=
"1"
)
private
String
zipCode
;
@ApiModelProperty
(
value
=
"组合名称"
,
example
=
"1"
)
private
String
merName
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"1"
)
private
Float
lng
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"1"
)
private
Float
lat
;
@ApiModelProperty
(
value
=
"拼音/英文名"
,
example
=
"1"
)
private
String
enName
;
}
src/main/java/cn/timer/api/controller/oss/OSSController.java
View file @
7c365873
...
...
@@ -120,27 +120,37 @@ public class OSSController {
* DELETE
*
* @param moudle
* @param fileName
************/
@DeleteMapping
(
value
=
"/delSingle"
)
@ApiOperation
(
value
=
"删除单个(谨慎使用)"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
Result
<
String
>
delSingle
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
false
)
String
moudle
,
@RequestParam
(
required
=
false
)
String
fileName
)
{
String
path
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
moudle
+
"/"
+
fileName
;
oss
.
delSingleFile
(
path
);
try
{
String
path
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
moudle
+
"/"
+
fileName
;
oss
.
delSingleFile
(
path
);
}
catch
(
Exception
e
)
{
e
.
getStackTrace
();
}
return
ResultUtil
.
success
(
"删除成功"
);
}
@DeleteMapping
(
value
=
"/delFiles"
)
@ApiOperation
(
value
=
"删除多个(谨慎使用,谨慎使用)"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
String
>>
delFiles
(
@CurrentUser
UserBean
userBean
,
@RequestBody
OssDto
ossDto
)
{
List
<
String
>
list
=
null
;
List
<
String
>
keys
=
null
;
for
(
String
fileName
:
ossDto
.
getFileNames
())
{
keys
=
new
ArrayList
<
String
>();
String
key
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
ossDto
.
getMoudle
()
+
"/"
+
fileName
;
keys
.
add
(
key
);
try
{
for
(
String
fileName
:
ossDto
.
getFileNames
())
{
keys
=
new
ArrayList
<
String
>();
String
key
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
ossDto
.
getMoudle
()
+
"/"
+
fileName
;
keys
.
add
(
key
);
}
list
=
oss
.
delFiles
(
keys
,
ossDto
.
isQuiet
());
}
catch
(
Exception
e
)
{
e
.
getStackTrace
();
}
List
<
String
>
list
=
oss
.
delFiles
(
keys
,
ossDto
.
isQuiet
());
return
ResultUtil
.
data
(
list
,
"删除成功"
);
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
7c365873
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/clazz/SysRegionMapper.java
0 → 100644
View file @
7c365873
/**
* <p>Title: SysRegionMapper.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
package
cn
.
timer
.
api
.
dao
.
clazz
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.clazz.SysRegion
;
/**
* <p>
* Title: SysRegionMapper.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年5月11日
* @version 1.0
*/
public
interface
SysRegionMapper
extends
BaseMapper
<
SysRegion
>
{
}
src/main/java/cn/timer/api/utils/schedule/CronUtil.java
View file @
7c365873
...
...
@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
cn.timer.api.bean.sche.ScheduleTask
;
public
class
CronUtil
{
// 默认cron 10秒一次
private
static
String
cron
=
"0/10 * * * * ?"
;
// 默认cron 30秒一次
private
static
String
cron
=
"0 0 8 * * ?"
;
// private static String cron = "0 50 14 * * ?";
// 数据库cron
public
static
String
getCron
(
String
className
,
String
methodName
)
{
...
...
src/main/java/cn/timer/api/utils/schedule/RemindUtil.java
View file @
7c365873
...
...
@@ -28,7 +28,7 @@ import cn.timer.api.utils.aliyun.AliyunSMS;
*
*/
@Component
@Lazy
(
false
)
@Lazy
public
class
RemindUtil
implements
SchedulingConfigurer
{
@Autowired
...
...
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