店铺商品

This commit is contained in:
Renpc-kilig 2021-03-23 15:14:35 +08:00
parent f7f991567b
commit 227f733ff9
10 changed files with 97 additions and 264 deletions

View File

@ -1,4 +1,4 @@
package cn.com.tenlion.controller.apis.category;
package cn.com.tenlion.controller.api.category;
import cn.com.tenlion.controller.AbstractController;
import cn.com.tenlion.pojo.dtos.industry.IndustryZTreeDTO;

View File

@ -1,4 +1,4 @@
package cn.com.tenlion.controller.apis.industry;
package cn.com.tenlion.controller.api.industry;
import cn.com.tenlion.controller.AbstractController;
import cn.com.tenlion.pojo.dtos.industry.IndustryDTO;

View File

@ -1,4 +1,4 @@
package cn.com.tenlion.controller.apis.shopgoods;
package cn.com.tenlion.controller.api.shopgoods;
import cn.com.tenlion.pojo.dtos.shopgoods.ShopGoodsDTO;
import cn.com.tenlion.pojo.vos.shopgoods.ShopGoodsVO;
@ -59,10 +59,10 @@ public class ShopGoodsController extends DefaultBaseController {
@ApiImplicitParam(name = "shopGoodsId", value = "ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{shopGoodsId}")
@PutMapping("update/{goodsId}")
@CheckRequestBodyAnnotation
public SuccessResult update(@PathVariable("shopGoodsId") String shopGoodsId, @RequestBody ShopGoodsVO shopGoodsVO) {
shopGoodsService.update(shopGoodsId, shopGoodsVO);
public SuccessResult update(@PathVariable("goodsId") String goodsId, @RequestBody ShopGoodsVO shopGoodsVO) {
shopGoodsService.update(goodsId, shopGoodsVO);
return new SuccessResult();
}

View File

@ -50,23 +50,18 @@ public class ShopGoodsVO {
@ApiModelProperty(name = "goodsVideo", value = "商品视频最多1个")
private String goodsVideo;
@ApiModelProperty(name = "goodStar", value = "商品星级最高5星")
@CheckNumberAnnotation(name = "商品星级最高5星")
private Double goodStar;
@ApiModelProperty(name = "userEvaluate", value = "用户评价分数满分10分通过用户的评价自动计算")
@CheckNumberAnnotation(name = "用户评价分数满分10分通过用户的评价自动计算")
private Double userEvaluate;
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
@CheckEmptyAnnotation(name = "创建时间", verifyType = "datetime")
private String gmtCreate;
@ApiModelProperty(name = "creator", value = "创建人")
private String creator;
@ApiModelProperty(name = "gmtModified", value = "修改时间")
@CheckEmptyAnnotation(name = "修改时间", verifyType = "datetime")
private String gmtModified;
@ApiModelProperty(name = "modifier", value = "修改人")
private String modifier;
@ApiModelProperty(name = "isDelete", value = "是否删除0:是1:否")
@CheckNumberAnnotation(name = "是否删除0:是1:否")
private Integer isDelete;
public String getGoodsId() {

View File

@ -81,11 +81,11 @@ public interface IShopGoodsService {
/**
* 修改
*
* @param shopGoodsId
* @param goodsId
* @param shopGoodsVO
* @return
*/
void update(String shopGoodsId, ShopGoodsVO shopGoodsVO);
void update(String goodsId, ShopGoodsVO shopGoodsVO);
/**
* 修改

View File

@ -7,6 +7,7 @@ import cn.com.tenlion.pojo.pos.shopgoods.ShopGoodsPO;
import cn.com.tenlion.pojo.vos.shopgoods.ShopGoodsVO;
import cn.com.tenlion.service.shopgoods.IShopGoodsService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
@ -49,16 +50,25 @@ public class ShopGoodsServiceImpl extends DefaultBaseService implements IShopGoo
@Override
public String saveReturnId(String token, ShopGoodsVO shopGoodsVO) {
String shopGoodsId = UUIDUtil.getUUID();
/**
* 数据非空验证
*/
/*if(StringUtils.isEmpty(shopGoodsVO.getShopId())) {
throw new ParamsException("店铺ID不允许为空");
}
if(StringUtils.isEmpty(shopGoodsVO.getCategoryId())) {
throw new ParamsException("类目ID不允许为空");
}*/
Map<String, Object> params = HashMapUtil.beanToMap(shopGoodsVO);
params.put("shopGoodsId", shopGoodsId);
String goodsId = UUIDUtil.getUUID();
params.put("goodsId", goodsId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
shopGoodsDao.save(params);
return shopGoodsId;
return goodsId;
}
@Override
@ -86,14 +96,14 @@ public class ShopGoodsServiceImpl extends DefaultBaseService implements IShopGoo
}
@Override
public void update(String shopGoodsId, ShopGoodsVO shopGoodsVO) {
update(null, shopGoodsId, shopGoodsVO);
public void update(String goodsId, ShopGoodsVO shopGoodsVO) {
update(null, goodsId, shopGoodsVO);
}
@Override
public void update(String token, String shopGoodsId, ShopGoodsVO shopGoodsVO) {
public void update(String token, String goodsId, ShopGoodsVO shopGoodsVO) {
Map<String, Object> params = HashMapUtil.beanToMap(shopGoodsVO);
params.put("shopGoodsId", shopGoodsId);
params.put("goodsId", goodsId);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {

View File

@ -148,9 +148,6 @@
UPDATE
svc_shop_goods
SET
<if test="goodsId != null and goodsId != ''">
goods_id = #{goodsId},
</if>
<if test="goodsName != null and goodsName != ''">
goods_name = #{goodsName},
</if>
@ -212,7 +209,9 @@
is_delete = #{isDelete}
</if>
WHERE
<!-- 添加条件 -->
<if test="goodsId != null and goodsId != ''">
goods_id = #{goodsId}
</if>
</update>
<!-- 详情 -->
@ -244,7 +243,9 @@
svc_shop_goods t1
WHERE
t1.is_delete = 0
<!-- 添加条件 -->
<if test="goodsId != null and goodsId != ''">
AND goods_id = #{goodsId}
</if>
</select>
<!-- 详情 -->
@ -275,7 +276,9 @@
svc_shop_goods t1
WHERE
t1.is_delete = 0
<!-- 添加条件 -->
<if test="goodsId != null and goodsId != ''">
AND goods_id = #{goodsId}
</if>
</select>
<!-- 详情 -->
@ -306,7 +309,9 @@
svc_shop_goods t1
WHERE
t1.is_delete = 0
<!-- 添加条件 -->
<if test="goodsId != null and goodsId != ''">
AND goods_id = #{goodsId}
</if>
</select>
<!-- 列表 -->

View File

@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<base href="/usercenter/">
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@ -86,15 +86,6 @@
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'goodsId', width: 180, title: '商品ID', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'goodsName', width: 180, title: '商品名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
@ -130,7 +121,7 @@
return downloadFile;
}
},
{field: 'shopId', width: 180, title: '店铺ID', align:'center',
{field: 'shopId', width: 180, title: '所属店铺', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -139,7 +130,7 @@
return rowData;
}
},
{field: 'categoryId', width: 180, title: '类目ID', align:'center',
{field: 'categoryId', width: 180, title: '商品类目', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -148,16 +139,7 @@
return rowData;
}
},
{field: 'goodsSort', width: 180, title: '排序', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'goodsTotal', width: 180, title: '商品总数最大9999标识不限制', align:'center',
{field: 'goodsTotal', width: 180, title: '商品总数', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -172,6 +154,12 @@
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(1 == rowData) {
rowData = '上架';
}
if(2 == rowData) {
rowData = '下架';
}
return rowData;
}
},
@ -199,44 +187,16 @@
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(1 == rowData) {
rowData = '线上支付';
}
if(2 == rowData) {
rowData = '到店支付';
}
return rowData;
}
},
{field: 'goodsPhotos', width: 180, title: '商品图片最多9张', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
var downloadFile = '';
var datas = rowData.split(',');
for(var i = 0, item = datas[i]; item = datas[i++];) {
if(downloadFile.length > 0) {
downloadFile += ' | ';
}
downloadFile += '<a href="route/file/download/false/'+ item +'" target="_blank">点击下载</a>'
}
return downloadFile;
}
},
{field: 'goodsVideo', width: 180, title: '商品视频最多1个', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
var downloadFile = '';
var datas = rowData.split(',');
for(var i = 0, item = datas[i]; item = datas[i++];) {
if(downloadFile.length > 0) {
downloadFile += ' | ';
}
downloadFile += '<a href="route/file/download/false/'+ item +'" target="_blank">点击下载</a>'
}
return downloadFile;
}
},
{field: 'goodStar', width: 180, title: '商品星级最高5星', align:'center',
{field: 'goodStar', width: 180, title: '商品星级', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -245,7 +205,7 @@
return rowData;
}
},
{field: 'userEvaluate', width: 180, title: '用户评价分数满分10分通过用户的评价自动计算', align:'center',
{field: 'userEvaluate', width: 180, title: '用户评价', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -263,7 +223,7 @@
return rowData;
}
},
{field: 'creator', width: 180, title: '创建人', align:'center',
{field: 'goodsSort', width: 180, title: '排序', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -271,34 +231,7 @@
}
return rowData;
}
},
{field: 'gmtModified', width: 180, title: '修改时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'modifier', width: 180, title: '修改人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isDelete', width: 180, title: '是否删除0:是1:否', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
}
]
],
page: true,
@ -405,7 +338,7 @@
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopgoods/update.html?shopGoodsId={shopGoodsId}', [checkDatas[0].shopGoodsId]),
content: top.restAjax.path('route/shopgoods/update.html?goodsId={goodsId}', [checkDatas[0].goodsId]),
end: function() {
reloadTable();
}
@ -420,7 +353,7 @@
if(i > 1) {
ids += '_';
}
ids += item['shopGoodsId'];
ids += item['goodsId'];
}
removeData(ids);
}

View File

@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<base href="/usercenter/">
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@ -22,12 +22,6 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">商品ID</label>
<div class="layui-input-block">
<input type="text" id="goodsId" name="goodsId" class="layui-input" value="" placeholder="请输入商品ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品名称</label>
<div class="layui-input-block">
@ -37,7 +31,7 @@
<div class="layui-form-item">
<label class="layui-form-label">商品说明</label>
<div class="layui-input-block">
<input type="text" id="goodsSummary" name="goodsSummary" class="layui-input" value="" placeholder="请输入商品说明" maxlength="500">
<textarea id="goodsSummary" name="goodsSummary" class="layui-textarea" placeholder="请输入商品说明" maxlength="500"></textarea>
</div>
</div>
<div class="layui-form-item layui-form-text">
@ -71,33 +65,16 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">店铺ID</label>
<div class="layui-input-block">
<input type="text" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">类目ID</label>
<div class="layui-input-block">
<input type="text" id="categoryId" name="categoryId" class="layui-input" value="" placeholder="请输入类目ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="goodsSort" name="goodsSort" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品总数最大9999标识不限制</label>
<label class="layui-form-label">商品总数</label>
<div class="layui-input-block">
<input type="number" id="goodsTotal" name="goodsTotal" class="layui-input" value="" placeholder="请输入商品总数最大9999标识不限制" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品状态1:上架2:下架</label>
<div class="layui-input-block">
<input type="number" id="goodsStatus" name="goodsStatus" class="layui-input" value="" placeholder="请输入商品状态1:上架2:下架" lay-verify="required">
<div class="layui-form-item" pane>
<label class="layui-form-label">商品状态</label>
<div class="layui-input-block layui-form">
<input type="radio" name="goodsStatus" value="1" title="上架" checked>
<input type="radio" name="goodsStatus" value="2" title="下架">
</div>
</div>
<div class="layui-form-item">
@ -112,14 +89,15 @@
<input type="text" id="goodsUnit" name="goodsUnit" class="layui-input" value="" placeholder="请输入商品单位" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">支付类型1:线上支付2:到店支付</label>
<div class="layui-input-block">
<input type="number" id="paymentType" name="paymentType" class="layui-input" value="" placeholder="请输入支付类型1:线上支付2:到店支付" lay-verify="required">
<div class="layui-form-item" pane>
<label class="layui-form-label">支付类型</label>
<div class="layui-input-block layui-form">
<input type="radio" name="paymentType" value="1" title="线上支付" checked>
<input type="radio" name="paymentType" value="2" title="到店支付">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品图片最多9张</label>
<label class="layui-form-label">商品图片</label>
<div class="layui-input-block">
<input type="hidden" id="goodsPhotos" name="goodsPhotos">
<div class="layui-btn-container" id="goodsPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
@ -149,7 +127,7 @@
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品视频最多1个</label>
<label class="layui-form-label">商品视频</label>
<div class="layui-input-block">
<input type="hidden" id="goodsVideo" name="goodsVideo">
<div class="layui-btn-container" id="goodsVideoFileBox" style="border: 1px solid #e6e6e6;"></div>
@ -177,45 +155,9 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品星级最高5星</label>
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="goodStar" name="goodStar" class="layui-input" value="" placeholder="请输入商品星级最高5星" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">用户评价分数满分10分通过用户的评价自动计算</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="userEvaluate" name="userEvaluate" class="layui-input" value="" placeholder="请输入用户评价分数满分10分通过用户的评价自动计算" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-block">
<input type="text" id="gmtCreate" name="gmtCreate" class="layui-input" value="" placeholder="请选择创建时间" readonly style="cursor: pointer;" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">创建人</label>
<div class="layui-input-block">
<input type="text" id="creator" name="creator" class="layui-input" value="" placeholder="请输入创建人" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">修改时间</label>
<div class="layui-input-block">
<input type="text" id="gmtModified" name="gmtModified" class="layui-input" value="" placeholder="请选择修改时间" readonly style="cursor: pointer;" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">修改人</label>
<div class="layui-input-block">
<input type="text" id="modifier" name="modifier" class="layui-input" value="" placeholder="请输入修改人" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否删除0:是1:否</label>
<div class="layui-input-block">
<input type="number" id="isDelete" name="isDelete" class="layui-input" value="" placeholder="请输入是否删除0:是1:否" lay-verify="required">
<input type="number" step="0.01" id="goodsSort" name="goodsSort" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item layui-layout-admin">

View File

@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<base href="/usercenter/">
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@ -22,12 +22,6 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">商品ID</label>
<div class="layui-input-block">
<input type="text" id="goodsId" name="goodsId" class="layui-input" value="" placeholder="请输入商品ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品名称</label>
<div class="layui-input-block">
@ -37,7 +31,7 @@
<div class="layui-form-item">
<label class="layui-form-label">商品说明</label>
<div class="layui-input-block">
<input type="text" id="goodsSummary" name="goodsSummary" class="layui-input" value="" placeholder="请输入商品说明" maxlength="500">
<textarea id="goodsSummary" name="goodsSummary" class="layui-textarea" placeholder="请输入商品说明" maxlength="500"></textarea>
</div>
</div>
<div class="layui-form-item layui-form-text">
@ -71,33 +65,16 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">店铺ID</label>
<div class="layui-input-block">
<input type="text" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">类目ID</label>
<div class="layui-input-block">
<input type="text" id="categoryId" name="categoryId" class="layui-input" value="" placeholder="请输入类目ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="goodsSort" name="goodsSort" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品总数最大9999标识不限制</label>
<label class="layui-form-label">商品总数</label>
<div class="layui-input-block">
<input type="number" id="goodsTotal" name="goodsTotal" class="layui-input" value="" placeholder="请输入商品总数最大9999标识不限制" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品状态1:上架2:下架</label>
<div class="layui-input-block">
<input type="number" id="goodsStatus" name="goodsStatus" class="layui-input" value="" placeholder="请输入商品状态1:上架2:下架" lay-verify="required">
<div class="layui-form-item" pane>
<label class="layui-form-label">商品状态</label>
<div class="layui-input-block layui-form">
<input type="radio" name="goodsStatus" value="1" title="上架" checked>
<input type="radio" name="goodsStatus" value="2" title="下架">
</div>
</div>
<div class="layui-form-item">
@ -112,14 +89,15 @@
<input type="text" id="goodsUnit" name="goodsUnit" class="layui-input" value="" placeholder="请输入商品单位" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">支付类型1:线上支付2:到店支付</label>
<div class="layui-input-block">
<input type="number" id="paymentType" name="paymentType" class="layui-input" value="" placeholder="请输入支付类型1:线上支付2:到店支付" lay-verify="required">
<div class="layui-form-item" pane>
<label class="layui-form-label">支付类型</label>
<div class="layui-input-block layui-form">
<input type="radio" name="paymentType" value="1" title="线上支付" checked>
<input type="radio" name="paymentType" value="2" title="到店支付">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品图片最多9张</label>
<label class="layui-form-label">商品图片</label>
<div class="layui-input-block">
<input type="hidden" id="goodsPhotos" name="goodsPhotos">
<div class="layui-btn-container" id="goodsPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
@ -149,7 +127,7 @@
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品视频最多1个</label>
<label class="layui-form-label">商品视频</label>
<div class="layui-input-block">
<input type="hidden" id="goodsVideo" name="goodsVideo">
<div class="layui-btn-container" id="goodsVideoFileBox" style="border: 1px solid #e6e6e6;"></div>
@ -177,45 +155,15 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品星级最高5星</label>
<label class="layui-form-label">商品星级</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="goodStar" name="goodStar" class="layui-input" value="" placeholder="请输入商品星级最高5星" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">用户评价分数满分10分通过用户的评价自动计算</label>
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="userEvaluate" name="userEvaluate" class="layui-input" value="" placeholder="请输入用户评价分数满分10分通过用户的评价自动计算" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-block">
<input type="text" id="gmtCreate" name="gmtCreate" class="layui-input" value="" placeholder="请选择创建时间" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">创建人</label>
<div class="layui-input-block">
<input type="text" id="creator" name="creator" class="layui-input" value="" placeholder="请输入创建人" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">修改时间</label>
<div class="layui-input-block">
<input type="text" id="gmtModified" name="gmtModified" class="layui-input" value="" placeholder="请选择修改时间" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">修改人</label>
<div class="layui-input-block">
<input type="text" id="modifier" name="modifier" class="layui-input" value="" placeholder="请输入修改人" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否删除0:是1:否</label>
<div class="layui-input-block">
<input type="number" id="isDelete" name="isDelete" class="layui-input" value="" placeholder="请输入是否删除0:是1:否" lay-verify="required">
<input type="number" step="0.01" id="goodsSort" name="goodsSort" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item layui-layout-admin">
@ -244,7 +192,7 @@
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var shopGoodsId = top.restAjax.params(window.location.href).shopGoodsId;
var goodsId = top.restAjax.params(window.location.href).goodsId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
@ -477,7 +425,7 @@
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/shopgoods/get/{shopGoodsId}', [shopGoodsId]), {}, null, function(code, data) {
top.restAjax.get(top.restAjax.path('api/shopgoods/get/{goodsId}', [goodsId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
@ -504,7 +452,7 @@
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/shopgoods/update/{shopGoodsId}', [shopGoodsId]), formData.field, null, function(code, data) {
top.restAjax.put(top.restAjax.path('api/shopgoods/update/{goodsId}', [goodsId]), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],