Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
chnmuseum-party
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
liqin
chnmuseum-party
Commits
2e89f4bd
Commit
2e89f4bd
authored
Apr 16, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
cfaabc74
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
18 deletions
+37
-18
AssetMapper.java
...java/cn/wisenergy/chnmuseum/party/mapper/AssetMapper.java
+4
-0
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+1
-0
LoginController.java
...nergy/chnmuseum/party/web/controller/LoginController.java
+32
-18
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/mapper/AssetMapper.java
View file @
2e89f4bd
...
...
@@ -21,6 +21,10 @@ public interface AssetMapper extends BaseMapper<Asset> {
"where a.ref_item_id = vc.id "
+
"and vc.video_content_cat_id = vcc.id "
+
"and vc.video_content_copyright_owner_id = co.id "
+
"and vc.is_published = 1 and vc.is_deleted = 0 "
+
"and co.is_deleted = 0 and vcc.is_deleted = 0 "
+
"<![CDATA[and co.expire_date_start <= DATE_FORMAT(now(), '%Y-%m-%d') ]]>"
+
"<![CDATA[and co.expire_date_end >= DATE_FORMAT(now(), '%Y-%m-%d') ]]>"
+
"<if test='videoContentCatId != null'>and vcc.id = #{videoContentCatId} </if>"
+
"<if test='videoContentCopyrightOwnerId != null'>and co.id = #{videoContentCopyrightOwnerId} </if>"
+
"order by a.create_time desc"
+
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
2e89f4bd
...
...
@@ -119,6 +119,7 @@ public class CopyrightOwnerController extends BaseController {
public
Map
<
String
,
Object
>
updateCopyrightOwner
(
@Validated
(
value
=
{
Update
.
class
})
CopyrightOwner
copyrightOwner
)
{
final
LambdaQueryWrapper
<
CopyrightOwner
>
lambdaQueryWrapper
=
Wrappers
.<
CopyrightOwner
>
lambdaQuery
().
eq
(
CopyrightOwner:
:
getName
,
copyrightOwner
.
getName
().
trim
());
lambdaQueryWrapper
.
eq
(
CopyrightOwner:
:
getOwnerType
,
copyrightOwner
.
getOwnerType
().
trim
());
lambdaQueryWrapper
.
ne
(
CopyrightOwner:
:
getId
,
copyrightOwner
.
getId
());
final
int
count
=
this
.
copyrightOwnerService
.
count
(
lambdaQueryWrapper
);
if
(
count
>
0
)
{
return
getFailResult
(
"400"
,
"名称已存在,请修改名称"
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LoginController.java
View file @
2e89f4bd
...
...
@@ -16,6 +16,8 @@ import cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -261,6 +263,36 @@ public class LoginController extends BaseController {
}
}
@ApiOperation
(
value
=
"H5/PAD登录二维码"
,
notes
=
"H5/PAD登录二维码"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"clientType"
,
value
=
"客户端类型"
,
dataType
=
"String"
,
paramType
=
"query"
,
allowableValues
=
"PAD, H5"
),
@ApiImplicitParam
(
name
=
"width"
,
value
=
"二维码宽度"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"height"
,
value
=
"二维码高度"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@GetMapping
(
value
=
"loginByQrCode"
)
public
ResponseEntity
<
byte
[]>
loginByQrCode
(
@RequestParam
(
value
=
"clientType"
)
String
clientType
,
@RequestParam
(
value
=
"width"
,
required
=
false
,
defaultValue
=
"150"
)
int
width
,
@RequestParam
(
value
=
"height"
,
required
=
false
,
defaultValue
=
"150"
)
int
height
,
HttpServletRequest
request
)
{
String
regUrl
;
if
(
"H5"
.
equalsIgnoreCase
(
clientType
))
{
regUrl
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":8088/h5/login"
;
}
else
{
regUrl
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":8088/plat/#/login"
;
}
QrConfig
config
=
new
QrConfig
(
width
,
height
);
config
.
setCharset
(
StandardCharsets
.
UTF_8
);
config
.
setMargin
(
1
);
config
.
setWidth
(
width
);
config
.
setHeight
(
height
);
final
byte
[]
bytes
=
QrCodeUtil
.
generatePng
(
regUrl
,
config
);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
IMAGE_PNG
);
headers
.
setContentLength
(
bytes
.
length
);
return
new
ResponseEntity
<>(
bytes
,
headers
,
HttpStatus
.
OK
);
}
@RequestMapping
(
value
=
{
"/verifyCode1"
},
method
=
{
RequestMethod
.
GET
},
produces
=
MediaType
.
IMAGE_JPEG_VALUE
)
public
@ResponseBody
byte
[]
verifyCode1
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Integer
width
,
Integer
height
)
{
...
...
@@ -298,22 +330,4 @@ public class LoginController extends BaseController {
return
null
;
}
@ApiOperation
(
value
=
"H5/PAD登录二维码"
,
notes
=
"H5/PAD登录二维码"
,
httpMethod
=
"GET"
)
@GetMapping
(
value
=
"loginByQrCode"
)
public
ResponseEntity
<
byte
[]>
loginByQrCode
(
@RequestParam
(
value
=
"width"
,
required
=
false
,
defaultValue
=
"150"
)
int
width
,
@RequestParam
(
value
=
"height"
,
required
=
false
,
defaultValue
=
"150"
)
int
height
,
HttpServletRequest
request
)
{
String
regFullUrl
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":8088/h5/login"
;
QrConfig
config
=
new
QrConfig
(
width
,
height
);
config
.
setCharset
(
StandardCharsets
.
UTF_8
);
config
.
setMargin
(
1
);
config
.
setWidth
(
width
);
config
.
setHeight
(
height
);
final
byte
[]
bytes
=
QrCodeUtil
.
generatePng
(
regFullUrl
,
config
);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
IMAGE_PNG
);
headers
.
setContentLength
(
bytes
.
length
);
return
new
ResponseEntity
<>(
bytes
,
headers
,
HttpStatus
.
OK
);
}
}
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