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
75c12bad
Commit
75c12bad
authored
Aug 18, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into developer
parents
52c7831d
d28bc056
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
435 deletions
+0
-435
AppVersion.java
...a/com/yeejoin/amos/maintenance/dao/entity/AppVersion.java
+0
-124
Config.java
.../java/com/yeejoin/amos/maintenance/dao/entity/Config.java
+0
-59
CommonController.java
...mos/maintenance/business/controller/CommonController.java
+0
-68
ConfigController.java
...mos/maintenance/business/controller/ConfigController.java
+0
-56
MsgController.java
...n/amos/maintenance/business/controller/MsgController.java
+0
-0
UserController.java
.../amos/maintenance/business/controller/UserController.java
+0
-0
AppVersionDao.java
...os/maintenance/business/dao/repository/AppVersionDao.java
+0
-12
IConfigDao.java
.../amos/maintenance/business/dao/repository/IConfigDao.java
+0
-12
AppServiceImpl.java
...mos/maintenance/business/service/impl/AppServiceImpl.java
+0
-85
IAppService.java
.../amos/maintenance/business/service/intfc/IAppService.java
+0
-19
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/AppVersion.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Where
;
@Entity
@Table
(
name
=
"p_app_version"
)
@NamedQuery
(
name
=
"AppVersion.findAll"
,
query
=
"SELECT c FROM AppVersion c"
)
@Where
(
clause
=
"is_latest_version=1"
)
//表示未删除的数据
public
class
AppVersion
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
-
3207180951171522450L
;
/**
* app版本
*/
@Column
(
name
=
"version"
)
private
String
version
;
/**
* 版本说明
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
/**
* app发布人id
*/
@Column
(
name
=
"publisher"
)
private
int
publisher
;
/**
* app发布人名称
*/
@Column
(
name
=
"publisher_name"
)
private
String
publisherName
;
/**
* 是否需要强制更新
*/
@Column
(
name
=
"update_type"
)
private
int
updateType
;
/**
* 是否为最新版本
*/
@Column
(
name
=
"is_latest_version"
)
private
Boolean
isLatestVersion
;
/**
* app保存路径
*/
@Column
(
name
=
"url"
)
private
String
url
;
public
String
getVersion
()
{
return
version
;
}
public
void
setVersion
(
String
version
)
{
this
.
version
=
version
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
int
getPublisher
()
{
return
publisher
;
}
public
void
setPublisher
(
int
publisher
)
{
this
.
publisher
=
publisher
;
}
public
String
getPublisherName
()
{
return
publisherName
;
}
public
void
setPublisherName
(
String
publisherName
)
{
this
.
publisherName
=
publisherName
;
}
public
int
getUpdateType
()
{
return
updateType
;
}
public
void
setUpdateType
(
int
updateType
)
{
this
.
updateType
=
updateType
;
}
public
Boolean
getIsLatestVersion
()
{
return
isLatestVersion
;
}
public
void
setIsLatestVersion
(
Boolean
isLatestVersion
)
{
this
.
isLatestVersion
=
isLatestVersion
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
static
long
getSerialversionuid
()
{
return
serialVersionUID
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/Config.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
@Entity
@Table
(
name
=
"p_config"
)
@NamedQuery
(
name
=
"Config.findAll"
,
query
=
"SELECT c FROM Config c"
)
public
class
Config
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 描述
*/
@Column
(
name
=
"des"
)
private
String
des
;
/**
* 名称
*/
@Column
(
name
=
"name"
)
private
String
name
;
/**
* 属性
*/
@Column
(
name
=
"attribute"
)
private
String
attribute
;
public
String
getDes
()
{
return
des
;
}
public
void
setDes
(
String
des
)
{
this
.
des
=
des
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAttribute
()
{
return
attribute
;
}
public
void
setAttribute
(
String
attribute
)
{
this
.
attribute
=
attribute
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CommonController.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IAppService
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.common.enums.CheckStatisticsTypeEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskExecution
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.maintenance.common.enums.TaskStatisticsTypeEnum
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@RestController
@RequestMapping
(
value
=
"/api/common"
)
@Api
(
tags
=
"公共接口api"
)
public
class
CommonController
extends
AbstractBaseController
{
/*@Autowired
IUserService userService;*/
@Autowired
private
IAppService
iAppService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务统计口径类型"
,
notes
=
"任务统计口径类型"
)
@RequestMapping
(
value
=
"/taskgetStatisticsType"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getTaskStatisticsType
()
{
return
CommonResponseUtil
.
success
(
TaskStatisticsTypeEnum
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检统计口径类型"
,
notes
=
"巡检统计口径类型"
)
@RequestMapping
(
value
=
"/checkStatisticsType"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCheckStatisticsType
()
{
return
CommonResponseUtil
.
success
(
CheckStatisticsTypeEnum
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"计划任务完成种类"
,
notes
=
"计划任务完成种类"
)
@RequestMapping
(
value
=
"/planTaskFinishStatus"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskFinishStatus
()
{
return
CommonResponseUtil
.
success
(
PlanTaskFinishStatusEnum
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划任务执行情况种类"
,
notes
=
"计划任务执行情况种类"
)
@RequestMapping
(
value
=
"/planTaskExecution"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskExecution
()
{
return
CommonResponseUtil
.
success
(
PlanTaskExecution
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取app最新版本信息"
,
notes
=
"获取app最新版本信息"
)
@RequestMapping
(
value
=
"/queryAppVersion"
,
method
=
RequestMethod
.
GET
)
//@Authorization(ingore=true)
public
CommonResponse
getAppLastVersion
()
{
return
CommonResponseUtil
.
success
(
iAppService
.
queryAppLastVersion
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/ConfigController.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IConfigDao
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.Config
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 获取主题信息
*
* @author
*
*/
@RestController
@RequestMapping
(
value
=
"/api/config"
)
@Api
(
tags
=
"配置接口api"
)
public
class
ConfigController
extends
AbstractBaseController
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
ConfigController
.
class
);
@Autowired
private
IConfigDao
configDao
;
/**
* <pre>
* 获取配置接口信息
* </pre>
*
*
* @return
*/
//@Authorization(ingore = true)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取配置接口信息"
,
notes
=
" 获取配置接口信息"
)
@RequestMapping
(
value
=
"/getConfigsInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getConfigsInfo
()
{
List
<
Config
>
configs
=
configDao
.
findAll
();
return
CommonResponseUtil
.
success
(
configs
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/MsgController.java
deleted
100644 → 0
View file @
52c7831d
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/UserController.java
View file @
75c12bad
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/AppVersionDao.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
dao
.
repository
;
import
org.springframework.data.jpa.repository.Query
;
import
com.yeejoin.amos.maintenance.dao.entity.AppVersion
;
public
interface
AppVersionDao
extends
BaseDao
<
AppVersion
,
Long
>{
@Query
(
value
=
"SELECT * FROM p_app_version v ORDER BY v.id DESC LIMIT 0,1"
,
nativeQuery
=
true
)
AppVersion
findLastVersion
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/IConfigDao.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
dao
.
repository
;
import
java.util.List
;
import
org.springframework.stereotype.Repository
;
import
com.yeejoin.amos.maintenance.dao.entity.Config
;
@Repository
(
"configDao"
)
public
interface
IConfigDao
extends
BaseDao
<
Config
,
Long
>{
List
<
Config
>
findAll
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/AppServiceImpl.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.AppVersionDao
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IMsgSubscribeDao
;
import
com.yeejoin.amos.maintenance.business.param.UserMsgInitParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IAppService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IMsgSubscribeService
;
import
com.yeejoin.amos.maintenance.common.enums.MsgSubscribeTypeEnum
;
import
com.yeejoin.amos.maintenance.dao.entity.AppVersion
;
import
com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe
;
import
org.assertj.core.util.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
(
"iAppService"
)
public
class
AppServiceImpl
implements
IAppService
{
@Autowired
private
IMsgSubscribeDao
msgSubscribeDao
;
@Autowired
private
AppVersionDao
appVersionDao
;
@Autowired
private
IMsgSubscribeService
msgSubscribeService
;
@Autowired
private
PlanTaskMapper
planTaskMapper
;
@Override
public
AppVersion
queryAppLastVersion
()
{
// TODO Auto-generated method stub
return
appVersionDao
.
findLastVersion
();
}
/**
* 新增用户时初始化消息订阅(p_msg_subscribe)表
*
* @param userDTO
*/
@Override
public
List
<
MsgSubscribe
>
saveUserMsgInit
(
UserMsgInitParam
userInitParam
)
{
Long
count
=
msgSubscribeDao
.
countByUserId
(
userInitParam
.
getUserId
());
if
(
count
>
0
)
{
// 已存在用户订阅,直接返回
return
msgSubscribeService
.
queryMsgSubscribes
(
userInitParam
.
getUserId
());
}
List
<
MsgSubscribe
>
msgConfigs
=
new
ArrayList
<
MsgSubscribe
>();
for
(
MsgSubscribeTypeEnum
type
:
MsgSubscribeTypeEnum
.
values
())
{
MsgSubscribe
msgSub
=
new
MsgSubscribe
();
msgSub
.
setOrgCode
(
userInitParam
.
getOrgCode
());
msgSub
.
setUserId
(
userInitParam
.
getUserId
());
if
(
type
.
equals
(
MsgSubscribeTypeEnum
.
PLANBEGIN
)
||
type
.
equals
(
MsgSubscribeTypeEnum
.
PLANWARN
)
||
type
.
equals
(
MsgSubscribeTypeEnum
.
PLANEND
))
{
msgSub
.
setAttribute1
(
"False"
);
msgSub
.
setAttribute2
(
10
+
""
);
}
else
if
(
type
.
equals
(
MsgSubscribeTypeEnum
.
CHECKTYPE
)
||
type
.
equals
(
MsgSubscribeTypeEnum
.
CHECKEMAIL
))
{
msgSub
.
setAttribute1
(
"error"
);
}
msgSub
.
setMsgType
(
type
.
getName
());
msgSubscribeDao
.
saveAndFlush
(
msgSub
);
msgConfigs
.
add
(
msgSub
);
}
return
msgConfigs
;
}
@Override
public
List
<
String
>
getHaveToDoList
(
String
userId
)
{
int
taskCount
=
planTaskMapper
.
getCurrentPlanTaskCount
(
userId
);
List
<
String
>
havetoDoList
=
Lists
.
newArrayList
();
if
(
taskCount
>
0
)
{
havetoDoList
.
add
(
"planPatrol"
);
}
return
havetoDoList
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/IAppService.java
deleted
100644 → 0
View file @
52c7831d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
intfc
;
import
java.util.List
;
import
com.yeejoin.amos.maintenance.business.param.UserMsgInitParam
;
import
com.yeejoin.amos.maintenance.dao.entity.AppVersion
;
import
com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe
;
public
interface
IAppService
{
AppVersion
queryAppLastVersion
();
List
<
MsgSubscribe
>
saveUserMsgInit
(
UserMsgInitParam
userInitParam
);
List
<
String
>
getHaveToDoList
(
String
userId
);
}
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