|
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.TenantApplyCallRecordDao;
|
|
|
+import com.ym.mec.biz.dal.entity.TenantApply;
|
|
|
import com.ym.mec.biz.dal.entity.TenantApplyCallRecord;
|
|
|
import com.ym.mec.biz.service.TenantApplyCallRecordService;
|
|
|
+import com.ym.mec.biz.service.TenantApplyService;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.page.PageUtil;
|
|
@@ -19,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
|
|
|
/**
|
|
@@ -35,12 +36,15 @@ public class TenantApplyCallRecordServiceImpl extends ServiceImpl<TenantApplyCal
|
|
|
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
+ @Autowired
|
|
|
+ private TenantApplyService tenantApplyService;
|
|
|
|
|
|
@Override
|
|
|
public PageInfo<TenantApplyCallRecord> queryPage(Map<String, Object> param) {
|
|
|
int pageSize = PageUtil.getPage(param, "rows").orElse(50);
|
|
|
int pageIndex = PageUtil.getPage(param, "page").orElse(1);
|
|
|
Page<TenantApplyCallRecord> pageInfo = new Page<>(pageIndex, pageSize);
|
|
|
+ pageInfo.setDesc("create_time_");
|
|
|
IPage<TenantApplyCallRecord> page = this.page(pageInfo,
|
|
|
new WrapperUtil<TenantApplyCallRecord>()
|
|
|
.hasEq("tenant_apply_id_", param.get("applyId"))
|
|
@@ -55,11 +59,18 @@ public class TenantApplyCallRecordServiceImpl extends ServiceImpl<TenantApplyCal
|
|
|
Optional<TenantApplyCallRecord> optional = Optional.ofNullable(obj);
|
|
|
optional.orElseThrow(() -> new BizException("参数异常!"));
|
|
|
optional.map(TenantApplyCallRecord::getTenantApplyId)
|
|
|
- .orElseThrow(() -> new BizException("参数异常"));
|
|
|
+ .orElseThrow(() -> new BizException("参数异常"));
|
|
|
optional.map(TenantApplyCallRecord::getCallBackLog)
|
|
|
.filter(a -> StringUtils.isNotBlank(a) && a.length() <= 140)
|
|
|
.orElseThrow(() -> new BizException("请填写小于140字的沟通记录!"));
|
|
|
obj.setCallBackPeople(getUser().getRealName());
|
|
|
+ //修改申请表数据
|
|
|
+ TenantApply tenantApply = new TenantApply();
|
|
|
+ tenantApply.setId(Long.parseLong(obj.getTenantApplyId().toString()));
|
|
|
+ tenantApply.setCallBackPeople(getUser().getRealName());
|
|
|
+ tenantApply.setCallBackTime(obj.getCreateTime());
|
|
|
+ tenantApplyService.update(tenantApply);
|
|
|
+
|
|
|
return baseMapper.insert(obj);
|
|
|
}
|
|
|
|