提交 94eb37fb authored 作者: 000516's avatar 000516 提交者: Coding

1、导入活动门店;2、活动门店修改活动模式、状态、删除、新建门店操作;3、促销员打卡门店切换为活动计划门店

1. 管理后台-导入活动门店 2. 管理后台-解析门店列表(并做限制校验,校验出错时删除云存储中的excel文件) 3. 管理后台-活动门店列表分页查询(按条件模糊查询)、导入记录 4. 管理后台-活动门店修改活动模式、状态、删除、新建门店操作 5. 管理后台-打卡、上报记录中的门店来源切换为活动门店 6. 管理后台-添加隐藏侧边栏功能 7. 管理后台-门店模块隐藏 8. 管理后台- 上传模版规划 9. 小程序-促销员隐藏新建门店入口 10. 小程序-促销员打卡门店切换为活动计划门店
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<groupId>com.wangxiaolu</groupId> <groupId>com.wangxiaolu</groupId>
<artifactId>wangxiaolu-promotion-service</artifactId> <artifactId>wangxiaolu-promotion-service</artifactId>
<version>0.1.9</version> <version>0.1.10</version>
<name>wangxiaolu-promotion-service</name> <name>wangxiaolu-promotion-service</name>
<description>promotion-service</description> <description>promotion-service</description>
...@@ -90,10 +90,10 @@ ...@@ -90,10 +90,10 @@
</dependency> </dependency>
<!-- Web 场景启动器) 来为 Web 开发予以支持。spring-boot-starter-web 为我们提供了嵌入的 Servlet 容器以及 SpringMVC 的依赖,并为 Spring MVC 提供了大量自动配置,可以适用于大多数 Web 开发场景。--> <!-- Web 场景启动器) 来为 Web 开发予以支持。spring-boot-starter-web 为我们提供了嵌入的 Servlet 容器以及 SpringMVC 的依赖,并为 Spring MVC 提供了大量自动配置,可以适用于大多数 Web 开发场景。-->
<dependency> <!-- <dependency>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-web</artifactId> <!-- <artifactId>spring-boot-starter-web</artifactId>-->
</dependency> <!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop --> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop -->
<dependency> <dependency>
......
package com.wangxiaolu.promotion.controller.activity.manage;
import com.wangxiaolu.promotion.service.activity.manage.ActivityTypeQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author : liqiulin
* @date : 2024-09-10 13
* @describe :
*/
@RestController
@RequestMapping("/activity/employee/xxl_job")
public class XxlJobController {
@Autowired
private ActivityTypeQueryService activityTypeQueryService;
@GetMapping("/activity_type_pattern")
public void activityTypePattern(){
activityTypeQueryService.patternToRedis();
}
}
...@@ -9,10 +9,7 @@ import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoCoreServ ...@@ -9,10 +9,7 @@ import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoCoreServ
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @author : liqiulin * @author : liqiulin
...@@ -35,4 +32,10 @@ public class ActivityPlanInfoCoreController { ...@@ -35,4 +32,10 @@ public class ActivityPlanInfoCoreController {
activityPlanInfoCoreService.updateActivityInfo(activityPlanInfoVo); activityPlanInfoCoreService.updateActivityInfo(activityPlanInfoVo);
return R.success(); return R.success();
} }
@PostMapping("/save")
public R saveOne(@RequestBody ActivityPlanInfoVo activityPlanInfoVo){
activityPlanInfoCoreService.save(activityPlanInfoVo);
return R.success();
}
} }
package com.wangxiaolu.promotion.controller.activity.manage.activityplan; package com.wangxiaolu.promotion.controller.activity.manage.activityplan;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanVo;
import com.wangxiaolu.promotion.result.basedata.R; import com.wangxiaolu.promotion.result.basedata.R;
import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoQueryService; import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoQueryService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -17,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/activity/employee/plan_info/core") @RequestMapping("/activity/employee/plan_info/query")
public class ActivityPlanInfoQueryController { public class ActivityPlanInfoQueryController {
@Autowired @Autowired
...@@ -28,4 +30,13 @@ public class ActivityPlanInfoQueryController { ...@@ -28,4 +30,13 @@ public class ActivityPlanInfoQueryController {
activityPlanInfoQueryService.findActivityPlanInfoPage(pageInfo); activityPlanInfoQueryService.findActivityPlanInfoPage(pageInfo);
return R.success(pageInfo); return R.success(pageInfo);
} }
/**
* 查询当前城市经理下,是否存在重复的有效店铺名
* @return 店铺列表
*/
@PostMapping("/one")
public R findStore(@RequestBody ActivityPlanInfoVo activityPlanInfoVo){
return R.success(activityPlanInfoQueryService.findActivityPlanInfoOne(activityPlanInfoVo));
}
} }
...@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.controller.activity.manage.activityplan; ...@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.controller.activity.manage.activityplan;
import com.wangxiaolu.promotion.common.util.NumberUtils; import com.wangxiaolu.promotion.common.util.NumberUtils;
import com.wangxiaolu.promotion.exception.DataException; import com.wangxiaolu.promotion.exception.DataException;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto; import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanRecordDto; import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanRecordDto;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo; import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo;
...@@ -42,6 +43,11 @@ public class ActivityPlanRecordCoreController { ...@@ -42,6 +43,11 @@ public class ActivityPlanRecordCoreController {
String[] urlArr = activityPlanVo.getExcelUrl().split("weda-uploader/"); String[] urlArr = activityPlanVo.getExcelUrl().split("weda-uploader/");
String fileId = urlArr[urlArr.length - 1]; String fileId = urlArr[urlArr.length - 1];
if (fileId.length() > 53){
throw new DataException(RCode.ACTIVITY_PLAN_FILENAME_LONG);
}
planDto.setExcelFiledId(fileId); planDto.setExcelFiledId(fileId);
activityPlanRecordCoreService.saveActivityPlan(planDto, activityPlanVo); activityPlanRecordCoreService.saveActivityPlan(planDto, activityPlanVo);
return R.success(); return R.success();
......
package com.wangxiaolu.promotion.controller.activity.manage.activityplan;
import com.wangxiaolu.promotion.result.basedata.R;
import com.wangxiaolu.promotion.service.activity.manage.ActivityTypeQueryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author : liqiulin
* @date : 2024-09-10 14
* @describe :
*/
@Slf4j
@RestController
@RequestMapping("/activity/employee/activity_type/query")
public class ActivityTypeQueryController {
@Autowired
ActivityTypeQueryService activityTypeQueryService;
@GetMapping("/pattern")
public R getActivityPattern(){
return R.success(activityTypeQueryService.getActivityPattern());
}
}
...@@ -127,9 +127,7 @@ public class TemporaryActivityClockCoreController { ...@@ -127,9 +127,7 @@ public class TemporaryActivityClockCoreController {
.setClockInAddress(clockVo.getClockAddress()) .setClockInAddress(clockVo.getClockAddress())
.setClockInCoordinates(clockVo.getClockCoordinates()) .setClockInCoordinates(clockVo.getClockCoordinates())
.setClockInPhoto(clockVo.getClockPhoto()) .setClockInPhoto(clockVo.getClockPhoto())
.setClockInTime(dateTime) .setClockInTime(dateTime);
.setActivityPatternId(clockVo.getActivityPatternId())
.setActivityPattern(clockVo.getActivityPattern());
} }
// 午休下班卡 // 午休下班卡
......
...@@ -47,7 +47,7 @@ public class TemporaryActivityCoreController { ...@@ -47,7 +47,7 @@ public class TemporaryActivityCoreController {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@PostMapping("/today/reported") @PostMapping("/today/reported")
public R todayActivityDataReported(@RequestHeader("Authorization") String authorization, @RequestBody TemporaryActivityDataVo activityVo) { public R todayActivityDataReported(@RequestBody TemporaryActivityDataVo activityVo) {
if (Objects.isNull(activityVo.getTemporaryId())){ if (Objects.isNull(activityVo.getTemporaryId())){
throw new ParamException(RCode.LOGIN_PARAM_ERROR); throw new ParamException(RCode.LOGIN_PARAM_ERROR);
} }
...@@ -66,23 +66,23 @@ public class TemporaryActivityCoreController { ...@@ -66,23 +66,23 @@ public class TemporaryActivityCoreController {
/** /**
* 新增任务 * 新增任务
*/ */
JSONObject userJson = redisCache.getToJson(RedisKeys.UserKeys.TEMPORARY_TOKEN.getKey() + authorization);
if (Objects.isNull(userJson)) {
throw new ParamException(RCode.NOT_LOGIN_ERROR, null);
}
TemporaryClockDto clockDto = tempActivityClockQueryService.findTodayTemporaryClockByTemId(temActDto.getTemporaryId()); TemporaryClockDto clockDto = tempActivityClockQueryService.findTodayTemporaryClockByTemId(temActDto.getTemporaryId());
temActDto.setApproveStatus(TemActApproveStatus.SUBMITTED); temActDto.setApproveStatus(TemActApproveStatus.SUBMITTED)
temActDto.setApproverId(userJson.getString("chargerQcId")); .setLineName(clockDto.getLineName())
temActDto.setApproveName(userJson.getString("chargerName")); .setStoreName(clockDto.getStoreName())
temActDto.setActivityPatternId(clockDto.getActivityPatternId()); .setDeptQcId(clockDto.getDeptQcId())
temActDto.setActivityPattern(clockDto.getActivityPattern()); .setDeptQcOrgName(clockDto.getDeptQcOrgName())
.setApproverId(clockDto.getChargerQcId())
.setApproveName(clockDto.getChargerName())
.setActivityPatternId(clockDto.getActivityPatternId())
.setActivityPattern(clockDto.getActivityPattern())
.setProvince(clockDto.getClockProvince())
.setCity(clockDto.getClockCity());
long reportedId = tempActivityCoreService.activityDataReportedSave(temActDto); long reportedId = tempActivityCoreService.activityDataReportedSave(temActDto);
TemporaryClockDto clockDtoUpdate = new TemporaryClockDto(); TemporaryClockDto clockDtoUpdate = new TemporaryClockDto();
clockDtoUpdate.setId(clockDto.getId()) clockDtoUpdate.setId(clockDto.getId()).setReportedId(reportedId);
.setReportedId(reportedId);
tempActivityClockCoreService.updateById(clockDtoUpdate); tempActivityClockCoreService.updateById(clockDtoUpdate);
return R.success(reportedId); return R.success(reportedId);
} }
......
package com.wangxiaolu.promotion.controller.activity.temporary;
import com.wangxiaolu.promotion.pojo.activity.temporary.vo.TemporaryActivityPlanVo;
import com.wangxiaolu.promotion.result.basedata.R;
import com.wangxiaolu.promotion.service.activity.temporary.TemporaryActivityPlanQueryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author : liqiulin
* @date : 2024-09-09 16
* @describe :
*/
@Slf4j
@RestController
@RequestMapping("/temporary/activity_plan/query")
public class TemporaryActivityPlanQueryController {
@Autowired
TemporaryActivityPlanQueryService temporaryActivityPlanQueryService;
/**
* 获取当月、当前城市/ALL(全国)的门店计划列表
* @return
*/
@PostMapping("/stores")
public R findClockStoreList(@RequestBody TemporaryActivityPlanVo temporaryActivityPlanVo){
return R.success(temporaryActivityPlanQueryService.findClockStoreList(temporaryActivityPlanVo));
}
}
...@@ -23,4 +23,9 @@ public class QinCeDealerQueryController { ...@@ -23,4 +23,9 @@ public class QinCeDealerQueryController {
qinCeDealerQueryService.page(pageInfo); qinCeDealerQueryService.page(pageInfo);
return R.success(pageInfo); return R.success(pageInfo);
} }
@GetMapping("/list")
public R findList(String dealerName){
return R.success(qinCeDealerQueryService.findList(dealerName));
}
} }
...@@ -9,4 +9,6 @@ import com.wangxiaolu.promotion.pojo.user.dto.PromotionManageEmployeeDto; ...@@ -9,4 +9,6 @@ import com.wangxiaolu.promotion.pojo.user.dto.PromotionManageEmployeeDto;
*/ */
public interface PromotionManageEmployeeDao { public interface PromotionManageEmployeeDao {
PromotionManageEmployeeDto loginByEmployeeNo(String employeeNo,String pwd); PromotionManageEmployeeDto loginByEmployeeNo(String employeeNo,String pwd);
PromotionManageEmployeeDto selectById(Integer employeeId);
} }
...@@ -42,6 +42,11 @@ public class PromotionManageEmployeeDaoImpl implements PromotionManageEmployeeDa ...@@ -42,6 +42,11 @@ public class PromotionManageEmployeeDaoImpl implements PromotionManageEmployeeDa
return transitionDto(promotionManageEmployeeDO); return transitionDto(promotionManageEmployeeDO);
} }
@Override
public PromotionManageEmployeeDto selectById(Integer employeeId) {
return transitionDto(promotionManageEmployeeMapper.selectById(employeeId));
}
private PromotionManageEmployeeDto transitionDto(PromotionManageEmployeeDO employeeDO) { private PromotionManageEmployeeDto transitionDto(PromotionManageEmployeeDO employeeDO) {
PromotionManageEmployeeDto dto = null; PromotionManageEmployeeDto dto = null;
if (Objects.isNull(employeeDO)) { if (Objects.isNull(employeeDO)) {
......
...@@ -43,11 +43,20 @@ public class TemporaryActivityClockDO implements Serializable { ...@@ -43,11 +43,20 @@ public class TemporaryActivityClockDO implements Serializable {
private Long storeId; private Long storeId;
private String lineName;
/** /**
* qince_clientele_store表store_name * qince_clientele_store表store_name
*/ */
private String storeName; private String storeName;
private String deptQcId;
private String deptQcOrgName;
private String chargerQcId;
private String chargerName;
/** /**
* 打卡所在地-省 * 打卡所在地-省
...@@ -134,18 +143,6 @@ public class TemporaryActivityClockDO implements Serializable { ...@@ -134,18 +143,6 @@ public class TemporaryActivityClockDO implements Serializable {
*/ */
private Date modifyTime; private Date modifyTime;
/**
* 所属战区-部门
*/
@TableField(exist = false)
String deptQcOrgName;
/**
* 此促销员的任务人姓名
*/
@TableField(exist = false)
String chargerName;
// 活动模式Id // 活动模式Id
Integer activityPatternId; Integer activityPatternId;
......
...@@ -39,6 +39,8 @@ public class TemporaryActivityReportedDO implements Serializable { ...@@ -39,6 +39,8 @@ public class TemporaryActivityReportedDO implements Serializable {
private Long storeId; private Long storeId;
private String lineName;
/** /**
* 关联—活动店铺名称(例:小美超市) * 关联—活动店铺名称(例:小美超市)
*/ */
...@@ -69,6 +71,9 @@ public class TemporaryActivityReportedDO implements Serializable { ...@@ -69,6 +71,9 @@ public class TemporaryActivityReportedDO implements Serializable {
*/ */
String activityPattern; String activityPattern;
private String deptQcId;
private String deptQcOrgName;
/** /**
* 关联—审核人员qc_id * 关联—审核人员qc_id
*/ */
......
...@@ -5,6 +5,7 @@ import com.wangxiaolu.promotion.pojo.PageInfo; ...@@ -5,6 +5,7 @@ import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto; import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author : liqiulin * @author : liqiulin
...@@ -19,4 +20,12 @@ public interface EmployeeActivityPlanInfoDao { ...@@ -19,4 +20,12 @@ public interface EmployeeActivityPlanInfoDao {
void deletebyActivityPlanRecordId(Long recordId); void deletebyActivityPlanRecordId(Long recordId);
void update(ActivityPlanInfoWrapper wrap); void update(ActivityPlanInfoWrapper wrap);
List<EmployeeActivityPlanInfoDto> findList(ActivityPlanInfoWrapper wrapper);
EmployeeActivityPlanInfoDto selectById(Long id);
EmployeeActivityPlanInfoDto selectOne(ActivityPlanInfoWrapper wrapper);
Set<String> findStoreNameByEmployeeId(Integer employeeId);
} }
package com.wangxiaolu.promotion.domain.manage.dao;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.TemporaryActivityTypeDto;
import java.util.List;
/**
* @author : liqiulin
* @date : 2024-09-10 11
* @describe :
*/
public interface TemporaryActivityTypeDao {
List<TemporaryActivityTypeDto> selectPatternMap();
}
...@@ -8,7 +8,6 @@ import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao; ...@@ -8,7 +8,6 @@ import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao;
import com.wangxiaolu.promotion.domain.manage.mapper.EmployeeActivityPlanInfoMapper; import com.wangxiaolu.promotion.domain.manage.mapper.EmployeeActivityPlanInfoMapper;
import com.wangxiaolu.promotion.domain.manage.mapper.entity.EmployeeActivityPlanInfoDO; import com.wangxiaolu.promotion.domain.manage.mapper.entity.EmployeeActivityPlanInfoDO;
import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper; import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper;
import com.wangxiaolu.promotion.exception.DataException;
import com.wangxiaolu.promotion.exception.ParamException; import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto; import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
...@@ -19,10 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -19,10 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** /**
* @author : liqiulin * @author : liqiulin
...@@ -68,8 +64,47 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo ...@@ -68,8 +64,47 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo
public void update(ActivityPlanInfoWrapper wrap) { public void update(ActivityPlanInfoWrapper wrap) {
LambdaQueryWrapper<EmployeeActivityPlanInfoDO> qw = buildUpdateWrapper(wrap); LambdaQueryWrapper<EmployeeActivityPlanInfoDO> qw = buildUpdateWrapper(wrap);
EmployeeActivityPlanInfoDO updateDO = new EmployeeActivityPlanInfoDO(); EmployeeActivityPlanInfoDO updateDO = new EmployeeActivityPlanInfoDO();
BeanUtils.copyProperties(wrap, updateDO);
if (Objects.nonNull(wrap.getActivityStatusUpdate())) {
updateDO.setActivityStatus(wrap.getActivityStatusUpdate().getType()); updateDO.setActivityStatus(wrap.getActivityStatusUpdate().getType());
employeeActivityPlanInfoMapper.update(updateDO,qw); }
if (Objects.nonNull(wrap.getIsDeleteUpdate())) {
updateDO.setIsDelete(wrap.getIsDeleteUpdate().getType());
}
updateDO.setId(null);
employeeActivityPlanInfoMapper.update(updateDO, qw);
}
@Override
public List<EmployeeActivityPlanInfoDto> findList(ActivityPlanInfoWrapper wrapper) {
LambdaQueryWrapper<EmployeeActivityPlanInfoDO> qw = buildWrapper(wrapper);
qw.select(EmployeeActivityPlanInfoDO::getId,
EmployeeActivityPlanInfoDO::getStoreName,
EmployeeActivityPlanInfoDO::getActivityPattern,
EmployeeActivityPlanInfoDO::getActivityPatternId)
.last(" limit 30");
List<EmployeeActivityPlanInfoDO> dos = employeeActivityPlanInfoMapper.selectList(qw);
return transitionDtos(dos);
}
@Override
public EmployeeActivityPlanInfoDto selectById(Long id) {
return transitionDto(employeeActivityPlanInfoMapper.selectById(id));
}
@Override
public EmployeeActivityPlanInfoDto selectOne(ActivityPlanInfoWrapper wrapper) {
LambdaQueryWrapper<EmployeeActivityPlanInfoDO> qw = buildWrapper(wrapper);
qw.last("limit 1");
EmployeeActivityPlanInfoDO infoDO = employeeActivityPlanInfoMapper.selectOne(qw);
return transitionDto(infoDO);
}
@Override
public Set<String> findStoreNameByEmployeeId(Integer employeeId) {
return employeeActivityPlanInfoMapper.findStoreNameByEmployeeId(employeeId);
} }
private LambdaQueryWrapper<EmployeeActivityPlanInfoDO> buildWrapper(ActivityPlanInfoWrapper wrapper) { private LambdaQueryWrapper<EmployeeActivityPlanInfoDO> buildWrapper(ActivityPlanInfoWrapper wrapper) {
...@@ -86,9 +121,9 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo ...@@ -86,9 +121,9 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo
qw.eq(EmployeeActivityPlanInfoDO::getExcelFiledId, wrapper.getExcelFiledId()); qw.eq(EmployeeActivityPlanInfoDO::getExcelFiledId, wrapper.getExcelFiledId());
} }
if (StringUtils.isNotBlank(wrapper.getActivityMonth())) { // if (StringUtils.isNotBlank(wrapper.getActivityMonth())) {
qw.eq(EmployeeActivityPlanInfoDO::getActivityMonth, wrapper.getActivityMonth()); // qw.eq(EmployeeActivityPlanInfoDO::getActivityMonth, wrapper.getActivityMonth());
} // }
if (StringUtils.isNotBlank(wrapper.getDealerName())) { if (StringUtils.isNotBlank(wrapper.getDealerName())) {
qw.like(EmployeeActivityPlanInfoDO::getDealerName, wrapper.getDealerName()); qw.like(EmployeeActivityPlanInfoDO::getDealerName, wrapper.getDealerName());
...@@ -98,12 +133,16 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo ...@@ -98,12 +133,16 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo
qw.like(EmployeeActivityPlanInfoDO::getCity, wrapper.getCity()); qw.like(EmployeeActivityPlanInfoDO::getCity, wrapper.getCity());
} }
if (StringUtils.isNotBlank(wrapper.getStoreNameLike())) {
qw.like(EmployeeActivityPlanInfoDO::getStoreName, wrapper.getStoreNameLike());
}
if (StringUtils.isNotBlank(wrapper.getStoreName())) { if (StringUtils.isNotBlank(wrapper.getStoreName())) {
qw.like(EmployeeActivityPlanInfoDO::getStoreName, wrapper.getStoreName()); qw.eq(EmployeeActivityPlanInfoDO::getStoreName, wrapper.getStoreName());
} }
if (Objects.nonNull(wrapper.getActivityStatus())){ if (Objects.nonNull(wrapper.getActivityStatus())) {
qw.eq(EmployeeActivityPlanInfoDO::getActivityStatus,wrapper.getActivityStatus().getType()); qw.eq(EmployeeActivityPlanInfoDO::getActivityStatus, wrapper.getActivityStatus().getType());
} }
qw.eq(EmployeeActivityPlanInfoDO::getIsDelete, StatusType.VALID.getType()); qw.eq(EmployeeActivityPlanInfoDO::getIsDelete, StatusType.VALID.getType());
...@@ -111,19 +150,46 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo ...@@ -111,19 +150,46 @@ public class EmployeeActivityPlanInfoDaoImpl implements EmployeeActivityPlanInfo
return qw; return qw;
} }
private LambdaQueryWrapper<EmployeeActivityPlanInfoDO> buildUpdateWrapper(ActivityPlanInfoWrapper wrapper) { private LambdaQueryWrapper<EmployeeActivityPlanInfoDO> buildUpdateWrapper(ActivityPlanInfoWrapper wrapper) {
LambdaQueryWrapper<EmployeeActivityPlanInfoDO> qw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<EmployeeActivityPlanInfoDO> qw = new LambdaQueryWrapper<>();
if (!CollectionUtils.isEmpty(wrapper.getIds())) { if (!CollectionUtils.isEmpty(wrapper.getIds())) {
qw.in(EmployeeActivityPlanInfoDO::getId,wrapper.getIds()); qw.in(EmployeeActivityPlanInfoDO::getId, wrapper.getIds());
} }
if (!NumberUtils.isNull(wrapper.getId())){ if (!NumberUtils.isNull(wrapper.getId())) {
qw.eq(EmployeeActivityPlanInfoDO::getId,wrapper.getId()); qw.eq(EmployeeActivityPlanInfoDO::getId, wrapper.getId());
} }
if (qw.isEmptyOfWhere()){ if (qw.isEmptyOfWhere()) {
throw new ParamException(RCode.SELECT_PARAMS_ERROR,null); throw new ParamException(RCode.SELECT_PARAMS_ERROR, null);
} }
return qw; return qw;
} }
/**
* DO to DTO (单个对象)
*
* @param dos DO对象List
* @return DTO对象
*/
private List<EmployeeActivityPlanInfoDto> transitionDtos(List<EmployeeActivityPlanInfoDO> dos) {
if (CollectionUtils.isEmpty(dos)) {
return new ArrayList<>();
}
List<EmployeeActivityPlanInfoDto> dtos = new ArrayList<>(dos.size() * 2);
for (EmployeeActivityPlanInfoDO infoDO : dos) {
dtos.add(transitionDto(infoDO));
}
return dtos;
}
private EmployeeActivityPlanInfoDto transitionDto(EmployeeActivityPlanInfoDO infoDO) {
EmployeeActivityPlanInfoDto dto = null;
if (Objects.isNull(infoDO)) {
return dto;
}
dto = new EmployeeActivityPlanInfoDto();
BeanUtils.copyProperties(infoDO, dto);
return dto;
}
} }
...@@ -37,8 +37,7 @@ public class EmployeeActivityPlanRecordDaoImpl implements EmployeeActivityPlanRe ...@@ -37,8 +37,7 @@ public class EmployeeActivityPlanRecordDaoImpl implements EmployeeActivityPlanRe
@Override @Override
public Long save(EmployeeActivityPlanRecordDto planDto) { public Long save(EmployeeActivityPlanRecordDto planDto) {
ActivityPlanRecordWrapper rWrapper = new ActivityPlanRecordWrapper() ActivityPlanRecordWrapper rWrapper = new ActivityPlanRecordWrapper()
.setEmployeeId(planDto.getEmployeeId()) .setEmployeeId(planDto.getEmployeeId());
.setActivityMonth(planDto.getActivityMonth());
LambdaQueryWrapper<EmployeeActivityPlanRecordDO> qw = buildWrapper(rWrapper); LambdaQueryWrapper<EmployeeActivityPlanRecordDO> qw = buildWrapper(rWrapper);
Integer count = employeeActivityPlanRecordMapper.selectCount(qw); Integer count = employeeActivityPlanRecordMapper.selectCount(qw);
if (count >= 1) { if (count >= 1) {
...@@ -83,9 +82,9 @@ public class EmployeeActivityPlanRecordDaoImpl implements EmployeeActivityPlanRe ...@@ -83,9 +82,9 @@ public class EmployeeActivityPlanRecordDaoImpl implements EmployeeActivityPlanRe
qw.eq(EmployeeActivityPlanRecordDO::getEmployeeId,rWrapper.getEmployeeId()); qw.eq(EmployeeActivityPlanRecordDO::getEmployeeId,rWrapper.getEmployeeId());
} }
if (StringUtils.isNotBlank(rWrapper.getActivityMonth())){ // if (StringUtils.isNotBlank(rWrapper.getActivityMonth())){
qw.eq(EmployeeActivityPlanRecordDO::getActivityMonth,rWrapper.getActivityMonth()); // qw.eq(EmployeeActivityPlanRecordDO::getActivityMonth,rWrapper.getActivityMonth());
} // }
qw.eq(EmployeeActivityPlanRecordDO::getIsDelete, StatusType.VALID.getType()); qw.eq(EmployeeActivityPlanRecordDO::getIsDelete, StatusType.VALID.getType());
qw.orderByDesc(EmployeeActivityPlanRecordDO::getId); qw.orderByDesc(EmployeeActivityPlanRecordDO::getId);
......
package com.wangxiaolu.promotion.domain.manage.dao.impl;
import com.wangxiaolu.promotion.domain.manage.dao.TemporaryActivityTypeDao;
import com.wangxiaolu.promotion.domain.manage.mapper.TemporaryActivityTypeMapper;
import com.wangxiaolu.promotion.domain.manage.mapper.entity.TemporaryActivityTypeDO;
import com.wangxiaolu.promotion.enums.activity.ActivityType;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.TemporaryActivityTypeDto;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.*;
/**
* @author : liqiulin
* @date : 2024-09-10 11
* @describe :
*/
@Service
public class TemporaryActivityTypeDaoImpl implements TemporaryActivityTypeDao {
@Autowired
TemporaryActivityTypeMapper temporaryActivityTypeMapper;
@Override
public List<TemporaryActivityTypeDto> selectPatternMap() {
Integer type = ActivityType.pattern.getType();
List<TemporaryActivityTypeDO> typeDos = temporaryActivityTypeMapper.selectPatternList(type);
return transitionDtos(typeDos);
}
/**
* DO to DTO (单个对象)
*
* @param dos DO对象List
* @return DTO对象
*/
private List<TemporaryActivityTypeDto> transitionDtos(List<TemporaryActivityTypeDO> dos) {
if (CollectionUtils.isEmpty(dos)) {
return new ArrayList<>();
}
List<TemporaryActivityTypeDto> dtos = new ArrayList<>(dos.size() * 2);
for (TemporaryActivityTypeDO typeDO : dos) {
dtos.add(transitionDto(typeDO));
}
return dtos;
}
private TemporaryActivityTypeDto transitionDto(TemporaryActivityTypeDO typeDO) {
TemporaryActivityTypeDto dto = null;
if (Objects.isNull(typeDO)) {
return dto;
}
dto = new TemporaryActivityTypeDto();
BeanUtils.copyProperties(typeDO, dto);
return dto;
}
}
...@@ -2,12 +2,12 @@ package com.wangxiaolu.promotion.domain.manage.mapper; ...@@ -2,12 +2,12 @@ package com.wangxiaolu.promotion.domain.manage.mapper;
import com.wangxiaolu.promotion.domain.manage.mapper.entity.EmployeeActivityPlanInfoDO; import com.wangxiaolu.promotion.domain.manage.mapper.entity.EmployeeActivityPlanInfoDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author a02200059 * @author a02200059
...@@ -22,6 +22,8 @@ public interface EmployeeActivityPlanInfoMapper extends BaseMapper<EmployeeActiv ...@@ -22,6 +22,8 @@ public interface EmployeeActivityPlanInfoMapper extends BaseMapper<EmployeeActiv
void saveList(@Param("dos") List<EmployeeActivityPlanInfoDO> dos); void saveList(@Param("dos") List<EmployeeActivityPlanInfoDO> dos);
void deletebyActivityPlanRecordId(Long recordId); void deletebyActivityPlanRecordId(Long recordId);
Set<String> findStoreNameByEmployeeId(Integer employeeId);
} }
......
package com.wangxiaolu.promotion.domain.manage.mapper;
import com.wangxiaolu.promotion.domain.manage.mapper.entity.TemporaryActivityTypeDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author a02200059
* @description 针对表【temporary_activity_type】的数据库操作Mapper
* @createDate 2024-09-10 11:52:53
* @Entity com.wangxiaolu.promotion.domain.manage.mapper.entity.TemporaryActivityTypeDO
*/
@Repository
@Mapper
public interface TemporaryActivityTypeMapper extends BaseMapper<TemporaryActivityTypeDO> {
List<TemporaryActivityTypeDO> selectPatternList(Integer type);
}
...@@ -50,7 +50,7 @@ public class EmployeeActivityPlanInfoDO implements Serializable { ...@@ -50,7 +50,7 @@ public class EmployeeActivityPlanInfoDO implements Serializable {
/** /**
* 活动月份YYYY-MM * 活动月份YYYY-MM
*/ */
private String activityMonth; // private String activityMonth;
/** /**
* 城市 * 城市
...@@ -80,6 +80,7 @@ public class EmployeeActivityPlanInfoDO implements Serializable { ...@@ -80,6 +80,7 @@ public class EmployeeActivityPlanInfoDO implements Serializable {
/** /**
* 活动模式 * 活动模式
*/ */
private Integer activityPatternId;
private String activityPattern; private String activityPattern;
private Date createTime; private Date createTime;
......
...@@ -44,17 +44,17 @@ public class EmployeeActivityPlanRecordDO implements Serializable { ...@@ -44,17 +44,17 @@ public class EmployeeActivityPlanRecordDO implements Serializable {
/** /**
* 活动月份YYYY-MM * 活动月份YYYY-MM
*/ */
private String activityMonth; // private String activityMonth;
/** /**
* 周的开始日期 * 周的开始日期
*/ */
private Date monthStartDate; // private Date monthStartDate;
/** /**
* 周的结束日期 * 周的结束日期
*/ */
private Date monthEndDate; // private Date monthEndDate;
/** /**
* 创建时间 * 创建时间
......
package com.wangxiaolu.promotion.domain.manage.mapper.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;
/**
*
* @TableName temporary_activity_type
*/
@TableName(value ="temporary_activity_type")
@Data
public class TemporaryActivityTypeDO implements Serializable {
/**
* 主键id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 类型:1:活动模式
*/
private Integer type;
/**
* 活动模式id
*/
private Integer activityPatternId;
/**
* 活动模式
*/
private String activityPattern;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -59,6 +59,7 @@ public class ActivityPlanInfoWrapper { ...@@ -59,6 +59,7 @@ public class ActivityPlanInfoWrapper {
* 店铺名称 * 店铺名称
*/ */
private String storeName; private String storeName;
private String storeNameLike;
/** /**
* 经销商名称 * 经销商名称
...@@ -68,13 +69,17 @@ public class ActivityPlanInfoWrapper { ...@@ -68,13 +69,17 @@ public class ActivityPlanInfoWrapper {
/** /**
* 活动状态 * 活动状态
*/ */
StatusType activityStatus; private StatusType activityStatus;
List<Long> ids; private List<Long> ids;
Long id;
StatusType activityStatusUpdate;
private Long id;
private StatusType activityStatusUpdate;
private StatusType isDeleteUpdate;
/**
* 活动模式
*/
private Integer activityPatternId;
private String activityPattern;
} }
...@@ -27,5 +27,5 @@ public class ActivityPlanRecordWrapper { ...@@ -27,5 +27,5 @@ public class ActivityPlanRecordWrapper {
/** /**
* 活动月份YYYY-MM * 活动月份YYYY-MM
*/ */
private String activityMonth; // private String activityMonth;
} }
package com.wangxiaolu.promotion.domain.user.dao; package com.wangxiaolu.promotion.domain.user.dao;
import com.wangxiaolu.promotion.domain.user.wrapperQo.DealerWrapper;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.user.dto.QinCeDealerDto;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -14,8 +16,9 @@ import java.util.Map; ...@@ -14,8 +16,9 @@ import java.util.Map;
public interface QinceDealerDao { public interface QinceDealerDao {
void saveList(List<Object> dealerJsons); void saveList(List<Object> dealerJsons);
void page(PageInfo pageInfo); void page(PageInfo pageInfo, DealerWrapper dealerWrapper);
Map<Object,Object> selectAll(); Map<Object,Object> selectAll();
List<QinCeDealerDto> selectList(DealerWrapper dw);
} }
...@@ -5,18 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,18 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wangxiaolu.promotion.domain.user.dao.QinceDealerDao; import com.wangxiaolu.promotion.domain.user.dao.QinceDealerDao;
import com.wangxiaolu.promotion.domain.user.mapper.QinceDealerMapper; import com.wangxiaolu.promotion.domain.user.mapper.QinceDealerMapper;
import com.wangxiaolu.promotion.domain.user.mapper.entity.QinceDealerDO; import com.wangxiaolu.promotion.domain.user.mapper.entity.QinceDealerDO;
import com.wangxiaolu.promotion.domain.user.wrapperQo.DealerWrapper;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.user.dto.QinCeDealerDto;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
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 org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.rmi.server.ObjID; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** /**
* @author : liqiulin * @author : liqiulin
...@@ -38,24 +37,27 @@ public class QinceDealerDaoImpl implements QinceDealerDao { ...@@ -38,24 +37,27 @@ public class QinceDealerDaoImpl implements QinceDealerDao {
} }
@Override @Override
public void page(PageInfo pageInfo) { public void page(PageInfo pageInfo,DealerWrapper dealerWrapper) {
Map queryParams = pageInfo.getQueryParams(); LambdaQueryWrapper<QinceDealerDO> qw = builderWrapper(dealerWrapper);
LambdaQueryWrapper<QinceDealerDO> qw = new LambdaQueryWrapper<>();
if (!CollectionUtils.isEmpty(queryParams)) {
if (StringUtils.isNotBlank((String) queryParams.get("dealerId"))) {
qw.eq(QinceDealerDO::getDealerId, queryParams.get("dealerId"));
}
if (StringUtils.isNotBlank((String) queryParams.get("dealerName"))) {
qw.like(QinceDealerDO::getDealerName, queryParams.get("dealerName"));
}
}
qw.select(QinceDealerDO::getDealerId, QinceDealerDO::getDealerName);
Page<QinceDealerDO> page = new Page<>(pageInfo.getPageNum(), pageInfo.getPageSize()); Page<QinceDealerDO> page = new Page<>(pageInfo.getPageNum(), pageInfo.getPageSize());
Page<QinceDealerDO> doPage = qinceDealerMapper.selectPage(page, qw); Page<QinceDealerDO> doPage = qinceDealerMapper.selectPage(page, qw);
pageInfo.pageCovert(page); pageInfo.pageCovert(page);
pageInfo.setRecords(doPage.getRecords()); pageInfo.setRecords(doPage.getRecords());
} }
private LambdaQueryWrapper<QinceDealerDO> builderWrapper(DealerWrapper dealerWrapper){
LambdaQueryWrapper<QinceDealerDO> qw = new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(dealerWrapper.getDealerId())){
qw.eq(QinceDealerDO::getDealerId, dealerWrapper.getDealerId());
}
if (StringUtils.isNotBlank(dealerWrapper.getDealerName())){
qw.like(QinceDealerDO::getDealerName, dealerWrapper.getDealerName());
}
qw.select(QinceDealerDO::getDealerId, QinceDealerDO::getDealerName);
return qw;
}
@Override @Override
public Map<Object, Object> selectAll() { public Map<Object, Object> selectAll() {
List<QinceDealerDO> qinceDealerDOS = qinceDealerMapper.selectList(null); List<QinceDealerDO> qinceDealerDOS = qinceDealerMapper.selectList(null);
...@@ -67,4 +69,45 @@ public class QinceDealerDaoImpl implements QinceDealerDao { ...@@ -67,4 +69,45 @@ public class QinceDealerDaoImpl implements QinceDealerDao {
return maps; return maps;
} }
@Override
public List<QinCeDealerDto> selectList(DealerWrapper dw) {
LambdaQueryWrapper<QinceDealerDO> qw = builderWrapper(dw);
qw.last("limit 20");
List<QinceDealerDO> qinceDealerDOS = qinceDealerMapper.selectList(qw);
return transitionDtos(qinceDealerDOS);
}
/**
* DO to DTO (单个对象)
*
* @param dos DO对象List
* @return DTO对象
*/
private List<QinCeDealerDto> transitionDtos(List<QinceDealerDO> dos) {
if (CollectionUtils.isEmpty(dos)) {
return new ArrayList<>();
}
List<QinCeDealerDto> dtos = new ArrayList<>(dos.size() * 2);
for (QinceDealerDO infoDo : dos) {
dtos.add(transitionDto(infoDo));
}
return dtos;
}
/**
* DO to DTO (单个对象)
*
* @param infoDo DO对象
* @return DTO对象
*/
private QinCeDealerDto transitionDto(QinceDealerDO infoDo) {
QinCeDealerDto temporaryDto = null;
if (!Objects.isNull(infoDo)) {
temporaryDto = new QinCeDealerDto();
BeanUtils.copyProperties(infoDo, temporaryDto);
}
return temporaryDto;
}
} }
package com.wangxiaolu.promotion.domain.user.wrapperQo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* @author : liqiulin
* @date : 2024-09-11 11
* @describe :
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
public class DealerWrapper {
/**
* 经销商编码
*/
private String dealerId;
/**
* 经销商名称
*/
private String dealerName;
}
package com.wangxiaolu.promotion.enums.activity;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author : liqiulin
* @date : 2024-09-10 13
* @describe :
*/
@Getter
@AllArgsConstructor
public enum ActivityType {
/**
* 推广试吃照片
*/
pattern(1),
;
private int type;
}
...@@ -84,6 +84,7 @@ public class EmployeeActivityPlanInfoDto implements Serializable { ...@@ -84,6 +84,7 @@ public class EmployeeActivityPlanInfoDto implements Serializable {
* 活动模式 * 活动模式
*/ */
private String activityPattern; private String activityPattern;
private Integer activityPatternId;
private Integer activityStatus; private Integer activityStatus;
......
package com.wangxiaolu.promotion.pojo.activity.manage.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author : liqiulin
* @date : 2024-09-10 14
* @describe :
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class TemporaryActivityTypeDto implements Serializable {
/**
* 活动模式id
*/
private Integer activityPatternId;
/**
* 活动模式
*/
private String activityPattern;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
...@@ -6,7 +6,6 @@ import lombok.Data; ...@@ -6,7 +6,6 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
/** /**
...@@ -19,9 +18,62 @@ import java.util.List; ...@@ -19,9 +18,62 @@ import java.util.List;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class ActivityPlanInfoVo { public class ActivityPlanInfoVo {
List<Long> ids; private List<Long> ids;
private Long id;
private StatusType activityStatusUpdate;
private StatusType isDeleteUpdate;
/**
* 活动模式
*/
private Integer activityPatternId;
private String activityPattern;
private Integer employeeId;
private String storeName;
/**
* 活动计划表上传记录id
*/
private Long activityPlanRecordId;
/**
* 文件ID(云存储中的id)
*/
private String excelFiledId;
/**
* 姓名
*/
private String employeeName;
/**
* 员工工号
*/
private String employeeNo;
/**
* 城市
*/
private String city;
/**
* 经销商编码
*/
private String dealerId;
/**
* 经销商名称
*/
private String dealerName;
/**
* 系统名称
*/
private String lineName;
Long id;
StatusType activityStatusUpdate;
} }
...@@ -38,7 +38,7 @@ public class ActivityPlanVo { ...@@ -38,7 +38,7 @@ public class ActivityPlanVo {
/** /**
* 活动月份YYYY-MM * 活动月份YYYY-MM
*/ */
private String activityMonth; // private String activityMonth;
/** /**
* 月份第几周 * 月份第几周
...@@ -48,11 +48,11 @@ public class ActivityPlanVo { ...@@ -48,11 +48,11 @@ public class ActivityPlanVo {
/** /**
* 月结束日期 * 月结束日期
*/ */
private Date monthStartDate; // private Date monthStartDate;
/** /**
* 月结束日期 * 月结束日期
*/ */
private Date monthEndDate; // private Date monthEndDate;
} }
...@@ -40,6 +40,8 @@ public class TemporaryActivityReportedDto { ...@@ -40,6 +40,8 @@ public class TemporaryActivityReportedDto {
*/ */
private Long storeId; private Long storeId;
private String lineName;
/** /**
* 关联—活动店铺名称(例:小美超市) * 关联—活动店铺名称(例:小美超市)
*/ */
...@@ -70,6 +72,9 @@ public class TemporaryActivityReportedDto { ...@@ -70,6 +72,9 @@ public class TemporaryActivityReportedDto {
*/ */
String activityPattern; String activityPattern;
private String deptQcId;
private String deptQcOrgName;
/** /**
* 关联—审核人员qc_id * 关联—审核人员qc_id
* *
......
...@@ -36,12 +36,22 @@ public class TemporaryClockDto { ...@@ -36,12 +36,22 @@ public class TemporaryClockDto {
*/ */
private Long reportedId; private Long reportedId;
// 店铺勤策id
// String storeQcId;
Long storeId; Long storeId;
// 店铺名称 private String lineName;
String storeName;
/**
* qince_clientele_store表store_name
*/
private String storeName;
private String deptQcId;
private String deptQcOrgName;
private String chargerQcId;
private String chargerName;
// 上班打卡地址 // 上班打卡地址
String clockInAddress; String clockInAddress;
...@@ -108,16 +118,6 @@ public class TemporaryClockDto { ...@@ -108,16 +118,6 @@ public class TemporaryClockDto {
// 创建日期YYYY-MM-DD // 创建日期YYYY-MM-DD
String createDate; String createDate;
/**
* 所属战区-部门
*/
String deptQcOrgName;
/**
* 此促销员的任务人姓名
*/
String chargerName;
// 活动模式Id // 活动模式Id
Integer activityPatternId; Integer activityPatternId;
......
...@@ -39,7 +39,7 @@ public class TemporaryActivityDataVo { ...@@ -39,7 +39,7 @@ public class TemporaryActivityDataVo {
/** /**
* 活动店铺Id * 活动店铺Id
*/ */
private Long storeId; // private Long storeId;
/** /**
* 推广试吃照片 * 推广试吃照片
......
package com.wangxiaolu.promotion.pojo.activity.temporary.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* @author : liqiulin
* @date : 2024-09-09 16
* @describe :
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
public class TemporaryActivityPlanVo {
/**
* 活动月份YYYY-MM
*/
// private String activityMonth;
/**
* 城市
*/
private String city;
/**
* 店铺名称
*/
private String storeName;
}
...@@ -43,8 +43,7 @@ public class TemporaryClockVo { ...@@ -43,8 +43,7 @@ public class TemporaryClockVo {
String temporaryName; String temporaryName;
// 店铺id // 店铺id - 活动计划中的id
// String storeQcId;
Long storeId; Long storeId;
// 店铺名称 // 店铺名称
...@@ -66,10 +65,10 @@ public class TemporaryClockVo { ...@@ -66,10 +65,10 @@ public class TemporaryClockVo {
String clockCity; String clockCity;
// 活动模式Id // 活动模式Id
Integer activityPatternId; // Integer activityPatternId;
//
// 活动模式 // // 活动模式
String activityPattern; // String activityPattern;
/** /**
* 修改时用到,上次打卡时间 * 修改时用到,上次打卡时间
...@@ -90,9 +89,6 @@ public class TemporaryClockVo { ...@@ -90,9 +89,6 @@ public class TemporaryClockVo {
if (StringUtils.isBlank(clockPhoto)){ if (StringUtils.isBlank(clockPhoto)){
throw new ParamException(RCode.NOT_CLOCK_PHOTO_ERROR, null); throw new ParamException(RCode.NOT_CLOCK_PHOTO_ERROR, null);
} }
if (StringUtils.isBlank(this.activityPattern)){
throw new ParamException(RCode.NOT_CLOCK_ACTIVITY_PATTERN_ERROR, null);
}
} }
public Integer getPhotoType() { public Integer getPhotoType() {
......
package com.wangxiaolu.promotion.pojo.user.dto;
import lombok.Data;
/**
* @author : liqiulin
* @date : 2024-03-29 15
* @describe : 勤策-组织架构
*/
@Data
public class QinCeDealerDto {
// private Integer id;
/**
* 经销商编码
*/
private String dealerId;
/**
* 经销商名称
*/
private String dealerName;
}
...@@ -9,4 +9,6 @@ import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo; ...@@ -9,4 +9,6 @@ import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo;
*/ */
public interface ActivityPlanInfoCoreService { public interface ActivityPlanInfoCoreService {
void updateActivityInfo(ActivityPlanInfoVo activityPlanInfoVo); void updateActivityInfo(ActivityPlanInfoVo activityPlanInfoVo);
void save(ActivityPlanInfoVo activityPlanInfoVo);
} }
package com.wangxiaolu.promotion.service.activity.manage; package com.wangxiaolu.promotion.service.activity.manage;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo;
/** /**
* @author : liqiulin * @author : liqiulin
...@@ -10,4 +12,6 @@ import com.wangxiaolu.promotion.pojo.PageInfo; ...@@ -10,4 +12,6 @@ import com.wangxiaolu.promotion.pojo.PageInfo;
public interface ActivityPlanInfoQueryService { public interface ActivityPlanInfoQueryService {
void findActivityPlanInfoPage(PageInfo pageInfo); void findActivityPlanInfoPage(PageInfo pageInfo);
EmployeeActivityPlanInfoDto findActivityPlanInfoOne(ActivityPlanInfoVo activityPlanInfoVo);
} }
package com.wangxiaolu.promotion.service.activity.manage;
import com.alibaba.fastjson.JSONArray;
/**
* @author : liqiulin
* @date : 2024-09-10 13
* @describe :
*/
public interface ActivityTypeQueryService {
void patternToRedis();
JSONArray getActivityPattern();
}
package com.wangxiaolu.promotion.service.activity.manage.impl; package com.wangxiaolu.promotion.service.activity.manage.impl;
import com.wangxiaolu.promotion.common.redis.RedisKeys;
import com.wangxiaolu.promotion.common.redis.service.RedisCache;
import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao; import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao;
import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper; import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo; import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo;
import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoCoreService; import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoCoreService;
import org.springframework.beans.BeanUtils;
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.Arrays;
import java.util.Objects;
/** /**
* @author : liqiulin * @author : liqiulin
* @date : 2024-09-02 18 * @date : 2024-09-02 18
...@@ -17,11 +24,24 @@ public class ActivityPlanInfoCoreServiceImpl implements ActivityPlanInfoCoreServ ...@@ -17,11 +24,24 @@ public class ActivityPlanInfoCoreServiceImpl implements ActivityPlanInfoCoreServ
@Autowired @Autowired
EmployeeActivityPlanInfoDao employeeActivityPlanInfoDao; EmployeeActivityPlanInfoDao employeeActivityPlanInfoDao;
@Autowired
private RedisCache redisCache;
@Override @Override
public void updateActivityInfo(ActivityPlanInfoVo activityPlanInfoVo) { public void updateActivityInfo(ActivityPlanInfoVo activityPlanInfoVo) {
ActivityPlanInfoWrapper wrap = new ActivityPlanInfoWrapper(); ActivityPlanInfoWrapper wrap = new ActivityPlanInfoWrapper();
wrap.setIds(activityPlanInfoVo.getIds()).setId(activityPlanInfoVo.getId()).setActivityStatusUpdate(activityPlanInfoVo.getActivityStatusUpdate()); BeanUtils.copyProperties(activityPlanInfoVo, wrap);
if (Objects.nonNull(activityPlanInfoVo.getActivityPatternId())) {
wrap.setActivityPattern(redisCache.getHash(RedisKeys.TemporaryKeys.TENOIRART_ACTIVITY_PATTERN.getKey(),
String.valueOf(activityPlanInfoVo.getActivityPatternId())));
}
employeeActivityPlanInfoDao.update(wrap); employeeActivityPlanInfoDao.update(wrap);
} }
@Override
public void save(ActivityPlanInfoVo activityPlanInfoVo) {
EmployeeActivityPlanInfoDto dto = new EmployeeActivityPlanInfoDto();
BeanUtils.copyProperties(activityPlanInfoVo,dto);
employeeActivityPlanInfoDao.saveList(Arrays.asList(dto));
}
} }
...@@ -4,7 +4,10 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,7 +4,10 @@ import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao; import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao;
import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper; import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanInfoVo;
import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoQueryService; import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanInfoQueryService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -23,4 +26,11 @@ public class ActivityPlanInfoQueryServiceImpl implements ActivityPlanInfoQuerySe ...@@ -23,4 +26,11 @@ public class ActivityPlanInfoQueryServiceImpl implements ActivityPlanInfoQuerySe
ActivityPlanInfoWrapper wrapper = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), ActivityPlanInfoWrapper.class); ActivityPlanInfoWrapper wrapper = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), ActivityPlanInfoWrapper.class);
employeeActivityPlanInfoDao.page(pageInfo,wrapper); employeeActivityPlanInfoDao.page(pageInfo,wrapper);
} }
@Override
public EmployeeActivityPlanInfoDto findActivityPlanInfoOne(ActivityPlanInfoVo activityPlanInfoVo) {
ActivityPlanInfoWrapper wrapper = new ActivityPlanInfoWrapper();
BeanUtils.copyProperties(activityPlanInfoVo,wrapper);
return employeeActivityPlanInfoDao.selectOne(wrapper);
}
} }
...@@ -12,6 +12,7 @@ import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanVo; ...@@ -12,6 +12,7 @@ import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanVo;
import com.wangxiaolu.promotion.result.basedata.RCode; import com.wangxiaolu.promotion.result.basedata.RCode;
import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanRecordCoreService; import com.wangxiaolu.promotion.service.activity.manage.ActivityPlanRecordCoreService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.groovy.util.Maps;
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 org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -41,7 +42,6 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -41,7 +42,6 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
public void saveActivityPlan(EmployeeActivityPlanRecordDto planDto, ActivityPlanVo activityPlanVo) throws Exception { public void saveActivityPlan(EmployeeActivityPlanRecordDto planDto, ActivityPlanVo activityPlanVo) throws Exception {
// 保存上传记录 // 保存上传记录
Long planRecordId = employeeActivityPlanRecordDao.save(planDto); Long planRecordId = employeeActivityPlanRecordDao.save(planDto);
// Long planRecordId = 37L;
planDto.setId(planRecordId); planDto.setId(planRecordId);
// 解析excel表是否符合规范、保存 // 解析excel表是否符合规范、保存
saveActivityPlanInfo(activityPlanVo, planDto); saveActivityPlanInfo(activityPlanVo, planDto);
...@@ -57,8 +57,7 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -57,8 +57,7 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
private void saveActivityPlanInfo(ActivityPlanVo activityPlanVo, EmployeeActivityPlanRecordDto planDto) throws Exception { private void saveActivityPlanInfo(ActivityPlanVo activityPlanVo, EmployeeActivityPlanRecordDto planDto) throws Exception {
// 下载 // 下载
// String filePath = "/var/logs/activity_plan/" + activityPlanVo.getEmployeeNo() + "/" + planDto.getExcelFiledId(); String filePath = "/var/logs/activity_plan/" + activityPlanVo.getEmployeeNo() + "/" + planDto.getExcelFiledId();
String filePath = "/Users/a02200059/Desktop/错误图片/push/" + planDto.getExcelFiledId();
downloadExcel(activityPlanVo.getExcelUrl(), filePath); downloadExcel(activityPlanVo.getExcelUrl(), filePath);
// 读取 // 读取
List<EmployeeActivityPlanInfoDto> planInfoDtos = readSheet0(filePath, activityPlanVo, planDto); List<EmployeeActivityPlanInfoDto> planInfoDtos = readSheet0(filePath, activityPlanVo, planDto);
...@@ -90,10 +89,17 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -90,10 +89,17 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
throw new DataException(RCode.API_DATA_ERROR); throw new DataException(RCode.API_DATA_ERROR);
} }
// 查询当前用户下有效的门店名称列表,用于检查是否存在同名店铺
Set<String> storeNameDbList = employeeActivityPlanInfoDao.findStoreNameByEmployeeId(activityPlanVo.getEmployeeId());
Map<Object, Object> dealers = redisCache.getAllHash(RedisKeys.UserKeys.DEALER_HAVE_LIST.getKey()); Map<Object, Object> dealers = redisCache.getAllHash(RedisKeys.UserKeys.DEALER_HAVE_LIST.getKey());
Map<Object, Object> patternMap = redisCache.getAllHash(RedisKeys.TemporaryKeys.TENOIRART_ACTIVITY_PATTERN.getKey());
// 2、校验数据准确性 // 2、校验数据准确性
verifyRow(rows, dealers); verifyRow(rows, dealers,patternMap.values(),storeNameDbList);
Map<String,Integer> patternInfoMap = new HashMap<>();
for (Map.Entry<Object, Object> entry : patternMap.entrySet()) {
patternInfoMap.put(entry.getValue().toString(),Integer.parseInt((String) entry.getKey()));
}
/** /**
* 3、保存入库 * 3、保存入库
*/ */
...@@ -116,6 +122,8 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -116,6 +122,8 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
.setStoreName((String) value.get(3)) .setStoreName((String) value.get(3))
.setActivityPattern((String) value.get(4)); .setActivityPattern((String) value.get(4));
planInfoDto.setActivityPatternId(patternInfoMap.get(planInfoDto.getActivityPattern()));
planInfoDtos.add(planInfoDto); planInfoDtos.add(planInfoDto);
} }
return planInfoDtos; return planInfoDtos;
...@@ -124,17 +132,22 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -124,17 +132,22 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
/** /**
* 校验数据是否规范 * 校验数据是否规范
*/ */
private void verifyRow(Map<Integer, List<Object>> rows, Map<Object, Object> dealers) throws Exception { private void verifyRow(Map<Integer, List<Object>> rows, Map<Object, Object> dealers,Collection<Object> patterns,Set<String> storeNameDbSet) throws Exception {
StringBuilder msg = new StringBuilder(); StringBuilder msg = new StringBuilder();
List<String> storeList = new ArrayList<>(); List<String> storeList = new ArrayList<>(storeNameDbSet);
boolean patternY = false;
for (Map.Entry<Integer, List<Object>> entry : rows.entrySet()) { for (Map.Entry<Integer, List<Object>> entry : rows.entrySet()) {
Integer rowNo = entry.getKey() + 1; Integer rowNo = entry.getKey() + 1;
List<Object> value = entry.getValue(); List<Object> value = entry.getValue();
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
String city = (String) value.get(0);
if (StringUtils.isBlank((String) value.get(0))) { if (StringUtils.isBlank(city)) {
sb.append("城市不可为空;"); sb.append("城市不可为空;");
}else if (!city.contains("市")){
value.set(0,city+"市");
} }
if (!dealers.containsKey(((String) value.get(1)).trim())) { if (!dealers.containsKey(((String) value.get(1)).trim())) {
...@@ -149,13 +162,16 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -149,13 +162,16 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
if (StringUtils.isBlank(storeName)) { if (StringUtils.isBlank(storeName)) {
sb.append("店铺名称不可为空;"); sb.append("店铺名称不可为空;");
} else if (storeList.contains(storeName)) { } else if (storeList.contains(storeName)) {
sb.append("店铺名称重复;"); sb.append("店铺名称已存在;");
} else { } else {
storeList.add(storeName); storeList.add(storeName);
} }
if (StringUtils.isBlank((String) value.get(4))) { String pattern = (String) value.get(4);
if (StringUtils.isBlank(pattern)) {
sb.append("活动模式不可为空;"); sb.append("活动模式不可为空;");
}else if (!patterns.contains(pattern)){
patternY = true;
} }
if (sb.length() > 0) { if (sb.length() > 0) {
...@@ -164,6 +180,9 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore ...@@ -164,6 +180,9 @@ public class ActivityPlanRecordCoreServiceImpl implements ActivityPlanRecordCore
} }
if (patternY){
msg.append("活动模式列仅限:").append(patterns).append("(需区分大小写)");
}
if (msg.length() > 0) { if (msg.length() > 0) {
throw new DataException(msg.toString()); throw new DataException(msg.toString());
} }
......
package com.wangxiaolu.promotion.service.activity.manage.impl;
import com.alibaba.fastjson.JSONArray;
import com.wangxiaolu.promotion.common.redis.RedisKeys;
import com.wangxiaolu.promotion.common.redis.service.RedisCache;
import com.wangxiaolu.promotion.domain.manage.dao.TemporaryActivityTypeDao;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.TemporaryActivityTypeDto;
import com.wangxiaolu.promotion.service.activity.manage.ActivityTypeQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author : liqiulin
* @date : 2024-09-10 13
* @describe :
*/
@Service
public class ActivityTypeQueryServiceImpl implements ActivityTypeQueryService {
@Autowired
TemporaryActivityTypeDao temporaryActivityTypeDao;
@Autowired
private RedisCache redisCache;
@Override
public void patternToRedis() {
String key = RedisKeys.TemporaryKeys.TENOIRART_ACTIVITY_PATTERN.getKey();
String keyDo = RedisKeys.TemporaryKeys.TENOIRART_ACTIVITY_PATTERN_DO.getKey();
List<TemporaryActivityTypeDto> typeDtos = temporaryActivityTypeDao.selectPatternMap();
Map<Object, Object> map = new HashMap<>();
typeDtos.forEach(typeDto -> {
map.put(String.valueOf(typeDto.getActivityPatternId()),typeDto.getActivityPattern());
});
redisCache.removeKeys(Arrays.asList(keyDo,key));
redisCache.putAllHash(key,map);
redisCache.addToJson(keyDo,typeDtos);
}
@Override
public JSONArray getActivityPattern() {
String keyDo = RedisKeys.TemporaryKeys.TENOIRART_ACTIVITY_PATTERN_DO.getKey();
return redisCache.getToJsonArray(keyDo);
}
}
package com.wangxiaolu.promotion.service.activity.temporary;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.temporary.vo.TemporaryActivityPlanVo;
import java.util.List;
/**
* @author : liqiulin
* @date : 2024-09-09 16
* @describe :
*/
public interface TemporaryActivityPlanQueryService {
List<EmployeeActivityPlanInfoDto> findClockStoreList(TemporaryActivityPlanVo temporaryActivityPlanVo);
}
package com.wangxiaolu.promotion.service.activity.temporary.impl; package com.wangxiaolu.promotion.service.activity.temporary.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.domain.activity.dao.PromotionManageEmployeeDao;
import com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityClockDao; import com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityClockDao;
import com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityLogDao; import com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityLogDao;
import com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityPhotoDao; import com.wangxiaolu.promotion.domain.activity.dao.TemporaryActivityPhotoDao;
import com.wangxiaolu.promotion.domain.activity.wrapperQo.TemporaryPhotoWrapper; import com.wangxiaolu.promotion.domain.activity.wrapperQo.TemporaryPhotoWrapper;
import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao;
import com.wangxiaolu.promotion.enums.activity.ActivityPhotoType; import com.wangxiaolu.promotion.enums.activity.ActivityPhotoType;
import com.wangxiaolu.promotion.enums.activity.ClockType; import com.wangxiaolu.promotion.enums.activity.ClockType;
import com.wangxiaolu.promotion.enums.activity.LogType; import com.wangxiaolu.promotion.enums.activity.LogType;
import com.wangxiaolu.promotion.exception.ParamException; import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryClockDto; import com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryClockDto;
import com.wangxiaolu.promotion.pojo.activity.temporary.vo.TemporaryClockVo; import com.wangxiaolu.promotion.pojo.activity.temporary.vo.TemporaryClockVo;
import com.wangxiaolu.promotion.pojo.user.dto.PromotionManageEmployeeDto;
import com.wangxiaolu.promotion.result.basedata.RCode; import com.wangxiaolu.promotion.result.basedata.RCode;
import com.wangxiaolu.promotion.service.activity.temporary.TemporaryActivityClockCoreService; import com.wangxiaolu.promotion.service.activity.temporary.TemporaryActivityClockCoreService;
import com.wangxiaolu.promotion.utils.OkHttp; import com.wangxiaolu.promotion.utils.OkHttp;
...@@ -38,10 +42,12 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC ...@@ -38,10 +42,12 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC
QinCeUtils qinCeUtils; QinCeUtils qinCeUtils;
@Autowired @Autowired
private TemporaryActivityClockDao temporaryActivityClockDao; private TemporaryActivityClockDao temporaryActivityClockDao;
@Autowired @Autowired
private TemporaryActivityPhotoDao tempActivityPhotoDao; private TemporaryActivityPhotoDao tempActivityPhotoDao;
@Autowired
private EmployeeActivityPlanInfoDao employeeActivityPlanInfoDao;
@Autowired
private PromotionManageEmployeeDao promotionManageEmployeeDao;
@Autowired @Autowired
private TemporaryActivityLogDao tempActivityLogDao; private TemporaryActivityLogDao tempActivityLogDao;
/** /**
...@@ -52,6 +58,17 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC ...@@ -52,6 +58,17 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC
public void clockInTodayActivity(TemporaryClockDto dto, Integer clockType) { public void clockInTodayActivity(TemporaryClockDto dto, Integer clockType) {
log.info("促销员当日打卡[type-{}]信息保存:{}", clockType, dto.toString()); log.info("促销员当日打卡[type-{}]信息保存:{}", clockType, dto.toString());
if (Objects.isNull(dto.getId())) { if (Objects.isNull(dto.getId())) {
// 补充信息
EmployeeActivityPlanInfoDto planInfoDto = employeeActivityPlanInfoDao.selectById(dto.getStoreId());
PromotionManageEmployeeDto employeeDto = promotionManageEmployeeDao.selectById(planInfoDto.getEmployeeId());
dto.setLineName(planInfoDto.getLineName())
.setDeptQcId(employeeDto.getDeptQcId())
.setDeptQcOrgName(employeeDto.getDeptQcName())
.setChargerQcId(employeeDto.getQcId())
.setChargerName(employeeDto.getName())
.setActivityPatternId(planInfoDto.getActivityPatternId())
.setActivityPattern(planInfoDto.getActivityPattern());
temporaryActivityClockDao.save(dto); temporaryActivityClockDao.save(dto);
} else { } else {
temporaryActivityClockDao.updateById(dto); temporaryActivityClockDao.updateById(dto);
......
...@@ -73,15 +73,6 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -73,15 +73,6 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
throw new FlowException(RCode.DATA_HAVE_ERROR, null); throw new FlowException(RCode.DATA_HAVE_ERROR, null);
} }
/**
* 根据storeId查询店铺信息,进行店铺信息补充
*/
PromotionStoreDto promotionStoreDto = promotionStoreDao.selectOneById(temActDto.getStoreId());
temActDto.setStoreName(promotionStoreDto.getStoreName())
.setStoreAddr(promotionStoreDto.getAddress())
.setProvince(promotionStoreDto.getProvince())
.setCity(promotionStoreDto.getCity());
// 返回生成的活动id // 返回生成的活动id
long reportedId = temporaryActivityReportedDao.activityDataSave(temActDto); long reportedId = temporaryActivityReportedDao.activityDataSave(temActDto);
temActDto.setId(reportedId); temActDto.setId(reportedId);
......
package com.wangxiaolu.promotion.service.activity.temporary.impl;
import com.wangxiaolu.promotion.common.enums.StatusType;
import com.wangxiaolu.promotion.domain.manage.dao.EmployeeActivityPlanInfoDao;
import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper;
import com.wangxiaolu.promotion.pojo.activity.manage.dto.EmployeeActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.temporary.vo.TemporaryActivityPlanVo;
import com.wangxiaolu.promotion.service.activity.temporary.TemporaryActivityPlanQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author : liqiulin
* @date : 2024-09-09 16
* @describe :
*/
@Service
public class TemporaryActivityPlanQueryServiceImpl implements TemporaryActivityPlanQueryService {
@Autowired
EmployeeActivityPlanInfoDao employeeActivityPlanInfoDao;
@Override
public List<EmployeeActivityPlanInfoDto> findClockStoreList(TemporaryActivityPlanVo planVo) {
ActivityPlanInfoWrapper wrapper = new ActivityPlanInfoWrapper();
wrapper.setCity(planVo.getCity())
.setStoreNameLike(planVo.getStoreName())
.setActivityStatus(StatusType.VALID);
return employeeActivityPlanInfoDao.findList(wrapper);
}
}
package com.wangxiaolu.promotion.service.user; package com.wangxiaolu.promotion.service.user;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.user.dto.QinCeDealerDto;
import java.util.List;
/** /**
* @author : liqiulin * @author : liqiulin
...@@ -10,4 +13,5 @@ import com.wangxiaolu.promotion.pojo.PageInfo; ...@@ -10,4 +13,5 @@ import com.wangxiaolu.promotion.pojo.PageInfo;
public interface QinCeDealerQueryService { public interface QinCeDealerQueryService {
void page(PageInfo pageInfo); void page(PageInfo pageInfo);
List<QinCeDealerDto> findList(String dealerName);
} }
package com.wangxiaolu.promotion.service.user.impl; package com.wangxiaolu.promotion.service.user.impl;
import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.domain.user.dao.QinceDealerDao; import com.wangxiaolu.promotion.domain.user.dao.QinceDealerDao;
import com.wangxiaolu.promotion.domain.user.wrapperQo.DealerWrapper;
import com.wangxiaolu.promotion.pojo.PageInfo; import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.user.dto.QinCeDealerDto;
import com.wangxiaolu.promotion.service.user.QinCeDealerQueryService; import com.wangxiaolu.promotion.service.user.QinCeDealerQueryService;
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-09-02 13 * @date : 2024-09-02 13
...@@ -19,6 +24,15 @@ public class QinCeDealerQueryServiceImpl implements QinCeDealerQueryService { ...@@ -19,6 +24,15 @@ public class QinCeDealerQueryServiceImpl implements QinCeDealerQueryService {
@Override @Override
public void page(PageInfo pageInfo) { public void page(PageInfo pageInfo) {
qinceDealerDao.page(pageInfo); DealerWrapper dealerWrapper = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), DealerWrapper.class);
qinceDealerDao.page(pageInfo,dealerWrapper);
}
@Override
public List<QinCeDealerDto> findList(String dealerName) {
DealerWrapper dw = new DealerWrapper();
dw.setDealerName(dealerName);
List<QinCeDealerDto> dtos = qinceDealerDao.selectList(dw);
return dtos;
} }
} }
...@@ -160,9 +160,9 @@ public class QinCeUtils { ...@@ -160,9 +160,9 @@ public class QinCeUtils {
params.put("page_number", pageNum); params.put("page_number", pageNum);
params.put("status", "1"); params.put("status", "1");
// todo 全量数据同步后,再开启指定日期同步 // 全量数据同步后,再开启指定日期同步
// DateTime dateTime = DateUtil.offsetDay(new Date(), -7); DateTime dateTime = DateUtil.offsetDay(new Date(), -7);
// params.put("after_create_date", DateUtil.format(dateTime, DatePattern.NORM_DATETIME_PATTERN)); params.put("after_create_date", DateUtil.format(dateTime, DatePattern.NORM_DATETIME_PATTERN));
return params; return params;
} }
} }
package com.wangxiaolu.promotion.xxljobtask;
import com.wangxiaolu.promotion.service.activity.manage.ActivityTypeQueryService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author : liqiulin
* @date : 2024-09-10 12
* @describe : 活动类型操作
*/
@Component
@Slf4j
public class ActivityTypeXxlJobHandler {
@Autowired
private ActivityTypeQueryService activityTypeQueryService;
@XxlJob("activity_type_pattern")
public void activityTypePattern(){
activityTypeQueryService.patternToRedis();
}
}
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
<result property="employeeId" column="employee_id" jdbcType="INTEGER"/> <result property="employeeId" column="employee_id" jdbcType="INTEGER"/>
<result property="employeeName" column="employee_name" jdbcType="VARCHAR"/> <result property="employeeName" column="employee_name" jdbcType="VARCHAR"/>
<result property="employeeNo" column="employee_no" jdbcType="VARCHAR"/> <result property="employeeNo" column="employee_no" jdbcType="VARCHAR"/>
<result property="activityMonth" column="activity_month" jdbcType="CHAR"/>
<result property="city" column="city" jdbcType="VARCHAR"/> <result property="city" column="city" jdbcType="VARCHAR"/>
<result property="dealerId" column="dealer_id" jdbcType="VARCHAR"/> <result property="dealerId" column="dealer_id" jdbcType="VARCHAR"/>
<result property="dealerName" column="dealer_name" jdbcType="VARCHAR"/> <result property="dealerName" column="dealer_name" jdbcType="VARCHAR"/>
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,activity_plan_record_id,excel_filed_id, id,activity_plan_record_id,excel_filed_id,
employee_id,employee_name,employee_no, employee_id,employee_name,employee_no,
activity_month,city,dealer_id, city,dealer_id,
dealer_name,line_name,store_name, dealer_name,line_name,store_name,
activity_pattern,activity_start_date,activity_end_date, activity_pattern,activity_start_date,activity_end_date,
hupi_count,qugu_count,temporary_on_time, hupi_count,qugu_count,temporary_on_time,
...@@ -38,13 +37,13 @@ ...@@ -38,13 +37,13 @@
<insert id="saveList"> <insert id="saveList">
insert into employee_activity_plan_info (activity_plan_record_id, excel_filed_id, employee_id, employee_name, insert into employee_activity_plan_info (activity_plan_record_id, excel_filed_id, employee_id, employee_name,
employee_no, activity_month, city, dealer_id, dealer_name, line_name, employee_no, city, dealer_id, dealer_name, line_name,
store_name, activity_pattern) store_name, activity_pattern, activity_pattern_id)
values values
<foreach collection="dos" item="item" separator=","> <foreach collection="dos" item="item" separator=",">
(#{item.activityPlanRecordId},#{item.excelFiledId},#{item.employeeId},#{item.employeeName}, (#{item.activityPlanRecordId},#{item.excelFiledId},#{item.employeeId},#{item.employeeName},
#{item.employeeNo},#{item.activityMonth},#{item.city},#{item.dealerId},#{item.dealerName},#{item.lineName}, #{item.employeeNo},#{item.city},#{item.dealerId},#{item.dealerName},#{item.lineName},
#{item.storeName},#{item.activityPattern}) #{item.storeName},#{item.activityPattern},#{item.activityPatternId})
</foreach> </foreach>
</insert> </insert>
...@@ -52,4 +51,11 @@ ...@@ -52,4 +51,11 @@
update employee_activity_plan_info set is_delete = 0 where activity_plan_record_id = #{recordId} update employee_activity_plan_info set is_delete = 0 where activity_plan_record_id = #{recordId}
</update> </update>
<select id="findStoreNameByEmployeeId" resultType="java.lang.String">
select store_name
from employee_activity_plan_info
where employee_id = #{employeeId}
and is_delete = 1;
</select>
</mapper> </mapper>
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<result property="excelUrl" column="excel_url" jdbcType="VARCHAR"/> <result property="excelUrl" column="excel_url" jdbcType="VARCHAR"/>
<result property="excelFiledId" column="excel_filed_id" jdbcType="VARCHAR"/> <result property="excelFiledId" column="excel_filed_id" jdbcType="VARCHAR"/>
<result property="createDate" column="create_date" jdbcType="DATE"/> <result property="createDate" column="create_date" jdbcType="DATE"/>
<result property="activityMonth" column="activity_month" jdbcType="CHAR"/> <!-- <result property="activityMonth" column="activity_month" jdbcType="CHAR"/>-->
<result property="monthStartDate" column="month_start_date" jdbcType="DATE"/> <!-- <result property="monthStartDate" column="month_start_date" jdbcType="DATE"/>-->
<result property="monthEndDate" column="month_end_date" jdbcType="DATE"/> <!-- <result property="monthEndDate" column="month_end_date" jdbcType="DATE"/>-->
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modifyTime" column="modify_time" jdbcType="TIMESTAMP"/> <result property="modifyTime" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="deleteTime" column="delete_time" jdbcType="TIME"/> <result property="deleteTime" column="delete_time" jdbcType="TIME"/>
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
<result property="noonClockOutAddress" column="noon_clock_out_address" jdbcType="VARCHAR"/> <result property="noonClockOutAddress" column="noon_clock_out_address" jdbcType="VARCHAR"/>
<result property="noonClockInAddress" column="noon_clock_in_address" jdbcType="VARCHAR"/> <result property="noonClockInAddress" column="noon_clock_in_address" jdbcType="VARCHAR"/>
<result property="clockOutAddress" column="clock_out_address" jdbcType="VARCHAR"/> <result property="clockOutAddress" column="clock_out_address" jdbcType="VARCHAR"/>
<result property="deptQcOrgName" column="dept_qc_org_name" jdbcType="VARCHAR"/>
<result property="chargerName" column="charger_name" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -36,46 +38,81 @@ ...@@ -36,46 +38,81 @@
modify_time modify_time
</sql> </sql>
<!-- where tc.id &lt;= (select max(id)
from temporary_activity_clock)-->
<select id="employeePageFirsd" resultMap="BaseResultMap"> <select id="employeePageFirsd" resultMap="BaseResultMap">
select tc.id, select id,
tc.temporary_name, temporary_name,
tc.create_date, create_date,
tc.store_name, store_name,
tc.clock_in_time, clock_in_time,
tc.noon_clock_out_time, noon_clock_out_time,
tc.noon_clock_in_time, noon_clock_in_time,
tc.clock_out_time, clock_out_time,
tc.clock_province, clock_province,
tc.clock_city, clock_city,
tc.clock_in_address, clock_in_address,
tc.noon_clock_out_address, noon_clock_out_address,
tc.noon_clock_in_address, noon_clock_in_address,
tc.clock_out_address, clock_out_address,
tc.activity_pattern_id, activity_pattern_id,
tc.activity_pattern, activity_pattern,
ti.dept_qc_org_name, dept_qc_org_name,
ti.charger_name charger_name
from temporary_info ti from temporary_activity_clock
inner join temporary_activity_clock tc on ti.id = tc.temporary_id
<where> <where>
<if test="tcw != null"> <if test="tcw != null">
<if test="tcw.clockOutTimeIsNull != null and tcw.clockOutTimeIsNull == true"> <if test="tcw.clockOutTimeIsNull != null and tcw.clockOutTimeIsNull == true">
and tc.clock_out_time is null and clock_out_time is null
</if> </if>
<if test="tcw.createDateStart != null and tcw.createDateEnd != null"> <if test="tcw.createDateStart != null and tcw.createDateEnd != null">
and (tc.create_date between #{tcw.createDateStart} and #{tcw.createDateEnd}) and (create_date between #{tcw.createDateStart} and #{tcw.createDateEnd})
</if> </if>
<if test="tcw.nameLike != null"> <if test="tcw.nameLike != null">
and ti.name like concat('%',#{tcw.nameLike},'%') and temporary_name like concat('%',#{tcw.nameLike},'%')
</if> </if>
</if> </if>
and tc.is_delete = 1 and is_delete = 1
</where> </where>
order by id desc order by id desc
limit #{skipNum}, #{pageSize}; limit #{skipNum}, #{pageSize};
</select> </select>
<!-- <select id="employeePageFirsd" resultMap="BaseResultMap">-->
<!-- select tc.id,-->
<!-- tc.temporary_name,-->
<!-- tc.create_date,-->
<!-- tc.store_name,-->
<!-- tc.clock_in_time,-->
<!-- tc.noon_clock_out_time,-->
<!-- tc.noon_clock_in_time,-->
<!-- tc.clock_out_time,-->
<!-- tc.clock_province,-->
<!-- tc.clock_city,-->
<!-- tc.clock_in_address,-->
<!-- tc.noon_clock_out_address,-->
<!-- tc.noon_clock_in_address,-->
<!-- tc.clock_out_address,-->
<!-- tc.activity_pattern_id,-->
<!-- tc.activity_pattern,-->
<!-- ti.dept_qc_org_name,-->
<!-- ti.charger_name-->
<!-- from temporary_info ti-->
<!-- inner join temporary_activity_clock tc on ti.id = tc.temporary_id-->
<!-- <where>-->
<!-- <if test="tcw != null">-->
<!-- <if test="tcw.clockOutTimeIsNull != null and tcw.clockOutTimeIsNull == true">-->
<!-- and tc.clock_out_time is null-->
<!-- </if>-->
<!-- <if test="tcw.createDateStart != null and tcw.createDateEnd != null">-->
<!-- and (tc.create_date between #{tcw.createDateStart} and #{tcw.createDateEnd})-->
<!-- </if>-->
<!-- <if test="tcw.nameLike != null">-->
<!-- and ti.name like concat('%',#{tcw.nameLike},'%')-->
<!-- </if>-->
<!-- </if>-->
<!-- and tc.is_delete = 1-->
<!-- </where>-->
<!-- order by id desc-->
<!-- limit #{skipNum}, #{pageSize};-->
<!-- </select>-->
<select id="employeePageCount" resultType="integer"> <select id="employeePageCount" resultType="integer">
select count(*) select count(*)
......
<?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.wangxiaolu.promotion.domain.manage.mapper.TemporaryActivityTypeMapper">
<resultMap id="BaseResultMap" type="com.wangxiaolu.promotion.domain.manage.mapper.entity.TemporaryActivityTypeDO">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="type" column="type" jdbcType="INTEGER"/>
<result property="activityPatternId" column="activity_pattern_id" jdbcType="INTEGER"/>
<result property="activityPattern" column="activity_pattern" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,type,activity_pattern_id,
activity_pattern
</sql>
<select id="selectPatternList" resultMap="BaseResultMap">
select activity_pattern_id,activity_pattern from temporary_activity_type where type = #{type};
</select>
</mapper>
package com.wangxiaolu.promotion.xxljobtask;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.jupiter.api.Assertions.*;
/**
* @author : liqiulin
* @date : 2024-09-10 13
* @describe :
*/
@SpringBootTest
@RunWith(SpringRunner.class)
class ActivityTypeXxlJobHandlerTest {
@Autowired
ActivityTypeXxlJobHandler activityTypeXxlJobHandler;
@Test
void activityTypePattern() {
activityTypeXxlJobHandler.activityTypePattern();
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论