Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
8b3336f4
提交
8b3336f4
authored
12月 27, 2019
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成商品管理,sku,规格,属性等
上级
993a9ef9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
33 个修改的文件
包含
2395 行增加
和
144 行删除
+2395
-144
TbCfItemSkusController.java
.../java/com/platform/controller/TbCfItemSkusController.java
+109
-0
TbCfStationItemController.java
...va/com/platform/controller/TbCfStationItemController.java
+8
-10
TbCfCategoryDao.java
...admin/src/main/java/com/platform/dao/TbCfCategoryDao.java
+23
-0
TbCfItemDescDao.java
...admin/src/main/java/com/platform/dao/TbCfItemDescDao.java
+3
-1
TbCfItemSkusDao.java
...admin/src/main/java/com/platform/dao/TbCfItemSkusDao.java
+24
-0
TbCfOptionDao.java
...m-admin/src/main/java/com/platform/dao/TbCfOptionDao.java
+17
-0
TbCfStationItemDao.java
...in/src/main/java/com/platform/dao/TbCfStationItemDao.java
+4
-0
ItemDescSkus.java
...admin/src/main/java/com/platform/entity/ItemDescSkus.java
+46
-0
ItemInfo.java
...orm-admin/src/main/java/com/platform/entity/ItemInfo.java
+47
-0
ItemOptions.java
...-admin/src/main/java/com/platform/entity/ItemOptions.java
+20
-0
Option.java
platform-admin/src/main/java/com/platform/entity/Option.java
+33
-0
TbCfCategoryEntity.java
...src/main/java/com/platform/entity/TbCfCategoryEntity.java
+170
-0
TbCfItemSkusEntity.java
...src/main/java/com/platform/entity/TbCfItemSkusEntity.java
+216
-0
TbCfOptionEntity.java
...n/src/main/java/com/platform/entity/TbCfOptionEntity.java
+153
-0
TbCfStationItemEntity.java
.../main/java/com/platform/entity/TbCfStationItemEntity.java
+1
-1
TbCfCategoryService.java
...c/main/java/com/platform/service/TbCfCategoryService.java
+71
-0
TbCfItemSkusService.java
...c/main/java/com/platform/service/TbCfItemSkusService.java
+71
-0
TbCfOptionService.java
...src/main/java/com/platform/service/TbCfOptionService.java
+71
-0
TbCfStationItemService.java
...ain/java/com/platform/service/TbCfStationItemService.java
+9
-6
TbCfCategoryServiceImpl.java
...va/com/platform/service/impl/TbCfCategoryServiceImpl.java
+59
-0
TbCfItemSkusServiceImpl.java
...va/com/platform/service/impl/TbCfItemSkusServiceImpl.java
+59
-0
TbCfOptionServiceImpl.java
...java/com/platform/service/impl/TbCfOptionServiceImpl.java
+59
-0
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+221
-16
TbCfCategoryDao.xml
...n/src/main/resources/com/platform/dao/TbCfCategoryDao.xml
+132
-0
TbCfItemDescDao.xml
...n/src/main/resources/com/platform/dao/TbCfItemDescDao.xml
+11
-6
TbCfItemSkusDao.xml
...n/src/main/resources/com/platform/dao/TbCfItemSkusDao.xml
+146
-0
TbCfOptionDao.xml
...min/src/main/resources/com/platform/dao/TbCfOptionDao.xml
+124
-0
TbCfStationItemDao.xml
...rc/main/resources/com/platform/dao/TbCfStationItemDao.xml
+14
-3
tbcfitemskus.html
...-admin/src/main/webapp/WEB-INF/page/sys/tbcfitemskus.html
+71
-0
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+122
-50
tbcfitemskus.js
platform-admin/src/main/webapp/js/sys/tbcfitemskus.js
+118
-0
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+136
-51
iview.js
platform-admin/src/main/webapp/statics/libs/iview.js
+27
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfItemSkusController.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfItemSkusEntity
;
import
com.platform.service.TbCfItemSkusService
;
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 2019-12-24 17:10:28
*/
@Controller
@RequestMapping
(
"tbcfitemskus"
)
public
class
TbCfItemSkusController
{
@Autowired
private
TbCfItemSkusService
tbCfItemSkusService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"tbcfitemskus:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
TbCfItemSkusEntity
>
tbCfItemSkusList
=
tbCfItemSkusService
.
queryList
(
query
);
int
total
=
tbCfItemSkusService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
tbCfItemSkusList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* 查看信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"tbcfitemskus:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
TbCfItemSkusEntity
tbCfItemSkus
=
tbCfItemSkusService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"tbCfItemSkus"
,
tbCfItemSkus
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"tbcfitemskus:save"
)
@ResponseBody
public
R
save
(
@RequestBody
TbCfItemSkusEntity
tbCfItemSkus
)
{
tbCfItemSkusService
.
save
(
tbCfItemSkus
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"tbcfitemskus:update"
)
@ResponseBody
public
R
update
(
@RequestBody
TbCfItemSkusEntity
tbCfItemSkus
)
{
tbCfItemSkusService
.
update
(
tbCfItemSkus
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"tbcfitemskus:delete"
)
@ResponseBody
public
R
delete
(
@RequestBody
String
[]
ids
)
{
tbCfItemSkusService
.
deleteBatch
(
ids
);
return
R
.
ok
();
}
/**
* 查看所有列表
*/
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
TbCfItemSkusEntity
>
list
=
tbCfItemSkusService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/controller/TbCfStationItemController.java
浏览文件 @
8b3336f4
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfDescripitonEntity
;
import
com.platform.entity.TbCfGoodstwotypeEntity
;
import
com.platform.entity.TbCfStationItemEntity
;
import
com.platform.entity.*
;
import
com.platform.enums.OssFolderNameEnum
;
import
com.platform.service.TbCfDescripitonService
;
import
com.platform.service.TbCfGoodstwotypeService
;
...
...
@@ -17,6 +15,7 @@ import org.springframework.stereotype.Controller;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.UnsupportedEncodingException
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -81,9 +80,8 @@ public class TbCfStationItemController extends ApiBaseAction {
@RequiresPermissions
(
"tbcfstationitem:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"itemId"
)
String
itemId
)
{
TbCfStationItemEntity
tbCfStationItem
=
tbCfStationItemService
.
queryObject
(
itemId
);
return
R
.
ok
().
put
(
"tbCfStationItem"
,
tbCfStationItem
);
ItemInfo
itemInfo
=
tbCfStationItemService
.
queryItemInfoById
(
itemId
);
return
R
.
ok
().
put
(
"tbCfStationItem"
,
itemInfo
);
}
/**
...
...
@@ -92,8 +90,8 @@ public class TbCfStationItemController extends ApiBaseAction {
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"tbcfstationitem:save"
)
@ResponseBody
public
R
save
(
@RequestBody
TbCfStationItemEntity
tbCfStationItem
,
String
itemDesc
)
{
tbCfStationItemService
.
save
(
tbCfStationItem
,
itemDesc
);
public
R
save
(
@RequestBody
ItemDescSkus
items
)
throws
UnsupportedEncodingException
{
tbCfStationItemService
.
save
(
items
);
return
R
.
ok
();
}
...
...
@@ -103,8 +101,8 @@ public class TbCfStationItemController extends ApiBaseAction {
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"tbcfstationitem:update"
)
@ResponseBody
public
R
update
(
@RequestBody
TbCfStationItemEntity
tbCfStationItem
,
String
itemDesc
)
{
tbCfStationItemService
.
update
(
tbCfStationItem
,
itemDesc
);
public
R
update
(
@RequestBody
ItemDescSkus
items
,
String
itemDesc
)
throws
UnsupportedEncodingException
{
tbCfStationItemService
.
update
(
items
,
itemDesc
);
return
R
.
ok
();
}
...
...
platform-admin/src/main/java/com/platform/dao/TbCfCategoryDao.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfCategoryEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* Dao
*
* @author lipengjun
* @date 2019-12-26 15:10:48
*/
public
interface
TbCfCategoryDao
extends
BaseDao
<
TbCfCategoryEntity
>
{
List
<
TbCfCategoryEntity
>
queryByItemId
(
String
itemId
);
int
changStatus
(
String
itemId
);
int
changStatusBatch
(
String
[]
itemId
);
TbCfCategoryEntity
queryByOrderNum
(
@Param
(
"orderNum"
)
Integer
orderNum
,
@Param
(
"itemId"
)
String
itemId
);
}
platform-admin/src/main/java/com/platform/dao/TbCfItemDescDao.java
浏览文件 @
8b3336f4
...
...
@@ -10,5 +10,7 @@ import org.apache.ibatis.annotations.Param;
* @date 2019-12-23 14:28:47
*/
public
interface
TbCfItemDescDao
extends
BaseDao
<
TbCfItemDescEntity
>
{
int
changeItemDescStatus
(
@Param
(
"status"
)
Integer
status
,
@Param
(
"itemIds"
)
String
[]
itemIds
);
int
changStatus
(
String
itemId
);
int
changStatusBatch
(
String
[]
itemId
);
}
platform-admin/src/main/java/com/platform/dao/TbCfItemSkusDao.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfItemSkusEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* Dao
*
* @author lipengjun
* @date 2019-12-24 17:10:28
*/
public
interface
TbCfItemSkusDao
extends
BaseDao
<
TbCfItemSkusEntity
>
{
List
<
TbCfItemSkusEntity
>
querySkusByItemId
(
String
itemId
);
int
changStatus
(
String
itemId
);
int
changStatusBatch
(
String
[]
itemId
);
TbCfItemSkusEntity
queryByOrderNum
(
@Param
(
"orderNum"
)
Integer
orderNum
,
@Param
(
"itemId"
)
String
itemId
);
int
deleteByItemId
(
String
itemId
);
}
platform-admin/src/main/java/com/platform/dao/TbCfOptionDao.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfOptionEntity
;
/**
* 商品属性Dao
*
* @author lipengjun
* @date 2019-12-26 16:36:21
*/
public
interface
TbCfOptionDao
extends
BaseDao
<
TbCfOptionEntity
>
{
int
changStatus
(
String
itemId
);
int
changStatusBatch
(
String
[]
itemIds
);
int
deleteByItemId
(
String
itemId
);
}
platform-admin/src/main/java/com/platform/dao/TbCfStationItemDao.java
浏览文件 @
8b3336f4
package
com
.
platform
.
dao
;
import
com.platform.entity.ItemDescSkus
;
import
com.platform.entity.TbCfStationItemEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 站点商品Dao
*
...
...
@@ -11,4 +14,5 @@ import org.apache.ibatis.annotations.Param;
*/
public
interface
TbCfStationItemDao
extends
BaseDao
<
TbCfStationItemEntity
>
{
int
changeItemStatus
(
@Param
(
"status"
)
Integer
status
,
@Param
(
"itemIds"
)
String
[]
itemIds
);
List
<
ItemDescSkus
>
queryItemInfoById
(
String
itemId
);
}
platform-admin/src/main/java/com/platform/entity/ItemDescSkus.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/12/24
* @Description:
*/
public
class
ItemDescSkus
extends
TbCfStationItemEntity
{
private
String
itemDesc
;
private
boolean
putaway
;
private
List
<
TbCfItemSkusEntity
>
prevItem
;
private
List
<
TbCfCategoryEntity
>
tree
;
public
String
getItemDesc
()
{
return
itemDesc
;
}
public
void
setItemDesc
(
String
itemDesc
)
{
this
.
itemDesc
=
itemDesc
;
}
public
boolean
isPutaway
()
{
return
putaway
;
}
public
void
setPutaway
(
boolean
putaway
)
{
this
.
putaway
=
putaway
;
}
public
List
<
TbCfItemSkusEntity
>
getPrevItem
()
{
return
prevItem
;
}
public
void
setPrevItem
(
List
<
TbCfItemSkusEntity
>
prevItem
)
{
this
.
prevItem
=
prevItem
;
}
public
List
<
TbCfCategoryEntity
>
getTree
()
{
return
tree
;
}
public
void
setTree
(
List
<
TbCfCategoryEntity
>
tree
)
{
this
.
tree
=
tree
;
}
}
platform-admin/src/main/java/com/platform/entity/ItemInfo.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/12/25
* @Description:
*/
public
class
ItemInfo
{
private
TbCfStationItemEntity
item
;
private
TbCfItemDescEntity
itemDesc
;
private
List
<
TbCfItemSkusEntity
>
itemSkusList
;
private
List
<
TbCfCategoryEntity
>
categoryList
;
public
TbCfStationItemEntity
getItem
()
{
return
item
;
}
public
void
setItem
(
TbCfStationItemEntity
item
)
{
this
.
item
=
item
;
}
public
TbCfItemDescEntity
getItemDesc
()
{
return
itemDesc
;
}
public
void
setItemDesc
(
TbCfItemDescEntity
itemDesc
)
{
this
.
itemDesc
=
itemDesc
;
}
public
List
<
TbCfItemSkusEntity
>
getItemSkusList
()
{
return
itemSkusList
;
}
public
void
setItemSkusList
(
List
<
TbCfItemSkusEntity
>
itemSkusList
)
{
this
.
itemSkusList
=
itemSkusList
;
}
public
List
<
TbCfCategoryEntity
>
getCategoryList
()
{
return
categoryList
;
}
public
void
setCategoryList
(
List
<
TbCfCategoryEntity
>
categoryList
)
{
this
.
categoryList
=
categoryList
;
}
}
platform-admin/src/main/java/com/platform/entity/ItemOptions.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/12/26
* @Description:属性封装类
*/
public
class
ItemOptions
{
private
List
<
Option
>
option
;
public
void
setOption
(
List
<
Option
>
option
)
{
this
.
option
=
option
;
}
public
List
<
Option
>
getOption
()
{
return
option
;
}
}
platform-admin/src/main/java/com/platform/entity/Option.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
/**
* @Auther: wudepeng
* @Date: 2019/12/26
* @Description:商品属性
*/
public
class
Option
{
private
String
opt_order
;
private
String
opt_name
;
private
String
opt_desc
;
public
void
setOpt_order
(
String
opt_order
)
{
this
.
opt_order
=
opt_order
;
}
public
String
getOpt_order
()
{
return
opt_order
;
}
public
void
setOpt_name
(
String
opt_name
)
{
this
.
opt_name
=
opt_name
;
}
public
String
getOpt_name
()
{
return
opt_name
;
}
public
void
setOpt_desc
(
String
opt_desc
)
{
this
.
opt_desc
=
opt_desc
;
}
public
String
getOpt_desc
()
{
return
opt_desc
;
}
}
platform-admin/src/main/java/com/platform/entity/TbCfCategoryEntity.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实体
* 表名 tb_cf_category
*
* @author lipengjun
* @date 2019-12-26 21:20:36
*/
public
class
TbCfCategoryEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商品规格ID
*/
private
String
categoryId
;
/**
* 规格名称
*/
private
String
categoryName
;
/**
* 规格详情
*/
private
String
categoryDesc
;
/**
* option
*/
private
String
option
;
/**
* 商品ID
*/
private
String
itemId
;
/**
* 排序
*/
private
Integer
orderNum
;
/**
* 删除标志 0:正常 1:已删除
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 设置:商品规格ID
*/
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
;
}
/**
* 获取:商品规格ID
*/
public
String
getCategoryId
()
{
return
categoryId
;
}
/**
* 设置:规格名称
*/
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
;
}
/**
* 获取:规格名称
*/
public
String
getCategoryName
()
{
return
categoryName
;
}
/**
* 设置:规格详情
*/
public
void
setCategoryDesc
(
String
categoryDesc
)
{
this
.
categoryDesc
=
categoryDesc
;
}
/**
* 获取:规格详情
*/
public
String
getCategoryDesc
()
{
return
categoryDesc
;
}
/**
* 设置:option
*/
public
void
setOption
(
String
option
)
{
this
.
option
=
option
;
}
/**
* 获取:option
*/
public
String
getOption
()
{
return
option
;
}
/**
* 设置:商品ID
*/
public
void
setItemId
(
String
itemId
)
{
this
.
itemId
=
itemId
;
}
/**
* 获取:商品ID
*/
public
String
getItemId
()
{
return
itemId
;
}
/**
* 设置:排序
*/
public
void
setOrderNum
(
Integer
orderNum
)
{
this
.
orderNum
=
orderNum
;
}
/**
* 获取:排序
*/
public
Integer
getOrderNum
()
{
return
orderNum
;
}
/**
* 设置:删除标志 0:正常 1:已删除
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* 获取:删除标志 0:正常 1:已删除
*/
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/entity/TbCfItemSkusEntity.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 实体
* 表名 tb_cf_item_skus
*
* @author lipengjun
* @date 2019-12-26 20:47:21
*/
public
class
TbCfItemSkusEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商品规格ID
*/
private
String
id
;
/**
* 商品ID
*/
private
String
itemId
;
/**
* 数量
*/
private
Integer
skuCount
;
/**
* 规格名称
*/
private
String
skuName
;
/**
* 规格描述
*/
private
String
skuDesc
;
/**
* 价格
*/
private
BigDecimal
skuPrice
;
/**
* 属性IDS
*/
private
String
optionIds
;
/**
* 排序号
*/
private
Integer
orderNum
;
/**
* 删除标记
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 设置:商品规格ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:商品规格ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:商品ID
*/
public
void
setItemId
(
String
itemId
)
{
this
.
itemId
=
itemId
;
}
/**
* 获取:商品ID
*/
public
String
getItemId
()
{
return
itemId
;
}
/**
* 设置:规格名称
*/
public
void
setSkuName
(
String
skuName
)
{
this
.
skuName
=
skuName
;
}
/**
* 获取:规格名称
*/
public
String
getSkuName
()
{
return
skuName
;
}
/**
* 设置:规格描述
*/
public
void
setSkuDesc
(
String
skuDesc
)
{
this
.
skuDesc
=
skuDesc
;
}
/**
* 获取:规格描述
*/
public
String
getSkuDesc
()
{
return
skuDesc
;
}
/**
* 设置:价格
*/
public
void
setSkuPrice
(
BigDecimal
skuPrice
)
{
this
.
skuPrice
=
skuPrice
;
}
/**
* 获取:价格
*/
public
BigDecimal
getSkuPrice
()
{
return
skuPrice
;
}
/**
* 设置:属性IDS
*/
public
void
setOptionIds
(
String
optionIds
)
{
this
.
optionIds
=
optionIds
;
}
/**
* 获取:属性IDS
*/
public
String
getOptionIds
()
{
return
optionIds
;
}
/**
* 设置:数量
*/
public
void
setSkuCount
(
Integer
skuCount
)
{
this
.
skuCount
=
skuCount
;
}
/**
* 获取:数量
*/
public
Integer
getSkuCount
()
{
return
skuCount
;
}
/**
* 设置:排序号
*/
public
void
setOrderNum
(
Integer
orderNum
)
{
this
.
orderNum
=
orderNum
;
}
/**
* 获取:排序号
*/
public
Integer
getOrderNum
()
{
return
orderNum
;
}
/**
* 设置:删除标记
*/
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/entity/TbCfOptionEntity.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 商品属性实体
* 表名 tb_cf_option
*
* @author lipengjun
* @date 2019-12-26 16:36:21
*/
public
class
TbCfOptionEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商品属性
*/
private
String
optionId
;
/**
* 属性名
*/
private
String
optionName
;
/**
* 属性种类
*/
private
String
optiionSpecies
;
/**
* 商品ID
*/
private
String
itemId
;
/**
* 商品规格ID
*/
private
String
cid
;
/**
* 删除标志 0:正常 1:已删除
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 设置:商品属性
*/
public
void
setOptionId
(
String
optionId
)
{
this
.
optionId
=
optionId
;
}
/**
* 获取:商品属性
*/
public
String
getOptionId
()
{
return
optionId
;
}
/**
* 设置:属性名
*/
public
void
setOptionName
(
String
optionName
)
{
this
.
optionName
=
optionName
;
}
/**
* 获取:属性名
*/
public
String
getOptionName
()
{
return
optionName
;
}
/**
* 设置:属性种类
*/
public
void
setOptiionSpecies
(
String
optiionSpecies
)
{
this
.
optiionSpecies
=
optiionSpecies
;
}
/**
* 获取:属性种类
*/
public
String
getOptiionSpecies
()
{
return
optiionSpecies
;
}
/**
* 设置:商品ID
*/
public
void
setItemId
(
String
itemId
)
{
this
.
itemId
=
itemId
;
}
/**
* 获取:商品ID
*/
public
String
getItemId
()
{
return
itemId
;
}
/**
* 设置:商品规格ID
*/
public
void
setCid
(
String
cid
)
{
this
.
cid
=
cid
;
}
/**
* 获取:商品规格ID
*/
public
String
getCid
()
{
return
cid
;
}
/**
* 设置:删除标志 0:正常 1:已删除
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* 获取:删除标志 0:正常 1:已删除
*/
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/entity/TbCfStationItemEntity.java
浏览文件 @
8b3336f4
...
...
@@ -77,7 +77,7 @@ public class TbCfStationItemEntity implements Serializable {
/**
* 状态 0、删除 1、上架 2、下架
*/
private
Integer
enableFlag
;
private
Integer
enableFlag
=
2
;
/**
* 创建日期
*/
...
...
platform-admin/src/main/java/com/platform/service/TbCfCategoryService.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfCategoryEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2019-12-26 15:10:48
*/
public
interface
TbCfCategoryService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfCategoryEntity
queryObject
(
String
categoryId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfCategoryEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfCategory 实体
* @return 保存条数
*/
int
save
(
TbCfCategoryEntity
tbCfCategory
);
/**
* 根据主键更新实体
*
* @param tbCfCategory 实体
* @return 更新条数
*/
int
update
(
TbCfCategoryEntity
tbCfCategory
);
/**
* 根据主键删除
*
* @param categoryId
* @return 删除条数
*/
int
delete
(
String
categoryId
);
/**
* 根据主键批量删除
*
* @param categoryIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
categoryIds
);
}
platform-admin/src/main/java/com/platform/service/TbCfItemSkusService.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfItemSkusEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2019-12-24 17:10:28
*/
public
interface
TbCfItemSkusService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfItemSkusEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfItemSkusEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfItemSkus 实体
* @return 保存条数
*/
int
save
(
TbCfItemSkusEntity
tbCfItemSkus
);
/**
* 根据主键更新实体
*
* @param tbCfItemSkus 实体
* @return 更新条数
*/
int
update
(
TbCfItemSkusEntity
tbCfItemSkus
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
}
platform-admin/src/main/java/com/platform/service/TbCfOptionService.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfOptionEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 商品属性Service接口
*
* @author lipengjun
* @date 2019-12-26 16:36:21
*/
public
interface
TbCfOptionService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfOptionEntity
queryObject
(
String
optionId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfOptionEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfOption 实体
* @return 保存条数
*/
int
save
(
TbCfOptionEntity
tbCfOption
);
/**
* 根据主键更新实体
*
* @param tbCfOption 实体
* @return 更新条数
*/
int
update
(
TbCfOptionEntity
tbCfOption
);
/**
* 根据主键删除
*
* @param optionId
* @return 删除条数
*/
int
delete
(
String
optionId
);
/**
* 根据主键批量删除
*
* @param optionIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
optionIds
);
}
platform-admin/src/main/java/com/platform/service/TbCfStationItemService.java
浏览文件 @
8b3336f4
package
com
.
platform
.
service
;
import
com.platform.entity.ItemDescSkus
;
import
com.platform.entity.ItemInfo
;
import
com.platform.entity.TbCfStationItemEntity
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.io.UnsupportedEncodingException
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -17,10 +20,10 @@ public interface TbCfStationItemService {
/**
* 根据主键查询实体
*
*
@param id 主键
*
* @return 实体
*/
TbCfStationItemEntity
queryObject
(
String
itemId
);
ItemInfo
queryItemInfoById
(
String
itemId
);
/**
* 分页查询
...
...
@@ -41,18 +44,18 @@ public interface TbCfStationItemService {
/**
* 保存实体
*
* @param
tbCfStationItem 实体
* @param
* @return 保存条数
*/
void
save
(
TbCfStationItemEntity
tbCfStationItem
,
String
itemDesc
)
;
void
save
(
ItemDescSkus
itemSkus
)
throws
UnsupportedEncodingException
;
/**
* 根据主键更新实体
*
* @param
tbCfStationItem 实体
* @param
* @return 更新条数
*/
void
update
(
TbCfStationItemEntity
tbCfStationItem
,
String
itemDesc
)
;
void
update
(
ItemDescSkus
itemSkus
,
String
itemDesc
)
throws
UnsupportedEncodingException
;
/**
* 根据主键删除
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfCategoryServiceImpl.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfCategoryDao
;
import
com.platform.entity.TbCfCategoryEntity
;
import
com.platform.service.TbCfCategoryService
;
import
com.platform.utils.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2019-12-26 15:10:48
*/
@Service
(
"tbCfCategoryService"
)
public
class
TbCfCategoryServiceImpl
implements
TbCfCategoryService
{
@Autowired
private
TbCfCategoryDao
tbCfCategoryDao
;
@Override
public
TbCfCategoryEntity
queryObject
(
String
categoryId
)
{
return
tbCfCategoryDao
.
queryObject
(
categoryId
);
}
@Override
public
List
<
TbCfCategoryEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfCategoryDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfCategoryDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfCategoryEntity
tbCfCategory
)
{
tbCfCategory
.
setCategoryId
(
IdUtil
.
createIdbyUUID
());
return
tbCfCategoryDao
.
save
(
tbCfCategory
);
}
@Override
public
int
update
(
TbCfCategoryEntity
tbCfCategory
)
{
return
tbCfCategoryDao
.
update
(
tbCfCategory
);
}
@Override
public
int
delete
(
String
categoryId
)
{
return
tbCfCategoryDao
.
delete
(
categoryId
);
}
@Override
public
int
deleteBatch
(
String
[]
categoryIds
)
{
return
tbCfCategoryDao
.
deleteBatch
(
categoryIds
);
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfItemSkusServiceImpl.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfItemSkusDao
;
import
com.platform.entity.TbCfItemSkusEntity
;
import
com.platform.service.TbCfItemSkusService
;
import
com.platform.utils.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2019-12-24 17:10:28
*/
@Service
(
"tbCfItemSkusService"
)
public
class
TbCfItemSkusServiceImpl
implements
TbCfItemSkusService
{
@Autowired
private
TbCfItemSkusDao
tbCfItemSkusDao
;
@Override
public
TbCfItemSkusEntity
queryObject
(
String
id
)
{
return
tbCfItemSkusDao
.
queryObject
(
id
);
}
@Override
public
List
<
TbCfItemSkusEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfItemSkusDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfItemSkusDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfItemSkusEntity
tbCfItemSkus
)
{
tbCfItemSkus
.
setId
(
IdUtil
.
createIdbyUUID
());
return
tbCfItemSkusDao
.
save
(
tbCfItemSkus
);
}
@Override
public
int
update
(
TbCfItemSkusEntity
tbCfItemSkus
)
{
return
tbCfItemSkusDao
.
update
(
tbCfItemSkus
);
}
@Override
public
int
delete
(
String
id
)
{
return
tbCfItemSkusDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
tbCfItemSkusDao
.
deleteBatch
(
ids
);
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfOptionServiceImpl.java
0 → 100644
浏览文件 @
8b3336f4
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfOptionDao
;
import
com.platform.entity.TbCfOptionEntity
;
import
com.platform.service.TbCfOptionService
;
import
com.platform.utils.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* 商品属性Service实现类
*
* @author lipengjun
* @date 2019-12-26 16:36:21
*/
@Service
(
"tbCfOptionService"
)
public
class
TbCfOptionServiceImpl
implements
TbCfOptionService
{
@Autowired
private
TbCfOptionDao
tbCfOptionDao
;
@Override
public
TbCfOptionEntity
queryObject
(
String
optionId
)
{
return
tbCfOptionDao
.
queryObject
(
optionId
);
}
@Override
public
List
<
TbCfOptionEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfOptionDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfOptionDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfOptionEntity
tbCfOption
)
{
tbCfOption
.
setOptionId
(
IdUtil
.
createIdbyUUID
());
return
tbCfOptionDao
.
save
(
tbCfOption
);
}
@Override
public
int
update
(
TbCfOptionEntity
tbCfOption
)
{
return
tbCfOptionDao
.
update
(
tbCfOption
);
}
@Override
public
int
delete
(
String
optionId
)
{
return
tbCfOptionDao
.
delete
(
optionId
);
}
@Override
public
int
deleteBatch
(
String
[]
optionIds
)
{
return
tbCfOptionDao
.
deleteBatch
(
optionIds
);
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
8b3336f4
差异被折叠。
点击展开。
platform-admin/src/main/resources/com/platform/dao/TbCfCategoryDao.xml
0 → 100644
浏览文件 @
8b3336f4
<?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.TbCfCategoryDao"
>
<resultMap
type=
"com.platform.entity.TbCfCategoryEntity"
id=
"tbCfCategoryMap"
>
<result
property=
"categoryId"
column=
"category_id"
/>
<result
property=
"categoryName"
column=
"category_name"
/>
<result
property=
"categoryDesc"
column=
"category_desc"
/>
<result
property=
"option"
column=
"option"
/>
<result
property=
"itemId"
column=
"item_id"
/>
<result
property=
"orderNum"
column=
"order_num"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfCategoryEntity"
>
select
`category_id`,
`category_name`,
`category_desc`,
`option`,
`item_id`,
`order_num`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_category
where category_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfCategoryEntity"
>
select
`category_id`,
`category_name`,
`category_desc`,
`option`,
`item_id`,
`order_num`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_category
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 category_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_category
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<select
id=
"queryByOrderNum"
resultType=
"com.platform.entity.TbCfCategoryEntity"
>
select * from tb_cf_category where order_num=#{orderNum} and item_id=#{itemId}
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfCategoryEntity"
>
insert into tb_cf_category(
`category_id`,
`category_name`,
`category_desc`,
`option`,
`item_id`,
`order_num`,
`del_flag`,
`create_time`,
`update_time`)
values(
#{categoryId},
#{categoryName},
#{categoryDesc},
#{option},
#{itemId},
#{orderNum},
#{delFlag},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfCategoryEntity"
>
update tb_cf_category
<set>
<if
test=
"categoryName != null"
>
`category_name` = #{categoryName},
</if>
<if
test=
"categoryDesc != null"
>
`category_desc` = #{categoryDesc},
</if>
<if
test=
"option != null"
>
`option` = #{option},
</if>
<if
test=
"itemId != null"
>
`item_id` = #{itemId},
</if>
<if
test=
"orderNum != null"
>
`order_num` = #{orderNum},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where category_id = #{categoryId}
</update>
<update
id=
"changStatus"
parameterType=
"com.platform.entity.TbCfCategoryEntity"
>
update tb_cf_category set del_flag=0 where item_id=#{itemId}
</update>
<update
id=
"changStatusBatch"
parameterType=
"com.platform.entity.TbCfCategoryEntity"
>
update tb_cf_category set del_flag=0 where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</update>
<select
id=
"queryByItemId"
resultType=
"com.platform.entity.TbCfCategoryEntity"
>
select * from tb_cf_category where item_id=#{itemId} order by order_num asc
</select>
<delete
id=
"delete"
>
delete from tb_cf_category where category_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_category where category_id in
<foreach
item=
"categoryId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{categoryId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/com/platform/dao/TbCfItemDescDao.xml
浏览文件 @
8b3336f4
...
...
@@ -81,6 +81,15 @@
where item_id = #{itemId}
</update>
<update
id=
"changStatus"
parameterType=
"com.platform.entity.TbCfItemDescEntity"
>
update tb_cf_item_desc set del_flag=0 where item_id=#{itemId}
</update>
<update
id=
"changStatusBatch"
parameterType=
"com.platform.entity.TbCfItemDescEntity"
>
update tb_cf_item_desc set del_flag=0 where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</update>
<delete
id=
"delete"
>
delete from tb_cf_item_desc where item_id = #{value}
</delete>
...
...
@@ -91,10 +100,6 @@
#{itemId}
</foreach>
</delete>
<update
id=
"changeItemDescStatus"
>
update tb_cf_item_desc set del_flag=#{status} where item_id in
<foreach
item=
"itemId"
collection=
"itemIds"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</update>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/com/platform/dao/TbCfItemSkusDao.xml
0 → 100644
浏览文件 @
8b3336f4
<?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.TbCfItemSkusDao"
>
<resultMap
type=
"com.platform.entity.TbCfItemSkusEntity"
id=
"tbCfItemSkusMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"itemId"
column=
"item_id"
/>
<result
property=
"skuName"
column=
"sku_name"
/>
<result
property=
"skuDesc"
column=
"sku_desc"
/>
<result
property=
"skuPrice"
column=
"sku_price"
/>
<result
property=
"optionIds"
column=
"option_ids"
/>
<result
property=
"skuCount"
column=
"sku_count"
/>
<result
property=
"orderNum"
column=
"order_num"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfItemSkusEntity"
>
select
`id`,
`item_id`,
`sku_name`,
`sku_desc`,
`sku_price`,
`option_ids`,
`sku_count`,
`order_num`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_item_skus
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfItemSkusEntity"
>
select
`id`,
`item_id`,
`sku_name`,
`sku_desc`,
`sku_price`,
`option_ids`,
`sku_count`,
`order_num`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_item_skus
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=
"querySkusByItemId"
resultType=
"com.platform.entity.TbCfItemSkusEntity"
>
select * from tb_cf_item_skus where item_id=#{itemId} order by order_num asc
</select>
<select
id=
"queryByOrderNum"
resultType=
"com.platform.entity.TbCfItemSkusEntity"
>
select * from tb_cf_item_skus where order_num=#{orderNum} and item_id=#{itemId}
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_item_skus
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfItemSkusEntity"
>
insert into tb_cf_item_skus(
`id`,
`item_id`,
`sku_name`,
`sku_desc`,
`sku_price`,
`option_ids`,
`sku_count`,
`order_num`,
`del_flag`,
`create_time`,
`update_time`)
values(
#{id},
#{itemId},
#{skuName},
#{skuDesc},
#{skuPrice},
#{optionIds},
#{skuCount},
#{orderNum},
#{delFlag},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfItemSkusEntity"
>
update tb_cf_item_skus
<set>
<if
test=
"itemId != null"
>
`item_id` = #{itemId},
</if>
<if
test=
"skuName != null"
>
`sku_name` = #{skuName},
</if>
<if
test=
"skuDesc != null"
>
`sku_desc` = #{skuDesc},
</if>
<if
test=
"skuPrice != null"
>
`sku_price` = #{skuPrice},
</if>
<if
test=
"optionIds != null"
>
`option_ids` = #{optionIds},
</if>
<if
test=
"skuCount != null"
>
`sku_count` = #{skuCount},
</if>
<if
test=
"orderNum != null"
>
`order_num` = #{orderNum},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<update
id=
"changStatus"
parameterType=
"com.platform.entity.TbCfItemSkusEntity"
>
update tb_cf_item_skus set del_flag=0 where item_id=#{itemId}
</update>
<update
id=
"changStatusBatch"
parameterType=
"com.platform.entity.TbCfItemSkusEntity"
>
update tb_cf_item_skus set del_flag=0 where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</update>
<delete
id=
"delete"
>
delete from tb_cf_item_skus where id = #{value}
</delete>
<delete
id=
"deleteByItemId"
>
delete from tb_cf_item_skus where item_id = #{item_id}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_item_skus 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/resources/com/platform/dao/TbCfOptionDao.xml
0 → 100644
浏览文件 @
8b3336f4
<?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.TbCfOptionDao"
>
<resultMap
type=
"com.platform.entity.TbCfOptionEntity"
id=
"tbCfOptionMap"
>
<result
property=
"optionId"
column=
"option_id"
/>
<result
property=
"optionName"
column=
"option_name"
/>
<result
property=
"optiionSpecies"
column=
"optiion_species"
/>
<result
property=
"itemId"
column=
"item_id"
/>
<result
property=
"cid"
column=
"cid"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfOptionEntity"
>
select
`option_id`,
`option_name`,
`optiion_species`,
`item_id`,
`cid`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_option
where option_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfOptionEntity"
>
select
`option_id`,
`option_name`,
`optiion_species`,
`item_id`,
`cid`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_option
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 option_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_option
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfOptionEntity"
>
insert into tb_cf_option(
`option_id`,
`option_name`,
`optiion_species`,
`item_id`,
`cid`,
`del_flag`,
`create_time`,
`update_time`)
values(
#{optionId},
#{optionName},
#{optiionSpecies},
#{itemId},
#{cid},
#{delFlag},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfOptionEntity"
>
update tb_cf_option
<set>
<if
test=
"optionName != null"
>
`option_name` = #{optionName},
</if>
<if
test=
"optiionSpecies != null"
>
`optiion_species` = #{optiionSpecies},
</if>
<if
test=
"itemId != null"
>
`item_id` = #{itemId},
</if>
<if
test=
"cid != null"
>
`cid` = #{cid},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where option_id = #{optionId}
</update>
<update
id=
"changStatus"
parameterType=
"com.platform.entity.TbCfOptionEntity"
>
update tb_cf_option set del_flag=0 where item_id=#{itemId}
</update>
<update
id=
"changStatusBatch"
parameterType=
"com.platform.entity.TbCfOptionEntity"
>
update tb_cf_option set del_flag=0 where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</update>
<delete
id=
"delete"
>
delete from tb_cf_option where option_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_option where option_id in
<foreach
item=
"optionId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{optionId}
</foreach>
</delete>
<delete
id=
"deleteByItemId"
>
delete from tb_cf_option where item_id =#{itemId}
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/com/platform/dao/TbCfStationItemDao.xml
浏览文件 @
8b3336f4
...
...
@@ -79,7 +79,7 @@
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
left JOIN tb_cf_express_template e ON i.item_descrition_id = e.template_id
WHERE 1=1
WHERE 1=1
and i.enable_flag!=0
<if
test=
"name != null and name.trim() != ''"
>
AND item_name LIKE concat('%',#{name},'%')
</if>
...
...
@@ -102,10 +102,21 @@
</if>
</select>
<select
id=
"queryItemInfoById"
resultType=
"com.platform.entity.ItemDescSkus"
>
SELECT
i.*,
s.*,
d.*
FROM
tb_cf_station_item i
LEFT JOIN tb_cf_item_skus s ON i.item_id = s.item_id
LEFT JOIN tb_cf_item_desc d ON i.item_id = d.item_id
WHERE
i.item_id = #{itemId}
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_station_item
WHERE 1=1
WHERE 1=1
and enable_flag!=0
<if
test=
"name != null and name.trim() != ''"
>
AND item_name LIKE concat('%',#{name},'%')
</if>
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfitemskus.html
0 → 100644
浏览文件 @
8b3336f4
<!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("tbcfitemskus:save"))
<i-button
type=
"info"
@
click=
"add"
><i
class=
"fa fa-plus"
></i>
新增
</i-button>
#end
#if($shiro.hasPermission("tbcfitemskus:update"))
<i-button
type=
"warning"
@
click=
"update"
><i
class=
"fa fa-pencil-square-o"
></i>
修改
</i-button>
#end
#if($shiro.hasPermission("tbcfitemskus: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=
"tbCfItemSkus"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"商品ID"
prop=
"itemId"
>
<i-input
v-model=
"tbCfItemSkus.itemId"
placeholder=
"商品ID"
/>
</Form-item>
<Form-item
label=
"规格名称"
prop=
"skuName"
>
<i-input
v-model=
"tbCfItemSkus.skuName"
placeholder=
"规格名称"
/>
</Form-item>
<Form-item
label=
"规格描述"
prop=
"skuDesc"
>
<i-input
v-model=
"tbCfItemSkus.skuDesc"
placeholder=
"规格描述"
/>
</Form-item>
<Form-item
label=
"价格"
prop=
"skuPrice"
>
<i-input
v-model=
"tbCfItemSkus.skuPrice"
placeholder=
"价格"
/>
</Form-item>
<Form-item
label=
"数量"
prop=
"skuCount"
>
<i-input
v-model=
"tbCfItemSkus.skuCount"
placeholder=
"数量"
/>
</Form-item>
<Form-item
label=
"删除标记"
prop=
"delFlag"
>
<i-input
v-model=
"tbCfItemSkus.delFlag"
placeholder=
"删除标记"
/>
</Form-item>
<Form-item
label=
"创建时间"
prop=
"createTime"
>
<i-input
v-model=
"tbCfItemSkus.createTime"
placeholder=
"创建时间"
/>
</Form-item>
<Form-item
label=
"更新时间"
prop=
"updateTime"
>
<i-input
v-model=
"tbCfItemSkus.updateTime"
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/tbcfitemskus.js?_${date.systemTime}"
></script>
</body>
</html>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
8b3336f4
差异被折叠。
点击展开。
platform-admin/src/main/webapp/js/sys/tbcfitemskus.js
0 → 100644
浏览文件 @
8b3336f4
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfitemskus/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品ID'
,
name
:
'itemId'
,
index
:
'item_id'
,
width
:
80
},
{
label
:
'规格名称'
,
name
:
'skuName'
,
index
:
'sku_name'
,
width
:
80
},
{
label
:
'规格描述'
,
name
:
'skuDesc'
,
index
:
'sku_desc'
,
width
:
80
},
{
label
:
'价格'
,
name
:
'skuPrice'
,
index
:
'sku_price'
,
width
:
80
},
{
label
:
'数量'
,
name
:
'skuCount'
,
index
:
'sku_count'
,
width
:
80
},
{
label
:
'删除标记'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'更新时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfItemSkus
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfItemSkus
=
{};
},
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
.
tbCfItemSkus
.
id
==
null
?
"../tbcfitemskus/save"
:
"../tbcfitemskus/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfItemSkus
),
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
:
"../tbcfitemskus/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
){
Ajax
.
request
({
url
:
"../tbcfitemskus/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfItemSkus
=
r
.
tbCfItemSkus
;
}
});
},
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
浏览文件 @
8b3336f4
差异被折叠。
点击展开。
platform-admin/src/main/webapp/statics/libs/iview.js
0 → 100644
浏览文件 @
8b3336f4
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论