Commit cdbfa57e authored by daniel's avatar daniel

style(service): 新增服务模块+子类型多选

parent a90d382d
......@@ -4,7 +4,10 @@ import lombok.Data;
@Data
public class JoyfulRichTextBean {
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private String type;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private String category;
private String title;
private String lng;
private String lat;
......
......@@ -20,5 +20,5 @@ public interface JoyfulRichTextMapper {
List<JoyfulRichText> getJoyfulRichTextById(@Param("id") String id);
List<JoyfulRichText> getJoyfulRichTextList(@Param("type") String type, @Param("title") String title);
List<JoyfulRichText> getJoyfulRichTextList(@Param("type") String type, @Param("title") String title,@Param("category") String category);
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
INSERT INTO gksite.joyful_rich_text(
userId
,type
,category
,title
,address
,lng
......@@ -23,6 +24,7 @@
) VALUES (
#{userId}
,#{type}
,#{category}
,#{title}
,#{address}
,#{lng}
......@@ -46,6 +48,7 @@
SET
userId = #{userId}
,type = #{type}
,category = #{category}
,title = #{title}
,address = #{address}
,lng = #{lng}
......@@ -75,25 +78,23 @@
</update>
<select id="getJoyfulRichTextById" resultType="com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText">
SELECT
id
,userId
,type
,title
,address
,lng
,lat
,content
,img_url AS imgUrl
,remark1
,remark2
,remark3
,remark4
,status
FROM
gksite.joyful_rich_text
WHERE
id = #{id}
SELECT id
, userId
, type
, title
, address
, lng
, lat
, content
, img_url AS imgUrl
, remark1
, remark2
, remark3
, remark4
, status
, category
FROM gksite.joyful_rich_text
WHERE id = #{id}
</select>
<select id="getJoyfulRichTextList" resultType="com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText">
......@@ -110,6 +111,7 @@
,remark4
,type
,status
,category
FROM
gksite.joyful_rich_text
WHERE
......@@ -120,5 +122,8 @@
<if test="title != null and title != ''">
AND title like concat('%',#{title},'%')
</if>
<if test="category != null and category != ''">
AND FIND_IN_SET(#{category}, category)
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -6,7 +6,10 @@ import lombok.Data;
public class JoyfulRichText {
private String id;
private String userId;
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private String type;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private String category;
private String title;
private String address;
private String lng;
......
......@@ -82,7 +82,7 @@ public class JoyfulRichTextService {
* @return
*/
public List<JoyfulRichText> getJoyfulRichTextList(JoyfulRichTextBean joyfulRichTextBean) {
List<JoyfulRichText> joyfulRichTextList = joyfulRichTextMapper.getJoyfulRichTextList(joyfulRichTextBean.getType(), joyfulRichTextBean.getTitle());
List<JoyfulRichText> joyfulRichTextList = joyfulRichTextMapper.getJoyfulRichTextList(joyfulRichTextBean.getType(), joyfulRichTextBean.getTitle(),joyfulRichTextBean.getCategory());
if (StringUtils.isNotBlank(joyfulRichTextBean.getDistance())) {
joyfulRichTextList = joyfulRichTextList.stream().filter(model -> this.notGtDistance(model, joyfulRichTextBean)).collect(Collectors.toList());
}
......
Markdown is supported
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