|
@@ -18,6 +18,7 @@ import com.gree.mall.miniapp.plus.service.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
@@ -142,9 +143,16 @@ public class WorkerTeamLogic {
|
|
|
workerTeam.insert();
|
|
|
}
|
|
|
|
|
|
+ @Transactional
|
|
|
public void confirm(String id, ExamineStatusEnum status) {
|
|
|
CurrentCompanyWechat current = commonLogic.getCurrentCompanyWechat();
|
|
|
final WorkerTeamApply apply = workerTeamApplyService.getById(id);
|
|
|
+ if (!apply.getStatus().equals(ExamineStatusEnum.WAIT.getKey())) {
|
|
|
+ throw new RemoteServiceException("申请记录非”待确认“状态");
|
|
|
+ }
|
|
|
+ if (apply.getMasterWorkerId().equals(current.getUser().getWorkerNumber())) {
|
|
|
+ throw new RemoteServiceException("申请发起人不能”确认“记录");
|
|
|
+ }
|
|
|
if (status.getKey().equals(ExamineStatusEnum.OK.getKey())) {
|
|
|
new WorkerTeam()
|
|
|
.setCompanyWechatId(apply.getCompanyWechatId())
|