Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
c9552416
Commit
c9552416
authored
Nov 03, 2020
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
包机介绍推荐: 0不推荐 1推荐
parent
16e45ee4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
102 additions
and
4 deletions
+102
-4
bootstrap/src/main/java/io/geekidea/springbootplus/config/JacksonConfig.java
+5
-1
common/src/main/java/com/jumeirah/common/vo/CharterIntroductionQueryForAppVo.java
+4
-0
common/src/main/resources/mapper/CharterIntroductionMapper.xml
+3
-2
config/src/main/resources/config/application-test.yml
+8
-0
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/deserializer/JacksonIntegerDeserializer.java
+1
-1
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/deserializer/JacksonLongDeserializer.java
+38
-0
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/serializer/JacksonLongSerializer.java
+43
-0
No files found.
bootstrap/src/main/java/io/geekidea/springbootplus/config/JacksonConfig.java
View file @
c9552416
...
@@ -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.
de
serializer.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
());
...
...
common/src/main/java/com/jumeirah/common/vo/CharterIntroductionQueryForAppVo.java
View file @
c9552416
...
@@ -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
common/src/main/resources/mapper/CharterIntroductionMapper.xml
View file @
c9552416
...
@@ -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>
...
...
config/src/main/resources/config/application-test.yml
View file @
c9552416
...
@@ -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
:
...
...
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/serializer/JacksonIntegerDeserializer.java
→
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/
de
serializer/JacksonIntegerDeserializer.java
View file @
c9552416
...
@@ -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
.
de
serializer
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
...
...
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/deserializer/JacksonLongDeserializer.java
0 → 100755
View file @
c9552416
/*
* 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
);
}
}
framework/src/main/java/io/geekidea/springbootplus/framework/config/jackson/serializer/JacksonLongSerializer.java
0 → 100755
View file @
c9552416
/*
* 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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment