记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
6f4c6b13
Commit
6f4c6b13
authored
Jun 10, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
d87d000c
a3ec1a87
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
294 additions
and
29 deletions
+294
-29
KylinBannersAdminController.java
...ontroller/zhengzai/kylin/KylinBannersAdminController.java
+82
-1
application-client-admin-web.yml
...n-web/src/main/resources/application-client-admin-web.yml
+1
-1
application-dev.yml
...t-client-admin-web/src/main/resources/application-dev.yml
+5
-0
application-prod.yml
...-client-admin-web/src/main/resources/application-prod.yml
+5
-0
application-test.yml
...-client-admin-web/src/main/resources/application-test.yml
+5
-0
create.html
...in/resources/templates/zhengzai/kylin/banners/create.html
+54
-10
update.html
...in/resources/templates/zhengzai/kylin/banners/update.html
+63
-8
KylinBannersServiceImpl.java
.../zhengzai/kylin/service/impl/KylinBannersServiceImpl.java
+6
-1
pom.xml
liquidnet-bus-client/liquidnet-client-admin/pom.xml
+4
-1
pom.xml
liquidnet-bus-client/pom.xml
+5
-0
FilesUtils.java
...main/java/com/liquidnet/commons/lang/util/FilesUtils.java
+59
-0
KylinBannersMapper.xml
...com.liquidnet.service.kylin.mapper/KylinBannersMapper.xml
+1
-1
KylinPerformancesServiceImpl.java
...vice/kylin/service/impl/KylinPerformancesServiceImpl.java
+4
-6
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/KylinBannersAdminController.java
View file @
6f4c6b13
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
kylin
;
import
com.aliyun.oss.OSS
;
import
com.aliyun.oss.OSSClientBuilder
;
import
com.aliyun.oss.model.PutObjectRequest
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.client.admin.common.config.RuoYiConfig
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.common.enums.BannersDisplayLocation
;
import
com.liquidnet.client.admin.common.enums.BannersTargetType
;
import
com.liquidnet.client.admin.common.utils.file.FileUploadUtils
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinBannersServiceImpl
;
import
com.liquidnet.commons.lang.util.FilesUtils
;
import
com.liquidnet.service.kylin.dao.BannerDetailsListDao
;
import
com.liquidnet.service.kylin.dto.param.BannersParam
;
import
com.liquidnet.service.kylin.dto.param.BannersSearchParam
;
...
...
@@ -17,8 +23,14 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.UUID
;
/**
* <p>
...
...
@@ -66,6 +78,13 @@ public class KylinBannersAdminController extends BaseController {
@Value
(
"${liquidnet.url-banner.url26}"
)
private
String
url26
;
@Value
(
"${liquidnet.al-oss.endpoint}"
)
private
String
endpoint
;
@Value
(
"${liquidnet.al-oss.accessKeyId}"
)
private
String
accessKeyId
;
@Value
(
"${liquidnet.al-oss.accessKeySecret}"
)
private
String
accessKeySecret
;
@Autowired
private
KylinBannersServiceImpl
kylinBannersServiceImpl
;
...
...
@@ -148,7 +167,7 @@ public class KylinBannersAdminController extends BaseController {
@RequiresPermissions
(
"kylin:banners:update"
)
@PostMapping
(
"update"
)
@ResponseBody
public
AjaxResult
updateSave
(
@RequestBody
BannersParam
bannersParam
)
{
public
AjaxResult
updateSave
(
BannersParam
bannersParam
)
{
boolean
res
=
kylinBannersServiceImpl
.
update
(
bannersParam
);
if
(
res
)
{
return
success
();
...
...
@@ -187,4 +206,66 @@ public class KylinBannersAdminController extends BaseController {
}
}
/**
* 文件上传
*/
@PostMapping
(
"/upload1"
)
@ResponseBody
public
String
upload1
(
@RequestParam
MultipartFile
coverImg
)
{
try
{
if
(!
coverImg
.
isEmpty
())
{
String
avatar
=
FileUploadUtils
.
upload
(
RuoYiConfig
.
getAvatarPath
(),
coverImg
);
return
avatar
;
}
return
"error"
;
}
catch
(
Exception
e
)
{
return
"success"
;
}
}
@PostMapping
(
"/upload2"
)
@ResponseBody
public
String
upload2
(
@RequestParam
MultipartFile
coverImg
)
{
if
(
coverImg
.
isEmpty
())
{
return
"上传失败,请选择文件"
;
}
String
fileName
=
coverImg
.
getOriginalFilename
();
String
filePath
=
RuoYiConfig
.
getAvatarPath
();
File
dest
=
new
File
(
filePath
+
fileName
);
try
{
coverImg
.
transferTo
(
dest
);
return
dest
.
getName
();
}
catch
(
IOException
e
)
{
return
"上传失败!"
;
}
}
@PostMapping
(
"/upload3"
)
@ResponseBody
public
HashMap
upload3
(
@RequestParam
MultipartFile
coverImgFile
)
{
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
);
File
file
=
null
;
try
{
file
=
FilesUtils
.
multipartFileToFile
(
coverImgFile
);
}
catch
(
Exception
e
)
{
return
new
HashMap
<>();
}
String
filename
=
coverImgFile
.
getResource
().
getFilename
();
// time.jpeg
//这里文件名用了uuid 防止重复,可以根据自己的需要来写
String
uploadName
=
UUID
.
randomUUID
()
+
filename
.
substring
(
filename
.
lastIndexOf
(
"."
));
// 078a77e0-cf80-481b-824c-5935247cff15.jpeg
uploadName
=
uploadName
.
replace
(
"-"
,
""
);
// 078a77e0cf80481b824c5935247cff15.jpeg
String
uploadpath
=
"banner/"
+
uploadName
;
PutObjectRequest
putObjectRequest
=
new
PutObjectRequest
(
"img-zhengzai-tv"
,
uploadpath
,
file
);
ossClient
.
putObject
(
putObjectRequest
);
ossClient
.
shutdown
();
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
objectObjectHashMap
.
put
(
"uploadpath"
,
uploadpath
);
return
objectObjectHashMap
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-client-admin-web.yml
View file @
6f4c6b13
...
...
@@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关
demoEnabled
:
true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile
:
/us
ers/anjiabin/ruoyi
/uploadPath
profile
:
/us
r/local/var/www
/uploadPath
# 获取ip地址开关
addressEnabled
:
false
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-dev.yml
View file @
6f4c6b13
...
...
@@ -43,6 +43,11 @@ liquidnet:
url23
:
"
https://devmediaapi.zhengzai.tv/api/play/list?page=1&per_page=50"
#视频播单
url24
:
"
https://devmerchantapi.zhengzai.tv/admin/mis/musician/collect?page=1&per_page=50"
#音乐人合集
url26
:
"
https://devpassport.zhengzai.tv/admin/vip/card/list?page=1&per_page=50&status=1"
#摩登会员
al-oss
:
imgUrl
:
"
https://img.zhengzai.tv/"
endpoint
:
http://oss-cn-hangzhou.aliyuncs.com
accessKeyId
:
LTAI4FxrURzMvvu9reFgwY5o
accessKeySecret
:
Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV
# end-dev-这里是配置信息基本值
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-prod.yml
View file @
6f4c6b13
...
...
@@ -43,6 +43,11 @@ liquidnet:
url23
:
"
https://mediaapi.zhengzai.tv/api/play/list?page=1&per_page=50"
#视频播单
url24
:
"
https://merchantapi.zhengzai.tv/admin/mis/musician/collect?page=1&per_page=50"
#音乐人合集
url26
:
"
https://passport.zhengzai.tv/admin/vip/card/list?page=1&per_page=50&status=1"
#摩登会员
al-oss
:
imgUrl
:
"
https://img.zhengzai.tv/"
endpoint
:
http://oss-cn-hangzhou.aliyuncs.com
accessKeyId
:
LTAI4FxrURzMvvu9reFgwY5o
accessKeySecret
:
Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV
# end-dev-这里是配置信息基本值
spring
:
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/application-test.yml
View file @
6f4c6b13
...
...
@@ -43,6 +43,11 @@ liquidnet:
url23
:
"
https://testmediaapi.zhengzai.tv/api/play/list?page=1&per_page=50"
#视频播单
url24
:
"
https://testmerchantapi.zhengzai.tv/admin/mis/musician/collect?page=1&per_page=50"
#音乐人合集
url26
:
"
https://testpassport.zhengzai.tv/admin/vip/card/list?page=1&per_page=50&status=1"
#摩登会员
al-oss
:
imgUrl
:
"
https://img.zhengzai.tv/"
endpoint
:
http://oss-cn-hangzhou.aliyuncs.com
accessKeyId
:
LTAI4FxrURzMvvu9reFgwY5o
accessKeySecret
:
Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV
# end-dev-这里是配置信息基本值
spring
:
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/banners/create.html
View file @
6f4c6b13
...
...
@@ -4,6 +4,7 @@
<th:block
th:include=
"include :: header('添加banner')"
/>
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
...
@@ -56,14 +57,15 @@
</div>
<div
class=
"form-group"
id=
"provincesListSelect"
>
<label
class=
"col-sm-2 control-label"
>
请选择省份
</label>
<div
class=
"col-sm-5"
>
<select
id=
"provincesList"
class=
"form-control"
name=
"provincesList"
>
</select>
</div>
<div
class=
"col-sm-5"
>
<button
type=
"button"
class=
"btn btn-danger btn-sm"
>
删除
</button>
<button
type=
"button"
class=
"btn btn-success btn-sm"
>
添加
</button>
<div
class=
"col-sm-12 provincesAll"
>
<label
class=
"col-sm-2 control-label"
></label>
<div
class=
"col-sm-5"
>
<select
class=
"form-control provincesList"
name=
"provincesList"
></select>
</div>
<div
class=
"col-sm-5"
>
<button
type=
"button"
class=
"btn btn-danger btn-sm provincesDel"
>
删除
</button>
<button
type=
"button"
class=
"btn btn-success btn-sm provincesAdd"
>
添加
</button>
</div>
</div>
</div>
<div
class=
"form-group"
>
...
...
@@ -93,11 +95,19 @@
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"font-noraml"
>
请上传封面图
</label>
<div
class=
"file-loading"
>
<input
id=
"fileinput-demo-1"
type=
"file"
name=
"coverImgFile"
>
</div>
</div>
<input
hidden
id=
"coverImg"
name=
"coverImg"
>
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<th:block
th:include=
"include :: datetimepicker-js"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
type=
"text/javascript"
>
var
prefix
=
ctx
+
"kylin/banners"
;
var
provinces
=
"[[${provinces}]]"
;
...
...
@@ -151,6 +161,11 @@
return
false
;
}
}
var
coverImg
=
$
(
'#coverImg'
).
val
();
if
(
!
coverImg
)
{
layer
.
msg
(
"请上传图片,请勿忘记点击上传按钮先上传图片哦~"
);
return
false
;
}
data
.
push
({
"name"
:
"targetObj"
,
"value"
:
targetObj
});
/*data.push({"name": "positionList", "value": positionList});
var provincesList = $.form.selectSelects("provincesList");
...
...
@@ -218,6 +233,27 @@
form.render();*/
});
$
(
'body'
).
on
(
'click'
,
'.provincesDel'
,
function
(){
$
(
this
).
parents
(
'.provincesAll'
).
remove
();
})
$
(
'body'
).
on
(
'click'
,
'.provincesAdd'
,
function
(){
var
selecthtml
=
$
(
'.provincesList'
).
eq
(
0
).
select2
(
"destroy"
).
html
();
var
html
=
'<div class="col-sm-12 provincesAll">'
+
' <label class="col-sm-2 control-label"></label>'
+
' <div class="col-sm-5"><select class="form-control provincesList" name="provincesList">'
;
html
+=
selecthtml
;
html
+=
'</select></div>'
+
' <div class="col-sm-5">'
+
' <button type="button" class="btn btn-danger btn-sm provincesDel">删除</button>'
+
' <button type="button" class="btn btn-success btn-sm provincesAdd">添加</button>'
+
' </div>'
+
' </div>'
;
$
(
this
).
parents
(
'.provincesAll'
).
after
(
html
)
$
(
"select"
).
select2
();
})
// 获取省份数据
var
configProvinces
=
{
url
:
provinces
,
...
...
@@ -233,7 +269,7 @@
html
+=
'<option value="'
+
result
[
i
].
adcode
+
'">'
+
result
[
i
].
name
+
'</option>'
;
}
;
$
(
"
#
provincesList"
).
html
(
html
);
$
(
"
.
provincesList"
).
html
(
html
);
}
};
$
.
ajax
(
configProvinces
)
...
...
@@ -259,7 +295,6 @@
}
else
{
var
urlVarName
=
'url'
+
targetType
;
var
url
=
eval
(
urlVarName
);
console
.
log
(
url
)
// 获取相关数据
var
configUrl
=
{
url
:
url
,
...
...
@@ -284,6 +319,15 @@
$
.
ajax
(
configUrl
)
}
});
$
(
"#fileinput-demo-1"
).
fileinput
({
'theme'
:
'explorer-fas'
,
'uploadUrl'
:
"/kylin/banners/upload3"
,
overwriteInitial
:
false
,
initialPreviewAsData
:
true
,
});
$
(
"#fileinput-demo-1"
).
on
(
"fileuploaded"
,
function
(
event
,
data
,
previewId
,
index
)
{
$
(
"#coverImg"
).
val
(
data
.
response
.
uploadpath
)
});
})
</script>
</body>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/banners/update.html
View file @
6f4c6b13
...
...
@@ -4,6 +4,7 @@
<th:block
th:include=
"include :: header('修改banner')"
/>
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
...
@@ -63,12 +64,15 @@
</div>
<div
class=
"form-group"
id=
"provincesListSelect"
>
<label
class=
"col-sm-2 control-label"
>
请选择省份
</label>
<div
class=
"col-sm-5"
>
<select
th:each=
"provinces : ${KylinBannersVo.provincesList}"
class=
"form-control provincesList"
name=
"provincesList"
></select>
</div>
<div
class=
"col-sm-5"
>
<button
type=
"button"
class=
"btn btn-danger btn-sm"
>
删除
</button>
<button
type=
"button"
class=
"btn btn-success btn-sm"
>
添加
</button>
<div
class=
"col-sm-12 provincesAll"
th:each=
"provinces : ${KylinBannersVo.provincesList}"
>
<label
class=
"col-sm-2 control-label"
></label>
<div
class=
"col-sm-5"
>
<select
class=
"form-control provincesList"
name=
"provincesList"
></select>
</div>
<div
class=
"col-sm-5"
>
<button
type=
"button"
class=
"btn btn-danger btn-sm provincesDel"
>
删除
</button>
<button
type=
"button"
class=
"btn btn-success btn-sm provincesAdd"
>
添加
</button>
</div>
</div>
</div>
<div
class=
"form-group"
>
...
...
@@ -102,11 +106,19 @@
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"font-noraml"
>
请上传封面图
</label>
<div
class=
"file-loading"
>
<input
id=
"fileinput-demo-1"
type=
"file"
name=
"coverImgFile"
th:value=
"${KylinBannersVo.coverImg}"
>
</div>
</div>
<input
hidden
id=
"coverImg"
name=
"coverImg"
th:value=
"${KylinBannersVo.coverImg}"
>
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<th:block
th:include=
"include :: datetimepicker-js"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
type=
"text/javascript"
>
var
prefix
=
ctx
+
"kylin/banners"
;
var
provinces
=
"[[${provinces}]]"
;
...
...
@@ -127,6 +139,8 @@
var
targetObj
=
"[[${KylinBannersVo.targetObj}]]"
;
var
targetObjType
=
"[[${KylinBannersVo.targetType}]]"
;
var
provincesListOld
=
"[[${KylinBannersVo.provincesList}]]"
;
var
coverImg
=
"[[${KylinBannersVo.coverImg}]]"
;
var
bannersId
=
"[[${KylinBannersVo.bannersId}]]"
;
function
submitHandler
()
{
var
bannersName
=
$
(
'#bannersName'
).
val
();
...
...
@@ -163,12 +177,18 @@
return
false
;
}
}
var
coverImg
=
$
(
'#coverImg'
).
val
();
if
(
!
coverImg
)
{
layer
.
msg
(
"请上传图片,请勿忘记点击上传按钮先上传图片哦~"
);
return
false
;
}
data
.
push
({
"name"
:
"targetObj"
,
"value"
:
targetObj
});
data
.
push
({
"name"
:
"bannersId"
,
"value"
:
bannersId
});
/*data.push({"name": "positionList", "value": positionList});
var provincesList = $.form.selectSelects("provincesList");
data.push({"name": "provincesList", "value": provincesList});*/
$
.
operate
.
save
(
prefix
+
"/
cre
ate"
,
data
);
$
.
operate
.
save
(
prefix
+
"/
upd
ate"
,
data
);
}
}
...
...
@@ -230,6 +250,27 @@
form.render();*/
});
$
(
'body'
).
on
(
'click'
,
'.provincesDel'
,
function
(){
$
(
this
).
parents
(
'.provincesAll'
).
remove
();
})
$
(
'body'
).
on
(
'click'
,
'.provincesAdd'
,
function
(){
var
selecthtml
=
$
(
'.provincesList'
).
eq
(
0
).
select2
(
"destroy"
).
html
();
var
html
=
'<div class="col-sm-12 provincesAll">'
+
' <label class="col-sm-2 control-label"></label>'
+
' <div class="col-sm-5"><select class="form-control provincesList" name="provincesList">'
;
html
+=
selecthtml
;
html
+=
'</select></div>'
+
' <div class="col-sm-5">'
+
' <button type="button" class="btn btn-danger btn-sm provincesDel">删除</button>'
+
' <button type="button" class="btn btn-success btn-sm provincesAdd">添加</button>'
+
' </div>'
+
' </div>'
;
$
(
this
).
parents
(
'.provincesAll'
).
after
(
html
)
$
(
"select"
).
select2
();
})
// 获取省份数据
var
configProvinces
=
{
url
:
provinces
,
...
...
@@ -259,7 +300,6 @@
alert(sex);
});*/
// 跳转类型选择事件
function
targetType
()
{
var
targetType
=
$
(
'#targetType'
).
select2
(
'val'
);
...
...
@@ -307,6 +347,21 @@
// var targetType = $("#targetType option:checked").val();
targetType
();
});
$
(
"#fileinput-demo-1"
).
fileinput
({
'theme'
:
'explorer-fas'
,
'uploadUrl'
:
"/kylin/banners/upload3"
,
// 'uploadUrl': ctx + "system/user/profile/updateAvatar",
overwriteInitial
:
false
,
initialPreviewAsData
:
true
,
autoReplace
:
true
,
initialPreview
:
[
"https://img.zhengzai.tv/"
+
coverImg
]
});
$
(
"#fileinput-demo-1"
).
on
(
"fileuploaded"
,
function
(
event
,
data
,
previewId
,
index
)
{
$
(
"#coverImg"
).
val
(
data
.
response
.
uploadpath
)
});
})
</script>
</body>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinBannersServiceImpl.java
View file @
6f4c6b13
...
...
@@ -27,6 +27,7 @@ import com.mongodb.client.model.ReturnDocument;
import
org.bson.Document
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.query.Criteria
;
...
...
@@ -51,6 +52,9 @@ import java.util.List;
@Service
public
class
KylinBannersServiceImpl
extends
ServiceImpl
<
KylinBannersMapper
,
KylinBanners
>
implements
IKylinBannersService
{
@Value
(
"${liquidnet.al-oss.imgUrl}"
)
private
String
imgUrl
;
@Autowired
private
KylinBannersMapper
bannersMapper
;
...
...
@@ -219,7 +223,6 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
data
.
setPositionList
(
positionList
);
data
.
setProvincesList
(
provincesList
);
kylinBannersVo
=
new
KylinBannersVo
();
BeanUtils
.
copyProperties
(
data
,
kylinBannersVo
);
}
else
{
return
null
;
...
...
@@ -239,6 +242,8 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
String
typeName
=
BannersTargetType
.
getTypeName
(
item
.
getTargetType
());
item
.
setTargetTypeName
(
typeName
);
item
.
setCoverImg
(
imgUrl
+
item
.
getCoverImg
());
}
pageInfoTmp
=
new
PageInfo
(
voList
);
}
catch
(
Exception
e
)
{
...
...
liquidnet-bus-client/liquidnet-client-admin/pom.xml
View file @
6f4c6b13
...
...
@@ -256,7 +256,10 @@
<dependencies>
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
...
...
liquidnet-bus-client/pom.xml
View file @
6f4c6b13
...
...
@@ -48,6 +48,11 @@
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
<version>
3.10.2
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
\ No newline at end of file
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/FilesUtils.java
0 → 100644
View file @
6f4c6b13
package
com
.
liquidnet
.
commons
.
lang
.
util
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.io.File
;
public
class
FilesUtils
{
/**
* MultipartFile 转 File
*
* @param file
* @throws Exception
*/
public
static
File
multipartFileToFile
(
MultipartFile
file
)
throws
Exception
{
File
toFile
=
null
;
if
(
file
.
equals
(
""
)
||
file
.
getSize
()
<=
0
)
{
file
=
null
;
}
else
{
InputStream
ins
=
null
;
ins
=
file
.
getInputStream
();
toFile
=
new
File
(
file
.
getOriginalFilename
());
inputStreamToFile
(
ins
,
toFile
);
ins
.
close
();
}
return
toFile
;
}
//获取流文件
private
static
void
inputStreamToFile
(
InputStream
ins
,
File
file
)
{
try
{
OutputStream
os
=
new
FileOutputStream
(
file
);
int
bytesRead
=
0
;
byte
[]
buffer
=
new
byte
[
8192
];
while
((
bytesRead
=
ins
.
read
(
buffer
,
0
,
8192
))
!=
-
1
)
{
os
.
write
(
buffer
,
0
,
bytesRead
);
}
os
.
close
();
ins
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 删除本地临时文件
* @param file
*/
public
static
void
delteTempFile
(
File
file
)
{
if
(
file
!=
null
)
{
File
del
=
new
File
(
file
.
toURI
());
del
.
delete
();
}
}
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinBannersMapper.xml
View file @
6f4c6b13
...
...
@@ -17,7 +17,7 @@
<where>
is_deleted = 1
<if
test=
"bannersName != ''"
>
AND banners_name LIKE concat('%',
$
{bannersName}, '%')
AND banners_name LIKE concat('%',
#
{bannersName}, '%')
</if>
<if
test=
"targetType != ''"
>
AND target_type=${targetType}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinPerformancesServiceImpl.java
View file @
6f4c6b13
...
...
@@ -306,13 +306,11 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
if
(
1
==
DateUtil
.
compareStrDay
(
timeStart
,
nowTime
))
{
// 未开始
ticket
.
setStatus
(
9
);
}
else
{
// 购买
ticket
.
setStatus
(
6
);
}
if
(-
1
==
DateUtil
.
compareStrDay
(
timeEnd
,
nowTime
))
{
// 已结束
ticket
.
setStatus
(
10
);
}
else
{
// 购买
}
else
{
// 已开始
ticket
.
setStatus
(
6
);
if
(
1
==
DateUtil
.
compareStrDay
(
nowTime
,
timeEnd
))
{
// 已结束
ticket
.
setStatus
(
10
);
}
}
}
// 会员状态
...
...
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