Commit c9552416 by giaogiao

包机介绍推荐: 0不推荐 1推荐

parent 16e45ee4
...@@ -28,7 +28,7 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; ...@@ -28,7 +28,7 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule; import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import io.geekidea.springbootplus.config.constant.DatePattern; import io.geekidea.springbootplus.config.constant.DatePattern;
import io.geekidea.springbootplus.framework.config.jackson.deserializer.JacksonDoubleDeserializer; import io.geekidea.springbootplus.framework.config.jackson.deserializer.JacksonDoubleDeserializer;
import io.geekidea.springbootplus.framework.config.jackson.serializer.JacksonIntegerDeserializer; import io.geekidea.springbootplus.framework.config.jackson.deserializer.JacksonIntegerDeserializer;
import io.geekidea.springbootplus.framework.core.xss.XssJacksonDeserializer; import io.geekidea.springbootplus.framework.core.xss.XssJacksonDeserializer;
import io.geekidea.springbootplus.framework.core.xss.XssJacksonSerializer; import io.geekidea.springbootplus.framework.core.xss.XssJacksonSerializer;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -76,6 +76,10 @@ public class JacksonConfig implements WebMvcConfigurer { ...@@ -76,6 +76,10 @@ public class JacksonConfig implements WebMvcConfigurer {
// simpleModule.addSerializer(Date.class, new JacksonDateSerializer()); // simpleModule.addSerializer(Date.class, new JacksonDateSerializer());
// simpleModule.addDeserializer(Date.class, new JacksonDateDeserializer()); // simpleModule.addDeserializer(Date.class, new JacksonDateDeserializer());
// response数据Long型转String simpleModule.addSerializer(Long.class, new JacksonLongSerializer());
simpleModule.addDeserializer(Integer.class, new JacksonIntegerDeserializer()); simpleModule.addDeserializer(Integer.class, new JacksonIntegerDeserializer());
simpleModule.addDeserializer(Double.class, new JacksonDoubleDeserializer()); simpleModule.addDeserializer(Double.class, new JacksonDoubleDeserializer());
......
...@@ -38,4 +38,7 @@ public class CharterIntroductionQueryForAppVo implements Serializable { ...@@ -38,4 +38,7 @@ public class CharterIntroductionQueryForAppVo implements Serializable {
@ApiModelProperty("包机标题") @ApiModelProperty("包机标题")
private String title; private String title;
@ApiModelProperty("推荐: 0不推荐 1推荐")
private Integer recommend;
} }
\ No newline at end of file
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, mc_id, status, create_time,update_time,type,text,img_url id, mc_id, status, create_time,update_time,type,text,img_url,recommend
</sql> </sql>
<sql id="Base_Column_ListForApp"> <sql id="Base_Column_ListForApp">
title,text,img_url,m.head AS mcHead,m.name AS mcName title,text,img_url,m.head AS mcHead,m.name AS mcName,ci.recommend
</sql> </sql>
<select id="getCharterIntroductionById" resultType="com.jumeirah.common.vo.CharterIntroductionQueryVo"> <select id="getCharterIntroductionById" resultType="com.jumeirah.common.vo.CharterIntroductionQueryVo">
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
where ci.type = #{param.type} where ci.type = #{param.type}
AND m.state=1 and m.audit_register_status=1 AND m.state=1 and m.audit_register_status=1
ORDER BY ci.recommend DESC
</select> </select>
......
...@@ -26,6 +26,14 @@ spring: ...@@ -26,6 +26,14 @@ spring:
password: temple123456 password: temple123456
port: 6379 port: 6379
rabbitmq:
host: 47.99.47.225
port: 5672
username: root
password: root
user-queue-name: disable.user.dev
order-queue-name: push.order
# 打印SQL语句和结果集,本地开发环境可开启,线上注释掉 # 打印SQL语句和结果集,本地开发环境可开启,线上注释掉
mybatis-plus: mybatis-plus:
configuration: configuration:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package io.geekidea.springbootplus.framework.config.jackson.serializer; package io.geekidea.springbootplus.framework.config.jackson.deserializer;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
......
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.geekidea.springbootplus.framework.config.jackson.deserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import io.geekidea.springbootplus.framework.config.converter.StringToDoubleUtil;
import java.io.IOException;
/**
* @author geekidea
* @date 2018-11-08
*/
public class JacksonLongDeserializer extends JsonDeserializer<Double> {
@Override
public Double deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
String string = jsonParser.getText();
return StringToDoubleUtil.convert(string);
}
}
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.geekidea.springbootplus.framework.config.jackson.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
/**
* <p>
* Jackson Long反序列化器
* </p>
*
* @author geekidea
* @date 2018-11-08
*/
public class JacksonLongSerializer extends JsonSerializer<Long> {
@Override
public void serialize(Long aLong, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
String string = null;
if (aLong != null) {
string = aLong.toString();
}
jsonGenerator.writeString(string);
}
}
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