Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
04fbb2fa
提交
04fbb2fa
authored
10月 06, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复后台订单bug
上级
f73489f0
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
108 行增加
和
83 行删除
+108
-83
AdvertisementController.java
...java/com/platform/controller/AdvertisementController.java
+19
-4
AdvertisementItemController.java
.../com/platform/controller/AdvertisementItemController.java
+5
-1
AdvertisementItemDao.java
.../src/main/java/com/platform/dao/AdvertisementItemDao.java
+3
-1
TbCfStationItemDao.java
...in/src/main/java/com/platform/dao/TbCfStationItemDao.java
+2
-1
AdvertisementItemService.java
...n/java/com/platform/service/AdvertisementItemService.java
+1
-1
TbCfStationItemService.java
...ain/java/com/platform/service/TbCfStationItemService.java
+1
-1
AdvertisementItemServiceImpl.java
...m/platform/service/impl/AdvertisementItemServiceImpl.java
+2
-2
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+2
-2
AdvertisementDao.xml
.../src/main/resources/com/platform/dao/AdvertisementDao.xml
+59
-59
TbCfStationItemDao.xml
...rc/main/resources/com/platform/dao/TbCfStationItemDao.xml
+3
-0
advertisement.js
platform-admin/src/main/webapp/js/sys/advertisement.js
+11
-11
没有找到文件。
platform-admin/src/main/java/com/platform/controller/AdvertisementController.java
浏览文件 @
04fbb2fa
...
...
@@ -126,11 +126,26 @@ public class AdvertisementController {
@ResponseBody
public
R
getAdvertisementItem
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
Query
query
=
new
Query
(
params
);
List
<
TbCfStationItemEntity
>
itemList
=
tbCfStationItemService
.
getAdvertisementItem
(
params
.
get
(
"adId"
).
toString
()
);
int
count
=
advertisementItemService
.
getAdItemCount
(
params
.
get
(
"adId"
).
toString
(),
null
);
PageUtils
pageUtil
=
new
PageUtils
(
itemList
,
count
,
query
.
getLimit
(),
query
.
getPage
());
List
<
TbCfStationItemEntity
>
itemList
=
tbCfStationItemService
.
getAdvertisementItem
(
query
);
int
total
=
advertisementItemService
.
getAdItemCount
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
itemList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* @RequestMapping("/list")
* @RequiresPermissions("advertisement:list")
* @ResponseBody
* public R list(@RequestParam Map<String, Object> params) {
* //查询列表数据
* Query query = new Query(params);
*
* List<AdvertisementEntity> advertisementList = advertisementService.queryList(query);
* int total = advertisementService.queryTotal(query);
*
* PageUtils pageUtil = new PageUtils(advertisementList, total, query.getLimit(), query.getPage());
*
* return R.ok().put("page", pageUtil);
* }
*/
}
platform-admin/src/main/java/com/platform/controller/AdvertisementItemController.java
浏览文件 @
04fbb2fa
...
...
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -75,7 +76,10 @@ public class AdvertisementItemController {
public
R
saveBatch
(
@RequestParam
(
"aId"
)
String
aId
,
@RequestParam
(
"itemIds"
)
String
itemIds
)
{
String
itemIdArr
[]
=
itemIds
.
split
(
","
);
for
(
int
i
=
0
;
i
<
itemIdArr
.
length
;
i
++)
{
int
count
=
advertisementItemService
.
getAdItemCount
(
aId
,
itemIdArr
[
i
]);
Map
map
=
new
HashMap
();
map
.
put
(
"adId"
,
aId
);
map
.
put
(
"itemId"
,
itemIdArr
[
i
]);
int
count
=
advertisementItemService
.
getAdItemCount
(
map
);
if
(
count
>
0
)
continue
;
AdvertisementItemEntity
advertisementItem
=
new
AdvertisementItemEntity
();
...
...
platform-admin/src/main/java/com/platform/dao/AdvertisementItemDao.java
浏览文件 @
04fbb2fa
...
...
@@ -3,6 +3,8 @@ package com.platform.dao;
import
com.platform.entity.AdvertisementItemEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* Dao
*
...
...
@@ -11,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
*/
public
interface
AdvertisementItemDao
extends
BaseDao
<
AdvertisementItemEntity
>
{
int
getAdItemCount
(
@Param
(
"adId"
)
String
adId
,
@Param
(
"itemId"
)
String
itemId
);
int
getAdItemCount
(
Map
<
String
,
Object
>
map
);
int
deleteByItem
(
String
itemId
);
}
platform-admin/src/main/java/com/platform/dao/TbCfStationItemDao.java
浏览文件 @
04fbb2fa
...
...
@@ -6,6 +6,7 @@ import com.platform.entity.TbCfStationItemEntityExtends;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 站点商品Dao
...
...
@@ -41,6 +42,6 @@ public interface TbCfStationItemDao extends BaseDao<TbCfStationItemEntity> {
TbCfStationItemEntity
downSortItem
(
Integer
sort
);
List
<
TbCfStationItemEntity
>
getAdvertisementItem
(
String
adId
);
List
<
TbCfStationItemEntity
>
getAdvertisementItem
(
Map
<
String
,
Object
>
map
);
}
platform-admin/src/main/java/com/platform/service/AdvertisementItemService.java
浏览文件 @
04fbb2fa
...
...
@@ -69,7 +69,7 @@ public interface AdvertisementItemService {
*/
int
deleteBatch
(
String
[]
adIds
);
int
getAdItemCount
(
String
adId
,
String
itemId
);
int
getAdItemCount
(
Map
<
String
,
Object
>
map
);
int
deleteByItem
(
String
itemId
);
}
platform-admin/src/main/java/com/platform/service/TbCfStationItemService.java
浏览文件 @
04fbb2fa
...
...
@@ -110,5 +110,5 @@ public interface TbCfStationItemService {
int
exchangeItemSort
(
String
itemId
,
Integer
sort
);
List
<
TbCfStationItemEntity
>
getAdvertisementItem
(
String
adId
);
List
<
TbCfStationItemEntity
>
getAdvertisementItem
(
Map
<
String
,
Object
>
map
);
}
platform-admin/src/main/java/com/platform/service/impl/AdvertisementItemServiceImpl.java
浏览文件 @
04fbb2fa
...
...
@@ -57,8 +57,8 @@ public class AdvertisementItemServiceImpl implements AdvertisementItemService {
}
@Override
public
int
getAdItemCount
(
String
adId
,
String
itemId
)
{
return
advertisementItemDao
.
getAdItemCount
(
adId
,
itemId
);
public
int
getAdItemCount
(
Map
<
String
,
Object
>
map
)
{
return
advertisementItemDao
.
getAdItemCount
(
map
);
}
@Override
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
04fbb2fa
...
...
@@ -565,9 +565,9 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
}
@Override
public
List
<
TbCfStationItemEntity
>
getAdvertisementItem
(
String
adId
)
{
public
List
<
TbCfStationItemEntity
>
getAdvertisementItem
(
Map
<
String
,
Object
>
map
)
{
return
tbCfStationItemDao
.
getAdvertisementItem
(
adId
);
return
tbCfStationItemDao
.
getAdvertisementItem
(
map
);
}
...
...
platform-admin/src/main/resources/com/platform/dao/AdvertisementDao.xml
浏览文件 @
04fbb2fa
...
...
@@ -47,14 +47,14 @@
from advertisement
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND
name LIKE concat('%',#{name},'%')
AND ad_
name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by
id
desc
order by
create_time
desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
...
...
@@ -66,7 +66,7 @@
select count(*) from advertisement
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
AND
ad_
name LIKE concat('%',#{name},'%')
</if>
</select>
...
...
@@ -98,14 +98,14 @@
<update
id=
"update"
parameterType=
"com.platform.entity.AdvertisementEntity"
>
update advertisement
<set>
<if
test=
"adName != null"
>
`ad_name` = #{adName},
</if>
<if
test=
"adLink != null"
>
`ad_link` = #{adLink},
</if>
<if
test=
"picture != null"
>
`picture` = #{picture},
</if>
<if
test=
"status != null"
>
`status` = #{status},
</if>
<if
test=
"startTime != null"
>
`start_time` = #{startTime},
</if>
<if
test=
"endTime != null"
>
`end_time` = #{endTime},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime},
</if>
<if
test=
"adName != null"
>
`ad_name` = #{adName},
</if>
<if
test=
"adLink != null"
>
`ad_link` = #{adLink},
</if>
<if
test=
"picture != null"
>
`picture` = #{picture},
</if>
<if
test=
"status != null"
>
`status` = #{status},
</if>
<if
test=
"startTime != null"
>
`start_time` = #{startTime},
</if>
<if
test=
"endTime != null"
>
`end_time` = #{endTime},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime},
</if>
<if
test=
"remark != null"
>
`remark` = #{remark}
</if>
</set>
where id = #{id}
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfStationItemDao.xml
浏览文件 @
04fbb2fa
...
...
@@ -100,6 +100,9 @@
left JOIN tb_cf_goodstwotype t ON i.item_categorytwo=t.goodstwotype_id
left JOIN tb_cf_descripiton d ON i.item_descrition_id=d.descripition_id
where a.ad_id=#{adId} and i.enable_flag!=0
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryByItems"
resultType=
"com.platform.entity.TbCfStationItemEntityExtends"
>
...
...
platform-admin/src/main/webapp/js/sys/advertisement.js
浏览文件 @
04fbb2fa
...
...
@@ -219,7 +219,7 @@ let vm = new Vue({
$
(
"#adItemjqGrid"
).
Grid
({
url
:
'../advertisement/getAdvertisementItem?adId='
+
vm
.
tempId
,
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'itemId'
,
name
:
'itemId'
,
key
:
true
,
index
:
'item_id'
,
hidden
:
true
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
100
,
formatter
:
imageFormat
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
160
},
{
label
:
'商品名称'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
160
},
...
...
@@ -245,13 +245,15 @@ let vm = new Vue({
},
update
:
function
(
event
)
{
$
(
"#searchjqGrid"
).
jqGrid
(
"clearGridData"
);
$
(
"#adItemjqGrid"
).
jqGrid
(
"clearGridData"
);
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getItems
(
id
);
vm
.
btn_Search
(
id
);
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
...
...
@@ -263,14 +265,14 @@ let vm = new Vue({
alert
(
"广告链接不能为空"
)
return
;
}
if
(
vm
.
advertisement
.
picture
==
null
||
vm
.
advertisement
.
picture
==
''
)
{
alert
(
"广告图片不能为空"
)
return
;
}
if
(
vm
.
advertisement
.
status
==
null
||
vm
.
advertisement
.
status
==
''
)
{
alert
(
"广告状态不能为空"
)
return
;
}
if
(
vm
.
advertisement
.
picture
==
null
||
vm
.
advertisement
.
picture
==
''
)
{
alert
(
"广告图片不能为空"
)
return
;
}
if
(
vm
.
advertisement
.
startTime
==
null
||
vm
.
advertisement
.
startTime
==
''
)
{
alert
(
"广告开始时间不能为空"
)
return
;
...
...
@@ -284,7 +286,7 @@ let vm = new Vue({
return
;
}
let
url
=
vm
.
advertisement
.
id
==
null
?
"../advertisement/save"
:
"../advertisement/update"
;
let
ids
=
getSelectedRows
(
"#searchjqGrid
"
);
let
ids
=
$
(
"#searchjqGrid"
).
getGridParam
(
"selarrrow
"
);
vm
.
advertisement
.
itemIds
=
ids
;
if
(
vm
.
advertisement
.
id
==
null
||
vm
.
advertisement
.
id
==
''
||
vm
.
advertisement
.
id
==
'undefined'
)
{
vm
.
advertisement
.
id
=
vm
.
tempId
;
...
...
@@ -330,20 +332,18 @@ let vm = new Vue({
vm
.
advertisement
=
r
.
advertisement
;
}
});
this
.
getItems
(
id
);
this
.
btn_Search
(
id
);
},
btn_Search
(
id
)
{
$
(
"#adItemjqGrid"
).
jqGrid
(
'setGridParam'
,
{
url
:
'../advertisement/getAdvertisementItem?adId='
+
id
,
page
:
1
url
:
'../advertisement/getAdvertisementItem?adId='
+
id
}).
trigger
(
'reloadGrid'
);
},
getItems
(
id
)
{
$
(
"#adItemjqGrid"
).
Grid
({
url
:
'../advertisement/getAdvertisementItem?adId='
+
id
,
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'itemId'
,
name
:
'itemId'
,
key
:
true
,
index
:
'item_id'
,
hidden
:
true
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
100
,
formatter
:
imageFormat
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
160
},
{
label
:
'商品名称'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
160
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论