Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
443f1174
提交
443f1174
authored
10月 18, 2019
作者:
zhengfg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成商品管理
上级
cefff93f
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
298 行增加
和
161 行删除
+298
-161
TbCfDescripitonController.java
...va/com/platform/controller/TbCfDescripitonController.java
+23
-8
TbCfStationItemController.java
...va/com/platform/controller/TbCfStationItemController.java
+34
-1
TbCfDescripitonDao.java
...in/src/main/java/com/platform/dao/TbCfDescripitonDao.java
+3
-1
TbCfGoodstwotypeDao.java
...n/src/main/java/com/platform/dao/TbCfGoodstwotypeDao.java
+4
-0
TbCfDescripitonService.java
...ain/java/com/platform/service/TbCfDescripitonService.java
+1
-0
TbCfGoodstwotypeService.java
...in/java/com/platform/service/TbCfGoodstwotypeService.java
+1
-0
TbCfDescripitonServiceImpl.java
...com/platform/service/impl/TbCfDescripitonServiceImpl.java
+5
-0
TbCfGoodstwotypeServiceImpl.java
...om/platform/service/impl/TbCfGoodstwotypeServiceImpl.java
+5
-0
TbCfDescripitonDao.xml
...rc/main/resources/com/platform/dao/TbCfDescripitonDao.xml
+10
-1
TbCfGoodstwotypeDao.xml
...c/main/resources/com/platform/dao/TbCfGoodstwotypeDao.xml
+59
-52
TbCfStationItemDao.xml
...rc/main/resources/com/platform/dao/TbCfStationItemDao.xml
+77
-77
tbcfdescripiton.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfdescripiton.html
+8
-8
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+14
-10
tbcfdescripiton.js
platform-admin/src/main/webapp/js/sys/tbcfdescripiton.js
+18
-0
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+36
-3
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfDescripitonController.java
浏览文件 @
443f1174
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfDescripitonEntity
;
import
com.platform.entity.TbCfGoodstwotypeEntity
;
import
com.platform.service.TbCfDescripitonService
;
import
com.platform.service.TbCfGoodstwotypeService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
...
...
@@ -28,23 +30,25 @@ import java.util.Map;
public
class
TbCfDescripitonController
{
@Autowired
private
TbCfDescripitonService
tbCfDescripitonService
;
@Autowired
private
TbCfGoodstwotypeService
tbCfGoodstwotypeService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"tbcfdescripiton:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
TbCfDescripitonEntity
>
tbCfDescripitonList
=
tbCfDescripitonService
.
queryList
(
query
);
int
total
=
tbCfDescripitonService
.
queryTotal
(
query
);
List
<
TbCfDescripitonEntity
>
tbCfDescripitonList
=
tbCfDescripitonService
.
queryList
(
query
);
int
total
=
tbCfDescripitonService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
tbCfDescripitonList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
PageUtils
pageUtil
=
new
PageUtils
(
tbCfDescripitonList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
...
...
@@ -106,4 +110,15 @@ public class TbCfDescripitonController {
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
*
* @param typeId
* @return 根据一级类目ID查询二级类目
*/
@RequestMapping
(
"/queryByItemType"
)
@ResponseBody
public
R
queryByItemType
(
@RequestParam
(
"typeId"
)
String
typeId
){
List
<
TbCfGoodstwotypeEntity
>
list
=
tbCfGoodstwotypeService
.
queryByTypeId
(
typeId
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/controller/TbCfStationItemController.java
浏览文件 @
443f1174
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfDescripitonEntity
;
import
com.platform.entity.TbCfGoodstwotypeEntity
;
import
com.platform.entity.TbCfStationItemEntity
;
import
com.platform.entity.merge.GoodsTypeToGoodsTwo
;
import
com.platform.service.TbCfDescripitonService
;
import
com.platform.service.TbCfGoodstwotypeService
;
import
com.platform.service.TbCfStationItemService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
...
...
@@ -28,7 +33,10 @@ import java.util.Map;
public
class
TbCfStationItemController
{
@Autowired
private
TbCfStationItemService
tbCfStationItemService
;
@Autowired
private
TbCfGoodstwotypeService
tbCfGoodstwotypeService
;
@Autowired
private
TbCfDescripitonService
tbCfDescripitonService
;
/**
* 查看列表
*/
...
...
@@ -106,4 +114,29 @@ public class TbCfStationItemController {
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
*
* @param typeId
* @return 根据一级类目ID查询二级类目
*/
@RequestMapping
(
"/queryByItemType"
)
@ResponseBody
public
R
queryByItemType
(
@RequestParam
(
"typeId"
)
String
typeId
){
List
<
TbCfGoodstwotypeEntity
>
list
=
tbCfGoodstwotypeService
.
queryByTypeId
(
typeId
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
*
* @param typeTwoId
* @return 根据二级类目ID查询三级类目
*/
@RequestMapping
(
"/queryByItemTypeTwo"
)
@ResponseBody
public
R
queryByItemTypeTwo
(
@RequestParam
(
"typeTwoId"
)
String
typeTwoId
){
List
<
TbCfDescripitonEntity
>
descripiton
=
tbCfDescripitonService
.
queryByItemTypeTwo
(
typeTwoId
);
return
R
.
ok
().
put
(
"descripiton"
,
descripiton
);
}
}
platform-admin/src/main/java/com/platform/dao/TbCfDescripitonDao.java
浏览文件 @
443f1174
...
...
@@ -2,6 +2,8 @@ package com.platform.dao;
import
com.platform.entity.TbCfDescripitonEntity
;
import
java.util.List
;
/**
* Dao
*
...
...
@@ -9,5 +11,5 @@ import com.platform.entity.TbCfDescripitonEntity;
* @date 2019-10-16 11:51:35
*/
public
interface
TbCfDescripitonDao
extends
BaseDao
<
TbCfDescripitonEntity
>
{
List
<
TbCfDescripitonEntity
>
queryByItemTypeTwo
(
String
id
);
}
platform-admin/src/main/java/com/platform/dao/TbCfGoodstwotypeDao.java
浏览文件 @
443f1174
...
...
@@ -3,6 +3,8 @@ package com.platform.dao;
import
com.platform.entity.TbCfGoodstwotypeEntity
;
import
com.platform.entity.merge.GoodsTypeToGoodsTwo
;
import
java.util.List
;
/**
* Dao
*
...
...
@@ -11,4 +13,6 @@ import com.platform.entity.merge.GoodsTypeToGoodsTwo;
*/
public
interface
TbCfGoodstwotypeDao
extends
BaseDao
<
TbCfGoodstwotypeEntity
>
{
GoodsTypeToGoodsTwo
queryGoodsTypeId
(
String
goodstype_id
);
List
<
TbCfGoodstwotypeEntity
>
queryByTypeId
(
String
typeId
);
}
platform-admin/src/main/java/com/platform/service/TbCfDescripitonService.java
浏览文件 @
443f1174
...
...
@@ -20,6 +20,7 @@ public interface TbCfDescripitonService {
* @return 实体
*/
TbCfDescripitonEntity
queryObject
(
String
descripitionId
);
List
<
TbCfDescripitonEntity
>
queryByItemTypeTwo
(
String
id
);
/**
* 分页查询
...
...
platform-admin/src/main/java/com/platform/service/TbCfGoodstwotypeService.java
浏览文件 @
443f1174
...
...
@@ -76,4 +76,5 @@ public interface TbCfGoodstwotypeService {
* @return
*/
GoodsTypeToGoodsTwo
queryGoodsTypeId
(
String
goodstype_id
);
List
<
TbCfGoodstwotypeEntity
>
queryByTypeId
(
String
goodstype_id
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfDescripitonServiceImpl.java
浏览文件 @
443f1174
...
...
@@ -26,6 +26,11 @@ public class TbCfDescripitonServiceImpl implements TbCfDescripitonService {
return
tbCfDescripitonDao
.
queryObject
(
descripitionId
);
}
@Override
public
List
<
TbCfDescripitonEntity
>
queryByItemTypeTwo
(
String
id
)
{
return
tbCfDescripitonDao
.
queryByItemTypeTwo
(
id
);
}
@Override
public
List
<
TbCfDescripitonEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfDescripitonDao
.
queryList
(
map
);
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfGoodstwotypeServiceImpl.java
浏览文件 @
443f1174
...
...
@@ -66,4 +66,9 @@ public class TbCfGoodstwotypeServiceImpl implements TbCfGoodstwotypeService {
public
GoodsTypeToGoodsTwo
queryGoodsTypeId
(
String
goodstype_id
)
{
return
tbCfGoodstwotypeDao
.
queryGoodsTypeId
(
goodstype_id
);
}
@Override
public
List
<
TbCfGoodstwotypeEntity
>
queryByTypeId
(
String
typeId
)
{
return
tbCfGoodstwotypeDao
.
queryByTypeId
(
typeId
);
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfDescripitonDao.xml
浏览文件 @
443f1174
...
...
@@ -21,7 +21,16 @@
from tb_cf_descripiton
where descripition_id = #{id}
</select>
<select
id=
"queryByItemTypeTwo"
resultType=
"com.platform.entity.TbCfDescripitonEntity"
>
select
`descripition_id`,
`descripition_name`,
`descripition_code`,
`goodstype_id`,
`goodstwotype_id`
from tb_cf_descripiton
where goodstwotype_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfDescripitonEntity"
>
select
`descripition_id`,
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfGoodstwotypeDao.xml
浏览文件 @
443f1174
...
...
@@ -9,14 +9,14 @@
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
</resultMap>
<resultMap
type=
"com.platform.entity.merge.GoodsTypeToGoodsTwo"
id=
"GoodsToTwo"
>
<result
property=
"goodstwotypeId"
column=
"goodstwotype_id"
/>
<result
property=
"goodstwotypeTitle"
column=
"goodstwotype_title"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstypeTitle"
column=
"goodstype_title"
/>
</resultMap>
<resultMap
type=
"com.platform.entity.merge.GoodsTypeToGoodsTwo"
id=
"GoodsToTwo"
>
<result
property=
"goodstwotypeId"
column=
"goodstwotype_id"
/>
<result
property=
"goodstwotypeTitle"
column=
"goodstwotype_title"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstypeTitle"
column=
"goodstype_title"
/>
</resultMap>
<select
id=
"queryGoodsTypeId"
resultMap=
"GoodsToTwo"
>
<select
id=
"queryGoodsTypeId"
resultMap=
"GoodsToTwo"
>
SELECT
tw.`goodstwotype_id`,
tw.`goodstwotype_title`,
...
...
@@ -26,8 +26,15 @@
INNER JOIN tb_cf_goodstype ds ON ds.goodstype_id = tw.goodstype_id
where tw.goodstwotype_id = #{id}
</select>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
<select
id=
"queryByTypeId"
resultType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
select
`goodstwotype_id`,
`goodstwotype_title`,
`goodstype_id`
from tb_cf_goodstwotype
WHERE goodstype_id= #{id}
</select>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
select
`goodstwotype_id`,
`goodstwotype_title`,
...
...
@@ -36,40 +43,40 @@
where goodstwotype_id = #{id}
</select>
<select
id=
"queryList"
resultMap=
"GoodsToTwo"
>
SELECT
tw.`goodstwotype_id`,
tw.`goodstwotype_title`,
ds.`goodstype_id`,
ds.`goodstype_title`
FROM tb_cf_goodstwotype
tw
INNER JOIN tb_cf_goodstype ds ON ds.goodstype_id = tw.goodstype_id
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<select
id=
"queryList"
resultMap=
"GoodsToTwo"
>
SELECT
tw.`goodstwotype_id`,
tw.`goodstwotype_title`,
ds.`goodstype_id`,
ds.`goodstype_title`
FROM tb_cf_goodstwotype
tw
INNER JOIN tb_cf_goodstype ds ON ds.goodstype_id = tw.goodstype_id
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>
<otherwise>
order by goodstwotype_id desc
</otherwise>
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_goodstwotype
WHERE 1=1
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_goodstwotype
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
insert into tb_cf_goodstwotype(
`goodstwotype_id`,
`goodstwotype_title`,
...
...
@@ -79,25 +86,25 @@
#{goodstwotypeTitle},
#{goodstypeId})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
update tb_cf_goodstwotype
<set>
<if
test=
"goodstwotypeTitle != null"
>
`goodstwotype_title` = #{goodstwotypeTitle},
</if>
<if
test=
"goodstypeId != null"
>
`goodstype_id` = #{goodstypeId}
</if>
</set>
where goodstwotype_id = #{goodstwotypeId}
</update>
<delete
id=
"delete"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
update tb_cf_goodstwotype
<set>
<if
test=
"goodstwotypeTitle != null"
>
`goodstwotype_title` = #{goodstwotypeTitle},
</if>
<if
test=
"goodstypeId != null"
>
`goodstype_id` = #{goodstypeId}
</if>
</set>
where goodstwotype_id = #{goodstwotypeId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_goodstwotype where goodstwotype_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_goodstwotype where goodstwotype_id in
<foreach
item=
"goodstwotypeId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{goodstwotypeId}
</foreach>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_goodstwotype where goodstwotype_id in
<foreach
item=
"goodstwotypeId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{goodstwotypeId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/com/platform/dao/TbCfStationItemDao.xml
浏览文件 @
443f1174
...
...
@@ -19,67 +19,67 @@
<result
property=
"itemDescritionId"
column=
"item_descrition_id"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
select
`item_id
`,
`item_cod
e`,
`item_name
`,
`item_brief
`,
`item_category
`,
`item_url
`,
`item_img
`,
`platform_cod
e`,
`platform_name
`,
`enable_flag
`,
`create_time
`,
`item_categorytwo`,
`item_descrition_id`
from tb_cf_station_item
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
select `item_id`,
`item_code
`,
`item_nam
e`,
`item_brief
`,
`item_category
`,
`item_url
`,
`item_img
`,
`platform_code
`,
`platform_nam
e`,
`enable_flag
`,
`create_time
`,
`item_categorytwo
`,
`item_descrition_id`
FROM
tb_cf_station_item s
where item_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
select
`item_id
`,
`item_cod
e`,
`item_name
`,
`item_brief
`,
`item_category
`,
`item_url
`,
`item_img
`,
`platform_cod
e`,
`platform_name
`,
`enable_flag
`,
`create_time
`,
`item_categorytwo`,
`item_descrition_id`
from tb_cf_station_item
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
select `item_id`,
`item_code
`,
`item_nam
e`,
`item_brief
`,
`item_category
`,
`item_url
`,
`item_img
`,
`platform_code
`,
`platform_nam
e`,
`enable_flag
`,
`create_time
`,
`item_categorytwo
`,
`item_descrition_id`
FROM
tb_cf_station_item s
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>
<otherwise>
order by item_id desc
</otherwise>
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_station_item
WHERE 1=1
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_station_item
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
insert into tb_cf_station_item(
`item_id`,
`item_code`,
...
...
@@ -109,35 +109,35 @@
#{itemCategorytwo},
#{itemDescritionId})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
update tb_cf_station_item
<set>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"itemCategorytwo != null"
>
`item_categorytwo` = #{itemCategorytwo},
</if>
<if
test=
"itemDescritionId != null"
>
`item_descrition_id` = #{itemDescritionId}
</if>
</set>
where item_id = #{itemId}
</update>
<delete
id=
"delete"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
update tb_cf_station_item
<set>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"itemCategorytwo != null"
>
`item_categorytwo` = #{itemCategorytwo},
</if>
<if
test=
"itemDescritionId != null"
>
`item_descrition_id` = #{itemDescritionId}
</if>
</set>
where item_id = #{itemId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_station_item where item_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_station_item where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_station_item where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfdescripiton.html
浏览文件 @
443f1174
...
...
@@ -39,20 +39,20 @@
<Form-item
label=
"海关编码"
prop=
"descripitionCode"
>
<i-input
v-model=
"tbCfDescripiton.descripitionCode"
placeholder=
"海关编码"
/>
</Form-item>
<Form-item
label=
"商品一级分类"
prop=
"goodstypeId"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfDescripiton.goodstypeId"
>
<Form-item
label=
"商品一级分类"
prop=
"goodstypeId"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfDescripiton.goodstypeId"
@
on-change=
"changeGoodstype"
>
<i-option
v-for=
"(el,i) in Goodstype"
:key =
'i'
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
</i-select>
</Form-item>
<Form-item
label=
"商品二级分类"
prop=
"goodstwotypeId"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfDescripiton.goodstwotypeId"
>
<i-option
v-for=
"(el,i) in GoodstypeTwo
"
:key =
'i'
:value=
"el.goodstwotypeId"
>
{{el.goodstwotypeTitle}}
</i-option>
</i-select>
</Form-item>
<i-select
placeholder=
"请选择"
v-model=
"tbCfDescripiton.goodstwotypeId"
>
<i-option
v-for=
"(el,i) in Goodstype2
"
:key =
'i'
:value=
"el.goodstwotypeId"
>
{{el.goodstwotypeTitle}}
</i-option>
</i-select>
</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>
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
443f1174
...
...
@@ -41,12 +41,6 @@
</Form-item>
<Form-item
label=
"商品标题简介"
prop=
"itemBrief"
>
<i-input
v-model=
"tbCfStationItem.itemBrief"
placeholder=
"商品标题简介"
/>
</Form-item>
<Form-item
label=
"商品一级分类"
prop=
"itemCategory"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategory"
>
<i-option
v-for=
"(el,i) in Goodstype"
:key =
'i'
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
</i-select>
</Form-item>
<Form-item
label=
"商品链接"
prop=
"itemUrl"
>
<i-input
v-model=
"tbCfStationItem.itemUrl"
placeholder=
"商品链接"
/>
...
...
@@ -63,14 +57,24 @@
<Form-item
label=
"启用状态"
prop=
"enableFlag"
>
<i-input
v-model=
"tbCfStationItem.enableFlag"
placeholder=
"启用状态"
/>
</Form-item>
<Form-item
label=
"创建日期"
prop=
"createTime"
>
<i-input
v-model=
"tbCfStationItem.createTime"
placeholder=
"创建日期"
/>
<Form-item
label=
"商品一级分类"
prop=
"itemCategory"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategory"
@
on-change=
"changeGoodstype"
>
<i-option
v-for=
"(el,i) in Goodstype"
:key =
'i'
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
</i-select>
</Form-item>
<Form-item
label=
"商品二级分类"
prop=
"itemCategorytwo"
>
<i-input
v-model=
"tbCfStationItem.itemCategorytwo"
placeholder=
"商品二级分类"
/>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategorytwo"
@
on-change=
"changeGoodstype2"
>
<i-option
v-for=
"(el,i) in Goodstype2"
:key =
'i'
:value=
"el.goodstwotypeId"
>
{{el.goodstwotypeTitle}}
</i-option>
</i-select>
</Form-item>
<Form-item
label=
"商品品名"
prop=
"itemDescritionId"
>
<i-input
v-model=
"tbCfStationItem.itemDescritionId"
placeholder=
"商品品名"
/>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemDescritionId"
>
<i-option
v-for=
"(el,i) in Goodstype3"
:key =
'i'
:value=
"el.descripitionId"
>
{{el.descripitionName}}
</i-option>
</i-select>
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
...
...
platform-admin/src/main/webapp/js/sys/tbcfdescripiton.js
浏览文件 @
443f1174
...
...
@@ -16,6 +16,7 @@ let vm = new Vue({
showList
:
true
,
title
:
null
,
tbCfDescripiton
:
{},
Goodstype2
:
null
,
Goodstype
:
null
,
GoodstypeTwo
:
null
,
ruleValidate
:
{
...
...
@@ -28,6 +29,23 @@ let vm = new Vue({
}
},
methods
:
{
changeGoodstype
(){
let
url
=
`/africa_shop/tbcfdescripiton/queryByItemType?typeId=
${
this
.
tbCfDescripiton
.
goodstypeId
}
`
console
.
log
(
'url'
,
url
)
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
console
.
log
(
'res'
,
r
)
if
(
r
.
code
===
0
){
that
.
Goodstype2
=
r
.
list
console
.
log
(
that
.
Goodstype2
)
}
}
});
},
query
:
function
()
{
vm
.
reload
();
},
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
443f1174
...
...
@@ -25,6 +25,8 @@ let vm = new Vue({
title
:
null
,
tbCfStationItem
:
{},
Goodstype
:
null
,
Goodstype2
:
null
,
Goodstype3
:
null
,
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
...
...
@@ -35,6 +37,40 @@ let vm = new Vue({
}
},
methods
:
{
//获取一级分类
changeGoodstype
(){
let
url
=
`/africa_shop/tbcfstationitem/queryByItemType?typeId=
${
this
.
tbCfStationItem
.
itemCategory
}
`
//console.log('url',url)
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
console
.
log
(
'res'
,
r
)
if
(
r
.
code
===
0
){
that
.
Goodstype2
=
r
.
list
console
.
log
(
that
.
Goodstype2
)
}
}
});
},
changeGoodstype2
(){
let
url
=
`/africa_shop/tbcfstationitem/queryByItemTypeTwo?typeTwoId=
${
this
.
tbCfStationItem
.
itemCategorytwo
}
`
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
console
.
log
(
'res'
,
r
)
if
(
r
.
code
===
0
){
that
.
Goodstype3
=
r
.
descripiton
console
.
log
(
that
.
Goodstype3
)
}
}
});
},
query
:
function
()
{
vm
.
reload
();
},
...
...
@@ -124,10 +160,7 @@ let vm = new Vue({
var
that
=
this
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
//console.log("成功");
// console.log(that,"this");
//console.log(res,"BBB");
that
.
Goodstype
=
res
.
list
;
// console.log(that.Goodstype);
})
}
});
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论