Commit 55000586 authored by Junling Bu's avatar Junling Bu
Browse files

chore: 数据库中goods表的desc字段调整成detail,因为desc是数据库关键字

parent 147c836d
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</el-form-item> </el-form-item>
<el-form-item label="商品详细介绍"> <el-form-item label="商品详细介绍">
<editor :init="editorInit" v-model="goods.desc"></editor> <editor :init="editorInit" v-model="goods.detail"></editor>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</el-form-item> </el-form-item>
<el-form-item label="商品详细介绍"> <el-form-item label="商品详细介绍">
<editor :init="editorInit" v-model="goods.desc"></editor> <editor :init="editorInit" v-model="goods.detail"></editor>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
......
...@@ -52,12 +52,12 @@ ...@@ -52,12 +52,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="详情" prop="desc"> <el-table-column align="center" label="详情" prop="detail">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dialog title="商品详情" :visible.sync="descDialogVisible"> <el-dialog title="商品详情" :visible.sync="detailDialogVisible">
<div v-html="descDetail"></div> <div v-html="goodsDetail"></div>
</el-dialog> </el-dialog>
<el-button type="primary" size="mini" @click="showDesc(scope.row.desc)">查看</el-button> <el-button type="primary" size="mini" @click="showDetail(scope.row.detail)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -145,8 +145,8 @@ export default { ...@@ -145,8 +145,8 @@ export default {
sort: 'add_time', sort: 'add_time',
order: 'desc' order: 'desc'
}, },
descDetail: '', goodsDetail: '',
descDialogVisible: false, detailDialogVisible: false,
downloadLoading: false downloadLoading: false
} }
}, },
...@@ -184,9 +184,9 @@ export default { ...@@ -184,9 +184,9 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.$router.push({ path: '/goods/edit', query: { id: row.id }}) this.$router.push({ path: '/goods/edit', query: { id: row.id }})
}, },
showDesc(desc) { showDetail(detail) {
this.descDetail = desc this.goodsDetail = detail
this.descDialogVisible = true this.detailDialogVisible = true
}, },
handleDelete(row) { handleDelete(row) {
deleteGoods(row).then(response => { deleteGoods(row).then(response => {
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
this.downloadLoading = true this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => { import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['商品ID', '商品编号', '名称', '专柜价格', '当前价格', '是否新品', '是否热品', '是否在售', '首页主图', '宣传图片列表', '商品介绍', '详细介绍', '商品图片', '商品单位', '关键字', '类目ID', '品牌商ID'] const tHeader = ['商品ID', '商品编号', '名称', '专柜价格', '当前价格', '是否新品', '是否热品', '是否在售', '首页主图', '宣传图片列表', '商品介绍', '详细介绍', '商品图片', '商品单位', '关键字', '类目ID', '品牌商ID']
const filterVal = ['id', 'goodsSn', 'name', 'counterPrice', 'retailPrice', 'isNew', 'isHot', 'isOnSale', 'listPicUrl', 'gallery', 'brief', 'desc', 'picUrl', 'goodsUnit', 'keywords', 'categoryId', 'brandId'] const filterVal = ['id', 'goodsSn', 'name', 'counterPrice', 'retailPrice', 'isNew', 'isHot', 'isOnSale', 'listPicUrl', 'gallery', 'brief', 'detail', 'picUrl', 'goodsUnit', 'keywords', 'categoryId', 'brandId']
excel.export_json_to_excel2(tHeader, this.list, filterVal, '商品信息') excel.export_json_to_excel2(tHeader, this.list, filterVal, '商品信息')
this.downloadLoading = false this.downloadLoading = false
}) })
......
...@@ -189,11 +189,11 @@ public class LitemallGoods { ...@@ -189,11 +189,11 @@ public class LitemallGoods {
/** /**
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column litemall_goods.desc * This field corresponds to the database column litemall_goods.detail
* *
* @mbg.generated * @mbg.generated
*/ */
private String desc; private String detail;
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -629,26 +629,26 @@ public class LitemallGoods { ...@@ -629,26 +629,26 @@ public class LitemallGoods {
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column litemall_goods.desc * This method returns the value of the database column litemall_goods.detail
* *
* @return the value of litemall_goods.desc * @return the value of litemall_goods.detail
* *
* @mbg.generated * @mbg.generated
*/ */
public String getDesc() { public String getDetail() {
return desc; return detail;
} }
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method sets the value of the database column litemall_goods.desc * This method sets the value of the database column litemall_goods.detail
* *
* @param desc the value for litemall_goods.desc * @param detail the value for litemall_goods.detail
* *
* @mbg.generated * @mbg.generated
*/ */
public void setDesc(String desc) { public void setDetail(String detail) {
this.desc = desc; this.detail = detail;
} }
/** /**
...@@ -681,7 +681,7 @@ public class LitemallGoods { ...@@ -681,7 +681,7 @@ public class LitemallGoods {
sb.append(", retailPrice=").append(retailPrice); sb.append(", retailPrice=").append(retailPrice);
sb.append(", addTime=").append(addTime); sb.append(", addTime=").append(addTime);
sb.append(", deleted=").append(deleted); sb.append(", deleted=").append(deleted);
sb.append(", desc=").append(desc); sb.append(", detail=").append(detail);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
...@@ -722,7 +722,7 @@ public class LitemallGoods { ...@@ -722,7 +722,7 @@ public class LitemallGoods {
&& (this.getRetailPrice() == null ? other.getRetailPrice() == null : this.getRetailPrice().equals(other.getRetailPrice())) && (this.getRetailPrice() == null ? other.getRetailPrice() == null : this.getRetailPrice().equals(other.getRetailPrice()))
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime())) && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted())) && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
&& (this.getDesc() == null ? other.getDesc() == null : this.getDesc().equals(other.getDesc())); && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()));
} }
/** /**
...@@ -753,7 +753,7 @@ public class LitemallGoods { ...@@ -753,7 +753,7 @@ public class LitemallGoods {
result = prime * result + ((getRetailPrice() == null) ? 0 : getRetailPrice().hashCode()); result = prime * result + ((getRetailPrice() == null) ? 0 : getRetailPrice().hashCode());
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
result = prime * result + ((getDesc() == null) ? 0 : getDesc().hashCode()); result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
return result; return result;
} }
...@@ -794,7 +794,7 @@ public class LitemallGoods { ...@@ -794,7 +794,7 @@ public class LitemallGoods {
retailPrice("retail_price", "retailPrice", "DECIMAL"), retailPrice("retail_price", "retailPrice", "DECIMAL"),
addTime("add_time", "addTime", "TIMESTAMP"), addTime("add_time", "addTime", "TIMESTAMP"),
deleted("deleted", "deleted", "BIT"), deleted("deleted", "deleted", "BIT"),
desc("desc", "desc", "LONGVARCHAR"); detail("detail", "detail", "LONGVARCHAR");
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<result column="desc" jdbcType="LONGVARCHAR" property="desc" /> <result column="detail" jdbcType="LONGVARCHAR" property="detail" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
`desc` detail
</sql> </sql>
<select id="selectByExampleWithBLOBs" parameterType="org.linlinjava.litemall.db.domain.LitemallGoodsExample" resultMap="ResultMapWithBLOBs"> <select id="selectByExampleWithBLOBs" parameterType="org.linlinjava.litemall.db.domain.LitemallGoodsExample" resultMap="ResultMapWithBLOBs">
<!-- <!--
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
<otherwise> <otherwise>
id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale,
sort_order, pic_url, is_new, is_hot, unit, counter_price, retail_price, add_time, sort_order, pic_url, is_new, is_hot, unit, counter_price, retail_price, add_time,
deleted, `desc` deleted, detail
</otherwise> </otherwise>
</choose> </choose>
from litemall_goods from litemall_goods
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
<otherwise> <otherwise>
id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale,
sort_order, pic_url, is_new, is_hot, unit, counter_price, retail_price, add_time, sort_order, pic_url, is_new, is_hot, unit, counter_price, retail_price, add_time,
deleted, `desc` deleted, detail
</otherwise> </otherwise>
</choose> </choose>
from litemall_goods from litemall_goods
...@@ -312,14 +312,14 @@ ...@@ -312,14 +312,14 @@
sort_order, pic_url, is_new, sort_order, pic_url, is_new,
is_hot, unit, counter_price, is_hot, unit, counter_price,
retail_price, add_time, deleted, retail_price, add_time, deleted,
`desc`) detail)
values (#{goodsSn,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER}, values (#{goodsSn,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER},
#{brandId,jdbcType=INTEGER}, #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, #{brandId,jdbcType=INTEGER}, #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler},
#{keywords,jdbcType=VARCHAR}, #{brief,jdbcType=VARCHAR}, #{isOnSale,jdbcType=BIT}, #{keywords,jdbcType=VARCHAR}, #{brief,jdbcType=VARCHAR}, #{isOnSale,jdbcType=BIT},
#{sortOrder,jdbcType=SMALLINT}, #{picUrl,jdbcType=VARCHAR}, #{isNew,jdbcType=BIT}, #{sortOrder,jdbcType=SMALLINT}, #{picUrl,jdbcType=VARCHAR}, #{isNew,jdbcType=BIT},
#{isHot,jdbcType=BIT}, #{unit,jdbcType=VARCHAR}, #{counterPrice,jdbcType=DECIMAL}, #{isHot,jdbcType=BIT}, #{unit,jdbcType=VARCHAR}, #{counterPrice,jdbcType=DECIMAL},
#{retailPrice,jdbcType=DECIMAL}, #{addTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}, #{retailPrice,jdbcType=DECIMAL}, #{addTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{desc,jdbcType=LONGVARCHAR}) #{detail,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallGoods"> <insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallGoods">
<!-- <!--
...@@ -382,8 +382,8 @@ ...@@ -382,8 +382,8 @@
<if test="deleted != null"> <if test="deleted != null">
deleted, deleted,
</if> </if>
<if test="desc != null"> <if test="detail != null">
`desc`, detail,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -438,8 +438,8 @@ ...@@ -438,8 +438,8 @@
<if test="deleted != null"> <if test="deleted != null">
#{deleted,jdbcType=BIT}, #{deleted,jdbcType=BIT},
</if> </if>
<if test="desc != null"> <if test="detail != null">
#{desc,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -514,8 +514,8 @@ ...@@ -514,8 +514,8 @@
<if test="record.deleted != null"> <if test="record.deleted != null">
deleted = #{record.deleted,jdbcType=BIT}, deleted = #{record.deleted,jdbcType=BIT},
</if> </if>
<if test="record.desc != null"> <if test="record.detail != null">
`desc` = #{record.desc,jdbcType=LONGVARCHAR}, detail = #{record.detail,jdbcType=LONGVARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -546,7 +546,7 @@ ...@@ -546,7 +546,7 @@
retail_price = #{record.retailPrice,jdbcType=DECIMAL}, retail_price = #{record.retailPrice,jdbcType=DECIMAL},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT}, deleted = #{record.deleted,jdbcType=BIT},
`desc` = #{record.desc,jdbcType=LONGVARCHAR} detail = #{record.detail,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -637,8 +637,8 @@ ...@@ -637,8 +637,8 @@
<if test="deleted != null"> <if test="deleted != null">
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
</if> </if>
<if test="desc != null"> <if test="detail != null">
`desc` = #{desc,jdbcType=LONGVARCHAR}, detail = #{detail,jdbcType=LONGVARCHAR},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
retail_price = #{retailPrice,jdbcType=DECIMAL}, retail_price = #{retailPrice,jdbcType=DECIMAL},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
`desc` = #{desc,jdbcType=LONGVARCHAR} detail = #{detail,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallGoods"> <update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallGoods">
...@@ -746,7 +746,7 @@ ...@@ -746,7 +746,7 @@
<otherwise> <otherwise>
id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale,
sort_order, pic_url, is_new, is_hot, unit, counter_price, retail_price, add_time, sort_order, pic_url, is_new, is_hot, unit, counter_price, retail_price, add_time,
deleted, `desc` deleted, detail
</otherwise> </otherwise>
</choose> </choose>
from litemall_goods from litemall_goods
......
...@@ -85,7 +85,7 @@ Page({ ...@@ -85,7 +85,7 @@ Page({
}); });
} }
WxParse.wxParse('goodsDetail', 'html', res.data.info.desc, that); WxParse.wxParse('goodsDetail', 'html', res.data.info.detail, that);
that.getGoodsRelated(); that.getGoodsRelated();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment