加盟意向

This commit is contained in:
guohb
2024-03-22 15:28:17 +08:00
parent dc6f7abb8f
commit 79e2e57ca2
3 changed files with 12 additions and 1 deletions

View File

@@ -4,14 +4,18 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
@ApiModel("加盟意向Request")
public class JoinIntentionRequest {
@ApiModelProperty("线索信息表-线索id")
@NotBlank(message = "线索id不能为空")
private Long lineId;
@ApiModelProperty("用户信息表partnerId")
@NotBlank(message = "partnerId不能为空")
private String partnerId;
@ApiModelProperty("加盟身份 1个人加盟 2企业加盟")

View File

@@ -8,6 +8,7 @@ import com.cool.store.mapper.JoinIntentionMapper;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.JoinIntentionRequest;
import com.cool.store.service.JoinIntentionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -15,6 +16,7 @@ import javax.annotation.Resource;
import java.util.Objects;
@Service
@Slf4j
public class JoinIntentionServiceImpl implements JoinIntentionService {
@Resource
@@ -33,6 +35,9 @@ public class JoinIntentionServiceImpl implements JoinIntentionService {
if (submitStatus){
//更改线索流程子状态为【待审核】
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
if (Objects.isNull(lineInfoDO)){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
}
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
}

View File

@@ -8,10 +8,12 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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;
import javax.annotation.Resource;
import javax.validation.Valid;
@RestController
@RequestMapping({"/mini/JoinIntention"})
@@ -24,7 +26,7 @@ public class MiniJoinIntentionController {
@PostMapping(path = "/getOpenAreaList")
@ApiOperation("填写加盟意向申请书")
public ResponseResult<Boolean> submit(JoinIntentionRequest request) {
public ResponseResult<Boolean> submit(@RequestBody @Valid JoinIntentionRequest request) {
return ResponseResult.success(joinIntentionService.submit(request));
}
}