商品增加keyword搜索条件
This commit is contained in:
parent
4addb0c1af
commit
9791ab6530
|
|
@ -3,9 +3,8 @@ package com.ghy.goods.domain;
|
||||||
import com.ghy.common.annotation.Excel;
|
import com.ghy.common.annotation.Excel;
|
||||||
import com.ghy.common.core.domain.BaseEntity;
|
import com.ghy.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -15,6 +14,7 @@ import java.util.Map;
|
||||||
* @author clunt
|
* @author clunt
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class Goods extends BaseEntity {
|
public class Goods extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
@ -88,4 +88,5 @@ public class Goods extends BaseEntity {
|
||||||
|
|
||||||
private List<String> lbUrl;
|
private List<String> lbUrl;
|
||||||
|
|
||||||
|
private String keyword;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,16 +25,18 @@
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="areaDesc" column="area_desc" />
|
<result property="areaDesc" column="area_desc" />
|
||||||
|
<result property="keyword" column="keyword" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGoods">
|
<sql id="selectGoods">
|
||||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, 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, area_desc
|
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword
|
||||||
FROM goods
|
FROM goods
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectGoodsWithArea">
|
<sql id="selectGoodsWithArea">
|
||||||
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,
|
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, g.area_desc
|
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword
|
||||||
FROM goods g
|
FROM goods g
|
||||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -149,6 +151,9 @@
|
||||||
<if test="goodsId != null">
|
<if test="goodsId != null">
|
||||||
AND g.goods_id = #{goodsId}
|
AND g.goods_id = #{goodsId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="keyword != null and keyword != ''">
|
||||||
|
AND g.keyword LIKE concat('%', #{keyword}, '%')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
/* 默认生成时间排序 */
|
/* 默认生成时间排序 */
|
||||||
order by create_time
|
order by create_time
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue