Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-tool
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-tool
Commits
fd223103
Commit
fd223103
authored
Jun 07, 2023
by
陈祥烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
32f0742a
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
749 additions
and
32 deletions
+749
-32
pom.xml
pom.xml
+8
-0
AmosDemoResource.java
...om/yeejoin/amos/api/tool/controller/AmosDemoResource.java
+1
-1
ApiInfoController.java
...m/yeejoin/amos/api/tool/controller/ApiInfoController.java
+106
-0
ApiSourceController.java
...yeejoin/amos/api/tool/controller/ApiSourceController.java
+95
-0
ApiInfoDto.java
.../com/yeejoin/amos/api/tool/face/model/Dto/ApiInfoDto.java
+45
-0
ApiSourceDto.java
...om/yeejoin/amos/api/tool/face/model/Dto/ApiSourceDto.java
+30
-0
ApiInfoVo.java
...va/com/yeejoin/amos/api/tool/face/model/Vo/ApiInfoVo.java
+35
-0
ApiInfoMapper.java
...com/yeejoin/amos/api/tool/face/orm/dao/ApiInfoMapper.java
+8
-0
ApiSourceMapper.java
...m/yeejoin/amos/api/tool/face/orm/dao/ApiSourceMapper.java
+14
-0
BaseMapper.java
...va/com/yeejoin/amos/api/tool/face/orm/dao/BaseMapper.java
+11
-0
ApiInfo.java
...va/com/yeejoin/amos/api/tool/face/orm/entity/ApiInfo.java
+54
-0
ApiSource.java
.../com/yeejoin/amos/api/tool/face/orm/entity/ApiSource.java
+29
-0
BaseEntity.java
...com/yeejoin/amos/api/tool/face/orm/entity/BaseEntity.java
+37
-0
ApiInfoServiceImpl.java
...amos/api/tool/face/service/I_Impl/ApiInfoServiceImpl.java
+68
-0
ApiSourceServiceImpl.java
...os/api/tool/face/service/I_Impl/ApiSourceServiceImpl.java
+26
-0
IApiInfoService.java
...in/amos/api/tool/face/service/I_Intf/IApiInfoService.java
+18
-0
IApiSourceService.java
.../amos/api/tool/face/service/I_Intf/IApiSourceService.java
+4
-0
application-dev.properties
src/main/resources/application-dev.properties
+30
-14
application-qa.properties
src/main/resources/application-qa.properties
+51
-0
application.properties
src/main/resources/application.properties
+18
-13
logback-dev.xml
src/main/resources/logback-dev.xml
+4
-4
logback-qa.xml
src/main/resources/logback-qa.xml
+46
-0
ApiInfoMapper.xml
src/main/resources/mapper/ApiInfoMapper.xml
+6
-0
ApiSourceMapper.xml
src/main/resources/mapper/ApiSourceMapper.xml
+5
-0
No files found.
pom.xml
View file @
fd223103
...
...
@@ -180,6 +180,14 @@
<skip>
true
</skip>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
6
</source>
<target>
6
</target>
</configuration>
</plugin>
</plugins>
</build>
...
...
src/main/java/com/yeejoin/amos/api/tool/controller/AmosDemoResource.java
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
controller
;
import
com.yeejoin.amos.api.tool.face.model.AmosDemoModel
;
import
com.yeejoin.amos.api.tool.face.model.AmosDemoModel
;
import
com.yeejoin.amos.api.tool.face.service.AmosDemoService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
src/main/java/com/yeejoin/amos/api/tool/controller/ApiInfoController.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
controller
;
import
com.yeejoin.amos.api.tool.face.model.Vo.ApiInfoVo
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
com.yeejoin.amos.api.tool.face.service.I_Impl.ApiInfoServiceImpl
;
import
com.yeejoin.amos.api.tool.face.service.I_Impl.ApiSourceServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.api.tool.face.model.Dto.ApiInfoDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
@CrossOrigin
@RestController
@Api
(
tags
=
"接口管理Api"
)
@RequestMapping
(
value
=
"/demo/api-info"
)
public
class
ApiInfoController
{
@Autowired
ApiInfoServiceImpl
apiInfoServiceImpl
;
@Autowired
ApiSourceServiceImpl
apiSourceServiceImpl
;
/**
* 新增
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
ApiInfoVo
>
save
(
@RequestBody
ApiInfoVo
apiInfoVo
)
throws
Exception
{
apiInfoServiceImpl
.
insertApiInfo
(
apiInfoVo
);
return
ResponseHelper
.
buildResponse
(
apiInfoVo
);
}
/**
* 根据sequenceNbr更新
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ApiInfoDto
>
updateBySequenceNbrApiInfo
(
@RequestBody
ApiInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
apiInfoServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
apiInfoServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
ApiInfoVo
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
apiInfoServiceImpl
.
selectApiInfoMsg
(
sequenceNbr
));
}
/**
* 列表分页查询
*@param current 当前页
*@param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
ApiInfoDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
Page
<
ApiInfoDto
>
page
=
new
Page
<
ApiInfoDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
apiInfoServiceImpl
.
queryForApiInfoPage
(
page
,
apiSourceServiceImpl
.
queryCodeById
(
sequenceNbr
)));
}
/**
*列表全部数据查询
*@return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
ApiInfoDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
apiInfoServiceImpl
.
queryForApiInfoList
());
}
}
src/main/java/com/yeejoin/amos/api/tool/controller/ApiSourceController.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
controller
;
import
com.yeejoin.amos.api.tool.face.model.Dto.ApiSourceDto
;
import
com.yeejoin.amos.api.tool.face.service.I_Impl.ApiSourceServiceImpl
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
@CrossOrigin
@RestController
@Api
(
tags
=
"接口来源管理Api"
)
@RequestMapping
(
value
=
"/demo/api_source"
)
public
class
ApiSourceController
{
@Autowired
ApiSourceServiceImpl
apiSourceServiceImpl
;
/**
* 新增
*
* @return ApiSourceDto
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
ApiSourceDto
>
save
(
@RequestBody
ApiSourceDto
model
)
{
model
=
apiSourceServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 编码
* @return ApiSourceDto
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ApiSourceDto
>
updateBySeqApiSource
(
@RequestBody
ApiSourceDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
apiSourceServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 编码
* @return Boolean
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
apiSourceServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 物理主键
* @return ApiSourceDto
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
ApiSourceDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
apiSourceServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表全部数据查询
*
* @return List<ApiSourceDto>
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
ApiSourceDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
apiSourceServiceImpl
.
queryForApiSourceList
());
}
}
src/main/java/com/yeejoin/amos/api/tool/face/model/Dto/ApiInfoDto.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
model
.
Dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"ApiInfoDto"
,
description
=
""
)
public
class
ApiInfoDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"物理主键"
)
private
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"接口来源"
)
private
String
apiSource
;
@ApiModelProperty
(
value
=
"接口名称"
)
private
String
apiName
;
@ApiModelProperty
(
value
=
"接口方法"
)
private
String
httpMethod
;
@ApiModelProperty
(
value
=
"接口地址"
)
private
String
apiPath
;
@ApiModelProperty
(
value
=
"响应方式"
)
private
String
resType
;
@ApiModelProperty
(
value
=
"请求参数配置"
)
private
String
bodyValue
;
@ApiModelProperty
(
value
=
"解析规则配置"
)
private
String
ruleData
;
@ApiModelProperty
(
value
=
"更新时间"
)
protected
Date
recDate
;
@ApiModelProperty
(
value
=
"更新人"
)
protected
String
recUserId
;
}
src/main/java/com/yeejoin/amos/api/tool/face/model/Dto/ApiSourceDto.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
model
.
Dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"ApiSourceDto"
,
description
=
""
)
public
class
ApiSourceDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"物理主键"
)
private
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"接口来源名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"接口标识"
)
private
String
code
;
@ApiModelProperty
(
value
=
"更新时间"
)
protected
Date
recDate
;
@ApiModelProperty
(
value
=
"更新人"
)
protected
String
recUserId
;
}
src/main/java/com/yeejoin/amos/api/tool/face/model/Vo/ApiInfoVo.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
model
.
Vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
ApiInfoVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"接口来源"
)
private
String
apiSource
;
@ApiModelProperty
(
value
=
"接口名称"
)
private
String
apiName
;
@ApiModelProperty
(
value
=
"接口方法"
)
private
String
httpMethod
;
@ApiModelProperty
(
value
=
"接口地址"
)
private
String
apiPath
;
@ApiModelProperty
(
value
=
"响应方式"
)
private
String
resType
;
@ApiModelProperty
(
value
=
"请求参数配置"
)
private
String
bodyValue
;
@ApiModelProperty
(
value
=
"解析规则配置"
)
private
String
ruleData
;
@ApiModelProperty
(
value
=
"物理主键"
)
private
Long
sequenceNbr
;
}
src/main/java/com/yeejoin/amos/api/tool/face/orm/dao/ApiInfoMapper.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
orm
.
dao
;
import
com.yeejoin.amos.api.tool.face.orm.entity.ApiInfo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
public
interface
ApiInfoMapper
extends
BaseMapper
<
ApiInfo
>{
}
src/main/java/com/yeejoin/amos/api/tool/face/orm/dao/ApiSourceMapper.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
orm
.
dao
;
import
com.yeejoin.amos.api.tool.face.orm.entity.ApiSource
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-06-01
*/
public
interface
ApiSourceMapper
extends
BaseMapper
<
ApiSource
>{
}
src/main/java/com/yeejoin/amos/api/tool/face/orm/dao/BaseMapper.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
orm
.
dao
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* MyBatis BaseMapper
* @author DELL
*/
@Mapper
public
interface
BaseMapper
{
}
src/main/java/com/yeejoin/amos/api/tool/face/orm/entity/ApiInfo.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
orm
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"studio_data_api"
)
public
class
ApiInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 接口来源
*/
@TableField
(
"api_source"
)
private
String
apiSource
;
/**
* 接口名称
*/
@TableField
(
"api_name"
)
private
String
apiName
;
/**
* 接口方法
*/
@TableField
(
"http_method"
)
private
String
httpMethod
;
/**
* 接口地址
*/
@TableField
(
"api_path"
)
private
String
apiPath
;
/**
* 响应方式
*/
@TableField
(
"res_type"
)
private
String
resType
;
/**
* 请求参数配置
*/
@TableField
(
"body_value"
)
private
String
bodyValue
;
/**
* 解析规则配置
*/
@TableField
(
"rule_data"
)
private
String
ruleData
;
}
src/main/java/com/yeejoin/amos/api/tool/face/orm/entity/ApiSource.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
orm
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"studio_data_api_category"
)
public
class
ApiSource
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 接口来源名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 接口标识
*/
@TableField
(
"code"
)
private
String
code
;
}
src/main/java/com/yeejoin/amos/api/tool/face/orm/entity/BaseEntity.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
orm
.
entity
;
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
;
/**
* 公共实体类
*
* @author DELL
*/
@Data
public
class
BaseEntity
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"sequence_nbr"
,
type
=
IdType
.
AUTO
)
protected
Long
sequenceNbr
;
@TableField
(
value
=
"rec_date"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
protected
Date
recDate
;
@TableField
(
value
=
"rec_user_id"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
protected
String
recUserId
;
/**
* 是否删除
*/
// @TableField(value = "is_delete")
// private Boolean isDelete;
}
src/main/java/com/yeejoin/amos/api/tool/face/service/I_Impl/ApiInfoServiceImpl.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
service
.
I_Impl
;
import
com.yeejoin.amos.api.tool.face.orm.entity.ApiInfo
;
import
com.yeejoin.amos.api.tool.face.orm.dao.ApiInfoMapper
;
import
com.yeejoin.amos.api.tool.face.service.I_Intf.IApiInfoService
;
import
com.yeejoin.amos.api.tool.face.model.Dto.ApiInfoDto
;
import
com.yeejoin.amos.api.tool.face.model.Vo.ApiInfoVo
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
@Service
public
class
ApiInfoServiceImpl
extends
BaseService
<
ApiInfoDto
,
ApiInfo
,
ApiInfoMapper
>
implements
IApiInfoService
{
@Autowired
ApiSourceServiceImpl
apiSourceService
;
/**
* 分页查询
*/
public
Page
<
ApiInfoDto
>
queryForApiInfoPage
(
Page
<
ApiInfoDto
>
page
,
String
apiSource
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
apiSource
);
}
/**
* 列表查询 示例
*/
public
List
<
ApiInfoDto
>
queryForApiInfoList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
public
void
insertApiInfo
(
ApiInfoVo
apiInfoVo
)
throws
Exception
{
ApiInfo
apiInfo
=
new
ApiInfo
();
BeanUtils
.
copyProperties
(
apiInfoVo
,
apiInfo
);
// 保存接口基本信息
this
.
save
(
apiInfo
);
}
@Override
public
ApiInfoVo
selectApiInfoMsg
(
Long
sequenceNbr
)
throws
Exception
{
// 查询接口基本信息
ApiInfoDto
apiInfoDto
=
this
.
queryBySeq
(
sequenceNbr
);
ApiInfoVo
apiInfoVo
=
new
ApiInfoVo
();
BeanUtils
.
copyProperties
(
apiInfoDto
,
apiInfoVo
);
return
apiInfoVo
;
}
@Override
public
void
deleteApiInfo
(
Long
sequenceNbr
)
throws
Exception
{
// 删除接口基本信息
this
.
deleteBySeq
(
sequenceNbr
);
// 删除接口来源信息
ApiInfo
apiInfo
=
this
.
getById
(
sequenceNbr
);
}
@Override
public
void
updateApiInfo
(
ApiInfoVo
apiInfoVo
,
Long
sequenceNbr
)
throws
Exception
{
// 更新接口基本信息
ApiInfo
apiInfo
=
new
ApiInfo
();
BeanUtils
.
copyProperties
(
apiInfoVo
,
apiInfo
);
this
.
updateById
(
apiInfo
);
// 更新接口来源信息
}
}
src/main/java/com/yeejoin/amos/api/tool/face/service/I_Impl/ApiSourceServiceImpl.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
service
.
I_Impl
;
import
com.yeejoin.amos.api.tool.face.model.Dto.ApiSourceDto
;
import
com.yeejoin.amos.api.tool.face.orm.entity.ApiSource
;
import
com.yeejoin.amos.api.tool.face.orm.dao.ApiSourceMapper
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
ApiSourceServiceImpl
extends
BaseService
<
ApiSourceDto
,
ApiSource
,
ApiSourceMapper
>
{
/**
* 列表查询 示例
*/
public
List
<
ApiSourceDto
>
queryForApiSourceList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
String
queryCodeById
(
Long
sequenceNbr
){
ApiSourceDto
model
=
this
.
queryModelByParams
(
sequenceNbr
);
return
model
.
getCode
();
}
}
src/main/java/com/yeejoin/amos/api/tool/face/service/I_Intf/IApiInfoService.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
service
.
I_Intf
;
import
com.yeejoin.amos.api.tool.face.model.Dto.ApiInfoDto
;
import
com.yeejoin.amos.api.tool.face.model.Vo.ApiInfoVo
;
import
org.apache.ibatis.annotations.Param
;
public
interface
IApiInfoService
{
void
insertApiInfo
(
ApiInfoVo
apiInfoVo
)
throws
Exception
;
ApiInfoVo
selectApiInfoMsg
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
)
throws
Exception
;
// ApiInfoDto selectApiInfo(@Param("apiSource") String apiSource) throws Exception;
void
deleteApiInfo
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
)
throws
Exception
;
void
updateApiInfo
(
ApiInfoVo
apiInfoVo
,
Long
sequenceNbr
)
throws
Exception
;
}
src/main/java/com/yeejoin/amos/api/tool/face/service/I_Intf/IApiSourceService.java
0 → 100644
View file @
fd223103
package
com
.
yeejoin
.
amos
.
api
.
tool
.
face
.
service
.
I_Intf
;
public
interface
IApiSourceService
{
}
src/main/resources/application-dev.properties
View file @
fd223103
#DB properties:
# jdbc_config
spring.datasource.url
=
jdbc:mysql://
172.16.3.18:3306/amos_studio
?allowMultiQueries=true
spring.datasource.url
=
jdbc:mysql://
39.98.45.134:3306/amos_studio-20221018
?allowMultiQueries=true
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
3
spring.datasource.hikari.maximum-pool-size
=
5
spring.datasource.hikari.maximum-pool-size
=
10
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
...
...
@@ -13,21 +14,30 @@ spring.datasource.hikari.max-lifetime=1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
# REDIS (RedisProperties)
#??????
eureka.instance.hostname
=
172.16.3.18
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/doc.html
#redis
spring.redis.database
=
1
spring.redis.host
=
172.16.3.18
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.timeout
=
0
#
注册中心地址
e
ureka.client.service-url.defaultZone
=
http://admin:a1234560@172.16.3.18:10001/eureka/
e
ureka.instance.prefer-ip-address
=
true
management.endpoints.web.exposure.include
=
*
e
ureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
e
ureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
e
ureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
e
ureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/doc.html
#
# emqx
e
mqx.clean-session
=
true
e
mqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.3.18:2883
e
mqx.client-user-name
=
super
e
mqx.client-password
=
a123456
e
mqx.max-inflight
=
1000
e
mqx.keep-alive-interval
=
10
knife4j.production
=
false
knife4j.enable
=
true
...
...
@@ -35,8 +45,13 @@ knife4j.basic.enable=true
knife4j.basic.username
=
admin
knife4j.basic.password
=
a1234560
management.security.enabled
=
true
management.endpoint.health.show-details
=
always
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
spring.boot.admin.client.enabled
=
true
spring.boot.admin.client.instance.metadata.user.name
=
${spring.security.user.name}
spring.boot.admin.client.instance.metadata.user.password
=
${spring.security.user.password}
spring.boot.admin.client.username
=
admin
spring.boot.admin.client.password
=
a1234560
management.security.enabled
=
false
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
\ No newline at end of file
src/main/resources/application-qa.properties
0 → 100644
View file @
fd223103
#DB properties:
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://172.16.3.67:3306/systemdeveloper?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
root_123
#eureka properties:
eureka.instance.hostname
=
172.16.10.72
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
#redis
spring.redis.database
=
0
spring.redis.host
=
172.16.10.85
spring.redis.port
=
6379
spring.redis.password
=
amos2019Redis
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
a123456
security.systemctl.name
=
AMOS-API-SYSTEMCTL
knife4j.production
=
false
knife4j.enable
=
true
knife4j.basic.enable
=
true
knife4j.basic.username
=
admin
knife4j.basic.password
=
a1234560
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
spring.boot.admin.client.enabled
=
true
spring.boot.admin.client.instance.metadata.user.name
=
${spring.security.user.name}
spring.boot.admin.client.instance.metadata.user.password
=
${spring.security.user.password}
spring.boot.admin.client.username
=
admin
spring.boot.admin.client.password
=
a1234560
management.security.enabled
=
false
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
\ No newline at end of file
src/main/resources/application.properties
View file @
fd223103
spring.application.name
=
AMOS-API-TOOL
server.port
=
30201
server.servlet.context-path
=
/tool
spring.application.name
=
DemoProject
server.servlet.context-path
=
/jcs
server.port
=
20000
spring.profiles.active
=
dev
spring.jackson.dateFormat
=
yyyy-MM-dd HH:mm:ss
management.health.elasticsearch.enabled
=
false
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
#mybatis-plus\uFFFD\uFFFD\uFFFD\uFFFD\u05BE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02B9\uFFFD\uFFFDmybatis\uFFFD\u0123\uFFFD\uFFFD\uFFFD\uFFFD\u04B2\uFFFD\uFFFD\uFFFD
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
# mybatis-plus
mybatis-plus.mapper-locations
=
classpath*:mapper/*Mapper.xml
mybatis-plus.type-aliases-super-type
=
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
mybatis-plus.global-config.db-config.id-type
=
id_worker
mybatis-plus.global-config.db-config.logic-delete-field
=
is_delete
mybatis-plus.global-config.db-config.logic-delete-value
=
1
mybatis-plus.global-config.db-config.logic-not-delete-value
=
0
mybatis.interceptor.enabled
=
true
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
10
spring.datasource.hikari.maximum-pool-size
=
25
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
120000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
\ No newline at end of file
src/main/resources/logback-dev.xml
View file @
fd223103
...
...
@@ -16,10 +16,11 @@
<logger
name=
"org.apache.activemq"
level=
"INFO"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<logger
name=
"
com.yeejoin.amos
"
level=
"DEBUG"
/>
<logger
name=
"
org.typroject
"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
\ No newline at end of file
</configuration>
src/main/resources/logback-qa.xml
0 → 100644
View file @
fd223103
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/jcs.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
30mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"INFO"
/>
<logger
name=
"org.mybatis"
level=
"INFO"
/>
<logger
name=
"java.sql.Connection"
level=
"INFO"
/>
<logger
name=
"java.sql.Statement"
level=
"INFO"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"INFO"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"INFO"
/>
<logger
name=
"org.typroject"
level=
"INFO"
/>
<logger
name=
"com.yeejoin"
level=
"INFO"
/>
<logger
name=
"org.springframework"
level=
"INFO"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
src/main/resources/mapper/ApiInfoMapper.xml
0 → 100644
View file @
fd223103
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.api.tool.face.orm.dao.ApiInfoMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mapper/ApiSourceMapper.xml
0 → 100644
View file @
fd223103
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.api.tool.face.orm.dao.ApiSourceMapper"
>
</mapper>
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