记得上下班打卡 | 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
5972bdcc
Commit
5972bdcc
authored
Aug 12, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hjc_ar_ac' into pre
parents
a5c7faf1
529ab013
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
218 additions
and
31 deletions
+218
-31
LocalAdminController.java
...t/admin/web/controller/zhengzai/LocalAdminController.java
+2
-2
GoblinSelfZhengzaiController.java
...troller/zhengzai/goblin/GoblinSelfZhengzaiController.java
+16
-5
addNewActivity.html
...templates/zhengzai/store/placingOrder/addNewActivity.html
+117
-15
IGoblinZhengzaiMarketService.java
...zhengzai/goblin/service/IGoblinZhengzaiMarketService.java
+7
-0
GoblinZhengzaiMarketServiceImpl.java
.../goblin/service/impl/GoblinZhengzaiMarketServiceImpl.java
+40
-1
GoblinRedisUtils.java
.../client/admin/zhengzai/goblin/utils/GoblinRedisUtils.java
+15
-0
GoblinSelfMarketing.java
.../liquidnet/service/goblin/entity/GoblinSelfMarketing.java
+5
-0
GoblinSelfMarketingMapper.xml
...idnet.service.goblin.mapper/GoblinSelfMarketingMapper.xml
+4
-5
SweetPerformanceServiceImpl.java
...rvice/sweet/service/impl/SweetPerformanceServiceImpl.java
+12
-3
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/LocalAdminController.java
View file @
5972bdcc
...
...
@@ -122,8 +122,8 @@ public class LocalAdminController extends BaseController
return
storePrefix
+
"/placingOrder/activityList"
;
}
@GetMapping
(
"/addNewActivity"
)
public
String
addNewActivity
(
)
{
public
String
addNewActivity
(
ModelMap
mmap
)
{
mmap
.
put
(
"platformUrl"
,
platformUrl
);
return
storePrefix
+
"/placingOrder/addNewActivity"
;
}
@GetMapping
(
"/activityStoreList"
)
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfZhengzaiController.java
View file @
5972bdcc
...
...
@@ -55,7 +55,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
@RequestParam
(
value
=
"createdAt"
,
required
=
false
)
String
ct
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
PageHelper
.
startPage
(
page
,
size
);
List
<
GoblinSelfMarketingDto
>
list
=
goblinZhengzaiMarketService
.
zhengzaiList
(
page
,
size
,
purchaseName
,
status
,
st
,
et
,
ct
).
getData
();
List
<
GoblinSelfMarketingDto
>
list
=
goblinZhengzaiMarketService
.
zhengzaiList
(
page
,
size
,
purchaseName
,
status
,
st
,
et
,
ct
).
getData
();
for
(
GoblinSelfMarketingDto
item
:
list
)
{
if
(
item
.
getStatus
()
!=
7
)
{
if
(
now
.
isBefore
(
item
.
getStartTime
()))
{
...
...
@@ -94,9 +94,8 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiOperation
(
"修改活动-正在下单"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
String
>
purchasingUpdate
(
GoblinStoreZhengzaiParam
goblinStoreZhengzaiParam
)
{
goblinZhengzaiMarketService
.
zhengzaiUpdate
(
goblinStoreZhengzaiParam
.
getMarketId
(),
goblinStoreZhengzaiParam
.
getName
(),
goblinStoreZhengzaiParam
.
getPerformanceId
(),
goblinStoreZhengzaiParam
.
getPerformanceImg
(),
goblinStoreZhengzaiParam
.
getStartTime
(),
goblinStoreZhengzaiParam
.
getEndTime
());
return
ResponseDto
.
success
();
public
ResponseDto
<
Boolean
>
purchasingUpdate
(
GoblinStoreZhengzaiParam
goblinStoreZhengzaiParam
)
{
return
goblinZhengzaiMarketService
.
zhengzaiUpdate
(
goblinStoreZhengzaiParam
.
getMarketId
(),
goblinStoreZhengzaiParam
.
getName
(),
goblinStoreZhengzaiParam
.
getPerformanceId
(),
goblinStoreZhengzaiParam
.
getPerformanceImg
(),
goblinStoreZhengzaiParam
.
getStartTime
(),
goblinStoreZhengzaiParam
.
getEndTime
());
}
@PostMapping
(
"zhengzai/details"
)
...
...
@@ -111,12 +110,24 @@ public class GoblinSelfZhengzaiController extends BaseController {
@PostMapping
(
"zhengzai/store"
)
@ApiOperation
(
"活动详情-正在下单-新增店铺"
)
@ApiOperation
(
"活动详情-正在下单-新增
/修改
店铺"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
ResponseDto
<
Boolean
>
purchasingStore
(
@RequestBody
List
<
GoblinInsertZhengzaiParam
>
params
)
{
return
goblinZhengzaiMarketService
.
zhengzaiStore
(
params
);
}
@PostMapping
(
"zhengzai/store/del"
)
@ApiOperation
(
"活动详情-正在下单-删除店铺"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"店铺id"
,
example
=
"0"
),
})
public
ResponseDto
<
Boolean
>
zhengzaiDelStore
(
@RequestParam
(
value
=
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
value
=
"storeId"
)
@Valid
String
storeId
)
{
return
goblinZhengzaiMarketService
.
zhengzaiDelStore
(
marketId
,
storeId
);
}
// @PostMapping("zhengzai/store/update")
// @ApiOperation("活动详情-正在下单-修改店铺")
// @ApiResponse(code = 200, message = "接口返回对象参数")
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/placingOrder/addNewActivity.html
View file @
5972bdcc
This diff is collapsed.
Click to expand it.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinZhengzaiMarketService.java
View file @
5972bdcc
...
...
@@ -101,6 +101,13 @@ public interface IGoblinZhengzaiMarketService {
*/
ResponseDto
<
Boolean
>
zhengzaiStore
(
List
<
GoblinInsertZhengzaiParam
>
params
);
/**
* 删除正在下单 可参与活动店铺
*
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiDelStore
(
String
marketId
,
String
storeId
);
/**
* 编辑正在下单 可参与活动店铺
*
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinZhengzaiMarketServiceImpl.java
View file @
5972bdcc
...
...
@@ -119,11 +119,17 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
@Override
public
ResponseDto
<
String
>
zhengzaiInsert
(
String
purchaseName
,
String
performanceId
,
String
img
,
String
st
,
String
et
)
{
int
count
=
goblinSelfMarketingMapper
.
selectCount
(
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
class
).
eq
(
GoblinSelfMarketing:
:
getPerformanceId
,
performanceId
).
eq
(
GoblinSelfMarketing:
:
getDelFlag
,
0
));
if
(
count
>
0
)
{
return
ResponseDto
.
failure
(
"该演出已关联活动"
);
}
GoblinSelfMarketing
selfMarketing
=
GoblinSelfMarketing
.
getNew
();
String
SelfMarketId
=
IDGenerator
.
nextTimeId2
();
selfMarketing
.
setSelfMarketId
(
SelfMarketId
);
selfMarketing
.
setName
(
purchaseName
);
selfMarketing
.
setPerformanceId
(
performanceId
);
selfMarketing
.
setPerformanceImg
(
img
);
selfMarketing
.
setType
(
GoblinStatusConst
.
MarketingStatus
.
SELF_TYPE_ZHENGZAI
.
getValue
());
selfMarketing
.
setStartTime
(
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
));
selfMarketing
.
setEndTime
(
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
));
...
...
@@ -147,9 +153,19 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
@Override
public
ResponseDto
<
Boolean
>
zhengzaiUpdate
(
String
marketId
,
String
purchaseName
,
String
performanceId
,
String
img
,
String
st
,
String
et
)
{
// GoblinSelfMarketingVo data =goblinRedisUtils.getSelfMarket(marketId);
// if(data.getPerformanceId().equals(performanceId)){
//
// }else {
int
count
=
goblinSelfMarketingMapper
.
selectCount
(
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
class
).
eq
(
GoblinSelfMarketing:
:
getPerformanceId
,
performanceId
).
ne
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
).
eq
(
GoblinSelfMarketing:
:
getDelFlag
,
0
));
if
(
count
>
0
)
{
return
ResponseDto
.
failure
(
"该演出已关联活动"
);
}
// }
GoblinSelfMarketing
selfMarketing
=
GoblinSelfMarketing
.
getNew
();
selfMarketing
.
setSelfMarketId
(
marketId
);
selfMarketing
.
setName
(
purchaseName
);
selfMarketing
.
setPerformanceImg
(
img
);
selfMarketing
.
setType
(
GoblinStatusConst
.
MarketingStatus
.
SELF_TYPE_ZHENGZAI
.
getValue
());
selfMarketing
.
setStartTime
(
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
));
selfMarketing
.
setEndTime
(
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
));
...
...
@@ -173,7 +189,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
@Override
public
ResponseDto
<
GoblinSelfMarketingVo
>
zhengzaiDetails
(
String
marketId
)
{
GoblinSelfMarketing
bean
=
goblinSelfMarketingMapper
.
selectOne
(
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
));
GoblinSelfMarketing
bean
=
goblinSelfMarketingMapper
.
selectOne
(
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
)
.
eq
(
GoblinSelfMarketing:
:
getDelFlag
,
0
)
);
GoblinSelfMarketingVo
vo
=
GoblinSelfMarketingVo
.
getNew
();
BeanUtils
.
copyProperties
(
bean
,
vo
);
vo
.
setStartTime
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
bean
.
getStartTime
()));
...
...
@@ -209,6 +225,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
entity
.
setSelfMarketId
(
marketId
);
entity
.
setStoreId
(
storeId
);
entity
.
setShowTime
(
LocalDateTime
.
parse
(
showTime
,
DTF_YMD_HMS
));
entity
.
setCreatedAt
(
LocalDateTime
.
now
());
if
(
goblinRedisUtils
.
getZhengzaiRelation
(
storeId
).
contains
(
marketId
))
{
return
ResponseDto
.
failure
(
"禁止重复添加"
);
}
...
...
@@ -264,6 +281,28 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiDelStore
(
String
marketId
,
String
storeId
)
{
try
{
GoblinMarketingZhengzaiRelation
entity
=
GoblinMarketingZhengzaiRelation
.
getNew
();
entity
.
setDelTag
(
1
);
entity
.
setUpdatedAt
(
LocalDateTime
.
now
());
entity
.
setStoreId
(
storeId
);
entity
.
setSelfMarketId
(
marketId
);
//mysql
goblinMarketingZhengzaiRelationMapper
.
update
(
entity
,
Wrappers
.
lambdaUpdate
(
GoblinMarketingZhengzaiRelation
.
getNew
()).
eq
(
GoblinMarketingZhengzaiRelation:
:
getSelfMarketId
,
marketId
).
eq
(
GoblinMarketingZhengzaiRelation:
:
getStoreId
,
storeId
));
//mongo
goblinMongoUtils
.
delZhengzaiRelation
(
marketId
,
storeId
);
//redis
goblinRedisUtils
.
delZhengzaiRelation
(
marketId
,
storeId
);
goblinRedisUtils
.
delStoreSelfRelation
(
marketId
,
storeId
);
return
ResponseDto
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
"删除失败"
);
}
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiStoreUpdate
(
List
<
GoblinInsertZhengzaiParam
>
params
)
{
for
(
GoblinInsertZhengzaiParam
item
:
params
)
{
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/utils/GoblinRedisUtils.java
View file @
5972bdcc
...
...
@@ -45,6 +45,21 @@ public class GoblinRedisUtils {
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
redisKey
);
}
/**
* 删除店铺活动
*
* @param selfMarketId
*/
public
GoblinSelfMarketingVo
getSelfMarket
(
String
selfMarketId
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_SELF_MARKET
.
concat
(
selfMarketId
);
Object
obj
=
redisDataSourceUtil
.
getRedisGoblinUtil
().
get
(
redisKey
);
if
(
obj
==
null
){
return
GoblinSelfMarketingVo
.
getNew
();
}
else
{
return
(
GoblinSelfMarketingVo
)
obj
;
}
}
/**
* 正在下单 可参加商户
*
...
...
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinSelfMarketing.java
View file @
5972bdcc
...
...
@@ -36,6 +36,11 @@ public class GoblinSelfMarketing implements Serializable, Cloneable {
*/
private
String
performanceId
;
/**
* 演出id
*/
private
String
performanceImg
;
/**
* 营销名称
*/
...
...
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinSelfMarketingMapper.xml
View file @
5972bdcc
...
...
@@ -50,8 +50,8 @@ from goblin_self_marketing as a
inner join goblin_marketing_zhengzai_relation as b on a.self_market_id = b.self_market_id
inner join goblin_store_info as c on c.store_id = b.store_id
left join goblin_marketing_zhengzai as d on d.store_id = b.store_id and d.self_market_id = b.self_market_id
where a.self_market_id = #{marketId}
GROUP BY b.store_id
where a.self_market_id = #{marketId}
and b.del_tag = 0
GROUP BY b.store_id
ORDER BY b.created_at asc
</select>
<select
id=
"getZhengzaiStoreDetails"
resultMap=
"goblinZhengzaiStoreDetailsDtoResult"
>
...
...
@@ -69,10 +69,9 @@ GROUP BY b.store_id
select
gsm.mid,gsm.name,gsm.performance_id,gsm.performance_img,gsm.created_at,gsm.updated_at,gsm.type,gsm.status,gsm.start_time,gsm.end_time,gsm.self_market_id,gsm.describes,count(gmzr.store_id)
as 'store_count'
from goblin_self_marketing as gsm left join goblin_marketing_zhengzai_relation gmzr on gsm.self_market_id =
gmzr.self_market_id
from goblin_self_marketing as gsm left join goblin_marketing_zhengzai_relation gmzr on gsm.self_market_id = gmzr.self_market_id and gmzr.del_tag !=1
<where>
del_flag = 0
gsm.
del_flag = 0
<if
test=
"purchaseName != null and purchaseName!=''"
>
and gsm.name like concat('%', #{purchaseName}, '%')
'%'
</if>
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetPerformanceServiceImpl.java
View file @
5972bdcc
...
...
@@ -49,8 +49,12 @@ public class SweetPerformanceServiceImpl extends ServiceImpl<SweetPerformanceMap
Environment
environment
;
@Override
public
ResponseDto
<
Boolean
>
add
(
String
performanceId
,
String
performanceName
,
String
arName
,
String
picOne
,
String
picTwo
,
String
arUrl
,
String
timeStart
,
String
timeEnd
,
String
fileSize
)
{
public
ResponseDto
<
Boolean
>
add
(
String
performanceId
,
String
performanceName
,
String
arName
,
String
picOne
,
String
picTwo
,
String
arUrl
,
String
timeStart
,
String
timeEnd
,
String
fileSize
)
{
try
{
int
count
=
sweetPerformanceMapper
.
selectCount
(
Wrappers
.
lambdaUpdate
(
SweetPerformanceShow
.
class
).
eq
(
SweetPerformanceShow:
:
getPerformanceId
,
performanceId
));
if
(
count
>
0
)
{
return
ResponseDto
.
failure
(
"该演出已关联活动"
);
}
String
offlineUrl
=
goblinUrl
+
"/goblin/inner/ar/data"
;
//离线地址
SweetPerformanceShow
show
=
SweetPerformanceShow
.
getNew
();
show
.
setArId
(
IDGenerator
.
nextTimeId2
());
...
...
@@ -63,8 +67,8 @@ public class SweetPerformanceServiceImpl extends ServiceImpl<SweetPerformanceMap
show
.
setStatus
(
0
);
show
.
setOfflineUrl
(
offlineUrl
);
show
.
setFileSize
(
fileSize
);
show
.
setTimeStart
(
LocalDateTime
.
parse
(
timeStart
,
DTF_YMD_HMS
));
show
.
setTimeEnd
(
LocalDateTime
.
parse
(
timeEnd
,
DTF_YMD_HMS
));
show
.
setTimeStart
(
LocalDateTime
.
parse
(
timeStart
,
DTF_YMD_HMS
));
show
.
setTimeEnd
(
LocalDateTime
.
parse
(
timeEnd
,
DTF_YMD_HMS
));
//redis
List
<
SweetPerformanceShow
>
performanceARList
=
redisUtils
.
getPerformanceAR
();
performanceARList
.
add
(
show
);
...
...
@@ -82,6 +86,11 @@ public class SweetPerformanceServiceImpl extends ServiceImpl<SweetPerformanceMap
@Override
public
ResponseDto
<
Boolean
>
change
(
SweetPerformanceShowParam
show
)
{
try
{
int
count
=
sweetPerformanceMapper
.
selectCount
(
Wrappers
.
lambdaUpdate
(
SweetPerformanceShow
.
class
).
eq
(
SweetPerformanceShow:
:
getPerformanceId
,
show
.
getPerformanceId
()).
ne
(
SweetPerformanceShow:
:
getArId
,
show
.
getArId
()));
if
(
count
>
0
)
{
return
ResponseDto
.
failure
(
"该演出已关联活动"
);
}
String
id
=
show
.
getArId
();
//修改redis
List
<
SweetPerformanceShow
>
performanceARList
=
redisUtils
.
getPerformanceAR
();
...
...
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