提交 fffaa0cf authored 作者: 李秋林's avatar 李秋林

当促销类型是mini秀、校园活动,允许计划被多次使用

上级 4a0f8366
......@@ -33,11 +33,11 @@ public class TemporaryActivityPlanQueryController {
}
/**
* todo 小程序端促销员查询促销计划
* 小程序端促销员查询促销计划
*/
@GetMapping("/plans")
public R findActivityPlanInfo(TemporaryActivityPlanVo temporaryActivityPlanVo){
return R.success(promPlanQueryService.findList(temporaryActivityPlanVo));
return R.success(promPlanQueryService.findClockList(temporaryActivityPlanVo));
}
......
......@@ -55,7 +55,6 @@ public class PromPlanCoreController {
String[] urlArr = activityPlanVo.getExcelUrl().split("/");
String fileId = urlArr[urlArr.length - 1];
String filePath = "/root/promotion/planv2/" + fileId;
//todo String filePath = "/Users/a02200059/Desktop/2.0/" + fileId;
FileUtils.downloadExcel(activityPlanVo.getExcelUrl(), filePath);
activityPlanVo.setExcelId(fileId);
Map<String, Object> map = promPlanCoreService.selfPlanUp(activityPlanVo, filePath);
......@@ -87,7 +86,6 @@ public class PromPlanCoreController {
String[] urlArr = activityPlanVo.getExcelUrl().split("/");
String fileId = urlArr[urlArr.length - 1];
String filePath = "/root/promotion/planv2/" + fileId;
// todo String filePath = "/Users/a02200059/Desktop/2.0/" + fileId;
FileUtils.downloadExcel(activityPlanVo.getExcelUrl(), filePath);
activityPlanVo.setExcelId(fileId);
Map<String, Object> map = promPlanCoreService.authPlanUp(activityPlanVo, filePath);
......@@ -127,7 +125,6 @@ public class PromPlanCoreController {
String[] urlArr = activityPlanVo.getExcelUrl().split("/");
String fileId = urlArr[urlArr.length - 1];
String filePath = "/root/promotion/planv2/" + fileId;
//todo String filePath = "/Users/a02200059/Desktop/2.0/" + fileId;
FileUtils.downloadExcel(activityPlanVo.getExcelUrl(), filePath);
activityPlanVo.setExcelId(fileId);
Map<String, Object> map = promPlanCoreService.selfPlanPut(activityPlanVo, filePath);
......
......@@ -31,7 +31,7 @@ public interface ActivityPlanInfoDao {
void save(ActivityPlanInfoDto planDto);
List<ActivityPlanInfoDto> findList(ActivityPlanInfoWrapper wrapper);
List<ActivityPlanInfoDto> findClockList(ActivityPlanInfoWrapper wrapper);
void updatePlanStatus(Long planId, PlanStatus planStatus);
}
......@@ -83,9 +83,9 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
}
@Override
public List<ActivityPlanInfoDto> findList(ActivityPlanInfoWrapper wrapper) {
LambdaQueryWrapper<ActivityPlanInfoDo> qw = buildWrapper(wrapper);
List<ActivityPlanInfoDo> activityPlanInfoDos = activityPlanInfoMapper.selectList(qw);
public List<ActivityPlanInfoDto> findClockList(ActivityPlanInfoWrapper wrapper) {
// LambdaQueryWrapper<ActivityPlanInfoDo> qw = buildWrapper(wrapper);
List<ActivityPlanInfoDo> activityPlanInfoDos = activityPlanInfoMapper.findClockList(wrapper);
return BeanUtils.transitionDtos(activityPlanInfoDos, ActivityPlanInfoDto.class);
}
......
......@@ -3,6 +3,7 @@ package com.wangxiaolu.promotion.domain.activityplanv2.mapper;
import com.alibaba.fastjson.JSONArray;
import com.wangxiaolu.promotion.domain.activityplanv2.mapper.entity.ActivityPlanInfoDo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -33,6 +34,8 @@ public interface ActivityPlanInfoMapper extends BaseMapper<ActivityPlanInfoDo> {
Integer selectTodayCount(List<Long> planIds);
void updatePlanStatus(@Param("id") Long planId, @Param("status") Integer status);
List<ActivityPlanInfoDo> findClockList(ActivityPlanInfoWrapper wrapper);
}
......
......@@ -14,7 +14,7 @@ import java.util.List;
public interface PromPlanQueryService {
void queryPage(PageInfo pageInfo);
List<ActivityPlanInfoDto> findList(TemporaryActivityPlanVo temporaryActivityPlanVo);
List<ActivityPlanInfoDto> findClockList(TemporaryActivityPlanVo temporaryActivityPlanVo);
ActivityPlanInfoDto selectById(Long planId);
}
......@@ -37,12 +37,12 @@ public class PromPlanQueryServiceImpl implements PromPlanQueryService {
* 促销员查询
*/
@Override
public List<ActivityPlanInfoDto> findList(TemporaryActivityPlanVo temporaryActivityPlanVo) {
public List<ActivityPlanInfoDto> findClockList(TemporaryActivityPlanVo temporaryActivityPlanVo) {
ActivityPlanInfoWrapper wrapper = JSONObject.parseObject(JSONObject.toJSONString(temporaryActivityPlanVo), ActivityPlanInfoWrapper.class);
wrapper.setActivityDate(Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant()));
wrapper.setPlanStatus(PlanStatus.NOT_EXECUTION);
wrapper.setLimitNum(50);
return activityPlanInfoDao.findList(wrapper);
return activityPlanInfoDao.findClockList(wrapper);
}
@Override
......
......@@ -155,4 +155,24 @@
where id = #{id}
</update>
<select id="findClockList" parameterType="com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper" resultMap="BaseResultMap">
select id,
employee_name, date, line_name, store_name, store_code, pattern, dealer_id, dealer_name, province, city, area,
addr, clock_in_time, clock_out_time, plan_status
from activity_plan_info
<where>
date = #{activityDate} and is_delete = 1
<if test="city != null and city != ''">
and city = #{city}
</if>
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="storeNameLike != null and storeNameLike != ''">
and store_name like concat('%',#{storeNameLike},'%')
</if>
and ( plan_status = 0 or pattern != '单点CP' )
</where>
limit 50
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论