记得上下班打卡 | 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
af73c911
Commit
af73c911
authored
Dec 28, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin
parents
a580ff70
9372f2f0
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1793 additions
and
260 deletions
+1793
-260
GoblinRedisConst.java
...m/liquidnet/service/goblin/constant/GoblinRedisConst.java
+5
-2
GoblinStoreZhengzaiParam.java
...t/service/goblin/dto/manage/GoblinStoreZhengzaiParam.java
+26
-0
GoblinMarketingZhengzaiRelationVo.java
...vice/goblin/dto/vo/GoblinMarketingZhengzaiRelationVo.java
+41
-0
GoblinSelfMarketingVo.java
...iquidnet/service/goblin/dto/vo/GoblinSelfMarketingVo.java
+51
-0
GoblinZhengzaiStoreListVo.java
...dnet/service/goblin/dto/vo/GoblinZhengzaiStoreListVo.java
+27
-0
GoblinZhengzaiVo.java
...com/liquidnet/service/goblin/dto/vo/GoblinZhengzaiVo.java
+32
-0
IGoblinStorePurchasingService.java
.../goblin/service/manage/IGoblinStorePurchasingService.java
+1
-1
GoblinFrontBannerController.java
...ntroller/zhengzai/goblin/GoblinFrontBannerController.java
+41
-0
GoblinFrontHotWordController.java
...troller/zhengzai/goblin/GoblinFrontHotWordController.java
+83
-0
GoblinFrontNavigationController.java
...ller/zhengzai/goblin/GoblinFrontNavigationController.java
+105
-0
GoblinSelfZhengzaiController.java
...troller/zhengzai/goblin/GoblinSelfZhengzaiController.java
+171
-0
a.java
...ava/com/liquidnet/client/admin/zhengzai/goblin/dto/a.java
+0
-4
IGoblinFrontHotWordService.java
...n/zhengzai/goblin/service/IGoblinFrontHotWordService.java
+17
-0
IGoblinFrontNavigationService.java
...hengzai/goblin/service/IGoblinFrontNavigationService.java
+17
-0
IGoblinZhengzaiMarketService.java
...zhengzai/goblin/service/IGoblinZhengzaiMarketService.java
+111
-0
GoblinFrontBannerServiceImpl.java
...gzai/goblin/service/imp/GoblinFrontBannerServiceImpl.java
+76
-21
GoblinFrontHotWordServiceImpl.java
...zai/goblin/service/imp/GoblinFrontHotWordServiceImpl.java
+119
-0
GoblinFrontNavigationServiceImpl.java
.../goblin/service/imp/GoblinFrontNavigationServiceImpl.java
+97
-0
GoblinZhengzaiMarketServiceImpl.java
...i/goblin/service/imp/GoblinZhengzaiMarketServiceImpl.java
+215
-0
GoblinMongoUtils.java
.../client/admin/zhengzai/goblin/utils/GoblinMongoUtils.java
+51
-0
GoblinObjectUtils.java
...client/admin/zhengzai/goblin/utils/GoblinObjectUtils.java
+11
-0
GoblinRedisUtils.java
.../client/admin/zhengzai/goblin/utils/GoblinRedisUtils.java
+42
-0
GoblinZhengzaiStoreDetailsDto.java
...net/service/goblin/dto/GoblinZhengzaiStoreDetailsDto.java
+19
-0
GoblinZhengzaiStoreListDto.java
...uidnet/service/goblin/dto/GoblinZhengzaiStoreListDto.java
+11
-0
GoblinFrontHotWord.java
...m/liquidnet/service/goblin/entity/GoblinFrontHotWord.java
+78
-74
GoblinFrontNavigation.java
...iquidnet/service/goblin/entity/GoblinFrontNavigation.java
+96
-88
GoblinMarketingZhengzai.java
...uidnet/service/goblin/entity/GoblinMarketingZhengzai.java
+9
-2
GoblinMarketingZhengzaiRelation.java
...ervice/goblin/entity/GoblinMarketingZhengzaiRelation.java
+64
-0
GoblinSelfMarketing.java
.../liquidnet/service/goblin/entity/GoblinSelfMarketing.java
+16
-1
GoblinFrontHotWordMapper.java
...idnet/service/goblin/mapper/GoblinFrontHotWordMapper.java
+16
-16
GoblinFrontNavigationMapper.java
...et/service/goblin/mapper/GoblinFrontNavigationMapper.java
+16
-16
GoblinMarketingZhengzaiRelationMapper.java
.../goblin/mapper/GoblinMarketingZhengzaiRelationMapper.java
+16
-0
GoblinSelfMarketingMapper.java
...dnet/service/goblin/mapper/GoblinSelfMarketingMapper.java
+7
-0
GoblinMarketingZhengzaiRelationMapper.xml
...e.goblin.mapper/GoblinMarketingZhengzaiRelationMapper.xml
+5
-0
GoblinSelfMarketingMapper.xml
...idnet.service.goblin.mapper/GoblinSelfMarketingMapper.xml
+42
-0
MybatisPlusCodeGenerator.java
.../java/com/liquidnet/service/MybatisPlusCodeGenerator.java
+2
-34
GoblinFrontController.java
...dnet/service/goblin/controller/GoblinFrontController.java
+35
-0
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+11
-0
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+11
-0
application-dev.yml
...net-support-config/src/main/resources/application-dev.yml
+0
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinRedisConst.java
View file @
af73c911
...
@@ -3,11 +3,14 @@ package com.liquidnet.service.goblin.constant;
...
@@ -3,11 +3,14 @@ package com.liquidnet.service.goblin.constant;
public
class
GoblinRedisConst
{
public
class
GoblinRedisConst
{
public
static
final
String
PREFIX
=
"goblin:"
;
public
static
final
String
PREFIX
=
"goblin:"
;
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
public
static
String
FRONT_BANNER
=
"front_banner"
;
//前端banner
public
static
final
String
FRONT_BANNER
=
"front_banner"
;
//前端banner
public
static
final
String
FRONT_NAVIGATION
=
"front_navigation"
;
//前端banner
public
static
final
String
FRONT_HOTWORD
=
"front_hot_word"
;
//前端banner
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
public
static
final
String
REDIS_GOBLIN_SELF_MARKET
=
PREFIX
.
concat
(
"self:market:"
);
public
static
final
String
REDIS_GOBLIN_ZHENGZAI_RELATION
=
PREFIX
.
concat
(
"zhengzai:market:"
);
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreZhengzaiParam.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"GoblinStorePurchaseParam"
)
@Data
public
class
GoblinStoreZhengzaiParam
{
@ApiModelProperty
(
required
=
false
,
value
=
"活动id[添加操作不需要]"
,
example
=
"1"
)
private
String
marketId
;
@ApiModelProperty
(
required
=
true
,
value
=
"商铺id"
,
example
=
"活动名称"
)
private
String
storeId
;
@ApiModelProperty
(
required
=
true
,
value
=
"活动名称"
,
example
=
"活动名称"
)
private
String
name
;
@ApiModelProperty
(
required
=
true
,
value
=
"活动开始时间"
,
example
=
"2021-12-11 12:00:00"
)
private
String
startTime
;
@ApiModelProperty
(
required
=
true
,
value
=
"活动结束时间"
,
example
=
"2021-12-12 12:00:00"
)
private
String
endTime
;
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinMarketingZhengzaiRelationVo.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 可参加官方活动的店铺表
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinMarketingZhengzaiRelationVo
implements
Serializable
,
Cloneable
{
@ApiModelProperty
(
value
=
"官方营销表id"
)
private
String
selfMarketId
;
@ApiModelProperty
(
value
=
"商铺id"
)
private
String
storeId
;
@ApiModelProperty
(
value
=
"可显示时间"
)
private
String
showTime
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
String
createdAt
;
private
static
final
GoblinMarketingZhengzaiRelationVo
obj
=
new
GoblinMarketingZhengzaiRelationVo
();
public
static
GoblinMarketingZhengzaiRelationVo
getNew
()
{
try
{
return
(
GoblinMarketingZhengzaiRelationVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinMarketingZhengzaiRelationVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinSelfMarketingVo.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 官方(平台)营销表[活动]表
* </p>
*
* @author liquidnet
* @since 2021-12-27
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinSelfMarketingVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"官方营销表id"
)
private
String
selfMarketId
;
@ApiModelProperty
(
value
=
"营销名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"营销类型[1-正在下单]"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"营销描述"
)
private
String
desc
;
@ApiModelProperty
(
value
=
"营销开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
value
=
"营销结束时间营销为定金预售的时候,该时间也是第二阶段付款的时间营销为全款预售的时候,该时间也是发货时间"
)
private
String
endTime
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
String
createdAt
;
private
static
final
GoblinSelfMarketingVo
obj
=
new
GoblinSelfMarketingVo
();
public
static
GoblinSelfMarketingVo
getNew
()
{
try
{
return
(
GoblinSelfMarketingVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinSelfMarketingVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinZhengzaiStoreListVo.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
@Data
public
class
GoblinZhengzaiStoreListVo
implements
Cloneable
{
@ApiModelProperty
(
value
=
"商铺id"
)
String
storeId
;
@ApiModelProperty
(
value
=
"商铺名称"
)
String
storeName
;
@ApiModelProperty
(
value
=
"商铺商品数量"
)
String
spuCount
;
@ApiModelProperty
(
value
=
"商铺款式数量"
)
String
skuCount
;
private
static
final
GoblinZhengzaiStoreListVo
obj
=
new
GoblinZhengzaiStoreListVo
();
public
static
GoblinZhengzaiStoreListVo
getNew
()
{
try
{
return
(
GoblinZhengzaiStoreListVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinZhengzaiStoreListVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinZhengzaiVo.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
@Data
public
class
GoblinZhengzaiVo
implements
Cloneable
{
@ApiModelProperty
(
value
=
"活动id"
)
String
marketId
;
@ApiModelProperty
(
value
=
"活动名称"
)
String
name
;
@ApiModelProperty
(
value
=
"活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]"
)
Integer
status
;
@ApiModelProperty
(
value
=
"开始时间"
)
String
startTime
;
@ApiModelProperty
(
value
=
"结束时间"
)
String
endTime
;
@ApiModelProperty
(
value
=
"创建时间"
)
String
createdAt
;
private
static
final
GoblinZhengzaiVo
obj
=
new
GoblinZhengzaiVo
();
public
static
GoblinZhengzaiVo
getNew
()
{
try
{
return
(
GoblinZhengzaiVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinZhengzaiVo
();
}
}
}
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinStorePurchasingService.java
View file @
af73c911
...
@@ -31,7 +31,7 @@ public interface IGoblinStorePurchasingService {
...
@@ -31,7 +31,7 @@ public interface IGoblinStorePurchasingService {
ResponseDto
<
Boolean
>
purchasingStatus
(
String
marketId
,
int
status
);
ResponseDto
<
Boolean
>
purchasingStatus
(
String
marketId
,
int
status
);
/**
/**
* 添加
显示
秒杀活动
* 添加
限时
秒杀活动
*
*
* @param purchaseName 秒杀活动名称
* @param purchaseName 秒杀活动名称
* @param storeId 商铺id
* @param storeId 商铺id
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinFrontBannerController.java
View file @
af73c911
...
@@ -44,4 +44,45 @@ public class GoblinFrontBannerController extends BaseController {
...
@@ -44,4 +44,45 @@ public class GoblinFrontBannerController extends BaseController {
}
}
}
}
@PostMapping
(
"update"
)
@ApiOperation
(
value
=
"修改banner"
)
@ResponseBody
public
AjaxResult
update
(
@RequestBody
GoblinFrontBanner
goblinFrontBanner
)
{
logger
.
info
(
"修改banner{}"
,
JSON
.
toJSONString
(
goblinFrontBanner
));
boolean
result
=
goblinFrontBannerService
.
update
(
goblinFrontBanner
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"delete"
)
@ApiOperation
(
value
=
"删除banner"
)
@ResponseBody
public
AjaxResult
delete
(
@RequestBody
GoblinFrontBanner
goblinFrontBanner
)
{
logger
.
info
(
"删除banner{}"
,
JSON
.
toJSONString
(
goblinFrontBanner
));
boolean
result
=
goblinFrontBannerService
.
delte
(
goblinFrontBanner
.
getMid
());
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"getOne"
)
@ApiOperation
(
value
=
"查看详情"
)
@ResponseBody
public
AjaxResult
getOne
(
@RequestBody
GoblinFrontBanner
goblinFrontBanner
)
{
logger
.
info
(
"修改banner{}"
,
JSON
.
toJSONString
(
goblinFrontBanner
));
GoblinFrontBanner
goblinFrontBanner1
=
goblinFrontBannerService
.
getOne
(
goblinFrontBanner
.
getMid
());
return
AjaxResult
.
success
(
goblinFrontBanner1
);
}
@PostMapping
(
"page"
)
@ApiOperation
(
value
=
"分页"
)
@ResponseBody
public
AjaxResult
page
(
@RequestParam
(
name
=
"pageSize"
,
required
=
true
)
int
pageSize
,
@RequestParam
(
name
=
"pageNumber"
,
required
=
true
)
int
pageNumber
,
@RequestBody
GoblinFrontBanner
goblinFrontBanner
)
{
logger
.
info
(
"分页banner{}"
,
JSON
.
toJSONString
(
goblinFrontBanner
));
return
AjaxResult
.
success
(
goblinFrontBannerService
.
bannerPage
(
pageSize
,
pageNumber
,
null
));
}
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinFrontHotWordController.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
goblin
;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.imp.GoblinFrontHotWordServiceImpl
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 热词
前端控制器
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@RestController
@RequestMapping
(
"/hotWord"
)
public
class
GoblinFrontHotWordController
extends
BaseController
{
@Autowired
GoblinFrontHotWordServiceImpl
goblinFrontHotWordService
;
/**
* @author zhangfuxin
* @Description:添加banner
* @date 2021/12/27 下午1:22
*/
@PostMapping
(
"create"
)
@ApiOperation
(
value
=
"增加热词"
)
@ResponseBody
public
AjaxResult
create
(
@RequestBody
GoblinFrontHotWord
goblinFrontHotWord
)
{
logger
.
info
(
"增加热词{}"
,
JSON
.
toJSONString
(
goblinFrontHotWord
));
boolean
result
=
goblinFrontHotWordService
.
create
(
goblinFrontHotWord
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"update"
)
@ApiOperation
(
value
=
"修改热词"
)
@ResponseBody
public
AjaxResult
update
(
@RequestBody
GoblinFrontHotWord
goblinFrontHotWord
)
{
logger
.
info
(
"修改热词{}"
,
JSON
.
toJSONString
(
goblinFrontHotWord
));
boolean
result
=
goblinFrontHotWordService
.
update
(
goblinFrontHotWord
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"delete"
)
@ApiOperation
(
value
=
"删除热词"
)
@ResponseBody
public
AjaxResult
delete
(
@RequestBody
GoblinFrontHotWord
goblinFrontHotWord
)
{
logger
.
info
(
"删除热词{}"
,
JSON
.
toJSONString
(
goblinFrontHotWord
));
boolean
result
=
goblinFrontHotWordService
.
delete
(
goblinFrontHotWord
.
getMid
());
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"getOne"
)
@ApiOperation
(
value
=
"查看详情"
)
@ResponseBody
public
AjaxResult
getOne
(
@RequestBody
GoblinFrontHotWord
goblinFrontHotWord
)
{
logger
.
info
(
"查看详情{}"
,
JSON
.
toJSONString
(
goblinFrontHotWord
));
goblinFrontHotWord
=
goblinFrontHotWordService
.
getOne
(
goblinFrontHotWord
.
getMid
());
return
AjaxResult
.
success
(
goblinFrontHotWord
);
}
@PostMapping
(
"page"
)
@ApiOperation
(
value
=
"分页"
)
@ResponseBody
public
AjaxResult
page
(
@RequestParam
(
name
=
"pageSize"
,
required
=
true
)
int
pageSize
,
@RequestParam
(
name
=
"pageNumber"
,
required
=
true
)
int
pageNumber
,
@RequestBody
GoblinFrontHotWord
goblinFrontHotWord
)
{
logger
.
info
(
"分页banner{}"
,
JSON
.
toJSONString
(
goblinFrontHotWord
));
return
AjaxResult
.
success
(
goblinFrontHotWordService
.
page
(
pageSize
,
pageNumber
,
null
));
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinFrontNavigationController.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
goblin
;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.imp.GoblinFrontNavigationServiceImpl
;
import
com.liquidnet.service.goblin.entity.GoblinFrontBanner
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 首页导航栏
前端控制器
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Api
(
tags
=
"金刚位管理"
)
@RestController
@RequestMapping
(
"/navigation"
)
public
class
GoblinFrontNavigationController
extends
BaseController
{
@Autowired
GoblinFrontNavigationServiceImpl
goblinFrontNavigationService
;
/***
* @author zhangfuxin
* @Description: 添加金刚位
* @date 2021/12/28 上午11:22
*/
@PostMapping
(
"create"
)
@ApiOperation
(
value
=
"增加金刚位"
)
@ResponseBody
public
AjaxResult
create
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"增加金刚位{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
boolean
result
=
goblinFrontNavigationService
.
create
(
goblinFrontNavigation
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
/**
* @author zhangfuxin
* @Description:修改金刚位
* @date 2021/12/28 上午11:23
*/
@PostMapping
(
"update"
)
@ApiOperation
(
value
=
"修改金刚位"
)
@ResponseBody
public
AjaxResult
update
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"修改金刚位{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
boolean
result
=
goblinFrontNavigationService
.
update
(
goblinFrontNavigation
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
/**
* 删除金刚位
*/
@PostMapping
(
"delete"
)
@ApiOperation
(
value
=
"删除金刚位"
)
@ResponseBody
public
AjaxResult
delete
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"删除金刚位{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
boolean
result
=
goblinFrontNavigationService
.
delete
(
goblinFrontNavigation
.
getMid
());
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
/**
* 分页金刚位
*/
@PostMapping
(
"page"
)
@ApiOperation
(
value
=
"分页"
)
@ResponseBody
public
AjaxResult
page
(
@RequestParam
(
name
=
"pageSize"
,
required
=
true
)
int
pageSize
,
@RequestParam
(
name
=
"pageNumber"
,
required
=
true
)
int
pageNumber
,
@RequestBody
GoblinFrontBanner
goblinFrontBanner
)
{
logger
.
info
(
"分页banner{}"
,
JSON
.
toJSONString
(
goblinFrontBanner
));
return
AjaxResult
.
success
(
goblinFrontNavigationService
.
page
(
pageSize
,
pageNumber
,
null
));
}
/**
* @author zhangfuxin
* @Description:查看金刚位
* @date 2021/12/28 上午11:24
*/
@PostMapping
(
"getOne"
)
@ApiOperation
(
value
=
"查看金刚位"
)
@ResponseBody
public
AjaxResult
getOne
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"修改banner{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
goblinFrontNavigation
=
goblinFrontNavigationService
.
getOne
(
goblinFrontNavigation
.
getMid
());
return
AjaxResult
.
success
(
goblinFrontNavigation
);
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfZhengzaiController.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
goblin
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinZhengzaiMarketService
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiStoreListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiVo
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
io.swagger.annotations.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* 商铺活动管理
*/
@Slf4j
@RestController
@Api
(
tags
=
"活动-正在下单"
)
@RequestMapping
(
"goblin/marketing"
)
public
class
GoblinSelfZhengzaiController
extends
BaseController
{
@Autowired
IGoblinZhengzaiMarketService
goblinZhengzaiMarketService
;
@GetMapping
(
"zhengzai/list"
)
@ApiOperation
(
"活动详情-正在下单列表"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"purchaseName"
,
value
=
"活动名称"
,
example
=
""
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"Integer"
,
name
=
"status"
,
value
=
"活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]"
,
example
=
""
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"startTime"
,
value
=
"活动开始时间"
,
example
=
""
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"endTime"
,
value
=
"活动结束时间"
,
example
=
""
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"createdAt"
,
value
=
"活动创建时间"
,
example
=
""
),
})
public
TableDataInfo
purchasingList
(
@RequestParam
(
value
=
"page"
,
required
=
false
)
@Valid
Integer
page
,
@RequestParam
(
value
=
"purchaseName"
,
required
=
false
)
String
purchaseName
,
@RequestParam
(
value
=
"status"
,
required
=
false
)
Integer
status
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
st
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
et
,
@RequestParam
(
value
=
"createdAt"
,
required
=
false
)
String
ct
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
List
<
GoblinSelfMarketing
>
list
=
goblinZhengzaiMarketService
.
zhengzaiList
(
page
,
purchaseName
,
status
,
st
,
et
,
ct
).
getData
();
startPage
();
for
(
GoblinSelfMarketing
item
:
list
)
{
if
(
item
.
getStatus
()
!=
7
)
{
if
(
now
.
isBefore
(
item
.
getStartTime
()))
{
item
.
setStatus
(
0
);
}
else
if
(
now
.
isAfter
(
item
.
getEndTime
()))
{
item
.
setStatus
(
2
);
}
else
{
item
.
setStatus
(
1
);
}
}
}
return
getDataTable
(
list
);
}
@PutMapping
(
"zhengzai/status"
)
@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
=
"Integer"
,
name
=
"status"
,
value
=
"活动状态[0-等待开始|7-停用]"
,
example
=
"0"
),
})
public
ResponseDto
<
Boolean
>
purchasingStatus
(
@RequestParam
(
value
=
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
value
=
"status"
)
@Valid
Integer
status
)
{
return
goblinZhengzaiMarketService
.
zhengzaiStatus
(
marketId
,
status
);
}
@PostMapping
(
"zhengzai"
)
@ApiOperation
(
"创建活动-正在下单"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
Boolean
>
purchasingInsert
(
GoblinStoreZhengzaiParam
goblinStoreZhengzaiParam
)
{
return
goblinZhengzaiMarketService
.
zhengzaiInsert
(
goblinStoreZhengzaiParam
.
getName
(),
goblinStoreZhengzaiParam
.
getStartTime
(),
goblinStoreZhengzaiParam
.
getEndTime
());
}
@PutMapping
(
"zhengzai"
)
@ApiOperation
(
"修改活动-正在下单"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ResponseBody
public
ResponseDto
<
String
>
purchasingUpdate
(
GoblinStoreZhengzaiParam
goblinStoreZhengzaiParam
)
{
goblinZhengzaiMarketService
.
zhengzaiUpdate
(
goblinStoreZhengzaiParam
.
getMarketId
(),
goblinStoreZhengzaiParam
.
getName
(),
goblinStoreZhengzaiParam
.
getStartTime
(),
goblinStoreZhengzaiParam
.
getEndTime
());
return
ResponseDto
.
success
();
}
@GetMapping
(
"zhengzai/details"
)
@ApiOperation
(
"活动详情-正在下单"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
})
public
ResponseDto
<
GoblinZhengzaiVo
>
purchasingDetails
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
return
goblinZhengzaiMarketService
.
zhengzaiDetails
(
marketId
);
}
@PostMapping
(
"zhengzai/store"
)
@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
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"showTime"
,
value
=
"显示时间"
,
example
=
"0"
),
})
public
ResponseDto
<
Boolean
>
purchasingStore
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"showTime"
)
@Valid
String
showTime
)
{
return
goblinZhengzaiMarketService
.
zhengzaiStore
(
marketId
,
storeId
,
showTime
);
}
@PutMapping
(
"zhengzai/store"
)
@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
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"showTime"
,
value
=
"显示时间"
,
example
=
"0"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integet"
,
name
=
"delTag"
,
value
=
"是否删除[0-否|1-是]"
,
example
=
"0"
),
})
public
ResponseDto
<
Boolean
>
purchasingStore
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"showTime"
)
@Valid
String
showTime
,
@RequestParam
(
"delTag"
)
@Valid
Integer
delTag
)
{
return
goblinZhengzaiMarketService
.
zhengzaiStore
(
marketId
,
storeId
,
showTime
);
}
@GetMapping
(
"zhengzai/store/list"
)
@ApiOperation
(
"活动详情-正在下单-参加活动店铺列表"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
})
public
ResponseDto
<
List
<
GoblinZhengzaiStoreListVo
>>
purchasingSkuDel
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
)
{
return
goblinZhengzaiMarketService
.
zhengzaiStoreList
(
marketId
);
}
@GetMapping
(
"zhengzai/sku"
)
@ApiOperation
(
"活动详情-正在下单-店铺sku列表"
)
@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
=
"页数"
,
example
=
"1"
),
})
public
ResponseDto
<
String
>
purchasingSkuList
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
)
{
return
goblinZhengzaiMarketService
.
zhengzaiSkuList
(
marketId
,
storeId
);
}
@DeleteMapping
(
"zhengzai/sku"
)
@ApiOperation
(
"活动详情-正在下单-店铺sku删除"
)
@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
=
"skuId"
,
value
=
"skuId"
,
example
=
"1"
),
})
public
ResponseDto
<
Boolean
>
purchasingSkuDel
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"skuId"
)
@Valid
String
skuId
)
{
return
goblinZhengzaiMarketService
.
zhengzaiSkuDel
(
marketId
,
skuId
);
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/dto/a.java
deleted
100644 → 0
View file @
a580ff70
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
dto
;
public
class
a
{
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinFrontHotWordService.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 热词
服务类
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
public
interface
IGoblinFrontHotWordService
extends
IService
<
GoblinFrontHotWord
>
{
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinFrontNavigationService.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 首页导航栏
服务类
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
public
interface
IGoblinFrontNavigationService
extends
IService
<
GoblinFrontNavigation
>
{
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinZhengzaiMarketService.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiStoreListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiVo
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
java.util.List
;
/**
* 正在下单相关
*/
public
interface
IGoblinZhengzaiMarketService
{
/**
* 正在下单列表
*
* @param page 页数
* @param purchaseName 活动名称
* @param status 状态
* @param st 开始时间
* @param et 结束时间
* @param ct 创建时间
* @return
*/
ResponseDto
<
List
<
GoblinSelfMarketing
>>
zhengzaiList
(
int
page
,
String
purchaseName
,
int
status
,
String
st
,
String
et
,
String
ct
);
/**
* 正在状态操作
*
* @param marketId 活动秒杀id
* @param status 状态
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiStatus
(
String
marketId
,
int
status
);
/**
* 添加 正在下单活动
*
* @param purchaseName 秒杀活动名称
* @param st 开始时间
* @param et 结束时间
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiInsert
(
String
purchaseName
,
String
st
,
String
et
);
/**
* @param marketId 活动id
* @param purchaseName 秒杀活动名称
* @param st 开始时间
* @param et 结束时间
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiUpdate
(
String
marketId
,
String
purchaseName
,
String
st
,
String
et
);
/**
* 获取 限时秒杀 详情
*
* @param marketId 活动秒杀id
* @return
*/
ResponseDto
<
GoblinZhengzaiVo
>
zhengzaiDetails
(
String
marketId
);
/**
* 获取活动内sku列表
*
* @param marketId 活动秒杀id
* @param storeId 页数
* @return
*/
ResponseDto
<
String
>
zhengzaiSkuList
(
String
marketId
,
String
storeId
);
//TODO 返回值
/**
* 删除活动内sku
*
* @param marketId 活动秒杀id
* @param skuId skuId
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiSkuDel
(
String
marketId
,
String
skuId
);
/**
* 添加正在下单 可参与活动店铺
*
* @param marketId
* @param storeId
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiStore
(
String
marketId
,
String
storeId
,
String
showTime
);
/**
* 编辑正在下单 可参与活动店铺
*
* @param marketId
* @param storeId
* @return
*/
ResponseDto
<
Boolean
>
zhengzaiStore
(
String
marketId
,
String
storeId
,
String
showTime
,
Integer
delTag
);
/**
* 查看详情(参加活动的商品列表)
*
* @param marketId
* @return
*/
ResponseDto
<
List
<
GoblinZhengzaiStoreListVo
>>
zhengzaiStoreList
(
String
marketId
);
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/imp/GoblinFrontBannerServiceImpl.java
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
imp
;
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
imp
;
import
com.
liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontBannerService
;
import
com.
baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.
liquidnet.client.admin.zhengzai.kylin.utils.DataUtil
s
;
import
com.
baomidou.mybatisplus.core.toolkit.Wrapper
s
;
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.PageInfo
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontBannerService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.common.cache.redis.util.RedisGoblinUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.entity.GoblinFrontBanner
;
import
com.liquidnet.service.goblin.entity.GoblinFrontBanner
;
...
@@ -15,7 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -15,7 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
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.time.LocalDateTime
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -30,33 +31,87 @@ public class GoblinFrontBannerServiceImpl extends ServiceImpl<GoblinFrontBannerM
...
@@ -30,33 +31,87 @@ public class GoblinFrontBannerServiceImpl extends ServiceImpl<GoblinFrontBannerM
@Autowired
@Autowired
private
MongoTemplate
mongoTemplate
;
private
MongoTemplate
mongoTemplate
;
@Autowired
@Autowired
private
DataUtils
dataUtils
;
@Autowired
GoblinFrontBannerMapper
goblinFrontBannerMapper
;
GoblinFrontBannerMapper
goblinFrontBannerMapper
;
@Autowired
@Autowired
private
RedisDataSourceUtil
redisDataSourceUtil
;
private
RedisDataSourceUtil
redisDataSourceUtil
;
public
boolean
create
(
GoblinFrontBanner
goblinFrontBanner
){
public
boolean
create
(
GoblinFrontBanner
goblinFrontBanner
){
goblinFrontBanner
.
setCreateTime
(
LocalDateTime
.
now
());
//设置bannerid
//设置bannerid
goblinFrontBanner
.
setBannerId
(
GoblinRedisConst
.
FRONT_BANNER
+
IDGenerator
.
nextTimeId
());
goblinFrontBanner
.
setBannerId
(
GoblinRedisConst
.
FRONT_BANNER
+
IDGenerator
.
nextTimeId
());
//增加 banner
//增加 banner
goblinFrontBannerMapper
.
insert
(
goblinFrontBanner
);
goblinFrontBannerMapper
.
insert
(
goblinFrontBanner
);
//mongo db增加
/*
//mongo db增加
mongoTemplate.save(goblinFrontBanner,GoblinFrontBanner.class.getSimpleName());
mongoTemplate.save(goblinFrontBanner,GoblinFrontBanner.class.getSimpleName());
//redis 增加
//redis 增加
if
(
redisDataSourceUtil
.
getRedisGoblinUtil
().
hasKey
(
GoblinRedisConst
.
FRONT_BANNER
+
"0"
)){
LambdaQueryWrapper<GoblinFrontBanner> queryWrapper = Wrappers.lambdaQuery(GoblinFrontBanner.class);
//从redis里面取出
queryWrapper.ne(GoblinFrontBanner::getDelTag,1);
ArrayList
<
GoblinFrontBanner
>
list
=
(
ArrayList
<
GoblinFrontBanner
>)
redisDataSourceUtil
.
getRedisGoblinUtil
().
get
(
GoblinRedisConst
.
FRONT_BANNER
+
0
);
queryWrapper.orderByDesc(GoblinFrontBanner::getIndexs);
list
.
add
(
goblinFrontBanner
);
List<GoblinFrontBanner> list=goblinFrontBannerMapper.selectList(queryWrapper);
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_BANNER
+
"0"
,
list
);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_BANNER,list);*/
}
else
{
return
true
;
//创建一个list
}
ArrayList
<
Object
>
list
=
CollectionUtil
.
arrayListObject
();
/***
list
.
add
(
goblinFrontBanner
);
* @author zhangfuxin
//redis 没有这个键
* @Description: 修改
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
GoblinRedisConst
.
FRONT_BANNER
+
"0"
,
list
);
* @date 2021/12/27 下午4:03
}
*/
public
boolean
update
(
GoblinFrontBanner
goblinFrontBanner
){
goblinFrontBanner
.
setUpdateTime
(
LocalDateTime
.
now
());
//数据库修改
goblinFrontBannerMapper
.
updateById
(
goblinFrontBanner
);
/* //mongodb修改
BasicDBObject orderObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(goblinFrontBanner)));
mongoTemplate.getCollection(GoblinFrontBanner.class.getSimpleName()).updateOne(
Query.query(Criteria.where("bannerId").is(goblinFrontBanner.getBannerId())).getQueryObject(),
orderObject
);
//redis 修改
//从数据库中查出来,从新塞进去
LambdaQueryWrapper<GoblinFrontBanner> queryWrapper = Wrappers.lambdaQuery(GoblinFrontBanner.class);
queryWrapper.ne(GoblinFrontBanner::getDelTag,1);
queryWrapper.orderByDesc(GoblinFrontBanner::getIndexs);
List<GoblinFrontBanner> list=goblinFrontBannerMapper.selectList(queryWrapper);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_BANNER,list);*/
return
true
;
return
true
;
}
}
/**
* @author zhangfuxin
* @Description:查看详情
* @date 2021/12/27 下午4:34
*/
public
GoblinFrontBanner
getOne
(
Long
id
){
return
goblinFrontBannerMapper
.
selectById
(
id
);
}
/**
* @author zhangfuxin
* @Description: 删除 banner
* @date 2021/12/27 下午4:36
*/
public
boolean
delte
(
Long
id
){
GoblinFrontBanner
goblinFrontBanner
=
goblinFrontBannerMapper
.
selectById
(
id
);
goblinFrontBanner
.
setDelTag
(
1
);
this
.
update
(
goblinFrontBanner
);
return
true
;
}
/**
* @author zhangfuxin
* @Description:分页
* @date 2021/12/27 下午5:19
*/
public
PageInfo
<
GoblinFrontBanner
>
bannerPage
(
int
pageSize
,
int
pageNumber
,
GoblinFrontBanner
goblinFrontBanner
)
{
PageInfo
<
GoblinFrontBanner
>
pageInfoTmp
=
null
;
try
{
PageHelper
.
startPage
(
pageNumber
,
pageSize
);
LambdaQueryWrapper
<
GoblinFrontBanner
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontBanner
.
class
);
queryWrapper
.
orderByDesc
(
GoblinFrontBanner:
:
getCreateTime
);
List
<
GoblinFrontBanner
>
list
=
goblinFrontBannerMapper
.
selectList
(
queryWrapper
);
pageInfoTmp
=
new
PageInfo
(
list
);
}
catch
(
Exception
e
)
{
return
new
PageInfo
();
}
return
pageInfoTmp
;
}
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/imp/GoblinFrontHotWordServiceImpl.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
imp
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontHotWordService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
com.liquidnet.service.goblin.mapper.GoblinFrontHotWordMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* <p>
* 热词
服务实现类
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Service
public
class
GoblinFrontHotWordServiceImpl
extends
ServiceImpl
<
GoblinFrontHotWordMapper
,
GoblinFrontHotWord
>
implements
IGoblinFrontHotWordService
{
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
GoblinFrontHotWordMapper
goblinFrontHotWordMapper
;
@Autowired
private
RedisDataSourceUtil
redisDataSourceUtil
;
public
boolean
create
(
GoblinFrontHotWord
goblinFrontHotWord
){
goblinFrontHotWord
.
setCreateTime
(
LocalDateTime
.
now
());
//设置bannerid
goblinFrontHotWord
.
setHotWordId
(
GoblinRedisConst
.
FRONT_HOTWORD
+
IDGenerator
.
nextTimeId
());
//增加 banner
goblinFrontHotWordMapper
.
insert
(
goblinFrontHotWord
);
/* //mongo db增加
mongoTemplate.save(GoblinFrontHotWord,GoblinFrontHotWord.class.getSimpleName());
//redis 增加
LambdaQueryWrapper<GoblinFrontHotWord> queryWrapper = Wrappers.lambdaQuery(GoblinFrontHotWord.class);
queryWrapper.ne(GoblinFrontHotWord::getDelTag,1);
queryWrapper.orderByDesc(GoblinFrontHotWord::getIndexs);
List<GoblinFrontHotWord> list=goblinFrontBannerMapper.selectList(queryWrapper);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD,list);*/
return
true
;
}
/***
* @author zhangfuxin
* @Description: 修改
* @date 2021/12/27 下午4:03
*/
public
boolean
update
(
GoblinFrontHotWord
goblinFrontHotWord
){
goblinFrontHotWord
.
setUpdateTime
(
LocalDateTime
.
now
());
//数据库修改
goblinFrontHotWordMapper
.
updateById
(
goblinFrontHotWord
);
/*//mongodb修改
BasicDBObject orderObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(goblinFrontHotWord)));
mongoTemplate.getCollection(GoblinFrontHotWord.class.getSimpleName()).updateOne(
Query.query(Criteria.where("hotWordId").is(goblinFrontHotWord.getHotWordId())).getQueryObject(),
orderObject
);
//redis 修改
//从数据库中查出来,从新塞进去
LambdaQueryWrapper<GoblinFrontHotWord> queryWrapper = Wrappers.lambdaQuery(GoblinFrontHotWord.class);
queryWrapper.ne(GoblinFrontHotWord::getDelTag,1);
queryWrapper.orderByDesc(GoblinFrontHotWord::getIndexs);
List<GoblinFrontHotWord> list=goblinFrontHotWordMapper.selectList(queryWrapper);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD,list);*/
return
true
;
}
/**
* @author zhangfuxin
* @Description:查看详情
* @date 2021/12/27 下午4:34
*/
public
GoblinFrontHotWord
getOne
(
Long
id
){
return
goblinFrontHotWordMapper
.
selectById
(
id
);
}
/**
* @author zhangfuxin
* @Description: 删除 banner
* @date 2021/12/27 下午4:36
*/
public
boolean
delete
(
Long
id
){
GoblinFrontHotWord
goblinFrontHotWord
=
goblinFrontHotWordMapper
.
selectById
(
id
);
goblinFrontHotWord
.
setDelTag
(
1
);
this
.
update
(
goblinFrontHotWord
);
return
true
;
}
/**
* @author zhangfuxin
* @Description:分页
* @date 2021/12/27 下午5:19
*/
public
PageInfo
<
GoblinFrontHotWord
>
page
(
int
pageSize
,
int
pageNumber
,
GoblinFrontHotWord
goblinFrontHotWord
)
{
PageInfo
<
GoblinFrontHotWord
>
pageInfoTmp
=
null
;
try
{
PageHelper
.
startPage
(
pageNumber
,
pageSize
);
LambdaQueryWrapper
<
GoblinFrontHotWord
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontHotWord
.
class
);
queryWrapper
.
ne
(
GoblinFrontHotWord:
:
getDelTag
,
1
);
queryWrapper
.
orderByDesc
(
GoblinFrontHotWord:
:
getCreateTime
);
List
<
GoblinFrontHotWord
>
list
=
goblinFrontHotWordMapper
.
selectList
(
queryWrapper
);
pageInfoTmp
=
new
PageInfo
(
list
);
}
catch
(
Exception
e
)
{
return
new
PageInfo
();
}
return
pageInfoTmp
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/imp/GoblinFrontNavigationServiceImpl.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
imp
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontNavigationService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.liquidnet.service.goblin.mapper.GoblinFrontNavigationMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* <p>
* 首页导航栏
服务实现类
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Service
public
class
GoblinFrontNavigationServiceImpl
extends
ServiceImpl
<
GoblinFrontNavigationMapper
,
GoblinFrontNavigation
>
implements
IGoblinFrontNavigationService
{
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
private
GoblinFrontNavigationMapper
goblinFrontNavigationMapper
;
@Autowired
private
RedisDataSourceUtil
redisDataSourceUtil
;
public
boolean
create
(
GoblinFrontNavigation
goblinFrontNavigation
){
goblinFrontNavigation
.
setCreateTime
(
LocalDateTime
.
now
());
//设置金刚位id
goblinFrontNavigation
.
setNavigationId
(
GoblinRedisConst
.
FRONT_NAVIGATION
+
IDGenerator
.
nextTimeId
());
//mysql插入
goblinFrontNavigationMapper
.
insert
(
goblinFrontNavigation
);
/* //mongo db增加
mongoTemplate.save(goblinFrontNavigation,GoblinFrontNavigation.class.getSimpleName());
//redis增加
LambdaQueryWrapper<GoblinFrontNavigation> queryWrapper = Wrappers.lambdaQuery(GoblinFrontNavigation.class);
queryWrapper.ne(GoblinFrontNavigation::getDelTag,1);
queryWrapper.orderByDesc(GoblinFrontNavigation::getIndexs);
List<GoblinFrontNavigation> list=goblinFrontNavigationMapper.selectList(queryWrapper);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_NAVIGATION,list);*/
return
true
;
}
public
boolean
update
(
GoblinFrontNavigation
goblinFrontNavigation
){
goblinFrontNavigation
.
setUpdateTime
(
LocalDateTime
.
now
());
//数据库修改
goblinFrontNavigationMapper
.
updateById
(
goblinFrontNavigation
);
/*//mongodb修改
BasicDBObject orderObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(goblinFrontNavigation)));
mongoTemplate.getCollection(GoblinFrontNavigation.class.getSimpleName()).updateOne(
Query.query(Criteria.where("navigationId").is(goblinFrontNavigation.getNavigationId())).getQueryObject(),
orderObject
);
//redis 修改
//从数据库中查出来,从新塞进去
LambdaQueryWrapper<GoblinFrontNavigation> queryWrapper = Wrappers.lambdaQuery(GoblinFrontNavigation.class);
queryWrapper.ne(GoblinFrontNavigation::getDelTag,1);
queryWrapper.orderByDesc(GoblinFrontNavigation::getIndexs);
List<GoblinFrontNavigation> list=goblinFrontNavigationMapper.selectList(queryWrapper);
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_NAVIGATION,list);*/
return
true
;
}
public
GoblinFrontNavigation
getOne
(
Long
id
){
return
goblinFrontNavigationMapper
.
selectById
(
id
);
}
public
boolean
delete
(
Long
id
){
GoblinFrontNavigation
goblinFrontNavigation
=
goblinFrontNavigationMapper
.
selectById
(
id
);
goblinFrontNavigation
.
setDelTag
(
1
);
this
.
update
(
goblinFrontNavigation
);
return
true
;
}
public
PageInfo
<
GoblinFrontNavigation
>
page
(
int
pageSize
,
int
pageNumber
,
GoblinFrontNavigation
goblinFrontNavigation
)
{
PageInfo
<
GoblinFrontNavigation
>
pageInfoTmp
=
null
;
try
{
PageHelper
.
startPage
(
pageNumber
,
pageSize
);
LambdaQueryWrapper
<
GoblinFrontNavigation
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontNavigation
.
class
);
queryWrapper
.
orderByDesc
(
GoblinFrontNavigation:
:
getCreateTime
);
List
<
GoblinFrontNavigation
>
list
=
goblinFrontNavigationMapper
.
selectList
(
queryWrapper
);
pageInfoTmp
=
new
PageInfo
(
list
);
}
catch
(
Exception
e
)
{
return
new
PageInfo
();
}
return
pageInfoTmp
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/imp/GoblinZhengzaiMarketServiceImpl.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
imp
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinZhengzaiMarketService
;
import
com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinMongoUtils
;
import
com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinRedisUtils
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreDetailsDto
;
import
com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreListDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketingZhengzaiRelationVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiStoreListVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinZhengzaiVo
;
import
com.liquidnet.service.goblin.entity.GoblinMarketingZhengzaiRelation
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
com.liquidnet.service.goblin.mapper.GoblinMarketingZhengzaiRelationMapper
;
import
com.liquidnet.service.goblin.mapper.GoblinSelfMarketingMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
/**
* 正在下单相关
*/
@Service
public
class
GoblinZhengzaiMarketServiceImpl
implements
IGoblinZhengzaiMarketService
{
@Autowired
GoblinRedisUtils
goblinRedisUtils
;
@Autowired
GoblinMongoUtils
goblinMongoUtils
;
@Autowired
GoblinSelfMarketingMapper
goblinSelfMarketingMapper
;
@Autowired
GoblinMarketingZhengzaiRelationMapper
goblinMarketingZhengzaiRelationMapper
;
@Override
public
ResponseDto
<
List
<
GoblinSelfMarketing
>>
zhengzaiList
(
int
page
,
String
purchaseName
,
int
status
,
String
st
,
String
et
,
String
ct
)
{
LambdaUpdateWrapper
<
GoblinSelfMarketing
>
queryMapper
=
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getDelFlag
,
0
);
switch
(
status
)
{
case
0
:
//未开始
queryMapper
.
lt
(
GoblinSelfMarketing:
:
getStartTime
,
DateUtil
.
getNowTime
());
break
;
case
1
:
//进行中
queryMapper
.
ge
(
GoblinSelfMarketing:
:
getStartTime
,
DateUtil
.
getNowTime
()).
le
(
GoblinSelfMarketing:
:
getEndTime
,
DateUtil
.
getNowTime
());
break
;
case
2
:
//已结束
queryMapper
.
gt
(
GoblinSelfMarketing:
:
getEndTime
,
DateUtil
.
getNowTime
());
break
;
case
7
:
//停用
queryMapper
.
gt
(
GoblinSelfMarketing:
:
getStatus
,
GoblinStatusConst
.
MarketingStatus
.
STORE_PURCHASE_STATUS_STOP
);
break
;
}
if
(
st
!=
null
&&
et
!=
null
)
{
queryMapper
.
ge
(
GoblinSelfMarketing:
:
getStartTime
,
st
).
le
(
GoblinSelfMarketing:
:
getEndTime
,
et
);
}
if
(
ct
!=
null
)
{
queryMapper
.
eq
(
GoblinSelfMarketing:
:
getCreatedAt
,
ct
);
}
return
ResponseDto
.
success
(
goblinSelfMarketingMapper
.
selectList
(
queryMapper
));
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiStatus
(
String
marketId
,
int
status
)
{
GoblinSelfMarketing
selfMarketing
=
GoblinSelfMarketing
.
getNew
();
selfMarketing
.
setStatus
(
status
);
selfMarketing
.
setUpdatedAt
(
LocalDateTime
.
now
());
//mysql
goblinSelfMarketingMapper
.
update
(
selfMarketing
,
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
));
//mongo
GoblinSelfMarketingVo
vo
=
GoblinSelfMarketingVo
.
getNew
();
BeanUtils
.
copyProperties
(
selfMarketing
,
vo
);
goblinMongoUtils
.
updateSelfMarket
(
marketId
,
vo
);
//redis
goblinRedisUtils
.
setSelfMarket
(
marketId
,
vo
);
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiInsert
(
String
purchaseName
,
String
st
,
String
et
)
{
GoblinSelfMarketing
selfMarketing
=
GoblinSelfMarketing
.
getNew
();
String
SelfMarketId
=
IDGenerator
.
nextTimeId2
();
selfMarketing
.
setSelfMarketId
(
SelfMarketId
);
selfMarketing
.
setName
(
purchaseName
);
selfMarketing
.
setType
(
GoblinStatusConst
.
MarketingStatus
.
SELF_TYPE_ZHENGZAI
.
getValue
());
selfMarketing
.
setStartTime
(
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
));
selfMarketing
.
setEndTime
(
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
));
//mysql
goblinSelfMarketingMapper
.
insert
(
selfMarketing
);
//mongo
GoblinSelfMarketingVo
vo
=
GoblinSelfMarketingVo
.
getNew
();
BeanUtils
.
copyProperties
(
selfMarketing
,
vo
);
vo
.
setStartTime
(
st
);
vo
.
setEndTime
(
et
);
vo
.
setCreatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
selfMarketing
.
getCreatedAt
()));
goblinMongoUtils
.
insertSelfMarket
(
vo
);
//redis
goblinRedisUtils
.
setSelfMarket
(
SelfMarketId
,
vo
);
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiUpdate
(
String
marketId
,
String
purchaseName
,
String
st
,
String
et
)
{
GoblinSelfMarketing
selfMarketing
=
GoblinSelfMarketing
.
getNew
();
selfMarketing
.
setName
(
purchaseName
);
selfMarketing
.
setType
(
GoblinStatusConst
.
MarketingStatus
.
SELF_TYPE_ZHENGZAI
.
getValue
());
selfMarketing
.
setStartTime
(
LocalDateTime
.
parse
(
st
,
DTF_YMD_HMS
));
selfMarketing
.
setEndTime
(
LocalDateTime
.
parse
(
et
,
DTF_YMD_HMS
));
selfMarketing
.
setUpdatedAt
(
LocalDateTime
.
now
());
//mysql
goblinSelfMarketingMapper
.
update
(
selfMarketing
,
Wrappers
.
lambdaUpdate
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
));
//mongo
GoblinSelfMarketingVo
vo
=
GoblinSelfMarketingVo
.
getNew
();
BeanUtils
.
copyProperties
(
selfMarketing
,
vo
);
vo
.
setStartTime
(
st
);
vo
.
setEndTime
(
et
);
goblinMongoUtils
.
updateSelfMarket
(
marketId
,
vo
);
//redis
goblinRedisUtils
.
setSelfMarket
(
marketId
,
vo
);
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
GoblinZhengzaiVo
>
zhengzaiDetails
(
String
marketId
)
{
GoblinSelfMarketing
data
=
goblinSelfMarketingMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
GoblinSelfMarketing
.
getNew
()).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
marketId
));
GoblinZhengzaiVo
vo
=
GoblinZhengzaiVo
.
getNew
();
vo
.
setMarketId
(
data
.
getSelfMarketId
());
vo
.
setName
(
data
.
getName
());
vo
.
setStartTime
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
data
.
getStartTime
()));
vo
.
setEndTime
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
data
.
getEndTime
()));
vo
.
setStatus
(
data
.
getStatus
());
vo
.
setCreatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
data
.
getCreatedAt
()));
return
null
;
}
@Override
public
ResponseDto
<
List
<
GoblinZhengzaiStoreListVo
>>
zhengzaiStoreList
(
String
marketId
)
{
List
<
GoblinZhengzaiStoreListDto
>
dtoList
=
goblinSelfMarketingMapper
.
getZhengzaiStoreList
(
marketId
);
List
<
GoblinZhengzaiStoreListVo
>
voList
=
new
ArrayList
<>();
for
(
GoblinZhengzaiStoreListDto
item
:
dtoList
)
{
GoblinZhengzaiStoreListVo
vo
=
GoblinZhengzaiStoreListVo
.
getNew
();
vo
.
setStoreId
(
item
.
getStoreId
());
vo
.
setStoreName
(
item
.
getStoreName
());
vo
.
setSpuCount
(
item
.
getSpuCount
());
vo
.
setSkuCount
(
item
.
getSkuCount
());
}
return
ResponseDto
.
success
(
voList
);
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiStore
(
String
marketId
,
String
storeId
,
String
showTime
)
{
GoblinMarketingZhengzaiRelation
entity
=
GoblinMarketingZhengzaiRelation
.
getNew
();
entity
.
setSelfMarketId
(
marketId
);
entity
.
setStoreId
(
storeId
);
entity
.
setShowTime
(
LocalDateTime
.
parse
(
showTime
,
DTF_YMD_HMS
));
//mysql
goblinMarketingZhengzaiRelationMapper
.
insert
(
entity
);
//mongo
GoblinMarketingZhengzaiRelationVo
vo
=
GoblinMarketingZhengzaiRelationVo
.
getNew
();
BeanUtils
.
copyProperties
(
entity
,
vo
);
vo
.
setShowTime
(
showTime
);
vo
.
setCreatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
entity
.
getCreatedAt
()));
goblinMongoUtils
.
insertZhengzaiRelation
(
vo
);
//redis
goblinRedisUtils
.
setZhengzaiRelation
(
marketId
,
vo
);
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiStore
(
String
marketId
,
String
storeId
,
String
showTime
,
Integer
delTag
)
{
if
(
delTag
==
0
)
{
GoblinMarketingZhengzaiRelation
entity
=
GoblinMarketingZhengzaiRelation
.
getNew
();
entity
.
setShowTime
(
LocalDateTime
.
parse
(
showTime
,
DTF_YMD_HMS
));
//mysql
goblinMarketingZhengzaiRelationMapper
.
update
(
entity
,
Wrappers
.
lambdaUpdate
(
GoblinMarketingZhengzaiRelation
.
getNew
()).
eq
(
GoblinMarketingZhengzaiRelation:
:
getSelfMarketId
,
marketId
).
eq
(
GoblinMarketingZhengzaiRelation:
:
getStoreId
,
storeId
));
//mongo
GoblinMarketingZhengzaiRelationVo
vo
=
GoblinMarketingZhengzaiRelationVo
.
getNew
();
BeanUtils
.
copyProperties
(
entity
,
vo
);
vo
.
setShowTime
(
showTime
);
vo
.
setCreatedAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
entity
.
getCreatedAt
()));
goblinMongoUtils
.
updateZhengzaiRelation
(
marketId
,
storeId
,
vo
);
//redis
goblinRedisUtils
.
setZhengzaiRelation
(
marketId
,
vo
);
}
else
if
(
delTag
==
1
)
{
//mongo
goblinMongoUtils
.
delZhengzaiRelation
(
marketId
,
storeId
);
//redis
goblinRedisUtils
.
delZhengzaiRelation
(
marketId
,
storeId
);
}
return
ResponseDto
.
success
();
}
@Override
public
ResponseDto
<
String
>
zhengzaiSkuList
(
String
marketId
,
String
storeId
)
{
List
<
GoblinZhengzaiStoreDetailsDto
>
dtoList
=
goblinSelfMarketingMapper
.
getZhengzaiStoreDetails
(
marketId
,
storeId
);
return
null
;
}
@Override
public
ResponseDto
<
Boolean
>
zhengzaiSkuDel
(
String
marketId
,
String
skuId
)
{
//调用goblin商铺配置商铺接口
return
null
;
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/utils/GoblinMongoUtils.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
utils
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketingZhengzaiRelationVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo
;
import
com.liquidnet.service.goblin.entity.GoblinMarketingZhengzaiRelation
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.client.result.DeleteResult
;
import
com.mongodb.client.result.UpdateResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
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.Component
;
@Component
public
class
GoblinMongoUtils
{
@Autowired
MongoTemplate
mongoTemplate
;
@Autowired
private
MongoConverter
mongoConverter
;
public
GoblinSelfMarketingVo
insertSelfMarket
(
GoblinSelfMarketingVo
data
)
{
return
mongoTemplate
.
insert
(
data
,
GoblinSelfMarketingVo
.
class
.
getSimpleName
());
}
public
UpdateResult
updateSelfMarket
(
String
selfMarketId
,
GoblinSelfMarketingVo
data
)
{
BasicDBObject
object
=
GoblinObjectUtils
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
data
));
return
mongoTemplate
.
getCollection
(
GoblinSelfMarketing
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"selfMarketId"
).
is
(
selfMarketId
)).
getQueryObject
(),
object
);
}
public
GoblinMarketingZhengzaiRelationVo
insertZhengzaiRelation
(
GoblinMarketingZhengzaiRelationVo
data
)
{
return
mongoTemplate
.
insert
(
data
,
GoblinMarketingZhengzaiRelationVo
.
class
.
getSimpleName
());
}
public
UpdateResult
updateZhengzaiRelation
(
String
selfMarketId
,
String
storeId
,
GoblinMarketingZhengzaiRelationVo
data
)
{
BasicDBObject
object
=
GoblinObjectUtils
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
data
));
return
mongoTemplate
.
getCollection
(
GoblinMarketingZhengzaiRelationVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"selfMarketId"
).
is
(
selfMarketId
).
and
(
"storeId"
).
is
(
storeId
)).
getQueryObject
(),
object
);
}
public
DeleteResult
delZhengzaiRelation
(
String
marketId
,
String
storeId
)
{
return
mongoTemplate
.
remove
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"selfMarketId"
).
is
(
marketId
)),
GoblinMarketingZhengzaiRelationVo
.
class
.
getSimpleName
());
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/utils/GoblinObjectUtils.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
utils
;
import
com.mongodb.BasicDBObject
;
public
class
GoblinObjectUtils
{
private
static
final
BasicDBObject
basicDBObject
=
new
BasicDBObject
();
public
static
BasicDBObject
cloneBasicDBObject
()
{
return
(
BasicDBObject
)
basicDBObject
.
clone
();
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/utils/GoblinRedisUtils.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
utils
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMarketingZhengzaiRelationVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
public
class
GoblinRedisUtils
{
@Autowired
RedisDataSourceUtil
redisDataSourceUtil
;
/**
* 覆盖店铺活动
*
* @param selfMarketId
* @param data
*/
public
void
setSelfMarket
(
String
selfMarketId
,
GoblinSelfMarketingVo
data
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_SELF_MARKET
.
concat
(
selfMarketId
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
redisKey
,
data
);
}
/**
* 正在下单 可参加商户
*
* @param selfMarketId
* @param data
*/
public
void
setZhengzaiRelation
(
String
selfMarketId
,
GoblinMarketingZhengzaiRelationVo
data
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ZHENGZAI_RELATION
.
concat
(
selfMarketId
).
concat
(
":store_id:"
+
data
.
getStoreId
());
redisDataSourceUtil
.
getRedisGoblinUtil
().
set
(
redisKey
,
data
);
}
public
boolean
delZhengzaiRelation
(
String
selfMarketId
,
String
storeId
){
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ZHENGZAI_RELATION
.
concat
(
selfMarketId
).
concat
(
":store_id:"
+
storeId
);
redisDataSourceUtil
.
getRedisGoblinUtil
().
del
(
redisKey
);
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/dto/GoblinZhengzaiStoreDetailsDto.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
GoblinZhengzaiStoreDetailsDto
{
String
skuId
;
String
specName
;
String
specVname
;
BigDecimal
price
;
Integer
stock
;
Integer
skuStock
;
BigDecimal
priceMarketing
;
Integer
stockMarketing
;
Integer
buyLimit
;
Integer
buyType
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/dto/GoblinZhengzaiStoreListDto.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
dto
;
import
lombok.Data
;
@Data
public
class
GoblinZhengzaiStoreListDto
{
String
storeId
;
String
storeName
;
String
spuCount
;
String
skuCount
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinFrontHotWord.java
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
/**
import
java.io.Serializable
;
* <p>
import
java.time.LocalDateTime
;
* 热词
/**
* </p>
* <p>
*
* 热词
* @author liquidnet
* @since 2021-12-27
* </p>
*/
*
@Data
* @author liquidnet
@EqualsAndHashCode
(
callSuper
=
false
)
* @since 2021-12-28
public
class
GoblinFrontHotWord
implements
Serializable
{
*/
@Data
private
static
final
long
serialVersionUID
=
1L
;
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinFrontHotWord
implements
Serializable
{
/**
* 主键
private
static
final
long
serialVersionUID
=
1L
;
*/
private
Long
mid
;
/**
* 主键
/**
*/
* 热词
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
*/
private
Long
mid
;
private
String
word
;
/**
/**
* 热词
* 1开启2未开启
*/
*/
private
String
word
;
private
Integer
status
;
/**
/**
* 1开启2未开启
* 排序
*/
*/
private
Integer
status
;
private
Integer
indexs
;
/**
/**
* 排序
* 1、滚动2、按时切换
*/
*/
private
Integer
indexs
;
private
Integer
changeType
;
/**
/**
* 1、滚动2、按时切换
* 切换时间单位为s
*/
*/
private
Integer
changeType
;
private
Integer
changeTime
;
/**
/**
* 切换时间单位为s
* 创建时间
*/
*/
private
Integer
changeTime
;
private
LocalDateTime
createTime
;
/**
/**
* 创建时间
* 修改时间
*/
*/
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
/**
/**
* 修改时间
* 热词id
*/
*/
private
LocalDateTime
updateTime
;
private
String
hotWordId
;
/**
/**
* 热词id
* 0未删除1已删除
*/
*/
private
String
hotWordId
;
private
Integer
delTag
;
/**
* 0未删除1已删除
}
*/
private
Integer
delTag
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinFrontNavigation.java
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
lombok.Data
;
/**
import
lombok.EqualsAndHashCode
;
* <p>
/**
* <p>
* 首页导航栏
* 首页导航栏
* </p>
* </p>
*
*
* @author liquidnet
* @author liquidnet
* @since 2021-12-27
* @since 2021-12-28
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinFrontNavigation
implements
Serializable
{
public
class
GoblinFrontNavigation
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 主键
* 主键
*/
*/
private
Long
mid
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 图片路径或id
/**
*/
* 图片路径或id
private
String
picUrl
;
*/
private
String
picUrl
;
/**
* 标题
/**
*/
* 标题
private
String
title
;
*/
private
String
title
;
/**
* 商品id
/**
*/
* 商品id
private
String
spuId
;
*/
private
String
spuId
;
/**
* 展示形式:1、一行2、二行
/**
*/
* 展示形式:1、一行2、二行
private
Integer
displayType
;
*/
private
Integer
displayType
;
/**
* 分类
/**
*/
* 分类
private
String
categoryType
;
*/
private
String
categoryType
;
/**
* 活动链接
/**
*/
* 活动链接
private
String
activityUrl
;
*/
private
String
activityUrl
;
/**
* 1、分类2、专题3、商品单品
/**
*/
* 1、分类2、专题3、商品单品
private
Integer
navigationType
;
*/
private
Integer
navigationType
;
/**
* 顺序
/**
*/
* 顺序
private
Integer
indexs
;
*/
private
Integer
indexs
;
/**
* 创建时间
/**
*/
* 创建时间
private
LocalDateTime
createTime
;
*/
private
LocalDateTime
createTime
;
/**
* 修改时间
/**
*/
* 修改时间
private
LocalDateTime
updateTime
;
*/
private
LocalDateTime
updateTime
;
/**
* 导航id
/**
*/
* 导航id
private
String
navigationId
;
*/
private
String
navigationId
;
/**
* 0未删除1已删除
/**
*/
* 0未删除1已删除
private
Integer
delTag
;
*/
private
Integer
delTag
;
}
/**
* 商品名字
*/
private
String
spuName
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinMarketingZhengzai.java
View file @
af73c911
...
@@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode;
...
@@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinMarketingZhengzai
implements
Serializable
{
public
class
GoblinMarketingZhengzai
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -76,5 +76,12 @@ public class GoblinMarketingZhengzai implements Serializable {
...
@@ -76,5 +76,12 @@ public class GoblinMarketingZhengzai implements Serializable {
private
String
comment
;
private
String
comment
;
private
static
final
GoblinMarketingZhengzai
obj
=
new
GoblinMarketingZhengzai
();
public
static
GoblinMarketingZhengzai
getNew
()
{
try
{
return
(
GoblinMarketingZhengzai
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinMarketingZhengzai
();
}
}
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinMarketingZhengzaiRelation.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 可参加官方活动的店铺表
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinMarketingZhengzaiRelation
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 官方营销表id
*/
private
String
selfMarketId
;
/**
* 商铺id
*/
private
String
storeId
;
/**
* 可显示时间
*/
private
LocalDateTime
showTime
;
/**
* 删除标记[0-未删除|1-删除]
*/
private
Integer
delTag
;
private
LocalDateTime
createdAt
;
private
LocalDateTime
updatedAt
;
private
String
comment
;
private
static
final
GoblinMarketingZhengzaiRelation
obj
=
new
GoblinMarketingZhengzaiRelation
();
public
static
GoblinMarketingZhengzaiRelation
getNew
()
{
try
{
return
(
GoblinMarketingZhengzaiRelation
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinMarketingZhengzaiRelation
();
}
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinSelfMarketing.java
View file @
af73c911
...
@@ -2,8 +2,10 @@ package com.liquidnet.service.goblin.entity;
...
@@ -2,8 +2,10 @@ package com.liquidnet.service.goblin.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
@@ -17,7 +19,7 @@ import lombok.EqualsAndHashCode;
...
@@ -17,7 +19,7 @@ import lombok.EqualsAndHashCode;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinSelfMarketing
implements
Serializable
{
public
class
GoblinSelfMarketing
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -39,6 +41,11 @@ public class GoblinSelfMarketing implements Serializable {
...
@@ -39,6 +41,11 @@ public class GoblinSelfMarketing implements Serializable {
*/
*/
private
Integer
type
;
private
Integer
type
;
/**
* 活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]
*/
private
Integer
status
;
/**
/**
* 营销描述
* 营销描述
*/
*/
...
@@ -65,5 +72,13 @@ public class GoblinSelfMarketing implements Serializable {
...
@@ -65,5 +72,13 @@ public class GoblinSelfMarketing implements Serializable {
private
String
comment
;
private
String
comment
;
private
static
final
GoblinSelfMarketing
obj
=
new
GoblinSelfMarketing
();
public
static
GoblinSelfMarketing
getNew
()
{
try
{
return
(
GoblinSelfMarketing
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
GoblinSelfMarketing
();
}
}
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinFrontHotWordMapper.java
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
com.liquidnet.service.goblin.entity.GoblinFrontHotWord
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
/**
* <p>
* <p>
* 热词
* 热词
Mapper 接口
Mapper 接口
* </p>
* </p>
*
*
* @author liquidnet
* @author liquidnet
* @since 2021-12-2
7
* @since 2021-12-2
8
*/
*/
public
interface
GoblinFrontHotWordMapper
extends
BaseMapper
<
GoblinFrontHotWord
>
{
public
interface
GoblinFrontHotWordMapper
extends
BaseMapper
<
GoblinFrontHotWord
>
{
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinFrontNavigationMapper.java
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
/**
* <p>
* <p>
* 首页导航栏
* 首页导航栏
Mapper 接口
Mapper 接口
* </p>
* </p>
*
*
* @author liquidnet
* @author liquidnet
* @since 2021-12-2
7
* @since 2021-12-2
8
*/
*/
public
interface
GoblinFrontNavigationMapper
extends
BaseMapper
<
GoblinFrontNavigation
>
{
public
interface
GoblinFrontNavigationMapper
extends
BaseMapper
<
GoblinFrontNavigation
>
{
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinMarketingZhengzaiRelationMapper.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinMarketingZhengzaiRelation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 可参加官方活动的店铺表 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
public
interface
GoblinMarketingZhengzaiRelationMapper
extends
BaseMapper
<
GoblinMarketingZhengzaiRelation
>
{
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinSelfMarketingMapper.java
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreDetailsDto
;
import
com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreListDto
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 官方(平台)营销表[活动]表 Mapper 接口
* 官方(平台)营销表[活动]表 Mapper 接口
...
@@ -13,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -13,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
GoblinSelfMarketingMapper
extends
BaseMapper
<
GoblinSelfMarketing
>
{
public
interface
GoblinSelfMarketingMapper
extends
BaseMapper
<
GoblinSelfMarketing
>
{
List
<
GoblinZhengzaiStoreListDto
>
getZhengzaiStoreList
(
String
marketId
);
List
<
GoblinZhengzaiStoreDetailsDto
>
getZhengzaiStoreDetails
(
String
marketId
,
String
storeId
);
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinMarketingZhengzaiRelationMapper.xml
0 → 100644
View file @
af73c911
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinMarketingZhengzaiRelationMapper"
>
</mapper>
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinSelfMarketingMapper.xml
View file @
af73c911
...
@@ -2,4 +2,46 @@
...
@@ -2,4 +2,46 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinSelfMarketingMapper"
>
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinSelfMarketingMapper"
>
<resultMap
id=
"goblinZhengzaiStoreListDtoResult"
type=
"com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreListDto"
>
<result
column=
"store_id"
property=
"storeId"
/>
<result
column=
"store_name"
property=
"storeName"
/>
<result
column=
"spu_count"
property=
"spuCount"
/>
<result
column=
"sku_count"
property=
"skuCount"
/>
</resultMap>
<resultMap
id=
"goblinZhengzaiStoreDetailsDtoResult"
type=
"com.liquidnet.service.goblin.dto.GoblinZhengzaiStoreDetailsDto"
>
<result
column=
"sku_id"
property=
"skuId"
/>
<result
column=
"spec_name"
property=
"specName"
/>
<result
column=
"spec_vname"
property=
"specVname"
/>
<result
column=
"price"
property=
"price"
/>
<result
column=
"stock"
property=
"stock"
/>
<result
column=
"sku_stock"
property=
"skuStock"
/>
<result
column=
"price_marketing"
property=
"priceMarketing"
/>
<result
column=
"stock_marketing"
property=
"stockMarketing"
/>
<result
column=
"buy_limit"
property=
"buyLimit"
/>
<result
column=
"buy_type"
property=
"buyType"
/>
</resultMap>
<select
id=
"getZhengzaiStoreList"
resultMap=
"goblinZhengzaiStoreListDtoResult"
>
select gsz.store_id, a.store_name, sum(gsz.spu_id), sum(sku_id)
from goblin_marketing_zhengzai as gsz
inner join (select gsi.store_name, gsi.store_id
from goblin_marketing_zhengzai_relation as gmzr
left join goblin_store_info as gsi on gmzr.store_id = gsi.store_id
where del_tag = 0) as a on gsz.store_id = a.store_id
where gsz.self_market_id = #{marketId}
group by gsz.store_id
</select>
<select
id=
"getZhengzaiStoreDetails"
resultMap=
"goblinZhengzaiStoreDetailsDtoResult"
>
select ggsku.sku_id,price,spec_name, spec_vname, ggsku.stock, ggsku.sku_stock from goblin_goods_sku ggsku
inner join goblin_goods_sku_spec_value ggssv on ggsku.sku_id = ggssv.sku_id
left join (select spec_name, spec_vname, ggs.spec_id
from goblin_goods_spec ggs
inner join goblin_goods_spec_value ggsv on ggsv.spec_id = ggs.spec_id) as a
on a.spec_id = ggssv.spec_id where ggsku.sku_id in (
select sku_id from goblin_marketing_zhengzai where self_market_id = #{marketId} and store_id = #{storeId}
)
</select>
</mapper>
</mapper>
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/MybatisPlusCodeGenerator.java
View file @
af73c911
...
@@ -93,42 +93,10 @@ public class MybatisPlusCodeGenerator {
...
@@ -93,42 +93,10 @@ public class MybatisPlusCodeGenerator {
dsc
.
setUsername
(
"testmall"
);
dsc
.
setUsername
(
"testmall"
);
dsc
.
setPassword
(
"zhengzai!mYT"
);
dsc
.
setPassword
(
"zhengzai!mYT"
);
String
resourcePath
=
"/Users/
zhanggb
/Downloads/tmp"
;
String
resourcePath
=
"/Users/
hujiachen
/Downloads/tmp"
;
String
directory
=
"com.liquidnet.service.goblin"
;
String
directory
=
"com.liquidnet.service.goblin"
;
String
[]
dbTableArray
=
new
String
[]{
String
[]
dbTableArray
=
new
String
[]{
"goblin_back_order"
,
"goblin_marketing_zhengzai_relation"
"goblin_back_order_log"
,
"goblin_front_banner"
,
"goblin_front_hot_word"
,
"goblin_front_navigation"
,
"goblin_front_seckill"
,
"goblin_goods"
,
"goblin_goods_category_spec"
,
"goblin_goods_image"
,
"goblin_goods_service_support"
,
"goblin_goods_sku"
,
"goblin_goods_sku_spec_value"
,
"goblin_goods_spec"
,
"goblin_goods_spec_value"
,
"goblin_goods_spu_spec_value"
,
"goblin_goods_spu_tag"
,
"goblin_marketing_zhengzai"
,
"goblin_order_attr"
,
"goblin_order_operation_log"
,
"goblin_order_sku"
,
"goblin_self_extag"
,
"goblin_self_goods_category"
,
"goblin_self_goods_tag"
,
"goblin_self_marketing"
,
"goblin_service_support"
,
"goblin_shopping_cart"
,
"goblin_store_certification"
,
"goblin_store_config"
,
"goblin_store_goods_category"
,
"goblin_store_info"
,
"goblin_store_market_relation"
,
"goblin_store_marketing"
,
"goblin_store_order"
};
};
doGenerator
(
resourcePath
,
dsc
,
directory
,
dbTableArray
);
doGenerator
(
resourcePath
,
dsc
,
directory
,
dbTableArray
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinFrontController.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.entity.GoblinFrontBanner
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author zhangfuxin
* @Description:前端接口
* @date 2021/12/27 下午6:25
*/
@Api
(
tags
=
"前端接口管理"
)
@RestController
@RequestMapping
(
"/front"
)
public
class
GoblinFrontController
{
@Autowired
private
RedisDataSourceUtil
redisDataSourceUtil
;
@GetMapping
(
"getBanner"
)
@ApiOperation
(
"获取banner"
)
public
ResponseDto
getBanner
()
{
//redis里获取banner
return
ResponseDto
.
success
(
redisDataSourceUtil
.
getRedisGoblinUtil
().
get
(
GoblinRedisConst
.
FRONT_BANNER
+
"0"
));
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
util
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Component
;
@Component
public
class
GoblinMongoUtils
{
@Autowired
MongoTemplate
mongoTemplate
;
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
0 → 100644
View file @
af73c911
package
com
.
liquidnet
.
service
.
goblin
.
util
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
public
class
GoblinRedisUtils
{
@Autowired
RedisDataSourceUtil
redisDataSourceUtil
;
}
liquidnet-bus-support/liquidnet-support-config/src/main/resources/application-dev.yml
View file @
af73c911
...
@@ -18,7 +18,6 @@ liquidnet:
...
@@ -18,7 +18,6 @@ liquidnet:
username
:
admin
username
:
admin
password
:
admin
password
:
admin
config
:
config
:
# location: /Users/color/company_project/java/liquidnet-bus-v1-1/liquidnet-bus-config/liquidnet-config
# location: /Users/hujiachen/IdeaProjects/liquidnet-bus-v1/liquidnet-bus-config/liquidnet-config
# location: /Users/hujiachen/IdeaProjects/liquidnet-bus-v1/liquidnet-bus-config/liquidnet-config
location
:
/app/support-config
location
:
/app/support-config
# end-dev-这里是配置信息基本值
# end-dev-这里是配置信息基本值
...
...
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