add
This commit is contained in:
@@ -110,5 +110,6 @@ public interface LineService {
|
||||
Integer updatePartnerName(String username,Long lineId);
|
||||
|
||||
Integer updateRegionId(Long regionId,Long lineId);
|
||||
Boolean hasRegionId(Long lineId);
|
||||
|
||||
}
|
||||
|
||||
@@ -651,6 +651,18 @@ public class LineServiceImpl implements LineService {
|
||||
return lineInfoDAO.updateLineInfo(lineInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean hasRegionId(Long lineId) {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
if (lineInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (lineInfo.getRegionId() != null&&lineInfo.getRegionId() != 0 ){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算预期时间
|
||||
* @param startTime
|
||||
|
||||
@@ -185,5 +185,10 @@ public class LineInfoController {
|
||||
public ResponseResult<Integer> updateLineRegion(@RequestParam("regionId")Long regionId,@RequestParam("lineId")Long lineId) {
|
||||
return ResponseResult.success(lineService.updateRegionId(regionId,lineId));
|
||||
}
|
||||
@ApiOperation("判断是否有所属大区/分公司 0否 1是")
|
||||
@GetMapping("/hasLineRegion")
|
||||
public ResponseResult<Boolean> hasLineRegion(@RequestParam("lineId")Long lineId) {
|
||||
return ResponseResult.success(lineService.hasRegionId(lineId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user