记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
1894f164
Commit
1894f164
authored
Jul 30, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.zhengzai.tv/dongjingwei/liquidnet-bus-v1
into dev
parents
8da19efb
008399c6
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
296 additions
and
205 deletions
+296
-205
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+5
-0
KylinOrderExpressVo.java
...net/service/kylin/dto/vo/express/KylinOrderExpressVo.java
+2
-2
AdminUpushServiceImpl.java
...in/zhengzai/admin/service/impl/AdminUpushServiceImpl.java
+54
-10
KylinBannersServiceImpl.java
.../zhengzai/kylin/service/impl/KylinBannersServiceImpl.java
+34
-59
AdamEntersController.java
...quidnet/service/adam/controller/AdamEntersController.java
+5
-3
AdamRdmService.java
...va/com/liquidnet/service/adam/service/AdamRdmService.java
+5
-2
AdamAddressesServiceImpl.java
...t/service/adam/service/impl/AdamAddressesServiceImpl.java
+4
-2
AdamEntersServiceImpl.java
...dnet/service/adam/service/impl/AdamEntersServiceImpl.java
+6
-5
AdamUserServiceImpl.java
...uidnet/service/adam/service/impl/AdamUserServiceImpl.java
+1
-1
db_kylin_structure.sql
.../liquidnet-service-kylin-impl/docu/db_kylin_structure.sql
+2
-2
KylinBannersController.java
...dnet/service/kylin/controller/KylinBannersController.java
+3
-2
BannersServiceImpl.java
...uidnet/service/kylin/service/impl/BannersServiceImpl.java
+58
-40
KylinRefundsStatusServiceImpl.java
...ice/kylin/service/impl/KylinRefundsStatusServiceImpl.java
+8
-8
PerformancesExpressInfoServiceImpl.java
...ylin/service/impl/PerformancesExpressInfoServiceImpl.java
+2
-2
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+5
-11
ObjectUtil.java
...in/java/com/liquidnet/service/kylin/utils/ObjectUtil.java
+6
-1
AdminUpushController.java
...atform/controller/basicServices/AdminUpushController.java
+4
-1
AdminUpushServiceImpl.java
...platform/service/basicServices/AdminUpushServiceImpl.java
+25
-30
PerformancesExpressCallbackServiceImpl.java
...ress/shunfeng/PerformancesExpressCallbackServiceImpl.java
+8
-3
DataUtils.java
.../java/com/liquidnet/service/platform/utils/DataUtils.java
+12
-0
db_sweetsugar_structure.sql
.../liquidnet-service-sweet/docu/db_sweetsugar_structure.sql
+2
-2
SweetManualShopController.java
...t/service/sweet/controller/SweetManualShopController.java
+21
-10
SweetRichtextController.java
...net/service/sweet/controller/SweetRichtextController.java
+1
-1
SweetManualShop.java
...a/com/liquidnet/service/sweet/entity/SweetManualShop.java
+1
-1
ISweetManualShopService.java
...uidnet/service/sweet/service/ISweetManualShopService.java
+3
-1
SweetManualShopServiceImpl.java
...ervice/sweet/service/impl/SweetManualShopServiceImpl.java
+17
-6
SweetManualArtistsMapper.xml
...quidnet/service/sweet/mapper/SweetManualArtistsMapper.xml
+2
-0
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
1894f164
...
@@ -45,4 +45,9 @@ public class KylinRedisConst {
...
@@ -45,4 +45,9 @@ public class KylinRedisConst {
public
static
final
String
ZHENGZAI_APP_VERSIONS_CHECK_ANDROID
=
"basicServices:zhengzaiCheckAppVersionsAndroid"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_CHECK_ANDROID
=
"basicServices:zhengzaiCheckAppVersionsAndroid"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_CHECK_IOS
=
"basicServices:zhengzaiCheckAppVersionsIos"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_CHECK_IOS
=
"basicServices:zhengzaiCheckAppVersionsIos"
;
public
static
final
String
ADMIN_UPUSH_LIST_IOS
=
"basicServices:upushList:IOS"
;
public
static
final
String
ADMIN_UPUSH_LIST_ANDROID
=
"basicServices:upushList:Android"
;
public
static
final
String
ADMIN_BANNER_LIST
=
"kylin:bannerList"
;
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/express/KylinOrderExpressVo.java
View file @
1894f164
...
@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.Li
nkedLi
st
;
/**
/**
* <p>
* <p>
...
@@ -31,6 +31,6 @@ public class KylinOrderExpressVo implements Serializable {
...
@@ -31,6 +31,6 @@ public class KylinOrderExpressVo implements Serializable {
@ApiModelProperty
(
value
=
"快递状态"
)
@ApiModelProperty
(
value
=
"快递状态"
)
private
Integer
expressStatus
;
private
Integer
expressStatus
;
@ApiModelProperty
(
value
=
"物流数据"
)
@ApiModelProperty
(
value
=
"物流数据"
)
List
<
KylinOrderExpressRouteVo
>
routeList
;
Li
nkedLi
st
<
KylinOrderExpressRouteVo
>
routeList
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/admin/service/impl/AdminUpushServiceImpl.java
View file @
1894f164
...
@@ -13,6 +13,7 @@ import com.liquidnet.common.cache.redis.util.RedisUtil;
...
@@ -13,6 +13,7 @@ import com.liquidnet.common.cache.redis.util.RedisUtil;
import
com.liquidnet.commons.lang.constant.LnsEnum
;
import
com.liquidnet.commons.lang.constant.LnsEnum
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.adam.dto.vo.admin.AdminUpushVo
;
import
com.liquidnet.service.adam.dto.vo.admin.AdminUpushVo
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dao.UpushDetailsListDao
;
import
com.liquidnet.service.kylin.dao.UpushDetailsListDao
;
import
com.liquidnet.service.kylin.dto.param.admin.UpushParam
;
import
com.liquidnet.service.kylin.dto.param.admin.UpushParam
;
import
com.liquidnet.service.kylin.dto.param.admin.UpushSearchParam
;
import
com.liquidnet.service.kylin.dto.param.admin.UpushSearchParam
;
...
@@ -27,10 +28,7 @@ import org.springframework.core.env.Environment;
...
@@ -27,10 +28,7 @@ import org.springframework.core.env.Environment;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -87,14 +85,60 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp
...
@@ -87,14 +85,60 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp
adminUpushMapper
.
insert
(
adminUpush
);
adminUpushMapper
.
insert
(
adminUpush
);
// 处理缓存数据
// 处理缓存数据
AdminUpush
adminUpushInfo
=
adminUpushMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
AdminUpush
.
class
).
eq
(
AdminUpush:
:
getUpushId
,
upushId
));
if
(
null
==
adminUpushInfo
.
getPushTime
())
{
adminUpushInfo
.
setPushTime
(
""
);
}
AdminUpushVo
adminUpushVo
=
new
AdminUpushVo
();
AdminUpushVo
adminUpushVo
=
new
AdminUpushVo
();
BeanUtils
.
copyProperties
(
adminUpushInfo
,
adminUpushVo
);
BeanUtils
.
copyProperties
(
adminUpush
,
adminUpushVo
);
mongoTemplate
.
insert
(
adminUpushVo
,
AdminUpushVo
.
class
.
getSimpleName
());
adminUpushVo
.
setMessageType
(
2
);
adminUpushVo
.
setSpecifyType
(
2
);
// 这里暂时写死就行 如果以后改需求再处理
String
redisKeyIos
=
KylinRedisConst
.
ADMIN_UPUSH_LIST_IOS
;
String
redisKeyAndroid
=
KylinRedisConst
.
ADMIN_UPUSH_LIST_ANDROID
;
LinkedList
<
AdminUpushVo
>
pushList
=
new
LinkedList
<>();
LinkedList
<
AdminUpushVo
>
pushList2
=
new
LinkedList
<>();
if
(
upushParam
.
getPushRange
()
==
1
)
{
// all
pushList
=
(
LinkedList
<
AdminUpushVo
>)
redisUtil
.
get
(
redisKeyIos
);
pushList2
=
(
LinkedList
<
AdminUpushVo
>)
redisUtil
.
get
(
redisKeyAndroid
);
}
else
if
(
upushParam
.
getPushRange
()
==
2
)
{
// ios
pushList
=
(
LinkedList
<
AdminUpushVo
>)
redisUtil
.
get
(
redisKeyIos
);
}
else
if
(
upushParam
.
getPushRange
()
==
3
)
{
// android
pushList
=
(
LinkedList
<
AdminUpushVo
>)
redisUtil
.
get
(
redisKeyAndroid
);
}
if
(
null
==
pushList
)
{
pushList
=
new
LinkedList
<>();
}
if
(
null
==
pushList2
)
{
pushList2
=
new
LinkedList
<>();
}
if
(
upushParam
.
getPushRange
()
==
1
)
{
if
(!
CollectionUtil
.
isEmpty
(
pushList
))
{
if
(
pushList
.
size
()
>=
20
)
{
pushList
.
remove
(
0
);
}
}
pushList
.
addFirst
(
adminUpushVo
);
if
(!
CollectionUtil
.
isEmpty
(
pushList2
))
{
if
(
pushList2
.
size
()
>=
20
)
{
pushList2
.
remove
(
0
);
}
}
pushList2
.
addFirst
(
adminUpushVo
);
}
else
{
if
(!
CollectionUtil
.
isEmpty
(
pushList
))
{
if
(
pushList
.
size
()
>=
20
)
{
pushList
.
remove
(
0
);
}
}
pushList
.
addFirst
(
adminUpushVo
);
}
if
(
upushParam
.
getPushRange
()
==
1
)
{
// all
redisUtil
.
set
(
redisKeyIos
,
pushList
);
redisUtil
.
set
(
redisKeyAndroid
,
pushList2
);
}
else
if
(
upushParam
.
getPushRange
()
==
2
)
{
// ios
redisUtil
.
set
(
redisKeyIos
,
pushList
);
}
else
if
(
upushParam
.
getPushRange
()
==
3
)
{
// android
redisUtil
.
set
(
redisKeyAndroid
,
pushList
);
}
// 推送
if
(
adminUpush
.
getIsPush
()
==
1
)
{
if
(
adminUpush
.
getIsPush
()
==
1
)
{
if
(
adminUpush
.
getPushRange
()
==
1
)
{
if
(
adminUpush
.
getPushRange
()
==
1
)
{
sendAndroidBroadcast
(
adminUpush
);
sendAndroidBroadcast
(
adminUpush
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinBannersServiceImpl.java
View file @
1894f164
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
kylin
.
service
.
impl
;
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
kylin
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.client.admin.common.enums.BannersTargetType
;
import
com.liquidnet.client.admin.common.enums.BannersTargetType
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.kylin.dao.BannerDetailsListDao
;
import
com.liquidnet.service.kylin.dao.BannerDetailsListDao
;
import
com.liquidnet.service.kylin.dto.param.BannersParam
;
import
com.liquidnet.service.kylin.dto.param.BannersParam
;
import
com.liquidnet.service.kylin.dto.param.BannersSearchParam
;
import
com.liquidnet.service.kylin.dto.param.BannersSearchParam
;
...
@@ -20,24 +18,18 @@ import com.liquidnet.service.kylin.entity.KylinBannersRelations;
...
@@ -20,24 +18,18 @@ import com.liquidnet.service.kylin.entity.KylinBannersRelations;
import
com.liquidnet.service.kylin.mapper.KylinBannersMapper
;
import
com.liquidnet.service.kylin.mapper.KylinBannersMapper
;
import
com.liquidnet.service.kylin.mapper.KylinBannersRelationsMapper
;
import
com.liquidnet.service.kylin.mapper.KylinBannersRelationsMapper
;
import
com.liquidnet.service.kylin.service.admin.IKylinBannersService
;
import
com.liquidnet.service.kylin.service.admin.IKylinBannersService
;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.client.model.FindOneAndUpdateOptions
;
import
com.mongodb.client.model.ReturnDocument
;
import
org.bson.Document
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* <p>
* <p>
...
@@ -62,9 +54,6 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -62,9 +54,6 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
@Autowired
@Autowired
MongoTemplate
mongoTemplate
;
MongoTemplate
mongoTemplate
;
@Autowired
private
MongoConverter
mongoConverter
;
@Autowired
@Autowired
RedisUtil
redisUtil
;
RedisUtil
redisUtil
;
...
@@ -106,27 +95,7 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -106,27 +95,7 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
}
}
// 处理缓存数据
// 处理缓存数据
KylinBannersVo
kylinBannersVo
=
new
KylinBannersVo
();
setBannerListRedis
();
BeanUtils
.
copyProperties
(
bannersParam
,
kylinBannersVo
);
kylinBannersVo
.
setBannersId
(
bannersId
);
kylinBannersVo
.
setCreatedAt
(
createdAtString
);
// 处理基础数据 防止缓存中无字段
kylinBannersVo
.
setIsDeleted
(
1
);
kylinBannersVo
.
setUpdatedAt
(
""
);
if
(
StringUtils
.
isEmpty
(
bannersParam
.
getTargetObj
()))
{
kylinBannersVo
.
setTargetObj
(
""
);
}
if
(
StringUtils
.
isEmpty
(
bannersParam
.
getOnlineStartTime
()))
{
kylinBannersVo
.
setOnlineStartTime
(
""
);
}
if
(
StringUtils
.
isEmpty
(
bannersParam
.
getOnlineEndTime
()))
{
kylinBannersVo
.
setOnlineEndTime
(
""
);
}
if
(
null
==
bannersParam
.
getBannersSort
())
{
kylinBannersVo
.
setBannersSort
(
0
);
}
// 入缓存
mongoTemplate
.
insert
(
kylinBannersVo
,
KylinBannersVo
.
class
.
getSimpleName
());
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -134,6 +103,29 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -134,6 +103,29 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
}
}
}
}
private
void
setBannerListRedis
()
{
List
<
KylinBanners
>
bannerList
=
bannersMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
KylinBanners
.
class
).
eq
(
KylinBanners:
:
getIsOnline
,
1
)
.
eq
(
KylinBanners:
:
getIsDeleted
,
1
)
.
orderByDesc
(
KylinBanners:
:
getBannersSort
)
);
for
(
KylinBanners
banner
:
bannerList
)
{
List
<
KylinBannersRelations
>
pList
=
kylinBannersRelationsMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
KylinBannersRelations
.
class
).
eq
(
KylinBannersRelations:
:
getBannersId
,
banner
.
getBannersId
())
.
eq
(
KylinBannersRelations:
:
getFieldIdType
,
1
)
);
List
<
String
>
pListStr
=
pList
.
stream
().
map
(
KylinBannersRelations
->
KylinBannersRelations
.
getFieldId
()).
collect
(
Collectors
.
toList
());
List
<
KylinBannersRelations
>
proList
=
kylinBannersRelationsMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
KylinBannersRelations
.
class
).
eq
(
KylinBannersRelations:
:
getBannersId
,
banner
.
getBannersId
())
.
eq
(
KylinBannersRelations:
:
getFieldIdType
,
2
)
);
List
<
String
>
proListStr
=
proList
.
stream
().
map
(
KylinBannersRelations
->
KylinBannersRelations
.
getFieldName
()).
collect
(
Collectors
.
toList
());
banner
.
setPositionList
(
pListStr
);
banner
.
setProvincesList
(
proListStr
);
}
redisUtil
.
set
(
KylinRedisConst
.
ADMIN_BANNER_LIST
,
bannerList
);
}
public
boolean
update
(
BannersParam
bannersParam
)
{
public
boolean
update
(
BannersParam
bannersParam
)
{
try
{
try
{
// 时间
// 时间
...
@@ -143,12 +135,12 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -143,12 +135,12 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
KylinBanners
params
=
bannersParam
.
getFields
(
null
,
null
);
KylinBanners
params
=
bannersParam
.
getFields
(
null
,
null
);
params
.
setUpdatedAt
(
updatedAtString
);
params
.
setUpdatedAt
(
updatedAtString
);
if
(
StringUtils
.
isEmpty
(
bannersParam
.
getOnlineStartTime
()))
{
/*
if (StringUtils.isEmpty(bannersParam.getOnlineStartTime())) {
params.setOnlineStartTime(null);
params.setOnlineStartTime(null);
}
}
if (StringUtils.isEmpty(bannersParam.getOnlineEndTime())) {
if (StringUtils.isEmpty(bannersParam.getOnlineEndTime())) {
params.setOnlineEndTime(null);
params.setOnlineEndTime(null);
}
}
*/
// 入数据库
// 入数据库
bannersMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinBanners
>().
eq
(
"banners_id"
,
bannersId
));
bannersMapper
.
update
(
params
,
new
UpdateWrapper
<
KylinBanners
>().
eq
(
"banners_id"
,
bannersId
));
...
@@ -183,18 +175,9 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -183,18 +175,9 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
}
}
}
}
}
}
// 处理缓存数据
// 处理缓存数据
KylinBannersVo
kylinBannersVo
=
new
KylinBannersVo
();
setBannerListRedis
();
BeanUtils
.
copyProperties
(
bannersParam
,
kylinBannersVo
);
kylinBannersVo
.
setBannersId
(
bannersId
);
kylinBannersVo
.
setUpdatedAt
(
updatedAtString
);
// 修改缓存
BasicDBObject
object
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinBannersVo
)));
Document
doc
=
mongoTemplate
.
getCollection
(
KylinBannersVo
.
class
.
getSimpleName
()).
findOneAndUpdate
(
Query
.
query
(
Criteria
.
where
(
"bannersId"
).
is
(
bannersId
)).
getQueryObject
(),
object
,
new
FindOneAndUpdateOptions
().
returnDocument
(
ReturnDocument
.
AFTER
)
);
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -256,16 +239,8 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
...
@@ -256,16 +239,8 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
,
new
UpdateWrapper
<
KylinBanners
>().
in
(
"banners_id"
,
bannersId
)
,
new
UpdateWrapper
<
KylinBanners
>().
in
(
"banners_id"
,
bannersId
)
);
);
// mongo 操作
// 处理缓存数据
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
setBannerListRedis
();
map
.
put
(
"updatedAt"
,
updatedAtString
);
map
.
put
(
"isDeleted"
,
0
);
BasicDBObject
object
=
new
BasicDBObject
(
"$set"
,
mongoConverter
.
convertToMongoType
(
map
));
Document
doc
=
mongoTemplate
.
getCollection
(
KylinBannersVo
.
class
.
getSimpleName
()).
findOneAndUpdate
(
Query
.
query
(
Criteria
.
where
(
"bannersId"
).
in
(
bannersId
)).
getQueryObject
(),
object
,
new
FindOneAndUpdateOptions
().
returnDocument
(
ReturnDocument
.
AFTER
)
);
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamEntersController.java
View file @
1894f164
...
@@ -87,10 +87,12 @@ public class AdamEntersController {
...
@@ -87,10 +87,12 @@ public class AdamEntersController {
List
<
AdamEntersVo
>
vos
=
adamRdmService
.
getEntersVoByUid
(
CurrentUtil
.
getCurrentUid
());
List
<
AdamEntersVo
>
vos
=
adamRdmService
.
getEntersVoByUid
(
CurrentUtil
.
getCurrentUid
());
if
(!
CollectionUtils
.
isEmpty
(
vos
))
{
Optional
<
AdamEntersVo
>
any
=
vos
.
stream
().
filter
(
r
->
(
r
.
getIdCard
().
equals
(
parameter
.
getIdCard
()))
&&
r
.
getType
().
equals
(
parameter
.
getType
())).
findAny
();
Optional
<
AdamEntersVo
>
any
=
vos
.
stream
().
filter
(
r
->
(
r
.
getIdCard
().
equals
(
parameter
.
getIdCard
()))
&&
r
.
getType
().
equals
(
parameter
.
getType
())).
findAny
();
if
(
any
.
isPresent
())
{
if
(
any
.
isPresent
())
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10019"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10019"
));
}
}
}
String
entersId
=
adamEntersService
.
add
(
parameter
);
String
entersId
=
adamEntersService
.
add
(
parameter
);
return
ResponseDto
.
success
(
entersId
);
return
ResponseDto
.
success
(
entersId
);
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/AdamRdmService.java
View file @
1894f164
...
@@ -525,7 +525,7 @@ public class AdamRdmService {
...
@@ -525,7 +525,7 @@ public class AdamRdmService {
redisUtil
.
del
(
AdamRedisConst
.
INFO_MEMBER_CODE
.
concat
(
memberCode
));
redisUtil
.
del
(
AdamRedisConst
.
INFO_MEMBER_CODE
.
concat
(
memberCode
));
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <AdamMemberCodeVo::buyOrderNo, MEMBER_CODE
+ STATE
> */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <AdamMemberCodeVo::buyOrderNo, MEMBER_CODE> */
public
boolean
setMemberCodeByBuyOrderNo
(
String
buyOrderNo
,
String
memberCode
)
{
public
boolean
setMemberCodeByBuyOrderNo
(
String
buyOrderNo
,
String
memberCode
)
{
return
redisUtil
.
set
(
buyOrderNo
,
memberCode
);
return
redisUtil
.
set
(
buyOrderNo
,
memberCode
);
...
@@ -549,7 +549,10 @@ public class AdamRdmService {
...
@@ -549,7 +549,10 @@ public class AdamRdmService {
// );
// );
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
// return vo;
// return vo;
return
this
.
getMemberCodeVoByCode
(
this
.
getMemberCodeByBuyOrderNo
(
buyOrderNo
));
// TODO: 2021/7/30 存在购买会员兑换码功能时,按需调整
AdamMemberCodeVo
vo
=
AdamMemberCodeVo
.
getNew
();
vo
.
setCode
(
this
.
getMemberCodeByBuyOrderNo
(
buyOrderNo
));
return
vo
;
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | TAGS:List<AdamTagVo> */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | TAGS:List<AdamTagVo> */
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamAddressesServiceImpl.java
View file @
1894f164
...
@@ -51,7 +51,7 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService {
...
@@ -51,7 +51,7 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService {
AdamAddressesVo
vo
=
AdamAddressesVo
.
getNew
();
AdamAddressesVo
vo
=
AdamAddressesVo
.
getNew
();
BeanUtils
.
copyProperties
(
parameter
,
vo
);
BeanUtils
.
copyProperties
(
parameter
,
vo
);
vo
.
setAddressesId
(
String
.
valueOf
(
IDGenerator
.
nextSnowId
()
));
vo
.
setAddressesId
(
IDGenerator
.
nextSnowId
(
));
vo
.
setUid
(
currentUid
);
vo
.
setUid
(
currentUid
);
vo
.
setIsDefault
(
CollectionUtils
.
isEmpty
(
vos
));
vo
.
setIsDefault
(
CollectionUtils
.
isEmpty
(
vos
));
vo
.
setState
(
1
);
vo
.
setState
(
1
);
...
@@ -62,7 +62,9 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService {
...
@@ -62,7 +62,9 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService {
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
adamRdmService
.
delAddressesVoByUid
(
currentUid
);
// adamRdmService.delAddressesVoByUid(currentUid);
vos
.
add
(
vo
);
adamRdmService
.
setAddressesVoByUid
(
currentUid
,
vos
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
s
=
System
.
currentTimeMillis
();
s
=
System
.
currentTimeMillis
();
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamEntersServiceImpl.java
View file @
1894f164
...
@@ -56,6 +56,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
...
@@ -56,6 +56,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
if
(
1
==
parameter
.
getType
())
{
if
(
1
==
parameter
.
getType
())
{
if
(!
adamRdmService
.
isCertification
(
1
,
parameter
.
getIdCard
(),
parameter
.
getName
()))
{
if
(!
adamRdmService
.
isCertification
(
1
,
parameter
.
getIdCard
(),
parameter
.
getName
()))
{
identityHandler
(
currentUid
,
parameter
.
getName
(),
parameter
.
getIdCard
());
identityHandler
(
currentUid
,
parameter
.
getName
(),
parameter
.
getIdCard
());
adamRdmService
.
setCertification
(
1
,
parameter
.
getIdCard
(),
parameter
.
getName
());
}
}
}
}
...
@@ -64,7 +66,7 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
...
@@ -64,7 +66,7 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
AdamEntersVo
vo
=
AdamEntersVo
.
getNew
();
AdamEntersVo
vo
=
AdamEntersVo
.
getNew
();
BeanUtils
.
copyProperties
(
parameter
,
vo
);
BeanUtils
.
copyProperties
(
parameter
,
vo
);
vo
.
setEntersId
(
String
.
valueOf
(
IDGenerator
.
nextSnowId
()
));
vo
.
setEntersId
(
IDGenerator
.
nextSnowId
(
));
vo
.
setUid
(
currentUid
);
vo
.
setUid
(
currentUid
);
vo
.
setIsDefault
(
CollectionUtils
.
isEmpty
(
vos
));
vo
.
setIsDefault
(
CollectionUtils
.
isEmpty
(
vos
));
vo
.
setState
(
1
);
vo
.
setState
(
1
);
...
@@ -75,10 +77,9 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
...
@@ -75,10 +77,9 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
adamRdmService
.
delEntersVoByUid
(
currentUid
);
// adamRdmService.delEntersVoByUid(currentUid);
if
(
1
==
parameter
.
getType
())
{
vos
.
add
(
vo
);
adamRdmService
.
setCertification
(
1
,
parameter
.
getIdCard
(),
parameter
.
getName
());
adamRdmService
.
setEntersVoByUid
(
currentUid
,
vos
);
}
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
s
=
System
.
currentTimeMillis
();
s
=
System
.
currentTimeMillis
();
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamUserServiceImpl.java
View file @
1894f164
...
@@ -404,6 +404,7 @@ public class AdamUserServiceImpl implements IAdamUserService {
...
@@ -404,6 +404,7 @@ public class AdamUserServiceImpl implements IAdamUserService {
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10102"
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10102"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
}
adamRdmService
.
setCertification
(
1
,
idCard
,
name
);
}
}
AdamRealName
realName
=
new
AdamRealName
();
AdamRealName
realName
=
new
AdamRealName
();
...
@@ -425,7 +426,6 @@ public class AdamUserServiceImpl implements IAdamUserService {
...
@@ -425,7 +426,6 @@ public class AdamUserServiceImpl implements IAdamUserService {
long
s
=
System
.
currentTimeMillis
();
long
s
=
System
.
currentTimeMillis
();
adamRdmService
.
setRealInfoVoByUid
(
uid
,
vo
);
adamRdmService
.
setRealInfoVoByUid
(
uid
,
vo
);
adamRdmService
.
setCertification
(
1
,
idCard
,
name
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
log
.
debug
(
"#RDS耗时:{}ms"
,
System
.
currentTimeMillis
()
-
s
);
// }
// }
// RedisLockUtil.unlock(AdamRedisConst.LOCK_KEY_UIDENTITY + uid);
// RedisLockUtil.unlock(AdamRedisConst.LOCK_KEY_UIDENTITY + uid);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/db_kylin_structure.sql
View file @
1894f164
...
@@ -15,8 +15,8 @@ CREATE TABLE `kylin_banners`
...
@@ -15,8 +15,8 @@ CREATE TABLE `kylin_banners`
`target_obj`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'跳转目标 id/url等'
,
`target_obj`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'跳转目标 id/url等'
,
`target_obj_name`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'跳转目标 name 选择的时候回显使用'
,
`target_obj_name`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'跳转目标 name 选择的时候回显使用'
,
`is_online`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'是否上线展示 0下线 1上线'
,
`is_online`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'是否上线展示 0下线 1上线'
,
`online_start_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'上线开始时间'
,
`online_start_time`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'上线开始时间'
,
`online_end_time`
timestamp
NULL
DEFAULT
NULL
COMMENT
'上线结束时间'
,
`online_end_time`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'上线结束时间'
,
`promotion_type`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'推广类型 1全国 2省份'
,
`promotion_type`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'推广类型 1全国 2省份'
,
`banners_sort`
int
NOT
NULL
DEFAULT
0
COMMENT
'排序 越大越靠前'
,
`banners_sort`
int
NOT
NULL
DEFAULT
0
COMMENT
'排序 越大越靠前'
,
`is_deleted`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'是否删除 0已删除 1正常'
,
`is_deleted`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'是否删除 0已删除 1正常'
,
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinBannersController.java
View file @
1894f164
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.controller;
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.controller;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.dto.vo.KylinBannersVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinBannersVo
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.liquidnet.service.kylin.service.impl.BannersServiceImpl
;
import
com.liquidnet.service.kylin.service.impl.BannersServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -36,11 +37,11 @@ public class KylinBannersController {
...
@@ -36,11 +37,11 @@ public class KylinBannersController {
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"position"
,
value
=
"展示位置 1首页 3周边 5积分商城 6YB 8视频"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"position"
,
value
=
"展示位置 1首页 3周边 5积分商城 6YB 8视频"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"provinceName"
,
value
=
"城市名称"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"provinceName"
,
value
=
"城市名称"
),
})
})
public
ResponseDto
<
List
<
KylinBanners
Vo
>>
blist
(
public
ResponseDto
<
List
<
KylinBanners
>>
blist
(
@RequestParam
()
String
position
,
@RequestParam
()
String
position
,
@RequestParam
(
defaultValue
=
""
)
String
provinceName
@RequestParam
(
defaultValue
=
""
)
String
provinceName
)
{
)
{
List
<
KylinBanners
Vo
>
result
=
bannersServiceImpl
.
blist
(
position
,
provinceName
);
List
<
KylinBanners
>
result
=
bannersServiceImpl
.
blist
(
position
,
provinceName
);
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/BannersServiceImpl.java
View file @
1894f164
package
com
.
liquidnet
.
service
.
kylin
.
service
.
impl
;
package
com
.
liquidnet
.
service
.
kylin
.
service
.
impl
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dto.vo.KylinBannersVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinBannersVo
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.liquidnet.service.kylin.service.admin.IKylinBannersService
;
import
com.liquidnet.service.kylin.service.admin.IKylinBannersService
;
import
com.liquidnet.service.kylin.utils.ObjectUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
@@ -12,6 +16,7 @@ import org.springframework.data.mongodb.core.query.Query;
...
@@ -12,6 +16,7 @@ import org.springframework.data.mongodb.core.query.Query;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -34,51 +39,64 @@ public class BannersServiceImpl implements IKylinBannersService {
...
@@ -34,51 +39,64 @@ public class BannersServiceImpl implements IKylinBannersService {
@Autowired
@Autowired
RedisUtil
redisUtil
;
RedisUtil
redisUtil
;
public
List
<
KylinBanners
Vo
>
blist
(
String
position
,
String
provinceName
)
{
public
List
<
KylinBanners
>
blist
(
String
position
,
String
provinceName
)
{
Query
query
=
new
Query
();
String
nowTime
=
DateUtil
.
getNowTime
();
query
.
addCriteria
(
Object
ListObj
=
redisUtil
.
get
(
KylinRedisConst
.
ADMIN_BANNER_LIST
);
Criteria
.
where
(
"isOnline"
).
is
(
1
).
and
(
"isDeleted"
).
is
(
1
)
List
<
KylinBanners
>
list
=
ObjectUtil
.
getKylinBannerListArrayList
();
);
if
(
null
!=
ListObj
)
{
list
=
(
List
<
KylinBanners
>)
ListObj
;
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
if
(!
CollectionUtil
.
isEmpty
(
list
))
{
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
Iterator
<
KylinBanners
>
itBannerList
=
list
.
iterator
(
);
Criteria
onlineTimeBetween
=
Criteria
.
where
(
"onlineStartTime"
).
lte
(
nowTimeStr
).
and
(
"onlineEndTime"
).
gte
(
nowTimeStr
);
while
(
itBannerList
.
hasNext
())
{
Criteria
onlineTimeGt
=
Criteria
.
where
(
"onlineStartTime"
).
lte
(
nowTimeStr
).
and
(
"onlineEndTime"
).
is
(
""
);
KylinBanners
bannerInfo
=
itBannerList
.
next
(
);
Criteria
onlineTimeLt
=
Criteria
.
where
(
"onlineStartTime"
).
is
(
""
).
and
(
"onlineEndTime"
).
gte
(
nowTimeStr
);
// 时间
Criteria
onlineTimeEmpty
=
Criteria
.
where
(
"onlineStartTime"
).
is
(
""
).
and
(
"onlineEndTime"
).
is
(
""
);
String
StartTime
=
bannerInfo
.
getOnlineStartTime
(
);
Criteria
mergeCriteriaTime
=
new
Criteria
();
String
endTime
=
bannerInfo
.
getOnlineEndTime
();
mergeCriteriaTime
.
orOperator
(
onlineTimeBetween
,
onlineTimeGt
,
onlineTimeLt
,
onlineTimeEmpty
);
if
(!
StartTime
.
isEmpty
()
&&
!
endTime
.
isEmpty
())
{
if
(
DateUtil
.
compareStrDay
(
nowTime
,
StartTime
)
<
0
)
{
// 当前时间小雨开始时间 还未开始呢
if
(!
position
.
isEmpty
())
{
itBannerList
.
remove
();
query
.
addCriteria
(
}
Criteria
.
where
(
"positionList"
).
in
(
position
)
if
(
DateUtil
.
compareStrDay
(
endTime
,
nowTime
)
<
0
)
{
// 解释时间大于当前时间 已过期
);
itBannerList
.
remove
(
);
}
}
Criteria
mergeCriteriaPromotion
=
new
Criteria
();
if
(!
provinceName
.
isEmpty
())
{
Criteria
promotionCity
=
Criteria
.
where
(
"provincesNameList"
).
in
(
provinceName
);
Criteria
promotionAll
=
Criteria
.
where
(
"promotionType"
).
is
(
1
);
mergeCriteriaPromotion
.
orOperator
(
promotionCity
,
promotionAll
);
}
}
Criteria
criteria
=
new
Criteria
();
// list
query
.
addCriteria
(
if
(
bannerInfo
.
getPromotionType
()
!=
1
)
{
criteria
.
andOperator
(
mergeCriteriaTime
,
mergeCriteriaPromotion
)
List
<
String
>
pList
=
bannerInfo
.
getPositionList
();
);
Boolean
pis
=
false
;
if
(
null
!=
pList
)
{
for
(
String
positionName
:
pList
)
{
if
(
positionName
.
equals
(
position
))
{
pis
=
true
;
}
}
}
if
(!
pis
||
null
==
pList
)
{
itBannerList
.
remove
();
}
List
<
KylinBannersVo
>
bannerList
=
mongoTemplate
.
find
(
List
<
String
>
proList
=
bannerInfo
.
getProvincesList
();
query
,
Boolean
prois
=
false
;
KylinBannersVo
.
class
,
if
(
null
!=
proList
)
{
KylinBannersVo
.
class
.
getSimpleName
()
for
(
String
proName
:
proList
)
{
);
if
(
proName
.
equals
(
provinceName
))
{
prois
=
true
;
}
}
}
if
(!
prois
||
null
==
proList
)
{
itBannerList
.
remove
();
}
}
for
(
KylinBannersVo
info
:
bannerList
)
{
String
setCoverImg
=
imgUrl
+
bannerInfo
.
getCoverImg
();
String
setCoverImg
=
imgUrl
+
info
.
getCoverImg
();
bannerInfo
.
setCoverImg
(
setCoverImg
);
info
.
setCoverImg
(
setCoverImg
);
}
}
}
}
return
bannerL
ist
;
return
l
ist
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinRefundsStatusServiceImpl.java
View file @
1894f164
...
@@ -234,18 +234,18 @@ public class KylinRefundsStatusServiceImpl {
...
@@ -234,18 +234,18 @@ public class KylinRefundsStatusServiceImpl {
entitiesTable
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
entitiesTable
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
entitiesTable
.
setUpdatedAt
(
time
);
entitiesTable
.
setUpdatedAt
(
time
);
BigDecimal
oldRefundPrice
=
BigDecimal
.
valueOf
(
0
);
//
BigDecimal oldRefundPrice = BigDecimal.valueOf(0);
for
(
KylinOrderTicketEntitiesVo
item
:
orderInfo
.
getEntitiesVoList
())
{
//
for (KylinOrderTicketEntitiesVo item :orderInfo.getEntitiesVoList()) {
if
(
item
.
getOrderTicketEntitiesId
().
equalsIgnoreCase
(
orderEntitiesId
)){
//
if(item.getOrderTicketEntitiesId().equalsIgnoreCase(orderEntitiesId)){
oldRefundPrice
=
item
.
getRefundPrice
();
//
oldRefundPrice = item.getRefundPrice();
break
;
//
break;
}
//
}
}
//
}
KylinOrderTicketEntitiesVo
kylinOrderTicketEntitiesVo
=
KylinOrderTicketEntitiesVo
.
getNew
();
KylinOrderTicketEntitiesVo
kylinOrderTicketEntitiesVo
=
KylinOrderTicketEntitiesVo
.
getNew
();
kylinOrderTicketEntitiesVo
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
kylinOrderTicketEntitiesVo
.
setIsPayment
(
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT2
);
kylinOrderTicketEntitiesVo
.
setRefundPrice
(
oldRefundPrice
.
add
(
BigDecimal
.
valueOf
(
refundPrice
)));
//
kylinOrderTicketEntitiesVo.setRefundPrice(oldRefundPrice.add(BigDecimal.valueOf(refundPrice)));
kylinOrderTicketEntitiesVo
.
setUpdatedAt
(
strTime
);
kylinOrderTicketEntitiesVo
.
setUpdatedAt
(
strTime
);
BasicDBObject
entitiesObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketEntitiesVo
)));
BasicDBObject
entitiesObject
=
new
BasicDBObject
(
"$set"
,
JSON
.
parse
(
JsonUtils
.
toJson
(
kylinOrderTicketEntitiesVo
)));
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateOne
(
mongoTemplate
.
getCollection
(
KylinOrderTicketEntitiesVo
.
class
.
getSimpleName
()).
updateOne
(
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/PerformancesExpressInfoServiceImpl.java
View file @
1894f164
...
@@ -9,7 +9,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
...
@@ -9,7 +9,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Li
nkedLi
st
;
/**
/**
* <p>
* <p>
...
@@ -33,7 +33,7 @@ public class PerformancesExpressInfoServiceImpl {
...
@@ -33,7 +33,7 @@ public class PerformancesExpressInfoServiceImpl {
private
DataUtils
dataUtils
;
private
DataUtils
dataUtils
;
public
KylinOrderExpressVo
orderRouteDetail
(
String
orderTicketsId
)
{
public
KylinOrderExpressVo
orderRouteDetail
(
String
orderTicketsId
)
{
List
<
KylinOrderExpressRouteVo
>
routeList
=
dataUtils
.
getOrderExpressRoute
(
orderTicketsId
);
Li
nkedLi
st
<
KylinOrderExpressRouteVo
>
routeList
=
dataUtils
.
getOrderExpressRoute
(
orderTicketsId
);
KylinOrderExpressVo
expressInfo
=
dataUtils
.
getOrderExpressInfos
(
orderTicketsId
);
KylinOrderExpressVo
expressInfo
=
dataUtils
.
getOrderExpressInfos
(
orderTicketsId
);
expressInfo
.
setRouteList
(
routeList
);
expressInfo
.
setRouteList
(
routeList
);
return
expressInfo
;
return
expressInfo
;
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
1894f164
...
@@ -507,19 +507,13 @@ public class DataUtils {
...
@@ -507,19 +507,13 @@ public class DataUtils {
/**
/**
* 演出订单快递路由
* 演出订单快递路由
*/
*/
public
List
<
KylinOrderExpressRouteVo
>
getOrderExpressRoute
(
String
orderTicketsId
)
{
// 获取
public
Li
nkedLi
st
<
KylinOrderExpressRouteVo
>
getOrderExpressRoute
(
String
orderTicketsId
)
{
// 获取
String
redisKey
=
KylinRedisConst
.
ORDER_ROUTE_INFO
.
concat
(
orderTicketsId
);
String
redisKey
=
KylinRedisConst
.
ORDER_ROUTE_INFO
.
concat
(
orderTicketsId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
LinkedList
<
KylinOrderExpressRouteVo
>
list
=
(
LinkedList
<
KylinOrderExpressRouteVo
>)
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
null
==
list
)
{
List
<
KylinOrderExpressRouteVo
>
routeVoList
=
mongoTemplate
.
find
(
list
=
new
LinkedList
<>();
Query
.
query
(
Criteria
.
where
(
"orderTicketsId"
).
is
(
orderTicketsId
))
.
with
(
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"createdAt"
)),
KylinOrderExpressRouteVo
.
class
,
KylinOrderExpressRouteVo
.
class
.
getSimpleName
()
);
redisUtil
.
set
(
redisKey
,
routeVoList
);
return
routeVoList
;
}
}
return
(
List
<
KylinOrderExpressRouteVo
>)
obj
;
return
list
;
}
}
public
KylinOrderExpressVo
getOrderExpressInfos
(
String
orderId
)
{
public
KylinOrderExpressVo
getOrderExpressInfos
(
String
orderId
)
{
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/ObjectUtil.java
View file @
1894f164
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo;
...
@@ -5,6 +5,7 @@ import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo;
import
com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo
;
import
com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo
;
import
com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.*
;
import
com.liquidnet.service.kylin.dto.vo.returns.*
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.mongodb.client.model.WriteModel
;
import
com.mongodb.client.model.WriteModel
;
import
org.bson.Document
;
import
org.bson.Document
;
...
@@ -21,7 +22,7 @@ public class ObjectUtil {
...
@@ -21,7 +22,7 @@ public class ObjectUtil {
private
static
final
ArrayList
<
KylinTicketTimesVo
>
kylinTicketTimesVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
KylinTicketTimesVo
>
kylinTicketTimesVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
KylinOrderRefundsVo
>
kylinOrderRefundsVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
KylinOrderListVo
>
kylinOrderListVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
KylinOrderListVo
>
kylinOrderListVoArrayList
=
new
ArrayList
<>();
private
static
final
ArrayList
<
KylinBanners
>
kylinBannerListArrayList
=
new
ArrayList
<>();
private
static
final
PagedResult
<
KylinStationPerformanceVo
>
kylinStationPerformanceVoPagedResult
=
new
PagedResult
<>();
private
static
final
PagedResult
<
KylinStationPerformanceVo
>
kylinStationPerformanceVoPagedResult
=
new
PagedResult
<>();
public
static
ArrayList
<
KylinStationPerformanceVo
>
getKylinStationPerformanceVoArrayList
()
{
public
static
ArrayList
<
KylinStationPerformanceVo
>
getKylinStationPerformanceVoArrayList
()
{
...
@@ -64,6 +65,10 @@ public class ObjectUtil {
...
@@ -64,6 +65,10 @@ public class ObjectUtil {
return
(
ArrayList
<
KylinOrderListVo
>)
kylinOrderListVoArrayList
.
clone
();
return
(
ArrayList
<
KylinOrderListVo
>)
kylinOrderListVoArrayList
.
clone
();
}
}
public
static
ArrayList
<
KylinBanners
>
getKylinBannerListArrayList
()
{
return
(
ArrayList
<
KylinBanners
>)
kylinBannerListArrayList
.
clone
();
}
public
static
PagedResult
<
KylinStationPerformanceVo
>
getKylinStationPerformanceVoPagedResult
()
{
public
static
PagedResult
<
KylinStationPerformanceVo
>
getKylinStationPerformanceVoPagedResult
()
{
return
kylinStationPerformanceVoPagedResult
.
clone
();
return
kylinStationPerformanceVoPagedResult
.
clone
();
}
}
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/basicServices/AdminUpushController.java
View file @
1894f164
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
/**
* <p>
* <p>
* 友盟推送 系统消息
* 友盟推送 系统消息
...
@@ -37,10 +39,11 @@ public class AdminUpushController {
...
@@ -37,10 +39,11 @@ public class AdminUpushController {
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"每页数量"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"size"
,
value
=
"每页数量"
),
})
})
public
ResponseDto
<
PageInfo
<
AdminUpushVo
>>
lists
(
public
ResponseDto
<
PageInfo
<
AdminUpushVo
>>
lists
(
HttpServletRequest
request
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
)
{
)
{
PageInfo
<
AdminUpushVo
>
result
=
adminUpushServiceImpl
.
lists
(
page
,
size
);
PageInfo
<
AdminUpushVo
>
result
=
adminUpushServiceImpl
.
lists
(
request
,
page
,
size
);
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/basicServices/AdminUpushServiceImpl.java
View file @
1894f164
...
@@ -5,9 +5,12 @@ import com.github.pagehelper.PageInfo;
...
@@ -5,9 +5,12 @@ import com.github.pagehelper.PageInfo;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.adam.dto.vo.admin.AdminUpushVo
;
import
com.liquidnet.service.adam.dto.vo.admin.AdminUpushVo
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.entity.AdminUpush
;
import
com.liquidnet.service.kylin.entity.AdminUpush
;
import
com.liquidnet.service.kylin.mapper.AdminUpushMapper
;
import
com.liquidnet.service.kylin.mapper.AdminUpushMapper
;
import
com.liquidnet.service.kylin.service.admin.IAdminUpushService
;
import
com.liquidnet.service.kylin.service.admin.IAdminUpushService
;
import
jdk.nashorn.internal.ir.RuntimeNode
;
import
org.apache.coyote.Request
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
...
@@ -19,6 +22,8 @@ import org.springframework.data.mongodb.core.query.Query;
...
@@ -19,6 +22,8 @@ import org.springframework.data.mongodb.core.query.Query;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -41,39 +46,29 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp
...
@@ -41,39 +46,29 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp
@Autowired
@Autowired
RedisUtil
redisUtil
;
RedisUtil
redisUtil
;
public
PageInfo
<
AdminUpushVo
>
lists
(
Integer
page
,
Integer
size
)
{
public
PageInfo
<
AdminUpushVo
>
lists
(
HttpServletRequest
request
,
Integer
page
,
Integer
size
)
{
Query
query
=
Query
.
query
(
String
source
=
request
.
getHeader
(
"source"
);
Criteria
.
where
(
"specifyType"
).
is
(
2
).
and
(
"messageType"
).
is
(
2
)
.
and
(
"pushTime"
).
lt
(
DateUtil
.
getNowTime
())
);
long
count
=
mongoTemplate
.
count
(
query
,
AdminUpushVo
.
class
.
getSimpleName
());
PageInfo
<
AdminUpushVo
>
voPageInfo
=
null
;
PageInfo
<
AdminUpushVo
>
voPageInfo
=
null
;
if
(
count
>
0
)
{
Object
adminUpushVo
=
null
;
Pageable
pageable
=
PageRequest
.
of
(
page
-
1
,
size
,
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"createdAt"
));
if
(
null
!=
source
)
{
if
(
source
.
equals
(
"IOS"
))
{
query
.
with
(
pageable
);
adminUpushVo
=
redisUtil
.
get
(
KylinRedisConst
.
ADMIN_UPUSH_LIST_IOS
);
}
else
if
(
source
.
equals
(
"Android"
))
{
List
<
AdminUpushVo
>
msgList
=
mongoTemplate
.
find
(
adminUpushVo
=
redisUtil
.
get
(
KylinRedisConst
.
ADMIN_UPUSH_LIST_ANDROID
);
query
,
}
AdminUpushVo
.
class
,
}
AdminUpushVo
.
class
.
getSimpleName
()
if
(
null
==
adminUpushVo
||
page
>
1
)
{
// 不分页了 大于第一页返回空
);
voPageInfo
=
PageInfo
.
of
(
new
LinkedList
<>()
);
}
else
{
if
(!
CollectionUtils
.
isEmpty
(
msgList
))
{
LinkedList
<
AdminUpushVo
>
pushList
=
(
LinkedList
<
AdminUpushVo
>)
adminUpushVo
;
for
(
AdminUpushVo
info
:
msg
List
)
{
for
(
AdminUpushVo
info
:
push
List
)
{
if
(!
info
.
getImg
().
isEmpty
())
{
if
(!
info
.
getImg
().
isEmpty
())
{
String
img
=
imgUrl
+
info
.
getImg
();
String
img
=
imgUrl
+
info
.
getImg
();
info
.
setImg
(
img
);
info
.
setImg
(
img
);
}
}
}
}
}
voPageInfo
=
PageInfo
.
of
(
pushList
);
voPageInfo
.
setTotal
(
pushList
.
size
());
voPageInfo
=
PageInfo
.
of
(
msgList
);
voPageInfo
.
setTotal
(
count
);
}
else
{
voPageInfo
=
new
PageInfo
<>();
}
}
return
voPageInfo
;
return
voPageInfo
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/express/shunfeng/PerformancesExpressCallbackServiceImpl.java
View file @
1894f164
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.platform.service.express.shunfeng;
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.platform.service.express.shunfeng;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.commons.lang.util.*
;
import
com.liquidnet.service.kylin.dto.param.*
;
import
com.liquidnet.service.kylin.dto.param.*
;
import
com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo
;
import
com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo
;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -148,9 +150,12 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
...
@@ -148,9 +150,12 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
KylinOrderExpressRouteVo
kylinOrderExpressRouteVo
=
new
KylinOrderExpressRouteVo
();
KylinOrderExpressRouteVo
kylinOrderExpressRouteVo
=
new
KylinOrderExpressRouteVo
();
BeanUtils
.
copyProperties
(
kylinOrderExpressRoute
,
kylinOrderExpressRouteVo
);
BeanUtils
.
copyProperties
(
kylinOrderExpressRoute
,
kylinOrderExpressRouteVo
);
kylinOrderExpressRouteVo
.
setOrderTicketsId
(
orderExpressInfo
.
getOrderTicketsId
());
kylinOrderExpressRouteVo
.
setOrderTicketsId
(
orderExpressInfo
.
getOrderTicketsId
());
mongoTemplate
.
insert
(
kylinOrderExpressRouteVo
,
KylinOrderExpressRouteVo
.
class
.
getSimpleName
());
LinkedList
<
KylinOrderExpressRouteVo
>
routeList
=
dataUtils
.
getOrderExpressRoute
(
orderExpressInfo
.
getOrderTicketsId
());
if
(
null
==
routeList
)
{
dataUtils
.
delOrderExpressRoute
(
orderExpressInfo
.
getOrderTicketsId
());
routeList
=
new
LinkedList
();
}
routeList
.
addFirst
(
kylinOrderExpressRouteVo
);
dataUtils
.
setOrderExpressRoute
(
orderExpressInfo
.
getOrderTicketsId
(),
routeList
);
// 记录演出数量
// 记录演出数量
if
(
50
==
Integer
.
valueOf
(
performanceExpressPushRouteParam
.
getOpCode
())
||
80
==
Integer
.
valueOf
(
performanceExpressPushRouteParam
.
getOpCode
()))
{
if
(
50
==
Integer
.
valueOf
(
performanceExpressPushRouteParam
.
getOpCode
())
||
80
==
Integer
.
valueOf
(
performanceExpressPushRouteParam
.
getOpCode
()))
{
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/DataUtils.java
View file @
1894f164
...
@@ -378,4 +378,16 @@ public class DataUtils {
...
@@ -378,4 +378,16 @@ public class DataUtils {
redisUtil
.
del
(
redisKey
);
redisUtil
.
del
(
redisKey
);
}
}
/**
* 演出订单快递路由
*/
public
LinkedList
<
KylinOrderExpressRouteVo
>
getOrderExpressRoute
(
String
orderTicketsId
)
{
// 获取
String
redisKey
=
KylinRedisConst
.
ORDER_ROUTE_INFO
.
concat
(
orderTicketsId
);
return
(
LinkedList
<
KylinOrderExpressRouteVo
>)
redisUtil
.
get
(
redisKey
);
}
public
void
setOrderExpressRoute
(
String
orderTicketsId
,
LinkedList
<
KylinOrderExpressRouteVo
>
routeList
)
{
String
redisKey
=
KylinRedisConst
.
ORDER_ROUTE_INFO
.
concat
(
orderTicketsId
);
redisUtil
.
set
(
redisKey
,
routeList
);
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/docu/db_sweetsugar_structure.sql
View file @
1894f164
...
@@ -167,7 +167,7 @@ CREATE TABLE `sweet_manual_shop`
...
@@ -167,7 +167,7 @@ CREATE TABLE `sweet_manual_shop`
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'电子宣传手册id'
,
`manual_id`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'电子宣传手册id'
,
`title`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'商家名称'
,
`title`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'商家名称'
,
`pic_url`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'商家图片'
,
`pic_url`
varchar
(
200
)
NOT
NULL
DEFAULT
''
COMMENT
'商家图片'
,
`describe`
longtext
NULL
COMMENT
'商家介绍'
,
`describe
s
`
longtext
NULL
COMMENT
'商家介绍'
,
`type`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'1吃喝 2玩乐'
,
`type`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'1吃喝 2玩乐'
,
`is_recommend`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0不推荐 1推荐'
,
`is_recommend`
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'0不推荐 1推荐'
,
`sort`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'排序字段 数字越大越靠前'
,
`sort`
tinyint
NOT
NULL
DEFAULT
0
COMMENT
'排序字段 数字越大越靠前'
,
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetManualShopController.java
View file @
1894f164
...
@@ -36,13 +36,24 @@ public class SweetManualShopController {
...
@@ -36,13 +36,24 @@ public class SweetManualShopController {
@ApiOperation
(
"列表"
)
@ApiOperation
(
"列表"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"类型 1吃喝 2玩乐"
,
required
=
true
),
})
public
ResponseDto
<
List
<
SweetManualShop
>>
getList
(
@RequestParam
String
manualId
,
@RequestParam
Integer
type
)
{
return
sweetManualShopService
.
getList
(
manualId
,
type
);
}
@GetMapping
(
"details"
)
@ApiOperation
(
"详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualShopId"
,
value
=
"商铺id"
,
required
=
true
),
})
})
public
ResponseDto
<
List
<
SweetManualShop
>>
getList
(
@RequestParam
()
String
manual
Id
)
{
public
ResponseDto
<
SweetManualShop
>
details
(
@RequestParam
String
manualShop
Id
)
{
return
sweetManualShopService
.
getList
(
manual
Id
);
return
sweetManualShopService
.
details
(
manualShop
Id
);
}
}
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
@ApiOperation
(
"添加
列表
"
)
@ApiOperation
(
"添加"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册iid"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualId"
,
value
=
"手册iid"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
...
@@ -63,7 +74,7 @@ public class SweetManualShopController {
...
@@ -63,7 +74,7 @@ public class SweetManualShopController {
}
}
@PostMapping
(
"change"
)
@PostMapping
(
"change"
)
@ApiOperation
(
"
通知列表
"
)
@ApiOperation
(
"
修改
"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualShopId"
,
value
=
"商铺id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"manualShopId"
,
value
=
"商铺id"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"标题"
,
required
=
true
),
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetRichtextController.java
View file @
1894f164
...
@@ -41,7 +41,7 @@ public class SweetRichtextController {
...
@@ -41,7 +41,7 @@ public class SweetRichtextController {
return
sweetRichtextService
.
get
(
manualId
,
type
);
return
sweetRichtextService
.
get
(
manualId
,
type
);
}
}
@
GetMapping
(
"list
"
)
@
PostMapping
(
"add
"
)
@ApiOperation
(
"添加富文本"
)
@ApiOperation
(
"添加富文本"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"manualId"
,
value
=
"页数"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"manualId"
,
value
=
"页数"
,
required
=
true
),
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/entity/SweetManualShop.java
View file @
1894f164
...
@@ -47,7 +47,7 @@ public class SweetManualShop implements Serializable,Cloneable {
...
@@ -47,7 +47,7 @@ public class SweetManualShop implements Serializable,Cloneable {
/**
/**
* 商家介绍
* 商家介绍
*/
*/
private
String
describe
;
private
String
describe
s
;
/**
/**
* 1吃喝 2玩乐
* 1吃喝 2玩乐
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/ISweetManualShopService.java
View file @
1894f164
...
@@ -16,7 +16,9 @@ import java.util.List;
...
@@ -16,7 +16,9 @@ import java.util.List;
*/
*/
public
interface
ISweetManualShopService
extends
IService
<
SweetManualShop
>
{
public
interface
ISweetManualShopService
extends
IService
<
SweetManualShop
>
{
ResponseDto
<
List
<
SweetManualShop
>>
getList
(
String
manualId
);
ResponseDto
<
List
<
SweetManualShop
>>
getList
(
String
manualId
,
Integer
type
);
ResponseDto
<
SweetManualShop
>
details
(
String
manualShopId
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
title
,
String
picUrl
,
String
describe
,
Integer
type
,
Integer
isRecommend
,
Integer
sort
);
ResponseDto
<
Boolean
>
add
(
String
manualId
,
String
title
,
String
picUrl
,
String
describe
,
Integer
type
,
Integer
isRecommend
,
Integer
sort
);
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetManualShopServiceImpl.java
View file @
1894f164
...
@@ -31,9 +31,19 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
...
@@ -31,9 +31,19 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
private
SweetManualShopMapper
sweetManualShopMapper
;
private
SweetManualShopMapper
sweetManualShopMapper
;
@Override
@Override
public
ResponseDto
<
List
<
SweetManualShop
>>
getList
(
String
manualId
)
{
public
ResponseDto
<
List
<
SweetManualShop
>>
getList
(
String
manualId
,
Integer
type
)
{
try
{
try
{
List
<
SweetManualShop
>
data
=
sweetManualShopMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualId
,
manualId
).
eq
(
SweetManualShop:
:
getStatus
,
1
));
List
<
SweetManualShop
>
data
=
sweetManualShopMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualId
,
manualId
).
eq
(
SweetManualShop:
:
getType
,
type
).
eq
(
SweetManualShop:
:
getStatus
,
1
));
return
ResponseDto
.
success
(
data
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
}
}
@Override
public
ResponseDto
<
SweetManualShop
>
details
(
String
manualShopId
)
{
try
{
SweetManualShop
data
=
sweetManualShopMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualShopId
,
manualShopId
).
eq
(
SweetManualShop:
:
getStatus
,
1
));
return
ResponseDto
.
success
(
data
);
return
ResponseDto
.
success
(
data
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
return
ResponseDto
.
failure
();
...
@@ -48,7 +58,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
...
@@ -48,7 +58,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
sweetManualShop
.
setManualId
(
manualId
);
sweetManualShop
.
setManualId
(
manualId
);
sweetManualShop
.
setTitle
(
title
);
sweetManualShop
.
setTitle
(
title
);
sweetManualShop
.
setPicUrl
(
picUrl
);
sweetManualShop
.
setPicUrl
(
picUrl
);
sweetManualShop
.
setDescribe
(
describe
);
sweetManualShop
.
setDescribe
s
(
describe
);
sweetManualShop
.
setType
(
type
);
sweetManualShop
.
setType
(
type
);
sweetManualShop
.
setIsRecommend
(
isRecommend
);
sweetManualShop
.
setIsRecommend
(
isRecommend
);
sweetManualShop
.
setSort
(
sort
);
sweetManualShop
.
setSort
(
sort
);
...
@@ -56,6 +66,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
...
@@ -56,6 +66,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
sweetManualShopMapper
.
insert
(
sweetManualShop
);
sweetManualShopMapper
.
insert
(
sweetManualShop
);
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
();
return
ResponseDto
.
failure
();
}
}
}
}
...
@@ -66,11 +77,11 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
...
@@ -66,11 +77,11 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
SweetManualShop
sweetManualShop
=
SweetManualShop
.
getNew
();
SweetManualShop
sweetManualShop
=
SweetManualShop
.
getNew
();
sweetManualShop
.
setTitle
(
title
);
sweetManualShop
.
setTitle
(
title
);
sweetManualShop
.
setPicUrl
(
picUrl
);
sweetManualShop
.
setPicUrl
(
picUrl
);
sweetManualShop
.
setDescribe
(
describe
);
sweetManualShop
.
setDescribe
s
(
describe
);
sweetManualShop
.
setType
(
type
);
sweetManualShop
.
setType
(
type
);
sweetManualShop
.
setIsRecommend
(
isRecommend
);
sweetManualShop
.
setIsRecommend
(
isRecommend
);
sweetManualShop
.
setSort
(
sort
);
sweetManualShop
.
setSort
(
sort
);
sweetManualShopMapper
.
update
(
sweetManualShop
,
Wrappers
.
lambdaUpdate
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualShopId
,
manualShopId
));
sweetManualShopMapper
.
update
(
sweetManualShop
,
Wrappers
.
lambdaUpdate
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualShopId
,
manualShopId
));
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
return
ResponseDto
.
failure
();
...
@@ -82,7 +93,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
...
@@ -82,7 +93,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
try
{
try
{
SweetManualShop
sweetManualShop
=
SweetManualShop
.
getNew
();
SweetManualShop
sweetManualShop
=
SweetManualShop
.
getNew
();
sweetManualShop
.
setStatus
(
0
);
sweetManualShop
.
setStatus
(
0
);
sweetManualShopMapper
.
update
(
sweetManualShop
,
Wrappers
.
lambdaUpdate
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualShopId
,
manualShopId
));
sweetManualShopMapper
.
update
(
sweetManualShop
,
Wrappers
.
lambdaUpdate
(
SweetManualShop
.
class
).
eq
(
SweetManualShop:
:
getManualShopId
,
manualShopId
));
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
ResponseDto
.
failure
();
return
ResponseDto
.
failure
();
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/resources/com/liquidnet/service/sweet/mapper/SweetManualArtistsMapper.xml
View file @
1894f164
...
@@ -39,7 +39,9 @@
...
@@ -39,7 +39,9 @@
<select
id=
"getManualDetails"
parameterType=
"java.util.Map"
resultMap=
"getManualListResult"
>
<select
id=
"getManualDetails"
parameterType=
"java.util.Map"
resultMap=
"getManualListResult"
>
select manual_relation_id,
select manual_relation_id,
sa.`name`,
sa.`name`,
sa.`artists_id`,
ss.title,
ss.title,
ss.stage_id,
performance_start,
performance_start,
performance_end,
performance_end,
signature_start,
signature_start,
...
...
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