Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
d5b7c93d
Commit
d5b7c93d
authored
Dec 09, 2022
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码同步(重庆)
parent
d5739485
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
184 additions
and
20 deletions
+184
-20
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/SkServiceApply.java
+7
-1
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/cqEntity/KsjTableResult.java
+35
-0
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/cqEntity/kshTable.java
+59
-0
common/common_utils/src/main/java/com/founder/commonutils/model/vo/param/SkServiceApplyParam.java
+4
-0
common/common_utils/src/main/java/com/founder/commonutils/model/vo/param/SkServiceParam.java
+8
-0
common/common_utils/src/main/java/com/founder/commonutils/model/vo/response/SkServiceApplyVO.java
+4
-0
common/common_utils/src/main/java/com/founder/commonutils/util/DateUtil.java
+8
-0
common/common_utils/src/main/java/com/founder/commonutils/util/cqInterfaceUtil.java
+0
-0
common/service_base/src/main/java/com/founder/servicebase/controller/SkServiceApplyController.java
+10
-5
common/service_base/src/main/java/com/founder/servicebase/controller/SkServiceController.java
+37
-14
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkServiceApplyMapper.xml
+3
-0
service/publicapi/src/main/java/com/founder/publicapi/controller/cqNewService/CqNewServiceController.java
+0
-0
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/KshTableMapper.java
+9
-0
No files found.
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/SkServiceApply.java
View file @
d5b7c93d
...
...
@@ -2,6 +2,7 @@ package com.founder.commonutils.model.newPublicEntity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
...
...
@@ -59,7 +60,12 @@ public class SkServiceApply extends Model<SkServiceApply> {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
sqsj
;
/**
* 授权时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
ssqsj
;
/**
* 1代表授权,0代表撤销
*/
*/
private
String
status
;
}
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/cqEntity/KsjTableResult.java
0 → 100644
View file @
d5b7c93d
package
com
.
founder
.
commonutils
.
model
.
newPublicEntity
.
cqEntity
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author yangyang
* @description 可视化表格实体
*/
@Data
public
class
KsjTableResult
{
private
String
count
;
// rows数量
private
List
<
Rows
>
rows
;
// 内容
@Data
public
static
class
Rows
{
private
String
tabsName
;
// tab的名字
private
String
url
;
// 接口路径
private
List
<
Title
>
title
;
// 表头
@Data
public
static
class
Title
{
private
String
prop
;
// 标签(对应数据库字段)
private
String
label
;
// 标签(对应的字段注释)
private
boolean
search
;
// True/false true得即为查询条件
private
String
type
;
// 日期为date 其他的都为text类型
}
}
}
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/cqEntity/kshTable.java
0 → 100644
View file @
d5b7c93d
package
com
.
founder
.
commonutils
.
model
.
newPublicEntity
.
cqEntity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* </p>
* @author yangyang
* @since 2022/12/08
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
"ksh_table"
)
@ApiModel
(
value
=
"kshTable对象"
,
description
=
"新可视化表格对接"
)
public
class
kshTable
implements
Serializable
{
@ApiModelProperty
(
value
=
"信息主键编号"
)
@TableId
(
type
=
IdType
.
INPUT
)
private
String
xxzjbh
;
@ApiModelProperty
(
value
=
"表头"
)
private
String
prop
;
@ApiModelProperty
(
value
=
"表头描述"
)
private
String
label
;
@ApiModelProperty
(
value
=
"是否为展示查询条件,0是,1否"
)
private
String
issearch
;
@ApiModelProperty
(
value
=
"是否为展示表头,0是,1否"
)
private
String
ishead
;
@ApiModelProperty
(
value
=
"日期为date 其他的都为text类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"来源"
)
private
String
ly
;
@ApiModelProperty
(
value
=
"接口url"
)
private
String
url
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
String
cjsj
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
String
gxsj
;
@ApiModelProperty
(
value
=
"删除标志"
)
private
String
isdeleted
;
}
common/common_utils/src/main/java/com/founder/commonutils/model/vo/param/SkServiceApplyParam.java
View file @
d5b7c93d
...
...
@@ -26,6 +26,10 @@ public class SkServiceApplyParam {
*/
private
String
applyurl
;
/**
* status 1已授权 2撤销 0是未授权
*/
private
String
status
;
/**
* 行数
*/
private
Integer
page
;
...
...
common/common_utils/src/main/java/com/founder/commonutils/model/vo/param/SkServiceParam.java
View file @
d5b7c93d
...
...
@@ -18,6 +18,14 @@ public class SkServiceParam {
*/
private
String
name
;
/**
* 服务类型
*/
private
String
servicetypename
;
/**
* 服务来源
*/
private
String
fwly
;
/**
* 行数
*/
private
Integer
page
;
...
...
common/common_utils/src/main/java/com/founder/commonutils/model/vo/response/SkServiceApplyVO.java
View file @
d5b7c93d
...
...
@@ -58,6 +58,10 @@ public class SkServiceApplyVO {
* 授权时间
*/
private
String
ssqsj
;
/**
* 授权状态 1已授权 2撤销 0是未授权
*/
private
String
status
;
public
SkServiceApplyVO
(){}
public
SkServiceApplyVO
(
SkServiceApply
skServiceApply
,
String
name
,
String
ms
){
...
...
common/common_utils/src/main/java/com/founder/commonutils/util/DateUtil.java
View file @
d5b7c93d
...
...
@@ -176,5 +176,13 @@ public class DateUtil {
}
return
result
;
}
/** 十位时间戳转化成时间
* */
public
static
String
getTimestampToTime
(
String
timestamp
){
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
format
=
sdf
.
format
(
new
Date
(
Long
.
valueOf
(
timestamp
+
"000"
)));
return
format
;
}
}
common/common_utils/src/main/java/com/founder/commonutils/util/cqInterfaceUtil.java
0 → 100644
View file @
d5b7c93d
This diff is collapsed.
Click to expand it.
common/service_base/src/main/java/com/founder/servicebase/controller/SkServiceApplyController.java
View file @
d5b7c93d
...
...
@@ -15,7 +15,6 @@ import com.founder.commonutils.model.vo.response.SkServiceApplyVO;
import
com.founder.commonutils.util.ExportExcelUtil
;
import
com.founder.commonutils.util.JwtUser
;
import
com.founder.commonutils.util.KeyUtil
;
import
com.founder.commonutils.util.NetworkUtil
;
import
com.founder.servicebase.logs.OperLog
;
import
com.founder.servicebase.logs.OperationType
;
import
com.founder.servicebase.service.SkServiceApplyService
;
...
...
@@ -33,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -66,8 +66,10 @@ public class SkServiceApplyController extends ApiController {
@OperLog
(
message
=
"新增服务授权信息"
,
operation
=
OperationType
.
ADD
)
public
MapRestResult
save
(
SkServiceApply
skService
)
throws
IOException
{
skService
.
setXxzjbh
(
KeyUtil
.
getUUIDKey
(
"SQ"
));
//时间不能为空 这块前端做校验去了
skService
.
setSqsj
(
new
Date
());
//时间不能为空 这块前端做校验去了
skService
.
setSsqsj
(
new
Date
());
skService
.
setStatus
(
"0"
);
boolean
save
=
skServiceApplyService
.
save
(
skService
);
if
(
save
)
{
return
new
MapRestResult
();
...
...
@@ -98,8 +100,8 @@ public class SkServiceApplyController extends ApiController {
public
MapRestResult
apply
(
SkServiceApply
skServiceApply
,
String
servicename
)
throws
Exception
{
UpdateWrapper
updateWrapper
=
new
UpdateWrapper
();
updateWrapper
.
eq
(
"xxzjbh"
,
skServiceApply
.
getXxzjbh
());
String
message
=
""
;
if
(
"
0
"
.
equals
(
skServiceApply
.
getStatus
()))
{
//撤销
String
message
=
""
;
//status 1已授权 2撤销 0是未授权
if
(
"
2
"
.
equals
(
skServiceApply
.
getStatus
()))
{
//撤销
updateWrapper
.
set
(
"token"
,
null
);
updateWrapper
.
set
(
"ssqsj"
,
null
);
message
=
"撤销成功"
;
...
...
@@ -235,7 +237,10 @@ public class SkServiceApplyController extends ApiController {
return
new
MapRestResult
(
201
,
"error"
,
1
,
"token获取失败!"
);
}
}
return
new
MapRestResult
(
200
,
"OK"
,
1
,
token
);
Map
mapResult
=
new
HashMap
();
mapResult
.
put
(
"token"
,
token
);
mapResult
.
put
(
"expire"
,
"86400"
);
return
new
MapRestResult
(
200
,
"OK"
,
1
,
mapResult
);
}
}
common/service_base/src/main/java/com/founder/servicebase/controller/SkServiceController.java
View file @
d5b7c93d
...
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.api.ApiController;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.newPublicEntity.SkService
;
import
com.founder.commonutils.model.newPublicEntity.SkTrail
;
import
com.founder.commonutils.model.newPublicEntity.hnkshEntity.HnTbStRygx
;
import
com.founder.commonutils.model.vo.param.SkServiceParam
;
import
com.founder.commonutils.util.ExcelUtil
;
import
com.founder.commonutils.util.ExportExcelUtil
;
...
...
@@ -57,7 +59,7 @@ public class SkServiceController extends ApiController {
public
MapRestResult
save
(
SkService
skService
)
throws
IOException
{
skService
.
setXxzjbh
(
KeyUtil
.
getUUIDKey
(
"FW"
));
skService
.
setCjsj
(
new
Date
());
skService
.
setServicetypename
(
skDictionaryService
.
findDmmcByDmAndDmlx
(
skService
.
getServicetype
(),
"ZF"
));
//
skService.setServicetypename(skDictionaryService.findDmmcByDmAndDmlx(skService.getServicetype(),"ZF"));
boolean
save
=
skServiceService
.
save
(
skService
);
if
(
save
)
{
...
...
@@ -75,14 +77,25 @@ public class SkServiceController extends ApiController {
@ApiOperation
(
value
=
"excel新增服务信息"
)
@OperLog
(
message
=
"excel新增服务信息"
,
operation
=
OperationType
.
ADD
)
public
MapRestResult
excelsave
(
MultipartFile
file
)
{
List
<
SkService
>
list
=
readExcel
(
file
);
for
(
SkService
sk
:
list
)
{
sk
.
setXxzjbh
(
KeyUtil
.
getUUIDKey
(
"FW"
));
sk
.
setCjsj
(
new
Date
());
sk
.
setServicetypename
(
skDictionaryService
.
findDmmcByDmAndDmlx
(
sk
.
getServicetype
(),
"ZF"
));
skServiceService
.
save
(
sk
);
if
(
file
!=
null
)
{
List
<
SkService
>
list
=
readExcel
(
file
);
for
(
SkService
sk
:
list
)
{
sk
.
setXxzjbh
(
KeyUtil
.
getUUIDKey
(
"FW"
));
sk
.
setCjsj
(
new
Date
());
if
(
sk
.
getServicetypename
().
equals
(
"数据服务"
)){
sk
.
setServicetype
(
"sjfw"
);
}
else
if
(
sk
.
getServicetypename
().
equals
(
"接口服务"
)){
sk
.
setServicetype
(
"jkfw"
);
}
else
if
(
sk
.
getServicetypename
().
equals
(
"页面"
)){
sk
.
setServicetype
(
"ymfw"
);
}
// sk.setServicetypename(skDictionaryService.findDmmcByDmAndDmlx(sk.getServicetype(),"ZF"));
skServiceService
.
save
(
sk
);
}
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
(
200
,
"请上传文件"
,
null
);
}
return
new
MapRestResult
();
}
...
...
@@ -97,9 +110,9 @@ public class SkServiceController extends ApiController {
String
postfix
=
filename
.
substring
(
filename
.
lastIndexOf
(
"."
)
+
1
);
//根据Excel文件后缀读取数据
if
(
postfix
.
equals
(
"xls"
))
{
Map
xlsExcelMap
=
ExcelUtil
.
readXLSExcel
(
file
.
getInputStream
(),
SkService
.
class
,
abandonFields
);
Map
xlsExcelMap
=
ExcelUtil
.
readXLS
X
Excel
(
file
.
getInputStream
(),
SkService
.
class
,
abandonFields
);
resultList
=
(
List
)
xlsExcelMap
.
get
(
"dataList"
);
}
else
{
}
else
if
(
postfix
.
equals
(
"xlsx"
))
{
Map
xlsxExcelMap
=
ExcelUtil
.
readXLSXExcel
(
file
.
getInputStream
(),
SkService
.
class
,
abandonFields
);
resultList
=
(
List
)
xlsxExcelMap
.
get
(
"dataList"
);
}
...
...
@@ -116,12 +129,12 @@ public class SkServiceController extends ApiController {
@ApiOperation
(
value
=
"修改服务信息"
)
@OperLog
(
message
=
"修改服务信息"
,
operation
=
OperationType
.
UPDATE
)
public
MapRestResult
update
(
SkService
skRegionalsResult
)
throws
IOException
{
skRegionalsResult
.
setServicetypename
(
skDictionaryService
.
findDmmcByDmAndDmlx
(
skRegionalsResult
.
getServicetype
(),
"ZF"
));
//
skRegionalsResult.setServicetypename(skDictionaryService.findDmmcByDmAndDmlx(skRegionalsResult.getServicetype(),"ZF"));
boolean
update
=
skServiceService
.
updateById
(
skRegionalsResult
);
if
(
update
)
{
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
(
).
error
(
"更新失败"
);
return
new
MapRestResult
(
200
,
"更新失败"
,
null
);
}
}
...
...
@@ -140,7 +153,7 @@ public class SkServiceController extends ApiController {
if
(
update
)
{
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
(
).
error
(
"更新失败"
);
return
new
MapRestResult
(
200
,
"更新失败"
,
null
);
}
}
...
...
@@ -153,7 +166,7 @@ public class SkServiceController extends ApiController {
public
MapRestResult
detail
(
String
xxzjbh
)
{
SkService
byId
=
skServiceService
.
getById
(
xxzjbh
);
if
(
byId
==
null
)
{
return
new
MapRestResult
(
).
error
(
"不存在该数据"
);
return
new
MapRestResult
(
200
,
"不存在该数据"
,
null
);
}
else
{
return
new
MapRestResult
(
byId
);
}
...
...
@@ -178,6 +191,14 @@ public class SkServiceController extends ApiController {
if
(
skRegionalsDetailParam
.
getDes
()!=
null
&&
!
skRegionalsDetailParam
.
getDes
().
equals
(
""
)){
queryWrapper
.
like
(
"serviceMs"
,
skRegionalsDetailParam
.
getDes
());
}
//服务来源
if
(
skRegionalsDetailParam
.
getFwly
()!=
null
&&
!
skRegionalsDetailParam
.
getFwly
().
equals
(
""
)){
queryWrapper
.
like
(
"fwly"
,
skRegionalsDetailParam
.
getFwly
());
}
//服务类型
if
(
skRegionalsDetailParam
.
getServicetypename
()!=
null
&&
!
skRegionalsDetailParam
.
getServicetypename
().
equals
(
""
)){
queryWrapper
.
eq
(
"serviceTypeName"
,
skRegionalsDetailParam
.
getServicetypename
());
}
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
queryWrapper
.
orderByDesc
(
"cjsj"
);
...
...
@@ -188,6 +209,7 @@ public class SkServiceController extends ApiController {
}
/**
* 服务列表信息导出
*/
...
...
@@ -216,5 +238,6 @@ public class SkServiceController extends ApiController {
}
}
common/service_base/src/main/java/com/founder/servicebase/logs/mapper/mysqlMapper/SkServiceApplyMapper.xml
View file @
d5b7c93d
...
...
@@ -39,6 +39,9 @@
<if
test=
"applyurl!= null and applyurl!=''"
>
AND a.applyUrl like "%"#{ applyurl , jdbcType=VARCHAR }"%"
</if>
<if
test=
"status!= null and status!=''"
>
AND a.status = #{ status , jdbcType=VARCHAR }
</if>
order by a.sqsj desc
limit #{page},#{pageSize}
</select>
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/cqNewService/CqNewServiceController.java
0 → 100644
View file @
d5b7c93d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/KshTableMapper.java
0 → 100644
View file @
d5b7c93d
package
com
.
founder
.
publicapi
.
mapper
.
mysqlMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.founder.commonutils.model.newPublicEntity.cqEntity.kshTable
;
import
org.springframework.stereotype.Component
;
@Component
public
interface
KshTableMapper
extends
BaseMapper
<
kshTable
>
{
}
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