Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
promotion-service
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
promotion
promotion-service
Commits
638c2f1a
提交
638c2f1a
authored
5月 08, 2024
作者:
李秋林
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
店铺信息前缀统一为:store
上级
db2c9dce
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
104 行增加
和
44 行删除
+104
-44
TemporaryActivityCoreController.java
...r/activity/temporary/TemporaryActivityCoreController.java
+19
-12
TemporaryActivityReportedDao.java
...ion/domain/activity/dao/TemporaryActivityReportedDao.java
+18
-1
TemporaryActivityReportedDaoImpl.java
...n/activity/dao/impl/TemporaryActivityReportedDaoImpl.java
+9
-2
TemporaryActivityReportedDO.java
...n/activity/mapper/entity/TemporaryActivityReportedDO.java
+4
-4
QinCeClienteleStoreDao.java
...olu/promotion/domain/user/dao/QinCeClienteleStoreDao.java
+2
-0
QinCeClienteleStoreDaoImpl.java
...tion/domain/user/dao/impl/QinCeClienteleStoreDaoImpl.java
+12
-0
TemporaryActivityReportedDto.java
.../activity/temporary/dto/TemporaryActivityReportedDto.java
+4
-4
TemporaryActivityDataVo.java
...n/pojo/activity/temporary/vo/TemporaryActivityDataVo.java
+7
-14
TemporaryActivityCoreService.java
...vice/activity/temporary/TemporaryActivityCoreService.java
+3
-0
TemporaryActivityCoreServiceImpl.java
...vity/temporary/impl/TemporaryActivityCoreServiceImpl.java
+22
-0
TemporaryActivityQueryServiceImpl.java
...ity/temporary/impl/TemporaryActivityQueryServiceImpl.java
+1
-4
TemporaryActivityReportedMapper.xml
...main/resources/mapper/TemporaryActivityReportedMapper.xml
+3
-3
没有找到文件。
src/main/java/com/wangxiaolu/promotion/controller/activity/temporary/TemporaryActivityCoreController.java
浏览文件 @
638c2f1a
...
@@ -65,6 +65,25 @@ public class TemporaryActivityCoreController {
...
@@ -65,6 +65,25 @@ public class TemporaryActivityCoreController {
tempActivityCoreService
.
clockInTodayActivity
(
dto
);
tempActivityCoreService
.
clockInTodayActivity
(
dto
);
}
}
/**
* 促销员今日活动上报
* 返回活动生成id
*/
@PostMapping
(
"/today/reported"
)
public
Long
todayActivityDataReported
(
@RequestBody
@Validated
TemporaryActivityDataVo
activityVo
)
{
TemporaryActivityReportedDto
temActDto
=
new
TemporaryActivityReportedDto
();
BeanUtils
.
copyProperties
(
activityVo
,
temActDto
);
if
(
Objects
.
nonNull
(
activityVo
.
getActivityReportedId
())){
tempActivityCoreService
.
activityDataReportedUpdate
(
temActDto
);
return
activityVo
.
getActivityReportedId
();
}
return
tempActivityCoreService
.
activityDataReportedSave
(
temActDto
);
}
// 上班打卡
// 上班打卡
private
void
builderClockInData
(
TemporaryClockVo
clockVo
,
TemporaryClockDto
clockDto
,
Date
dateTime
)
{
private
void
builderClockInData
(
TemporaryClockVo
clockVo
,
TemporaryClockDto
clockDto
,
Date
dateTime
)
{
// todo if (!DateUtils.parseTime(new Date(), ClockType.TEMPORARY_CLOCK_IN_BEGIN_TIME, ClockType.TEMPORARY_CLOCK_IN_END_TIME)) {
// todo if (!DateUtils.parseTime(new Date(), ClockType.TEMPORARY_CLOCK_IN_BEGIN_TIME, ClockType.TEMPORARY_CLOCK_IN_END_TIME)) {
...
@@ -123,16 +142,4 @@ public class TemporaryActivityCoreController {
...
@@ -123,16 +142,4 @@ public class TemporaryActivityCoreController {
}
}
/**
* 促销员今日活动上报
* 返回活动生成id
*/
@PostMapping
(
"/today/reported"
)
public
Long
todayActivityDataReported
(
@RequestBody
@Validated
TemporaryActivityDataVo
activityVo
)
{
TemporaryActivityReportedDto
temActDto
=
new
TemporaryActivityReportedDto
();
BeanUtils
.
copyProperties
(
activityVo
,
temActDto
);
return
tempActivityCoreService
.
activityDataReportedSave
(
temActDto
);
}
}
}
src/main/java/com/wangxiaolu/promotion/domain/activity/dao/TemporaryActivityReportedDao.java
浏览文件 @
638c2f1a
...
@@ -11,11 +11,28 @@ import java.util.List;
...
@@ -11,11 +11,28 @@ import java.util.List;
* @describe :
* @describe :
*/
*/
public
interface
TemporaryActivityReportedDao
{
public
interface
TemporaryActivityReportedDao
{
/**
* 新增并返回id
*/
long
activityDataSave
(
TemporaryActivityReportedDto
temActDto
);
long
activityDataSave
(
TemporaryActivityReportedDto
temActDto
);
/**
* 分页查询促销员任务列表
*/
void
findListByTemporaryId
(
Long
temporaryId
,
PageInfo
pageInfo
);
void
findListByTemporaryId
(
Long
temporaryId
,
PageInfo
pageInfo
);
/**
* 查询当日任务
*/
TemporaryActivityReportedDto
findOneByCurrentDate
(
Long
temporaryId
);
TemporaryActivityReportedDto
findOneByCurrentDate
(
Long
temporaryId
);
TemporaryActivityReportedDto
findTemporaryActivityById
(
Long
activityId
);
/**
* 根据ID查询
*/
TemporaryActivityReportedDto
findOneById
(
Long
id
);
/**
* 根据ID修改
*/
void
updateById
(
TemporaryActivityReportedDto
temActDto
);
}
}
src/main/java/com/wangxiaolu/promotion/domain/activity/dao/impl/TemporaryActivityReportedDaoImpl.java
浏览文件 @
638c2f1a
...
@@ -80,11 +80,18 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
...
@@ -80,11 +80,18 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
}
}
@Override
@Override
public
TemporaryActivityReportedDto
find
TemporaryActivityById
(
Long
activityI
d
)
{
public
TemporaryActivityReportedDto
find
OneById
(
Long
i
d
)
{
TemporaryActivityReportedDO
temDO
=
temporaryActivityReportedMapper
.
selectById
(
activityI
d
);
TemporaryActivityReportedDO
temDO
=
temporaryActivityReportedMapper
.
selectById
(
i
d
);
return
transitionDto
(
temDO
);
return
transitionDto
(
temDO
);
}
}
@Override
public
void
updateById
(
TemporaryActivityReportedDto
temActDto
)
{
TemporaryActivityReportedDO
rDo
=
new
TemporaryActivityReportedDO
();
BeanUtils
.
copyProperties
(
temActDto
,
rDo
);
temporaryActivityReportedMapper
.
updateById
(
rDo
);
}
private
LambdaQueryWrapper
<
TemporaryActivityReportedDO
>
buildQueryList
(
TemporaryActivityWrapper
tw
)
{
private
LambdaQueryWrapper
<
TemporaryActivityReportedDO
>
buildQueryList
(
TemporaryActivityWrapper
tw
)
{
LambdaQueryWrapper
<
TemporaryActivityReportedDO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TemporaryActivityReportedDO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
src/main/java/com/wangxiaolu/promotion/domain/activity/mapper/entity/TemporaryActivityReportedDO.java
浏览文件 @
638c2f1a
...
@@ -35,17 +35,17 @@ public class TemporaryActivityReportedDO implements Serializable {
...
@@ -35,17 +35,17 @@ public class TemporaryActivityReportedDO implements Serializable {
/**
/**
* 关联—活动店铺id
* 关联—活动店铺id
*/
*/
private
Long
shop
Id
;
private
String
storeQc
Id
;
/**
/**
* 关联—活动店铺名称(例:小美超市)
* 关联—活动店铺名称(例:小美超市)
*/
*/
private
String
s
hop
Name
;
private
String
s
tore
Name
;
/**
/**
* 关联—活动店铺地址(例:
小美超市
)
* 关联—活动店铺地址(例:
北京朝阳北路31号1层
)
*/
*/
private
String
s
hopAddress
;
private
String
s
toreAddr
;
/**
/**
* 关联—审核人员id
* 关联—审核人员id
...
...
src/main/java/com/wangxiaolu/promotion/domain/user/dao/QinCeClienteleStoreDao.java
浏览文件 @
638c2f1a
...
@@ -20,4 +20,6 @@ public interface QinCeClienteleStoreDao {
...
@@ -20,4 +20,6 @@ public interface QinCeClienteleStoreDao {
List
<
QinCeClienteleStoreDto
>
getStoreList
(
StoreWrapper
storeWrapper
);
List
<
QinCeClienteleStoreDto
>
getStoreList
(
StoreWrapper
storeWrapper
);
QinCeClienteleStoreDto
getOneStore
(
StoreWrapper
storeWrapper
);
}
}
src/main/java/com/wangxiaolu/promotion/domain/user/dao/impl/QinCeClienteleStoreDaoImpl.java
浏览文件 @
638c2f1a
...
@@ -73,6 +73,18 @@ public class QinCeClienteleStoreDaoImpl implements QinCeClienteleStoreDao {
...
@@ -73,6 +73,18 @@ public class QinCeClienteleStoreDaoImpl implements QinCeClienteleStoreDao {
return
storeDtos
;
return
storeDtos
;
}
}
@Override
public
QinCeClienteleStoreDto
getOneStore
(
StoreWrapper
storeWrapper
)
{
LambdaQueryWrapper
<
QinCeClienteleStoreDO
>
qw
=
builderQueryWrapper
(
storeWrapper
);
// 指定字段查询
qw
.
select
(
QinCeClienteleStoreDO:
:
getQcId
,
QinCeClienteleStoreDO:
:
getStoreName
,
QinCeClienteleStoreDO:
:
getStoreAddr
);
QinCeClienteleStoreDO
qinCeClienteleStoreDO
=
qinCeClienteleStoreMapper
.
selectOne
(
qw
);
return
transitionDto
(
qinCeClienteleStoreDO
);
}
private
LambdaQueryWrapper
<
QinCeClienteleStoreDO
>
builderQueryWrapper
(
StoreWrapper
storeWrapper
){
private
LambdaQueryWrapper
<
QinCeClienteleStoreDO
>
builderQueryWrapper
(
StoreWrapper
storeWrapper
){
LambdaQueryWrapper
<
QinCeClienteleStoreDO
>
qw
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
QinCeClienteleStoreDO
>
qw
=
new
LambdaQueryWrapper
<>();
// 默认查询有效数据 >>> 门店删除状态。0:删除,1:正常:store_status = 1
// 默认查询有效数据 >>> 门店删除状态。0:删除,1:正常:store_status = 1
...
...
src/main/java/com/wangxiaolu/promotion/pojo/activity/temporary/dto/TemporaryActivityReportedDto.java
浏览文件 @
638c2f1a
...
@@ -36,17 +36,17 @@ public class TemporaryActivityReportedDto {
...
@@ -36,17 +36,17 @@ public class TemporaryActivityReportedDto {
/**
/**
* 关联—活动店铺id
* 关联—活动店铺id
*/
*/
private
Long
shop
Id
;
private
String
storeQc
Id
;
/**
/**
* 关联—活动店铺名称(例:小美超市)
* 关联—活动店铺名称(例:小美超市)
*/
*/
private
String
s
hop
Name
;
private
String
s
tore
Name
;
/**
/**
* 关联—活动店铺地址(例:
小美超市
)
* 关联—活动店铺地址(例:
北京朝阳北路31号1层
)
*/
*/
private
String
s
hopAddress
;
private
String
s
toreAddr
;
/**
/**
* 关联—审核人员id
* 关联—审核人员id
...
...
src/main/java/com/wangxiaolu/promotion/pojo/activity/temporary/vo/TemporaryActivityDataVo.java
浏览文件 @
638c2f1a
...
@@ -10,14 +10,18 @@ import javax.validation.constraints.NotNull;
...
@@ -10,14 +10,18 @@ import javax.validation.constraints.NotNull;
/**
/**
* @author : liqiulin
* @author : liqiulin
* @date : 2024-04-17 19
* @date : 2024-04-17 19
* @describe :
* @describe :
促销员今日活动上报VO
*/
*/
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
public
class
TemporaryActivityDataVo
{
public
class
TemporaryActivityDataVo
{
/**
* 促销员活动上报id
* 关联ID:temporary_activity_reported表id
*/
Long
activityReportedId
;
/**
/**
* 促销员id
* 促销员id
* temporaryInfo表id
* temporaryInfo表id
...
@@ -36,17 +40,6 @@ public class TemporaryActivityDataVo {
...
@@ -36,17 +40,6 @@ public class TemporaryActivityDataVo {
* 活动店铺Id
* 活动店铺Id
*/
*/
@NotNull
(
message
=
"活动店铺异常"
)
@NotNull
(
message
=
"活动店铺异常"
)
private
Long
shopId
;
private
String
storeQcId
;
/**
* 活动店铺
*/
private
String
shopName
;
/**
* 店铺地址
*/
private
String
shopAddress
;
}
}
src/main/java/com/wangxiaolu/promotion/service/activity/temporary/TemporaryActivityCoreService.java
浏览文件 @
638c2f1a
...
@@ -20,4 +20,7 @@ public interface TemporaryActivityCoreService {
...
@@ -20,4 +20,7 @@ public interface TemporaryActivityCoreService {
* 促销员当日打卡信息保存
* 促销员当日打卡信息保存
*/
*/
void
clockInTodayActivity
(
TemporaryClockDto
dto
);
void
clockInTodayActivity
(
TemporaryClockDto
dto
);
void
activityDataReportedUpdate
(
TemporaryActivityReportedDto
temActDto
);
}
}
src/main/java/com/wangxiaolu/promotion/service/activity/temporary/impl/TemporaryActivityCoreServiceImpl.java
浏览文件 @
638c2f1a
...
@@ -2,8 +2,11 @@ package com.wangxiaolu.promotion.service.activity.temporary.impl;
...
@@ -2,8 +2,11 @@ package com.wangxiaolu.promotion.service.activity.temporary.impl;
import
com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityClockDao
;
import
com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityClockDao
;
import
com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityReportedDao
;
import
com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityReportedDao
;
import
com.wangxiaolu.promotion.domain.user.dao.QinCeClienteleStoreDao
;
import
com.wangxiaolu.promotion.domain.user.wrapperQo.StoreWrapper
;
import
com.wangxiaolu.promotion.enums.activity.TemActApproveStatus
;
import
com.wangxiaolu.promotion.enums.activity.TemActApproveStatus
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto
;
import
com.wangxiaolu.promotion.pojo.user.dto.QinCeClienteleStoreDto
;
import
com.wangxiaolu.promotion.pojo.user.dto.TemporaryClockDto
;
import
com.wangxiaolu.promotion.pojo.user.dto.TemporaryClockDto
;
import
com.wangxiaolu.promotion.service.activity.temporary.TemporaryActivityCoreService
;
import
com.wangxiaolu.promotion.service.activity.temporary.TemporaryActivityCoreService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -21,12 +24,17 @@ import java.util.Objects;
...
@@ -21,12 +24,17 @@ import java.util.Objects;
@Slf4j
@Slf4j
public
class
TemporaryActivityCoreServiceImpl
implements
TemporaryActivityCoreService
{
public
class
TemporaryActivityCoreServiceImpl
implements
TemporaryActivityCoreService
{
// 活动上报
@Autowired
@Autowired
TemporaryActivityReportedDao
temporaryActivityReportedDao
;
TemporaryActivityReportedDao
temporaryActivityReportedDao
;
// 打卡数据
@Autowired
@Autowired
TemporaryActivityClockDao
temporaryActivityClockDao
;
TemporaryActivityClockDao
temporaryActivityClockDao
;
@Autowired
QinCeClienteleStoreDao
qinCeClienteleStoreDao
;
/**
/**
* 活动上报保存
* 活动上报保存
...
@@ -35,6 +43,11 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
...
@@ -35,6 +43,11 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
@Override
@Override
public
long
activityDataReportedSave
(
TemporaryActivityReportedDto
temActDto
)
{
public
long
activityDataReportedSave
(
TemporaryActivityReportedDto
temActDto
)
{
temActDto
.
setApproveStatus
(
TemActApproveStatus
.
SUBMITTED
);
temActDto
.
setApproveStatus
(
TemActApproveStatus
.
SUBMITTED
);
// 根据storeQcId查询店铺信息
QinCeClienteleStoreDto
storeDto
=
qinCeClienteleStoreDao
.
getOneStore
(
new
StoreWrapper
().
setQcId
(
temActDto
.
getStoreQcId
()));
temActDto
.
setStoreName
(
storeDto
.
getStoreName
()).
setStoreAddr
(
storeDto
.
getStoreAddr
());
return
temporaryActivityReportedDao
.
activityDataSave
(
temActDto
);
return
temporaryActivityReportedDao
.
activityDataSave
(
temActDto
);
}
}
...
@@ -49,4 +62,13 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
...
@@ -49,4 +62,13 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
}
}
temporaryActivityClockDao
.
updateById
(
dto
);
temporaryActivityClockDao
.
updateById
(
dto
);
}
}
/**
* 活动信息修改
* 1、判断活动是否可以修改
*/
@Override
public
void
activityDataReportedUpdate
(
TemporaryActivityReportedDto
temActDto
)
{
temporaryActivityReportedDao
.
updateById
(
temActDto
);
}
}
}
src/main/java/com/wangxiaolu/promotion/service/activity/temporary/impl/TemporaryActivityQueryServiceImpl.java
浏览文件 @
638c2f1a
package
com
.
wangxiaolu
.
promotion
.
service
.
activity
.
temporary
.
impl
;
package
com
.
wangxiaolu
.
promotion
.
service
.
activity
.
temporary
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityReportedDao
;
import
com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityReportedDao
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto
;
...
@@ -9,8 +8,6 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -9,8 +8,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* @author : liqiulin
* @author : liqiulin
* @date : 2024-04-18 13
* @date : 2024-04-18 13
...
@@ -43,7 +40,7 @@ public class TemporaryActivityQueryServiceImpl implements TemporaryActivityQuery
...
@@ -43,7 +40,7 @@ public class TemporaryActivityQueryServiceImpl implements TemporaryActivityQuery
@Override
@Override
public
TemporaryActivityReportedDto
findTemporaryActivityById
(
Long
activityId
)
{
public
TemporaryActivityReportedDto
findTemporaryActivityById
(
Long
activityId
)
{
TemporaryActivityReportedDto
dto
=
temporaryActivityReportedDao
.
find
TemporaryActivity
ById
(
activityId
);
TemporaryActivityReportedDto
dto
=
temporaryActivityReportedDao
.
find
One
ById
(
activityId
);
return
dto
;
return
dto
;
}
}
}
}
src/main/resources/mapper/TemporaryActivityReportedMapper.xml
浏览文件 @
638c2f1a
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"temporaryId"
column=
"temporary_id"
jdbcType=
"INTEGER"
/>
<result
property=
"temporaryId"
column=
"temporary_id"
jdbcType=
"INTEGER"
/>
<result
property=
"temporaryName"
column=
"temporary_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"temporaryName"
column=
"temporary_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"s
hopId"
column=
"shop
_id"
jdbcType=
"BIGINT"
/>
<result
property=
"s
toreQcId"
column=
"store_qc
_id"
jdbcType=
"BIGINT"
/>
<result
property=
"s
hopName"
column=
"shop
_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"s
toreName"
column=
"store
_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"s
hopAddress"
column=
"shop_address
"
jdbcType=
"VARCHAR"
/>
<result
property=
"s
toreAddr"
column=
"store_addr
"
jdbcType=
"VARCHAR"
/>
<result
property=
"approverId"
column=
"approver_id"
jdbcType=
"BIGINT"
/>
<result
property=
"approverId"
column=
"approver_id"
jdbcType=
"BIGINT"
/>
<result
property=
"approveName"
column=
"approve_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"approveName"
column=
"approve_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"approveStatus"
column=
"approve_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"approveStatus"
column=
"approve_status"
jdbcType=
"VARCHAR"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论