提交 02275ba9 authored 作者: 000516's avatar 000516 提交者: Coding

1、促销员上报取消售卖单元记录;2、 促销员注册-注册失败时提示信息细化

[1-4在上个commit中] 5促销员注册-注册失败时提示信息细化 6促销员上报取消售卖单元记录 7管理后台删除售卖单元记录 8管理后台查看促销上报数据时,可以筛选[未审核][已审核][全部数据]三种状态
...@@ -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.6</version> <version>0.1.7</version>
<name>wangxiaolu-promotion-service</name> <name>wangxiaolu-promotion-service</name>
<description>promotion-service</description> <description>promotion-service</description>
......
...@@ -98,12 +98,10 @@ public class TemporaryActivityQueryController { ...@@ -98,12 +98,10 @@ public class TemporaryActivityQueryController {
}else if (CollectionUtils.isEmpty(activityReportedDto.getPsvPhotoUrls())){ }else if (CollectionUtils.isEmpty(activityReportedDto.getPsvPhotoUrls())){
throw new DataException(RCode.NOT_POS_PHOTO_ERROR); throw new DataException(RCode.NOT_POS_PHOTO_ERROR);
} }
// List<TemporaryActivityMarketCellDto> marketCells = temporaryActivityQueryService.findActivityMarketCellByDb(activityId);
List<TemporaryActivityMarketCellDto> marketCells = temporaryActivityQueryService.findActivityMarketCellByDb(activityId); // if (CollectionUtils.isEmpty(marketCells)){
if (CollectionUtils.isEmpty(marketCells)){ // throw new DataException(RCode.NOT_MARKET_CELL_ERROR);
throw new DataException(RCode.NOT_MARKET_CELL_ERROR); // }
}
return R.success(); return R.success();
} }
} }
...@@ -45,8 +45,11 @@ public class WeChatUserCoreController { ...@@ -45,8 +45,11 @@ public class WeChatUserCoreController {
// 人员信息校验 // 人员信息校验
boolean isIden = DataUtils.idenCardPattern(wxTemporaryEnrollVo.getIdenNumber()); boolean isIden = DataUtils.idenCardPattern(wxTemporaryEnrollVo.getIdenNumber());
boolean isPhone = DataUtils.phonePattern(wxTemporaryEnrollVo.getPhone()); boolean isPhone = DataUtils.phonePattern(wxTemporaryEnrollVo.getPhone());
if (!isIden || !isPhone) { if (!isIden) {
throw new ParamException(RCode.ENROLL_PARAM_ERROR, null); throw new ParamException(RCode.IDEN_NUMBER_PARAM_ERROR, null);
}
if (!isPhone) {
throw new ParamException(RCode.PHONE_PARAM_ERROR, null);
} }
/** /**
......
...@@ -53,7 +53,7 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport ...@@ -53,7 +53,7 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
} }
/** /**
* 根据促销员id查询所有任务 * 分布查询数据
*/ */
@Override @Override
public void findPage(TemporaryActivityWrapper taw, PageInfo pageInfo) { public void findPage(TemporaryActivityWrapper taw, PageInfo pageInfo) {
......
...@@ -20,6 +20,7 @@ public enum TemActApproveStatus { ...@@ -20,6 +20,7 @@ public enum TemActApproveStatus {
IN_APPROVAL("审批中"), IN_APPROVAL("审批中"),
APPROVED("审批通过"), APPROVED("审批通过"),
SEND_BACK("退回"), SEND_BACK("退回"),
ALL("ALL"),
; ;
private String msg; private String msg;
......
...@@ -90,19 +90,33 @@ public class WxTemporaryEnrollVo { ...@@ -90,19 +90,33 @@ public class WxTemporaryEnrollVo {
String chargerName; String chargerName;
public void validate() { public void validate() {
if ( if (StringUtils.isBlank(openId)){
StringUtils.isBlank(openId) || throw new ParamException(RCode.WX_OPENID_PARAM_ERROR, null);
StringUtils.isBlank(avatarUrl) || }
StringUtils.isBlank(name) ||
StringUtils.isBlank(phone) || if (StringUtils.isBlank(avatarUrl)){
StringUtils.isBlank(phoneCode) || throw new ParamException(RCode.NOT_AVATAR_URL_PARAM_ERROR, null);
StringUtils.isBlank(idenNumber) || }
StringUtils.isBlank(openId) ||
StringUtils.isBlank(chargerQcId) || if (StringUtils.isBlank(name)){
StringUtils.isBlank(deptQcId) throw new ParamException(RCode.NOT_USER_NAME_PARAM_ERROR, null);
) { }
throw new ParamException(RCode.ENROLL_PARAM_ERROR, null);
} if (StringUtils.isBlank(phone)){
throw new ParamException(RCode.PHONE_PARAM_ERROR, null);
}
if (StringUtils.isBlank(phoneCode)){
throw new ParamException(RCode.TENCENT_SMS_PHONE_CODE_ERROR, null);
}
if (StringUtils.isBlank(idenNumber)){
throw new ParamException(RCode.IDEN_NUMBER_PARAM_ERROR, null);
}
if (StringUtils.isBlank(chargerQcId)){
throw new ParamException(RCode.CHARGER_ID_ERROR, null);
}
} }
} }
...@@ -35,8 +35,8 @@ public class EmployeeCoreTemActivityServiceImpl implements EmployeeCoreTemActivi ...@@ -35,8 +35,8 @@ public class EmployeeCoreTemActivityServiceImpl implements EmployeeCoreTemActivi
private TemporaryActivityReportedDao temporaryActivityReportedDao; private TemporaryActivityReportedDao temporaryActivityReportedDao;
@Autowired @Autowired
private TemporaryActivityLogDao tempActivityLogDao; private TemporaryActivityLogDao tempActivityLogDao;
@Autowired // @Autowired
private TemporaryActivityMarketCellDao temporaryActivityMarketCellDao; // private TemporaryActivityMarketCellDao temporaryActivityMarketCellDao;
@Autowired @Autowired
private TemporaryActivityPhotoDao temporaryActivityPhotoDao; private TemporaryActivityPhotoDao temporaryActivityPhotoDao;
...@@ -81,7 +81,7 @@ public class EmployeeCoreTemActivityServiceImpl implements EmployeeCoreTemActivi ...@@ -81,7 +81,7 @@ public class EmployeeCoreTemActivityServiceImpl implements EmployeeCoreTemActivi
temporaryActivityReportedDao.updateById(updateDto); temporaryActivityReportedDao.updateById(updateDto);
// 删除售卖单元 // 删除售卖单元
temporaryActivityMarketCellDao.deleteByActivityReportedId(activityDo.getId()); // temporaryActivityMarketCellDao.deleteByActivityReportedId(activityDo.getId());
// 删除记录图片 // 删除记录图片
TemporaryPhotoWrapper tpw = new TemporaryPhotoWrapper(); TemporaryPhotoWrapper tpw = new TemporaryPhotoWrapper();
......
...@@ -47,7 +47,9 @@ public class EmployeeQueryTemActivityServiceImpl implements EmployeeQueryTemActi ...@@ -47,7 +47,9 @@ public class EmployeeQueryTemActivityServiceImpl implements EmployeeQueryTemActi
public void getEmployeeApproveActivityPage(String employeeQcId, PageInfo pageInfo) { public void getEmployeeApproveActivityPage(String employeeQcId, PageInfo pageInfo) {
TemporaryActivityWrapper tw = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), TemporaryActivityWrapper.class); TemporaryActivityWrapper tw = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), TemporaryActivityWrapper.class);
tw = Objects.isNull(tw) ? new TemporaryActivityWrapper() : tw; tw = Objects.isNull(tw) ? new TemporaryActivityWrapper() : tw;
// tw.setNotApproveStatus(TemActApproveStatus.SUBMITTED.name()); if (TemActApproveStatus.ALL.name().equals(tw.getApproveStatus())){
tw.setApproveStatus(null);
}
temporaryActivityReportedDao.findPage(tw, pageInfo); temporaryActivityReportedDao.findPage(tw, pageInfo);
// 查询活动记录关联的售卖单元列表(一次性查出) // 查询活动记录关联的售卖单元列表(一次性查出)
...@@ -62,7 +64,7 @@ public class EmployeeQueryTemActivityServiceImpl implements EmployeeQueryTemActi ...@@ -62,7 +64,7 @@ public class EmployeeQueryTemActivityServiceImpl implements EmployeeQueryTemActi
repClockInfo(activityIds,records); repClockInfo(activityIds,records);
// 查询售卖商品信息 // 查询售卖商品信息
repMarketCell(activityIds,records); // repMarketCell(activityIds,records);
} }
/** /**
......
...@@ -89,18 +89,16 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -89,18 +89,16 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
// 保存图片 // 保存图片
saveActivityPhoto(temActDto); saveActivityPhoto(temActDto);
/** // 售卖单元新增保存
* 售卖单元新增保存 // String key = temMarketCellRedisKey(temActDto.getTemporaryId());
*/ // temporaryActivityMarketCellDao.saveList(reportedId,redisCache.getToJsonArray(key));
String key = temMarketCellRedisKey(temActDto.getTemporaryId());
temporaryActivityMarketCellDao.saveList(reportedId,redisCache.getToJsonArray(key));
/** /**
* 日志保存 * 日志保存
*/ */
tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto); tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto);
redisCache.removeKey(key); // redisCache.removeKey(key);
return reportedId; return reportedId;
} }
...@@ -116,10 +114,9 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -116,10 +114,9 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
temporaryActivityReportedDao.updateById(temActDto); temporaryActivityReportedDao.updateById(temActDto);
// 售卖单元新增保存 // 售卖单元新增保存
String key = temMarketCellRedisKey(temActDto.getTemporaryId()); // String key = temMarketCellRedisKey(temActDto.getTemporaryId());
temporaryActivityMarketCellDao.saveList(temActDto.getId(),redisCache.getToJsonArray(key)); // temporaryActivityMarketCellDao.saveList(temActDto.getId(),redisCache.getToJsonArray(key));
// redisCache.removeKey(key);
redisCache.removeKey(key);
// 日志保存 // 日志保存
tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto); tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto);
} }
...@@ -138,11 +135,6 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -138,11 +135,6 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
throw new ParamException(RCode.DATA_NOT_HAVE_ERROR, null); throw new ParamException(RCode.DATA_NOT_HAVE_ERROR, null);
} }
// TemActApproveStatus approveStatus = reportedDto.getApproveStatus();
// if (!TemActApproveStatus.SUBMITTED.name().equals(approveStatus.name()) && !TemActApproveStatus.SEND_BACK.name().equals(approveStatus.name())) {
// throw new FlowException(RCode.STATUS_UPDATE_ERROR, null);
// }
// 查询促销员负责人,将人员补充到审批中 // 查询促销员负责人,将人员补充到审批中
WxTemporaryInfoDto wxTemporaryInfoDto = temporaryInfoDao.selectOneById(reportedDto.getTemporaryId()); WxTemporaryInfoDto wxTemporaryInfoDto = temporaryInfoDao.selectOneById(reportedDto.getTemporaryId());
TemporaryActivityReportedDto updateDto = new TemporaryActivityReportedDto() TemporaryActivityReportedDto updateDto = new TemporaryActivityReportedDto()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论