fix
This commit is contained in:
parent
f7c61f6696
commit
95cb637e18
|
|
@ -137,6 +137,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">热门类目图标:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" name="cover" value="" hidden>
|
||||
<input type="file" name="coverImg" id="coverImg" multiple class="file" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">热门类目图片:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
@ -198,6 +205,34 @@
|
|||
}
|
||||
});
|
||||
|
||||
// 商品封面上传
|
||||
$('#coverImg').fileinput({
|
||||
language: 'zh', //设置语言
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
showPreview: false,
|
||||
uploadExtraData: {
|
||||
"name": "coverImg"
|
||||
},
|
||||
dropZoneTitle: "可以将图片拖放到这里", //拖拽区域显示文字
|
||||
uploadUrl: ctx + 'tool/qiniu/dept/upload', //上传路径
|
||||
allowedFileExtensions: ['jpg', 'png', 'gif', 'jpeg'], //指定上传文件类型
|
||||
maxFileSize: 0,
|
||||
maxFileSize: 12048, //上传文件最大值,单位kb
|
||||
uploadAsync: true, //异步上传
|
||||
maxFileCount: 1 //上传文件最大个数。
|
||||
}).on("fileuploaded", function(event,data) { //异步上传成功后回调
|
||||
if(data.response.code === 0){
|
||||
var imgUrl = $("input[name='cover']").val();
|
||||
if(imgUrl){
|
||||
$("input[name='cover']").val( imgUrl + "," + data.response.url)
|
||||
}else {
|
||||
$("input[name='cover']").val(data.response.url)
|
||||
}
|
||||
}else {
|
||||
alert("上传失败!");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -34,6 +34,12 @@ public class Goods extends BaseEntity {
|
|||
|
||||
private String goodsUnit;
|
||||
|
||||
private String warrantyPeriod;
|
||||
|
||||
private String servActivity;
|
||||
|
||||
private String expectDuration;
|
||||
|
||||
@Excel(name = "商品排序", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer goodsSort;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectDeptGoodsCategory">
|
||||
SELECT dept_goods_category_id, dept_id, goods_category_id, category_sort, is_hot, hot_name,
|
||||
SELECT dept_goods_category_id, dept_id, goods_category_id, category_sort, is_hot, cover, hot_name,
|
||||
one_rate, two_rate, three_rate, dept_rate, dept_money, retain_rate, retain_money, create_by, create_time, remark
|
||||
FROM dept_goods_category
|
||||
</sql>
|
||||
|
|
@ -40,9 +40,9 @@
|
|||
<sql id="selectJoin">
|
||||
SELECT dgc.dept_goods_category_id, dgc.dept_id, dgc.goods_category_id, dgc.category_sort,
|
||||
dgc.one_rate, dgc.two_rate, dgc.three_rate, dgc.create_by, dgc.create_time, dgc.remark,
|
||||
dgc.is_hot, dgc.hot_name, dgc.dept_rate, dgc.dept_money, dgc.retain_rate, dgc.retain_money,
|
||||
dgc.is_hot, dgc.cover, dgc.hot_name, dgc.dept_rate, dgc.dept_money, dgc.retain_rate, dgc.retain_money,
|
||||
dgc.dept_category_name, gc.goods_category_name, gc.level, gc.parent_category_id, gc.type, gc.status,
|
||||
gc.cover, gc.simple_goods_category_name
|
||||
gc.simple_goods_category_name
|
||||
FROM dept_goods_category dgc LEFT JOIN goods_category gc ON dgc.goods_category_id = gc.goods_category_id
|
||||
</sql>
|
||||
|
||||
|
|
@ -68,6 +68,7 @@
|
|||
<set>
|
||||
<if test="deptCategoryName != null and deptCategoryName != ''">dept_category_name = #{deptCategoryName},</if>
|
||||
<if test="isHot != null">is_hot = #{isHot},</if>
|
||||
<if test="cover != null and cover != ''">cover = #{cover},</if>
|
||||
<if test="hotName != null">hot_name = #{hotName},</if>
|
||||
<if test="deptRate != null and deptRate != ''">dept_rate = #{deptRate},</if>
|
||||
<if test="deptMoney != null and deptMoney != ''">dept_money = #{deptMoney},</if>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="goodsUnit" column="goods_unit" />
|
||||
<result property="warrantyPeriod" column="warranty_period" />
|
||||
<result property="servActivity" column="serv_activity" />
|
||||
<result property="expectDuration" column="expect_duration" />
|
||||
<result property="goodsSort" column="goods_sort"/>
|
||||
<result property="workerId" column="worker_id"/>
|
||||
<result property="deptGoodsCategoryId" column="dept_goods_category_id"/>
|
||||
|
|
@ -24,12 +27,12 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGoods">
|
||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, goods_unit, goods_sort, worker_id,
|
||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark
|
||||
FROM goods
|
||||
</sql>
|
||||
<sql id="selectGoodsWithArea">
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id, goods_unit,
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark
|
||||
FROM goods g
|
||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||
|
|
@ -45,6 +48,10 @@
|
|||
<if test="goodsVideoUrl != null and goodsVideoUrl != ''">goods_video_url = #{goodsVideoUrl},</if>
|
||||
<if test="status != null">`status` = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">goods_unit = #{goodsUnit},</if>
|
||||
<if test="warrantyPeriod != null and warrantyPeriod != ''">warranty_period = #{warrantyPeriod},</if>
|
||||
<if test="servActivity != null and servActivity!=''">serv_activity = #{servActivity},</if>
|
||||
<if test="expectDuration != null and expectDuration!=''">expect_duration = #{expectDuration},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
|
|
@ -64,6 +71,9 @@
|
|||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
|
||||
<if test="warrantyPeriod != null and warrantyPeriod != ''">warranty_period,</if>
|
||||
<if test="servActivity != null and servActivity != ''">serv_activity,</if>
|
||||
<if test="expectDuration != null and expectDuration != ''">expect_duration,</if>
|
||||
<if test="goodsSort != null and goodsSort != ''">goods_sort,</if>
|
||||
<if test="workerId != null and workerId != ''">worker_id,</if>
|
||||
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">dept_goods_category_id,</if>
|
||||
|
|
@ -79,6 +89,9 @@
|
|||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>
|
||||
<if test="warrantyPeriod != null and warrantyPeriod != ''">#{warrantyPeriod},</if>
|
||||
<if test="servActivity != null and servActivity != ''">#{servActivity},</if>
|
||||
<if test="expectDuration != null and expectDuration != ''">#{expectDuration},</if>
|
||||
<if test="goodsSort != null and goodsSort != ''">#{goodsSort},</if>
|
||||
<if test="workerId != null and workerId != ''">#{workerId},</if>
|
||||
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">#{deptGoodsCategoryId},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue