Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
ea327de5
提交
ea327de5
authored
1月 13, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增商品热门推荐
上级
bf8eddfa
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
745 行增加
和
7 行删除
+745
-7
TbCfRecommendController.java
...java/com/platform/controller/TbCfRecommendController.java
+109
-0
uploadController.java
...in/java/com/platform/controller/api/uploadController.java
+65
-0
TbCfRecommendDao.java
...dmin/src/main/java/com/platform/dao/TbCfRecommendDao.java
+13
-0
TbCfRecommendEntity.java
...rc/main/java/com/platform/entity/TbCfRecommendEntity.java
+119
-0
TbCfRecommendService.java
.../main/java/com/platform/service/TbCfRecommendService.java
+71
-0
TbCfRecommendServiceImpl.java
...a/com/platform/service/impl/TbCfRecommendServiceImpl.java
+63
-0
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+1
-1
TbCfRecommendDao.xml
.../src/main/resources/com/platform/dao/TbCfRecommendDao.xml
+101
-0
tbcfrecommend.html
...admin/src/main/webapp/WEB-INF/page/sys/tbcfrecommend.html
+56
-0
common.js
platform-admin/src/main/webapp/js/common.js
+27
-1
tbcfrecommend.js
platform-admin/src/main/webapp/js/sys/tbcfrecommend.js
+115
-0
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+1
-1
OssUtil.java
...form-common/src/main/java/com/platform/utils/OssUtil.java
+4
-4
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfRecommendController.java
0 → 100644
浏览文件 @
ea327de5
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfRecommendEntity
;
import
com.platform.service.TbCfRecommendService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
import
java.util.Map
;
/**
* Controller
*
* @author lipengjun
* @date 2020-01-13 15:00:49
*/
@Controller
@RequestMapping
(
"tbcfrecommend"
)
public
class
TbCfRecommendController
{
@Autowired
private
TbCfRecommendService
tbCfRecommendService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"tbcfrecommend:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
TbCfRecommendEntity
>
tbCfRecommendList
=
tbCfRecommendService
.
queryList
(
query
);
int
total
=
tbCfRecommendService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
tbCfRecommendList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* 查看信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"tbcfrecommend:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
TbCfRecommendEntity
tbCfRecommend
=
tbCfRecommendService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"tbCfRecommend"
,
tbCfRecommend
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"tbcfrecommend:save"
)
@ResponseBody
public
R
save
(
@RequestBody
TbCfRecommendEntity
tbCfRecommend
)
{
tbCfRecommendService
.
save
(
tbCfRecommend
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"tbcfrecommend:update"
)
@ResponseBody
public
R
update
(
@RequestBody
TbCfRecommendEntity
tbCfRecommend
)
{
tbCfRecommendService
.
update
(
tbCfRecommend
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"tbcfrecommend:delete"
)
@ResponseBody
public
R
delete
(
@RequestBody
String
[]
ids
)
{
tbCfRecommendService
.
deleteBatch
(
ids
);
return
R
.
ok
();
}
/**
* 查看所有列表
*/
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
TbCfRecommendEntity
>
list
=
tbCfRecommendService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/controller/api/uploadController.java
0 → 100644
浏览文件 @
ea327de5
package
com
.
platform
.
controller
.
api
;
import
com.platform.annotation.IgnoreAuth
;
import
com.platform.utils.OssUtil
;
import
com.platform.utils.R
;
import
com.platform.utils.util.UuidUtil
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
/**
* @Auther: wudepeng
* @Date: 2020/01/10
* @Description:
*/
@Controller
@RequestMapping
(
value
=
"/api/upload"
,
produces
=
"application/json;charset=UTF-8"
)
public
class
uploadController
{
@IgnoreAuth
@RequestMapping
(
value
=
"/uploadFile"
,
produces
=
"application/json;charset=UTF-8"
)
@ResponseBody
public
String
upload
(
MultipartFile
file
)
{
try
{
String
secondaryFolderName
=
"Afrishop"
;
// 获取文件名
String
fileName
=
file
.
getOriginalFilename
();
// 获取文件后缀
String
prefix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
// 用uuid作为文件名,防止生成的文件重复
final
File
mfile
=
File
.
createTempFile
(
UuidUtil
.
get32UUID
(),
prefix
);
// MultipartFile to File
file
.
transferTo
(
mfile
);
String
url
=
OssUtil
.
uploadObject2OSS
(
mfile
,
secondaryFolderName
);
System
.
out
.
println
(
fileName
);
System
.
out
.
println
(
mfile
.
getName
());
System
.
out
.
println
(
url
);
return
url
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
"err"
;
}
}
@IgnoreAuth
@RequestMapping
(
"/delFile"
)
@ResponseBody
public
R
delete
(
String
url
)
{
try
{
boolean
flag
=
OssUtil
.
deleteFile
(
url
);
System
.
err
.
println
(
flag
);
System
.
err
.
println
(
url
);
return
R
.
ok
().
put
(
"success"
,
"删除成功"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
R
.
error
().
put
(
"fail"
,
"删除失败"
);
}
}
}
\ No newline at end of file
platform-admin/src/main/java/com/platform/dao/TbCfRecommendDao.java
0 → 100644
浏览文件 @
ea327de5
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfRecommendEntity
;
/**
* Dao
*
* @author lipengjun
* @date 2020-01-13 15:00:49
*/
public
interface
TbCfRecommendDao
extends
BaseDao
<
TbCfRecommendEntity
>
{
}
platform-admin/src/main/java/com/platform/entity/TbCfRecommendEntity.java
0 → 100644
浏览文件 @
ea327de5
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实体
* 表名 tb_cf_recommend
*
* @author lipengjun
* @date 2020-01-13 15:00:49
*/
public
class
TbCfRecommendEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 推荐ID
*/
private
String
id
;
/**
* 热门推荐
*/
private
String
recommend
;
/**
* 备注
*/
private
String
remark
;
/**
* 删除标志
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createtime
;
/**
* 更新时间
*/
private
Date
updatetime
;
/**
* 设置:推荐ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:推荐ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:热门推荐
*/
public
void
setRecommend
(
String
recommend
)
{
this
.
recommend
=
recommend
;
}
/**
* 获取:热门推荐
*/
public
String
getRecommend
()
{
return
recommend
;
}
/**
* 设置:备注
*/
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/**
* 获取:备注
*/
public
String
getRemark
()
{
return
remark
;
}
/**
* 设置:删除标志
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* 获取:删除标志
*/
public
Integer
getDelFlag
()
{
return
delFlag
;
}
/**
* 设置:创建时间
*/
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreatetime
()
{
return
createtime
;
}
/**
* 设置:更新时间
*/
public
void
setUpdatetime
(
Date
updatetime
)
{
this
.
updatetime
=
updatetime
;
}
/**
* 获取:更新时间
*/
public
Date
getUpdatetime
()
{
return
updatetime
;
}
}
platform-admin/src/main/java/com/platform/service/TbCfRecommendService.java
0 → 100644
浏览文件 @
ea327de5
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfRecommendEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2020-01-13 15:00:49
*/
public
interface
TbCfRecommendService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfRecommendEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfRecommendEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfRecommend 实体
* @return 保存条数
*/
int
save
(
TbCfRecommendEntity
tbCfRecommend
);
/**
* 根据主键更新实体
*
* @param tbCfRecommend 实体
* @return 更新条数
*/
int
update
(
TbCfRecommendEntity
tbCfRecommend
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfRecommendServiceImpl.java
0 → 100644
浏览文件 @
ea327de5
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfRecommendDao
;
import
com.platform.entity.TbCfRecommendEntity
;
import
com.platform.service.TbCfRecommendService
;
import
com.platform.utils.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2020-01-13 15:00:49
*/
@Service
(
"tbCfRecommendService"
)
public
class
TbCfRecommendServiceImpl
implements
TbCfRecommendService
{
@Autowired
private
TbCfRecommendDao
tbCfRecommendDao
;
@Override
public
TbCfRecommendEntity
queryObject
(
String
id
)
{
return
tbCfRecommendDao
.
queryObject
(
id
);
}
@Override
public
List
<
TbCfRecommendEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfRecommendDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfRecommendDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfRecommendEntity
tbCfRecommend
)
{
tbCfRecommend
.
setId
(
IdUtil
.
createIdbyUUID
());
tbCfRecommend
.
setCreatetime
(
new
Date
());
tbCfRecommend
.
setUpdatetime
(
new
Date
());
return
tbCfRecommendDao
.
save
(
tbCfRecommend
);
}
@Override
public
int
update
(
TbCfRecommendEntity
tbCfRecommend
)
{
tbCfRecommend
.
setUpdatetime
(
new
Date
());
return
tbCfRecommendDao
.
update
(
tbCfRecommend
);
}
@Override
public
int
delete
(
String
id
)
{
return
tbCfRecommendDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
tbCfRecommendDao
.
deleteBatch
(
ids
);
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
ea327de5
...
...
@@ -394,7 +394,7 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
item
.
setItemCategory
(
values
[
8
]);
item
.
setItemCategorytwo
(
values
[
9
]);
item
.
setItemDescritionId
(
values
[
10
]);
item
.
setEnableFlag
(
Integer
.
parseInt
(
values
[
11
])
);
item
.
setEnableFlag
(
2
);
item
.
setCreateTime
(
new
Date
());
item
.
setItemNum
(
0L
);
tbCfStationItemDao
.
save
(
item
);
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfRecommendDao.xml
0 → 100644
浏览文件 @
ea327de5
<?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.platform.dao.TbCfRecommendDao"
>
<resultMap
type=
"com.platform.entity.TbCfRecommendEntity"
id=
"tbCfRecommendMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"recommend"
column=
"recommend"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createtime"
column=
"createTime"
/>
<result
property=
"updatetime"
column=
"updateTime"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfRecommendEntity"
>
select
`id`,
`recommend`,
`remark`,
`del_flag`,
`createTime`,
`updateTime`
from tb_cf_recommend
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfRecommendEntity"
>
select
`id`,
`recommend`,
`remark`,
`del_flag`,
`createTime`,
`updateTime`
from tb_cf_recommend
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_recommend
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfRecommendEntity"
>
insert into tb_cf_recommend(
`id`,
`recommend`,
`remark`,
`del_flag`,
`createTime`,
`updateTime`)
values(
#{id},
#{recommend},
#{remark},
#{delFlag},
#{createtime},
#{updatetime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfRecommendEntity"
>
update tb_cf_recommend
<set>
<if
test=
"recommend != null"
>
`recommend` = #{recommend},
</if>
<if
test=
"remark != null"
>
`remark` = #{remark},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createtime != null"
>
`createTime` = #{createtime},
</if>
<if
test=
"updatetime != null"
>
`updateTime` = #{updatetime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_recommend where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_recommend where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfrecommend.html
0 → 100644
浏览文件 @
ea327de5
<!DOCTYPE html>
<html>
<head>
<title></title>
#parse("sys/header.html")
</head>
<body>
<div
id=
"rrapp"
v-cloak
style=
"height: calc(100% - 15px);"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<i-col
span=
"4"
>
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"名称"
/>
</i-col>
<i-button
@
click=
"query"
>
查询
</i-button>
<i-button
@
click=
"reloadSearch"
>
重置
</i-button>
</div>
<div
class=
"buttons-group"
>
#if($shiro.hasPermission("tbcfrecommend:save"))
<i-button
type=
"info"
@
click=
"add"
><i
class=
"fa fa-plus"
></i>
新增
</i-button>
#end
#if($shiro.hasPermission("tbcfrecommend:update"))
<i-button
type=
"warning"
@
click=
"update"
><i
class=
"fa fa-pencil-square-o"
></i>
修改
</i-button>
#end
#if($shiro.hasPermission("tbcfrecommend:delete"))
<i-button
type=
"error"
@
click=
"del"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
</div>
</Row>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"tbCfRecommend"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"热门推荐"
prop=
"recommend"
>
<i-input
v-model=
"tbCfRecommend.recommend"
placeholder=
"热门推荐"
/>
</Form-item>
<Form-item
label=
"备注"
prop=
"remark"
>
<i-input
v-model=
"tbCfRecommend.remark"
placeholder=
"备注"
/>
</Form-item>
<Form-item
label=
"状态"
prop=
"delFlag"
>
<i-input
v-model=
"tbCfRecommend.delFlag"
placeholder=
"状态"
/>
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</i-form>
</Card>
</div>
<script
src=
"${rc.contextPath}/js/sys/tbcfrecommend.js?_${date.systemTime}"
></script>
</body>
</html>
\ No newline at end of file
platform-admin/src/main/webapp/js/common.js
浏览文件 @
ea327de5
...
...
@@ -458,12 +458,38 @@ Dict = function () {
* @returns {string}
*/
imageFormat
=
function
(
cellvalue
,
options
,
rowObject
)
{
/**
*{path:https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157865052589110168.mp4,type:video},
*{path:https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157865053763610597.png,type:picture},
*{path:https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157865053763510451.png,type:picture},
*{path:https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157865053764010039.png,type:picture},
*{path:https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/null/157865054451310852.png,type:picture}
*
*/
if
(
!
cellvalue
)
{
cellvalue
=
"<i class=
\"
fa fa-file-picture-o
\"
style=
\"
font-size:30px;
\"
title='无图'></i>"
;
}
else
{
cellvalue
=
'<img src="'
+
cellvalue
+
'" style="width:30px;height:30px;" />'
;
/* if (cellvalue.indexOf(',') > 0) {
let str = cellvalue.split(',')[0];
let str1 = str.split(',')[0];
let str2 = str.split(',')[1]
let url = str1.substring(5, str1.length);
let type = str2.substring(5, str2.length);
alert(length)
alert(type)
console.log(123, url)
console.log(456, type)
if (type === 'video') {
cellvalue = '<video src="' + url + '" style="width:30px;height:30px;" />';
} else {
cellvalue = '<img src="' + url + '" style="width:30px;height:30px;" />';
}
} else {
cellvalue = '<img src="' + cellvalue + '" style="width:30px;height:30px;" />';
}*/
}
return
cellvalue
;
};
...
...
platform-admin/src/main/webapp/js/sys/tbcfrecommend.js
0 → 100644
浏览文件 @
ea327de5
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfrecommend/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'热门推荐'
,
name
:
'recommend'
,
index
:
'recommend'
,
width
:
80
},
{
label
:
'备注'
,
name
:
'remark'
,
index
:
'remark'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
,
formatter
:
categoryFormat
},
{
label
:
'创建时间'
,
name
:
'createtime'
,
index
:
'createTime'
,
width
:
80
}
]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfRecommend
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfRecommend
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfRecommend
.
id
==
null
?
"../tbcfrecommend/save"
:
"../tbcfrecommend/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfRecommend
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfrecommend/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
){
Ajax
.
request
({
url
:
"../tbcfrecommend/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfRecommend
=
r
.
tbCfRecommend
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
ea327de5
...
...
@@ -384,7 +384,7 @@ let vm = new Vue({
vm
.
uploadList
.
remove
(
url
);
console
.
log
(
url
);
Ajax
.
request
({
url
:
"../api/
osstest/deletetest
?url="
+
url
,
url
:
"../api/
upload/delFile
?url="
+
url
,
async
:
false
,
type
:
"POST"
,
contentType
:
"application/json"
,
...
...
platform-common/src/main/java/com/platform/utils/OssUtil.java
浏览文件 @
ea327de5
...
...
@@ -385,10 +385,10 @@ public class OssUtil {
File
file
=
new
File
(
"C:\\Users\\Administrator\\Pictures\\四等奖_20190918194024.png"
);
byte
[]
b
=
File2byte
(
file
);
System
.
out
.
println
(
b
);
// boolean flag = deleteFile("https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/hello/hello.jp
g");
String
s
=
upload
(
b
,
"hello.png"
,
"hello"
);
System
.
out
.
println
(
s
);
//
System.out.println(flag);
boolean
flag
=
deleteFile
(
"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/Afrishop/157865444910310855.pn
g"
);
//
String s = upload(b, "hello.png", "hello");
//
System.out.println(s);
System
.
out
.
println
(
flag
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论