Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
7c7ad9e3
Commit
7c7ad9e3
authored
Jul 04, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改app自动更新(19/7/04)
parent
4b9e054b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
0 deletions
+110
-0
AppVersionBiz.java
...rc/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
+41
-0
AppVersionController.java
...java/com/xxfc/platform/app/rest/AppVersionController.java
+38
-0
BaseAuthentication.java
...a/com/xxfc/platform/universal/api/BaseAuthentication.java
+14
-0
FQAuthentication.java
...om/xxfc/platform/universal/api/impl/FQAuthentication.java
+13
-0
Authentication.java
.../com/xxfc/platform/universal/api/pojo/Authentication.java
+4
-0
No files found.
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
View file @
7c7ad9e3
...
@@ -23,11 +23,13 @@ import org.springframework.stereotype.Service;
...
@@ -23,11 +23,13 @@ import org.springframework.stereotype.Service;
import
com.xxfc.platform.app.entity.AppVersion
;
import
com.xxfc.platform.app.entity.AppVersion
;
import
com.xxfc.platform.app.mapper.AppVersionMapper
;
import
com.xxfc.platform.app.mapper.AppVersionMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -112,5 +114,44 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -112,5 +114,44 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
return
new
ResponseEntity
<
byte
[]>(
FileUtils
.
readFileToByteArray
(
file
),
headers
,
HttpStatus
.
CREATED
);
return
new
ResponseEntity
<
byte
[]>(
FileUtils
.
readFileToByteArray
(
file
),
headers
,
HttpStatus
.
CREATED
);
}
}
/**
* 添加版本信息
* @param appVersion
*/
@Transactional
public
void
insertAppVersion
(
AppVersion
appVersion
)
{
appVersion
.
setDownloadSwitch
(
0
);
insertSelective
(
appVersion
);
}
public
AppVersion
get
(
Integer
id
)
{
if
(
id
==
null
)
{
throw
new
IllegalArgumentException
(
"Parameter is null"
);
}
return
selectById
(
id
);
}
/**
* 修改一条信息
* @param appVersion
*/
@Transactional
public
void
updateAppVersionById
(
AppVersion
appVersion
)
{
updateSelectiveById
(
appVersion
);
}
/**
* 删除
* @param id
*/
public
void
remove
(
Integer
id
)
{
AppVersion
appVersion
=
new
AppVersion
();
appVersion
.
setIsDel
(
1
);
Example
example
=
Example
.
builder
(
AppVersion
.
class
)
.
where
(
WeekendSqls
.<
AppVersion
>
custom
().
andEqualTo
(
AppVersion:
:
getId
,
id
))
.
build
();
mapper
.
updateByExampleSelective
(
appVersion
,
example
);
}
}
}
\ No newline at end of file
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/AppVersionController.java
View file @
7c7ad9e3
...
@@ -34,6 +34,8 @@ import java.util.List;
...
@@ -34,6 +34,8 @@ import java.util.List;
public
class
AppVersionController
extends
BaseController
<
AppVersionBiz
,
AppVersion
>
{
public
class
AppVersionController
extends
BaseController
<
AppVersionBiz
,
AppVersion
>
{
//最大上传500MB
//最大上传500MB
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
500L
;
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
500L
;
private
int
id
;
@ApiModelProperty
(
"app自动更新"
)
@ApiModelProperty
(
"app自动更新"
)
@RequestMapping
(
value
=
"/app/unauth/info"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/info"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@IgnoreUserToken
...
@@ -45,6 +47,42 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
...
@@ -45,6 +47,42 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
}
}
@Override
@ApiOperation
(
"添加"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ObjectRestResponse
<
AppVersion
>
add
(
@RequestBody
AppVersion
appVersion
){
baseBiz
.
insertAppVersion
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
}
@ApiOperation
(
"查询"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
AppVersion
>
get
(
@PathVariable
Integer
id
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
get
(
id
));
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
ObjectRestResponse
<
AppVersion
>
update
(
@RequestBody
AppVersion
appVersion
){
baseBiz
.
updateAppVersionById
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
ObjectRestResponse
<
AppVersion
>
remove
(
@PathVariable
Integer
id
){
baseBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
AppVersion
>();
}
@PostMapping
(
value
=
"/upload/installationPackage"
)
@PostMapping
(
value
=
"/upload/installationPackage"
)
@ApiOperation
(
value
=
"上传app安装包"
)
@ApiOperation
(
value
=
"上传app安装包"
)
public
RestResponse
uploadInstallationPackage
(
@RequestParam
(
"file"
)
MultipartFile
file
)
public
RestResponse
uploadInstallationPackage
(
@RequestParam
(
"file"
)
MultipartFile
file
)
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/api/BaseAuthentication.java
0 → 100644
View file @
7c7ad9e3
package
com
.
xxfc
.
platform
.
universal
.
api
;
import
com.xxfc.platform.universal.api.pojo.Authentication
;
import
com.xxfc.platform.universal.entity.IdInformation
;
/**
* 调用外部接口实现类。调用不同的外部接口,需要编写不同了类实现该类
*/
public
interface
BaseAuthentication
{
Authentication
getAuthentication
(
IdInformation
idInformation
);
}
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/api/impl/FQAuthentication.java
0 → 100644
View file @
7c7ad9e3
package
com
.
xxfc
.
platform
.
universal
.
api
.
impl
;
import
com.xxfc.platform.universal.api.BaseAuthentication
;
import
com.xxfc.platform.universal.api.pojo.Authentication
;
import
com.xxfc.platform.universal.entity.IdInformation
;
public
class
FQAuthentication
implements
BaseAuthentication
{
@Override
public
Authentication
getAuthentication
(
IdInformation
idInformation
)
{
return
null
;
}
}
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/api/pojo/Authentication.java
0 → 100644
View file @
7c7ad9e3
package
com
.
xxfc
.
platform
.
universal
.
api
.
pojo
;
public
class
Authentication
{
}
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