提交 271f2f4c authored 作者: zgy's avatar zgy

商品管理细节优化

上级 401386c2
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
tb_cf_goodstwotype t on d.goodstwotype_id=t.goodstwotype_id tb_cf_goodstwotype t on d.goodstwotype_id=t.goodstwotype_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND descripition_name LIKE concat('%',#{name},'%')
</if> </if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
select count(*) from tb_cf_descripiton select count(*) from tb_cf_descripiton
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND descripition_name LIKE concat('%',#{name},'%')
</if> </if>
</select> </select>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
INNER JOIN tb_cf_goodstype ds ON ds.goodstype_id = tw.goodstype_id INNER JOIN tb_cf_goodstype ds ON ds.goodstype_id = tw.goodstype_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND goodstwotype_title LIKE concat('%',#{name},'%')
</if> </if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
select count(*) from tb_cf_goodstwotype select count(*) from tb_cf_goodstwotype
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND goodstwotype_title LIKE concat('%',#{name},'%')
</if> </if>
</select> </select>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<result property="goodstypeUrl" column="goodstype_url"/> <result property="goodstypeUrl" column="goodstype_url"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfGoodstypeEntity"> <select id="queryObject" resultType="com.platform.entity.TbCfGoodstypeEntity">
select select
`goodstype_id`, `goodstype_id`,
`goodstype_title`, `goodstype_title`,
...@@ -20,39 +20,39 @@ ...@@ -20,39 +20,39 @@
where goodstype_id = #{id} where goodstype_id = #{id}
</select> </select>
<select id="queryList" resultType="com.platform.entity.TbCfGoodstypeEntity"> <select id="queryList" resultType="com.platform.entity.TbCfGoodstypeEntity">
select select
`goodstype_id`, `goodstype_id`,
`goodstype_title`, `goodstype_title`,
`goodstype_sort`, `goodstype_sort`,
`goodstype_url` `goodstype_url`
from tb_cf_goodstype from tb_cf_goodstype
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND goodstype_title LIKE concat('%',#{name},'%')
</if> </if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order} order by ${sidx} ${order}
</when> </when>
<otherwise> <otherwise>
order by goodstype_id desc order by goodstype_id desc
</otherwise> </otherwise>
</choose> </choose>
<if test="offset != null and limit != null"> <if test="offset != null and limit != null">
limit #{offset}, #{limit} limit #{offset}, #{limit}
</if> </if>
</select> </select>
<select id="queryTotal" resultType="int"> <select id="queryTotal" resultType="int">
select count(*) from tb_cf_goodstype select count(*) from tb_cf_goodstype
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND goodstype_title LIKE concat('%',#{name},'%')
</if> </if>
</select> </select>
<insert id="save" parameterType="com.platform.entity.TbCfGoodstypeEntity"> <insert id="save" parameterType="com.platform.entity.TbCfGoodstypeEntity">
insert into tb_cf_goodstype( insert into tb_cf_goodstype(
`goodstype_id`, `goodstype_id`,
`goodstype_title`, `goodstype_title`,
...@@ -64,27 +64,27 @@ ...@@ -64,27 +64,27 @@
#{goodstypeSort}, #{goodstypeSort},
#{goodstypeUrl}) #{goodstypeUrl})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfGoodstypeEntity">
update tb_cf_goodstype
<set>
<if test="goodstypeTitle != null">`goodstype_title` = #{goodstypeTitle}, </if>
<if test="goodstypeSort != null">`goodstype_sort` = #{goodstypeSort}</if>
<if test="goodstypeSort != null">`goodstype_sort` = #{goodstypeSort}</if>
<if test="goodstypeUrl != null">`goodstype_url` = #{goodstypeUrl}</if>
</set>
where goodstype_id = #{goodstypeId}
</update>
<delete id="delete"> <update id="update" parameterType="com.platform.entity.TbCfGoodstypeEntity">
update tb_cf_goodstype
<set>
<if test="goodstypeTitle != null">`goodstype_title` = #{goodstypeTitle},</if>
<if test="goodstypeSort != null">`goodstype_sort` = #{goodstypeSort}</if>
<if test="goodstypeSort != null">`goodstype_sort` = #{goodstypeSort}</if>
<if test="goodstypeUrl != null">`goodstype_url` = #{goodstypeUrl}</if>
</set>
where goodstype_id = #{goodstypeId}
</update>
<delete id="delete">
delete from tb_cf_goodstype where goodstype_id = #{value} delete from tb_cf_goodstype where goodstype_id = #{value}
</delete> </delete>
<delete id="deleteBatch"> <delete id="deleteBatch">
delete from tb_cf_goodstype where goodstype_id in delete from tb_cf_goodstype where goodstype_id in
<foreach item="goodstypeId" collection="array" open="(" separator="," close=")"> <foreach item="goodstypeId" collection="array" open="(" separator="," close=")">
#{goodstypeId} #{goodstypeId}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,7 +2,7 @@ $(function () { ...@@ -2,7 +2,7 @@ $(function () {
$("#jqGrid").Grid({ $("#jqGrid").Grid({
url: '../tbcfdescripiton/list', url: '../tbcfdescripiton/list',
colModel: [ colModel: [
{label: 'descripitionId', name: 'descripitionId', index: 'descripition_id', key: true, hidden: true}, {label: 'ID', name: 'descripitionId', index: 'descripition_id', key: true},
{label: '品名图片', name: 'image', index: 'image', width: 80, formatter: imageFormat}, {label: '品名图片', name: 'image', index: 'image', width: 80, formatter: imageFormat},
{label: '品名名字', name: 'descripitionName', index: 'descripition_name', width: 80}, {label: '品名名字', name: 'descripitionName', index: 'descripition_name', width: 80},
/*{label: '海关编码', name: 'descripitionCode', index: 'descripition_code', width: 80},*/ /*{label: '海关编码', name: 'descripitionCode', index: 'descripition_code', width: 80},*/
......
...@@ -2,7 +2,7 @@ $(function () { ...@@ -2,7 +2,7 @@ $(function () {
$("#jqGrid").Grid({ $("#jqGrid").Grid({
url: '../tbcfgoodstwotype/list', url: '../tbcfgoodstwotype/list',
colModel: [ colModel: [
{label: '商品二级分类Id', name: 'goodstwotypeId', index: 'goodstwotype_id', key: true, hidden: true}, {label: 'ID', name: 'goodstwotypeId', index: 'goodstwotype_id', key: true},
{label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80}, {label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80},
{label: '商品二级分类', name: 'goodstwotypeTitle', index: 'goodstwotype_title', width: 80}], {label: '商品二级分类', name: 'goodstwotypeTitle', index: 'goodstwotype_title', width: 80}],
shrinkToFit: true, shrinkToFit: true,
......
...@@ -2,7 +2,7 @@ $(function () { ...@@ -2,7 +2,7 @@ $(function () {
$("#jqGrid").Grid({ $("#jqGrid").Grid({
url: '../tbcfgoodstype/list', url: '../tbcfgoodstype/list',
colModel: [ colModel: [
{label: 'goodstypeId', name: 'goodstypeId', index: 'goodstype_id', key: true, hidden: true}, {label: 'ID', name: 'goodstypeId', index: 'goodstype_id', key: true},
{label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80}, {label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80},
{label: '排序编号', name: 'goodstypeSort', index: 'goodstype_sort', width: 80} {label: '排序编号', name: 'goodstypeSort', index: 'goodstype_sort', width: 80}
/*{label: '商品分类跳转链接', name: 'goodstypeUrl', index: 'goodstype_url', width: 80}*/], /*{label: '商品分类跳转链接', name: 'goodstypeUrl', index: 'goodstype_url', width: 80}*/],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论