Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
34c648fa
提交
34c648fa
authored
10月 15, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改商品oss上传二级目录
上级
1c00243f
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
260 行增加
和
220 行删除
+260
-220
OssTestApi.java
...src/main/java/com/platform/controller/api/OssTestApi.java
+218
-213
uploadController.java
...in/java/com/platform/controller/api/uploadController.java
+2
-2
AdvertisementItemDao.java
.../src/main/java/com/platform/dao/AdvertisementItemDao.java
+4
-0
AdvertisementItemServiceImpl.java
...m/platform/service/impl/AdvertisementItemServiceImpl.java
+16
-5
AdvertisementItemDao.xml
.../main/resources/com/platform/dao/AdvertisementItemDao.xml
+20
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/api/OssTestApi.java
浏览文件 @
34c648fa
...
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpSession
;
import
javax.servlet.http.HttpSession
;
import
com.platform.utils.OssUtil
;
import
com.platform.utils.OssUtil
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
@@ -30,37 +31,40 @@ import com.platform.utils.util.UuidUtil;
...
@@ -30,37 +31,40 @@ import com.platform.utils.util.UuidUtil;
@Controller
@Controller
@RequestMapping
(
value
=
"/api/osstest"
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/api/osstest"
,
produces
=
"application/json;charset=UTF-8"
)
public
class
OssTestApi
{
public
class
OssTestApi
{
@IgnoreAuth
@IgnoreAuth
@RequestMapping
(
"/createfolder"
)
@RequestMapping
(
"/createfolder"
)
@ResponseBody
@ResponseBody
public
String
createFolder
()
{
public
String
createFolder
()
{
try
{
try
{
OSSClient
client
=
OssUtil
.
getOSSClient
();
OSSClient
client
=
OssUtil
.
getOSSClient
();
String
fileDir
=
OssUtil
.
createFolder
(
client
,
"diaosaas-prod"
,
"xinlizixun/"
);
String
fileDir
=
OssUtil
.
createFolder
(
client
,
"diaosaas-prod"
,
"xinlizixun/"
);
return
fileDir
;
return
fileDir
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
"error"
;
return
"error"
;
}
}
}
}
@IgnoreAuth
@IgnoreAuth
@RequestMapping
(
value
=
"/uploadtest"
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/uploadtest"
,
produces
=
"application/json;charset=UTF-8"
)
@ResponseBody
@ResponseBody
public
String
upload
(
MultipartFile
file
,
String
secondaryFolderName
)
{
public
String
upload
(
MultipartFile
file
,
String
secondaryFolderName
)
{
try
{
try
{
// 获取文件名
// 获取文件名
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
// 获取文件后缀
// 获取文件后缀
String
prefix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
String
prefix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
// 用uuid作为文件名,防止生成的文件重复
// 用uuid作为文件名,防止生成的文件重复
final
File
mfile
=
File
.
createTempFile
(
UuidUtil
.
get32UUID
(),
prefix
);
final
File
mfile
=
File
.
createTempFile
(
UuidUtil
.
get32UUID
(),
prefix
);
// MultipartFile to File
// MultipartFile to File
file
.
transferTo
(
mfile
);
file
.
transferTo
(
mfile
);
if
(
StringUtils
.
isBlank
(
secondaryFolderName
))
{
String
url
=
OssUtil
.
uploadObject2OSS
(
mfile
,
secondaryFolderName
);
secondaryFolderName
=
"afrishop"
;
}
String
url
=
OssUtil
.
uploadObject2OSS
(
mfile
,
secondaryFolderName
);
System
.
out
.
println
(
mfile
.
getName
());
System
.
out
.
println
(
mfile
.
getName
());
System
.
out
.
println
(
url
);
System
.
out
.
println
(
url
);
return
url
;
return
url
;
...
@@ -71,24 +75,24 @@ public class OssTestApi {
...
@@ -71,24 +75,24 @@ public class OssTestApi {
}
}
@IgnoreAuth
@IgnoreAuth
@RequestMapping
(
value
=
"/uploadfile"
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/uploadfile"
,
produces
=
"application/json;charset=UTF-8"
)
@ResponseBody
@ResponseBody
public
String
uploadfile
(
MultipartFile
file
,
String
secondaryFolderName
)
{
public
String
uploadfile
(
MultipartFile
file
,
String
secondaryFolderName
)
{
try
{
try
{
// 获取文件名
// 获取文件名
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
// 获取文件后缀
// 获取文件后缀
String
prefix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
String
prefix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
// 用uuid作为文件名,防止生成的文件重复
// 用uuid作为文件名,防止生成的文件重复
final
File
mfile
=
File
.
createTempFile
(
UuidUtil
.
get32UUID
(),
prefix
);
final
File
mfile
=
File
.
createTempFile
(
UuidUtil
.
get32UUID
(),
prefix
);
// MultipartFile to File
// MultipartFile to File
file
.
transferTo
(
mfile
);
file
.
transferTo
(
mfile
);
String
url
=
OssUtil
.
uploadObject2OSS
(
mfile
,
secondaryFolderName
);
String
url
=
OssUtil
.
uploadObject2OSS
(
mfile
,
secondaryFolderName
);
System
.
out
.
println
(
mfile
.
getName
());
System
.
out
.
println
(
mfile
.
getName
());
System
.
out
.
println
(
url
);
System
.
out
.
println
(
url
);
return
url
+
" "
+
fileName
;
return
url
+
" "
+
fileName
;
//return "";
//return "";
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -98,43 +102,41 @@ public class OssTestApi {
...
@@ -98,43 +102,41 @@ public class OssTestApi {
/**
/**
*
* @Function: uploadfileVideo
* @Function: uploadfileVideo
* @Description: (此方法只用于[课程管理模块]上传课程宣传视频和课程视频)
* @Description: (此方法只用于[课程管理模块]上传课程宣传视频和课程视频)
* @param:
* @param:
* @return:
* @return:
* @IgnoreAuth
* @RequestMapping(value="/uploadfileVideo",produces="application/json;charset=UTF-8")
* @ResponseBody public Map<String, Object> uploadfileVideo(HttpServletRequest request,MultipartFile[] files) {
* <p>
* Map<String, Object> map = new HashMap<>();
* List<String> urlList = new ArrayList<>();
* try {
* for (int i = 0; i < files.length; i++) {
* // 获取文件名
* String fileName = files[i].getOriginalFilename();
* // 获取文件后缀
* String prefix=fileName.substring(fileName.lastIndexOf("."));
* System.out.println(UuidUtil.get32UUID()+"-"+fileName.substring(0,fileName.lastIndexOf(".")));
* final File mfile = File.createTempFile(UuidUtil.get32UUID(), prefix);
* // MultipartFile to File
* files[i].transferTo(mfile);
* String url=OssUtil.uploadObject3OSS(mfile,fileName);
* // String fileUpload = OssUtil.fileUpload(mfile, fileName, request);
* System.out.println(mfile.getName());
* urlList.add(url);
* // urlList.add(fileUpload);
* }
* map.put("urlList", urlList);
* return map;
* } catch (Exception e) {
* e.printStackTrace();
* return map;
* }
* }
* @since JDK 1.8
* @since JDK 1.8
*/
@IgnoreAuth
@RequestMapping(value="/uploadfileVideo",produces="application/json;charset=UTF-8")
@ResponseBody
public Map<String, Object> uploadfileVideo(HttpServletRequest request,MultipartFile[] files) {
Map<String, Object> map = new HashMap<>();
List<String> urlList = new ArrayList<>();
try {
for (int i = 0; i < files.length; i++) {
// 获取文件名
String fileName = files[i].getOriginalFilename();
// 获取文件后缀
String prefix=fileName.substring(fileName.lastIndexOf("."));
System.out.println(UuidUtil.get32UUID()+"-"+fileName.substring(0,fileName.lastIndexOf(".")));
final File mfile = File.createTempFile(UuidUtil.get32UUID(), prefix);
// MultipartFile to File
files[i].transferTo(mfile);
String url=OssUtil.uploadObject3OSS(mfile,fileName);
// String fileUpload = OssUtil.fileUpload(mfile, fileName, request);
System.out.println(mfile.getName());
urlList.add(url);
// urlList.add(fileUpload);
}
map.put("urlList", urlList);
return map;
} catch (Exception e) {
e.printStackTrace();
return map;
}
} */
@IgnoreAuth
@IgnoreAuth
...
@@ -143,7 +145,7 @@ public class OssTestApi {
...
@@ -143,7 +145,7 @@ public class OssTestApi {
public
R
delete
(
String
url
)
{
public
R
delete
(
String
url
)
{
try
{
try
{
// http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155771122620710111.jpg
// http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155771122620710111.jpg
url
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)+
1
);
url
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)
+
1
);
OssUtil
.
deleteFile
(
"diaosaas-prod"
,
"education/"
,
url
);
OssUtil
.
deleteFile
(
"diaosaas-prod"
,
"education/"
,
url
);
return
R
.
ok
().
put
(
"success"
,
"删除成功"
);
return
R
.
ok
().
put
(
"success"
,
"删除成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -153,12 +155,11 @@ public class OssTestApi {
...
@@ -153,12 +155,11 @@ public class OssTestApi {
}
}
/**
/**
* 富文本图片自定义上传
* 富文本图片自定义上传
*/
*/
@IgnoreAuth
@IgnoreAuth
@RequestMapping
(
value
=
"/uploaditemimage"
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/uploaditemimage"
,
produces
=
"application/json;charset=UTF-8"
)
@ResponseBody
@ResponseBody
public
Object
uploadItemImage
(
HttpServletRequest
request
)
throws
Exception
{
public
Object
uploadItemImage
(
HttpServletRequest
request
)
throws
Exception
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
...
@@ -166,7 +167,7 @@ public class OssTestApi {
...
@@ -166,7 +167,7 @@ public class OssTestApi {
String
url
=
""
;
String
url
=
""
;
if
(
photo
.
getSize
()
>
0
)
{
if
(
photo
.
getSize
()
>
0
)
{
String
result
=
OssUtil
.
upload
(
photo
);
String
result
=
OssUtil
.
upload
(
photo
);
if
(
result
.
equals
(
"fail"
))
{
if
(
result
.
equals
(
"fail"
))
{
}
else
{
}
else
{
...
@@ -184,11 +185,12 @@ public class OssTestApi {
...
@@ -184,11 +185,12 @@ public class OssTestApi {
return
result
;
return
result
;
}
}
// 删除富文本的图片
// 删除富文本的图片
//content 需要更新的内容
//content 需要更新的内容
//pd 没更新的数据
//pd 没更新的数据
public
void
deleteUeditorImg
(
String
content
,
PageData
pd
)
{
public
void
deleteUeditorImg
(
String
content
,
PageData
pd
)
{
if
(
pd
.
get
(
"describes"
)!=
null
&&
pd
.
get
(
"describes"
).
toString
().
trim
().
length
()>
0
)
{
if
(
pd
.
get
(
"describes"
)
!=
null
&&
pd
.
get
(
"describes"
).
toString
().
trim
().
length
()
>
0
)
{
String
dbContent
=
pd
.
getString
(
"describes"
);
String
dbContent
=
pd
.
getString
(
"describes"
);
List
<
String
>
list
=
StringUtil
.
getImgStr
(
dbContent
);
List
<
String
>
list
=
StringUtil
.
getImgStr
(
dbContent
);
String
[]
a
=
new
String
[
list
.
size
()];
String
[]
a
=
new
String
[
list
.
size
()];
...
@@ -206,7 +208,7 @@ public class OssTestApi {
...
@@ -206,7 +208,7 @@ public class OssTestApi {
for
(
int
i
=
0
;
i
<
list2
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
list2
.
size
();
i
++)
{
String
path
=
list2
.
get
(
i
);
String
path
=
list2
.
get
(
i
);
path
.
substring
(
path
.
lastIndexOf
(
"/"
)+
1
,
path
.
length
());
path
.
substring
(
path
.
lastIndexOf
(
"/"
)
+
1
,
path
.
length
());
OssUtil
.
deleteFile
(
"diaosaas-prod"
,
"education/"
,
path
);
OssUtil
.
deleteFile
(
"diaosaas-prod"
,
"education/"
,
path
);
}
}
}
}
...
@@ -215,57 +217,60 @@ public class OssTestApi {
...
@@ -215,57 +217,60 @@ public class OssTestApi {
/**
/**
* 获取实时长传进度
* 获取实时长传进度
*
* @param request
* @param request
* @return
* @return
*/
*/
@RequestMapping
(
"/item/percent"
)
@RequestMapping
(
"/item/percent"
)
@ResponseBody
@ResponseBody
public
int
getUploadPercent
(
HttpServletRequest
request
){
public
int
getUploadPercent
(
HttpServletRequest
request
)
{
HttpSession
session
=
request
.
getSession
();
HttpSession
session
=
request
.
getSession
();
int
percent
=
session
.
getAttribute
(
"upload_percent"
)
==
null
?
0
:
(
Integer
)
session
.
getAttribute
(
"upload_percent"
);
int
percent
=
session
.
getAttribute
(
"upload_percent"
)
==
null
?
0
:
(
Integer
)
session
.
getAttribute
(
"upload_percent"
);
return
percent
;
return
percent
;
}
}
/**
/**
* 重置上传进度
* 重置上传进度
*
* @param request
* @param request
* @return
* @return
*/
*/
@RequestMapping
(
"/percent/reset"
)
@RequestMapping
(
"/percent/reset"
)
public
void
resetPercent
(
HttpServletRequest
request
){
public
void
resetPercent
(
HttpServletRequest
request
)
{
HttpSession
session
=
request
.
getSession
();
HttpSession
session
=
request
.
getSession
();
session
.
setAttribute
(
"upload_percent"
,
0
);
session
.
setAttribute
(
"upload_percent"
,
0
);
}
}
/**
/**多线程分片文件上传**/
* 多线程分片文件上传
**/
@RequestMapping
(
"uploadFile"
)
@RequestMapping
(
"uploadFile"
)
public
String
uploadBlog
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
)
{
//MultipartFile是spring类型,代表HTML中form data方式上传的文件,包含二进制数据+文件名称。 logger.info("文件上传");
public
String
uploadBlog
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletRequest
request
)
{
//MultipartFile是spring类型,代表HTML中form data方式上传的文件,包含二进制数据+文件名称。 logger.info("文件上传");
HttpSession
session
=
request
.
getSession
();
HttpSession
session
=
request
.
getSession
();
String
filename
=
file
.
getOriginalFilename
();
String
filename
=
file
.
getOriginalFilename
();
session
.
setAttribute
(
"fileName"
,
filename
);
session
.
setAttribute
(
"fileName"
,
filename
);
System
.
out
.
println
(
filename
);
System
.
out
.
println
(
filename
);
long
fileLength
=
file
.
getSize
();
long
fileLength
=
file
.
getSize
();
DecimalFormat
df
=
new
DecimalFormat
(
".00"
);
DecimalFormat
df
=
new
DecimalFormat
(
".00"
);
if
(
fileLength
<
1024
)
{
if
(
fileLength
<
1024
)
{
session
.
setAttribute
(
"fileSize"
,
"1KB"
);
session
.
setAttribute
(
"fileSize"
,
"1KB"
);
}
else
if
(
fileLength
>=
1024
&&
fileLength
<
1024
*
1024
)
{
}
else
if
(
fileLength
>=
1024
&&
fileLength
<
1024
*
1024
)
{
session
.
setAttribute
(
"fileSize"
,
df
.
format
(
fileLength
/
1024.0
)+
"KB"
);
session
.
setAttribute
(
"fileSize"
,
df
.
format
(
fileLength
/
1024.0
)
+
"KB"
);
}
else
{
}
else
{
session
.
setAttribute
(
"fileSize"
,
df
.
format
(
fileLength
/(
1024.0
*
1024.0
))+
"MB"
);
session
.
setAttribute
(
"fileSize"
,
df
.
format
(
fileLength
/
(
1024.0
*
1024.0
))
+
"MB"
);
}
}
try
{
try
{
if
(
file
!=
null
)
{
if
(
file
!=
null
)
{
if
(!
""
.
equals
(
filename
.
trim
())){
if
(!
""
.
equals
(
filename
.
trim
()))
{
//MultipartFile转File
//MultipartFile转File
File
newFile
=
new
File
(
filename
);
File
newFile
=
new
File
(
filename
);
FileOutputStream
os
=
new
FileOutputStream
(
newFile
);
FileOutputStream
os
=
new
FileOutputStream
(
newFile
);
os
.
write
(
file
.
getBytes
());
os
.
write
(
file
.
getBytes
());
os
.
close
();
os
.
close
();
file
.
transferTo
(
newFile
);
//将上传文件写入目标文件
file
.
transferTo
(
newFile
);
//将上传文件写入目标文件
//上传到OSS
//上传到OSS
String
key
=
"time1128"
;
String
key
=
"time1128"
;
// String url=OssUtil.upLoad(newFile,session,key);
// String url=OssUtil.upLoad(newFile,session,key);
//删除临时文件
//删除临时文件
...
...
platform-admin/src/main/java/com/platform/controller/api/uploadController.java
浏览文件 @
34c648fa
...
@@ -29,7 +29,7 @@ public class uploadController {
...
@@ -29,7 +29,7 @@ public class uploadController {
@RequestMapping
(
value
=
"/uploadFile"
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/uploadFile"
,
produces
=
"application/json;charset=UTF-8"
)
public
String
upload
(
MultipartFile
file
)
{
public
String
upload
(
MultipartFile
file
)
{
try
{
try
{
String
secondaryFolderName
=
"
A
frishop"
;
String
secondaryFolderName
=
"
a
frishop"
;
// 获取文件名
// 获取文件名
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
// 获取文件后缀
// 获取文件后缀
...
...
platform-admin/src/main/java/com/platform/dao/AdvertisementItemDao.java
浏览文件 @
34c648fa
...
@@ -3,6 +3,7 @@ package com.platform.dao;
...
@@ -3,6 +3,7 @@ package com.platform.dao;
import
com.platform.entity.AdvertisementItemEntity
;
import
com.platform.entity.AdvertisementItemEntity
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -27,5 +28,8 @@ public interface AdvertisementItemDao extends BaseDao<AdvertisementItemEntity> {
...
@@ -27,5 +28,8 @@ public interface AdvertisementItemDao extends BaseDao<AdvertisementItemEntity> {
int
existItemSort
(
@Param
(
"adId"
)
String
adId
,
@Param
(
"sort"
)
Integer
sort
);
int
existItemSort
(
@Param
(
"adId"
)
String
adId
,
@Param
(
"sort"
)
Integer
sort
);
List
<
AdvertisementItemEntity
>
changeSortBack
(
@Param
(
"firstSort"
)
Integer
firstSort
,
@Param
(
"endSort"
)
Integer
endSort
,
@Param
(
"adId"
)
String
adId
);
List
<
AdvertisementItemEntity
>
changeSortFront
(
@Param
(
"firstSort"
)
Integer
firstSort
,
@Param
(
"endSort"
)
Integer
endSort
,
@Param
(
"adId"
)
String
adId
);
}
}
platform-admin/src/main/java/com/platform/service/impl/AdvertisementItemServiceImpl.java
浏览文件 @
34c648fa
...
@@ -146,13 +146,24 @@ public class AdvertisementItemServiceImpl implements AdvertisementItemService {
...
@@ -146,13 +146,24 @@ public class AdvertisementItemServiceImpl implements AdvertisementItemService {
res
=
advertisementItemDao
.
updateAdItem
(
byId
);
res
=
advertisementItemDao
.
updateAdItem
(
byId
);
}
else
{
}
else
{
//要更换的序号被占有
//要更换的序号被占有
//情况3
//情况3 (2-->8)
if
(
byId
.
getSort
()
<
itemSort
)
{
Integer
sort1
=
byId
.
getSort
();
if
(
sort1
<
itemSort
)
{
List
<
AdvertisementItemEntity
>
list
=
advertisementItemDao
.
changeSortBack
(
sort1
+
1
,
itemSort
,
adId
);
for
(
AdvertisementItemEntity
ad
:
list
)
{
ad
.
setSort
(
ad
.
getSort
()
-
1
);
advertisementItemDao
.
updateAdItem
(
ad
);
}
}
else
{
}
else
{
//情况4
//情况4 (8-->2)
List
<
AdvertisementItemEntity
>
list
=
advertisementItemDao
.
changeSortFront
(
itemSort
,
sort1
-
1
,
adId
);
for
(
AdvertisementItemEntity
ad
:
list
)
{
ad
.
setSort
(
ad
.
getSort
()
+
1
);
advertisementItemDao
.
updateAdItem
(
ad
);
}
}
}
byId
.
setSort
(
itemSort
);
res
=
advertisementItemDao
.
updateAdItem
(
byId
);
}
}
...
...
platform-admin/src/main/resources/com/platform/dao/AdvertisementItemDao.xml
浏览文件 @
34c648fa
...
@@ -57,6 +57,26 @@
...
@@ -57,6 +57,26 @@
</if>
</if>
</select>
</select>
<select
id=
"changeSortBack"
resultType=
"com.platform.entity.AdvertisementItemEntity"
>
select
`ad_id`,
`item_id`,
`is_top`,
`sort`,
`create_time`
from advertisement_item where sort BETWEEN #{firstSort} AND #{endSort} and ad_id=#{adId}
</select>
<select
id=
"changeSortFront"
resultType=
"com.platform.entity.AdvertisementItemEntity"
>
select
`ad_id`,
`item_id`,
`is_top`,
`sort`,
`create_time`
from advertisement_item where sort BETWEEN #{firstSort} AND #{endSort} and ad_id=#{adId}
</select>
<delete
id=
"deleteByItem"
>
<delete
id=
"deleteByItem"
>
delete from advertisement_item where item_id=#{itemId} and ad_id=#{adId}
delete from advertisement_item where item_id=#{itemId} and ad_id=#{adId}
</delete>
</delete>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论