|
@@ -5,16 +5,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.gree.mall.manager.bean.activity.PromotionActivityBatchBean;
|
|
import com.gree.mall.manager.bean.activity.PromotionActivityBatchBean;
|
|
import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
|
|
+import com.gree.mall.manager.bean.apply.WorkerInvolveApplyDetail;
|
|
|
|
+import com.gree.mall.manager.bean.apply.WorkerInvolveApplyVO;
|
|
import com.gree.mall.manager.bean.apply.WorkerInvolvePrincipalDetail;
|
|
import com.gree.mall.manager.bean.apply.WorkerInvolvePrincipalDetail;
|
|
import com.gree.mall.manager.bean.apply.WorkerInvolvePrincipalVO;
|
|
import com.gree.mall.manager.bean.apply.WorkerInvolvePrincipalVO;
|
|
import com.gree.mall.manager.bean.es.ESGoodsVO;
|
|
import com.gree.mall.manager.bean.es.ESGoodsVO;
|
|
import com.gree.mall.manager.commonmapper.CommonMapper;
|
|
import com.gree.mall.manager.commonmapper.CommonMapper;
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
-import com.gree.mall.manager.plus.entity.WorkerInvolvePrincipal;
|
|
|
|
-import com.gree.mall.manager.plus.entity.WorkerInvolvePrincipalItem;
|
|
|
|
-import com.gree.mall.manager.plus.service.WorkerInvolvePrincipalItemService;
|
|
|
|
-import com.gree.mall.manager.plus.service.WorkerInvolvePrincipalService;
|
|
|
|
|
|
+import com.gree.mall.manager.plus.entity.*;
|
|
|
|
+import com.gree.mall.manager.plus.service.*;
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -32,6 +32,9 @@ public class WorkerInvolveLogic {
|
|
private final CommonMapper commonMapper;
|
|
private final CommonMapper commonMapper;
|
|
private final WorkerInvolvePrincipalService workerInvolvePrincipalService;
|
|
private final WorkerInvolvePrincipalService workerInvolvePrincipalService;
|
|
private final WorkerInvolvePrincipalItemService workerInvolvePrincipalItemService;
|
|
private final WorkerInvolvePrincipalItemService workerInvolvePrincipalItemService;
|
|
|
|
+ private final WorkerInvolveApplyService workerInvolveApplyService;
|
|
|
|
+ private final WorkerInvolveApplyItemService workerInvolveApplyItemService;
|
|
|
|
+ private final PgOrderBaseService pgOrderBaseService;
|
|
|
|
|
|
public IPage<WorkerInvolvePrincipalVO> list(ZfireParamBean zfireParamBean) {
|
|
public IPage<WorkerInvolvePrincipalVO> list(ZfireParamBean zfireParamBean) {
|
|
|
|
|
|
@@ -89,4 +92,64 @@ public class WorkerInvolveLogic {
|
|
|
|
|
|
workerInvolvePrincipalItemService.saveBatch(bean.getWorkerInvolvePrincipalItems());
|
|
workerInvolvePrincipalItemService.saveBatch(bean.getWorkerInvolvePrincipalItems());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public IPage<WorkerInvolveApplyVO> listApply(ZfireParamBean zfireParamBean) {
|
|
|
|
+
|
|
|
|
+ AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
|
+ FieldUtils.supplyParam(zfireParamBean, WorkerInvolveApplyVO.class, adminUser);
|
|
|
|
+ IPage<WorkerInvolveApplyVO> page = commonMapper.listApply(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
|
|
|
|
+
|
|
|
|
+ return page;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public WorkerInvolveApplyDetail detailApply(String orderBaseId) {
|
|
|
|
+ WorkerInvolveApply workerInvolveApply = workerInvolveApplyService.lambdaQuery()
|
|
|
|
+ .eq(WorkerInvolveApply::getOrderBaseId,orderBaseId)
|
|
|
|
+ .last("limit 1").one();
|
|
|
|
+
|
|
|
|
+ if (workerInvolveApply == null)
|
|
|
|
+ return null;
|
|
|
|
+
|
|
|
|
+ WorkerInvolveApplyDetail workerInvolveApplyDetail = BeanUtil.toBean(workerInvolveApply, WorkerInvolveApplyDetail.class);
|
|
|
|
+
|
|
|
|
+ List<WorkerInvolveApplyItem> workerInvolveApplyItemList = workerInvolveApplyItemService.lambdaQuery()
|
|
|
|
+ .eq(WorkerInvolveApplyItem::getInvolveApplyId, workerInvolveApply.getId())
|
|
|
|
+ .orderByDesc(WorkerInvolveApplyItem::getCreateTime)
|
|
|
|
+ .list();
|
|
|
|
+
|
|
|
|
+ workerInvolveApplyDetail.setWorkerInvolveApplyItems(workerInvolveApplyItemList);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ PgOrderBase pgOrderBase = pgOrderBaseService.getById(workerInvolveApply.getOrderBaseId());
|
|
|
|
+
|
|
|
|
+ workerInvolveApplyDetail.setPgOrderBase(pgOrderBase);
|
|
|
|
+ return workerInvolveApplyDetail;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void websitAppeal(WorkerInvolveApplyItem workerInvolveApplyItem) {
|
|
|
|
+
|
|
|
|
+ WorkerInvolveApply workerInvolveApply = workerInvolveApplyService.getById(workerInvolveApplyItem.getInvolveApplyId());
|
|
|
|
+
|
|
|
|
+ workerInvolveApply.setStatus(workerInvolveApplyItem.getWebsitStatus());
|
|
|
|
+
|
|
|
|
+ workerInvolveApply.updateById();
|
|
|
|
+
|
|
|
|
+ workerInvolveApplyItem.insert();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void appeal(WorkerInvolveApplyItem workerInvolveApplyItem) {
|
|
|
|
+
|
|
|
|
+ if (!workerInvolveApplyItem.getWebsitStatus().equals(5))
|
|
|
|
+ throw new RemoteServiceException("网点未审批通过");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ WorkerInvolveApply workerInvolveApply = workerInvolveApplyService.getById(workerInvolveApplyItem.getInvolveApplyId());
|
|
|
|
+
|
|
|
|
+ workerInvolveApply.setStatus(workerInvolveApplyItem.getStatus());
|
|
|
|
+
|
|
|
|
+ workerInvolveApply.updateById();
|
|
|
|
+
|
|
|
|
+ workerInvolveApplyItem.updateById();
|
|
|
|
+ }
|
|
}
|
|
}
|