Merge #25 into master from cc_20260113_fix

feat:updateLineRegion

* cc_20260113_fix: (1 commits squashed)

  - feat:updateLineRegion

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/25
This commit is contained in:
正新
2026-01-13 07:17:35 +00:00
parent e62cd9bff9
commit 6a3d589d0c
3 changed files with 8 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ public interface LineService {
*/ */
Integer updatePartnerName(String username,Long lineId); Integer updatePartnerName(String username,Long lineId);
Integer updateRegionId(Long regionId,Long lineId); Integer updateRegionId(Long regionId,Long investRegionId,Long lineId);
Boolean hasRegionId(Long lineId); Boolean hasRegionId(Long lineId);
/** /**

View File

@@ -655,7 +655,7 @@ public class LineServiceImpl implements LineService {
} }
@Override @Override
public Integer updateRegionId(Long regionId, Long lineId) { public Integer updateRegionId(Long regionId,Long investRegionId, Long lineId) {
log.info("regionID:{}",regionId); log.info("regionID:{}",regionId);
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId); LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null) { if (lineInfo == null) {
@@ -664,6 +664,7 @@ public class LineServiceImpl implements LineService {
LineInfoDO lineInfoDO = new LineInfoDO(); LineInfoDO lineInfoDO = new LineInfoDO();
lineInfoDO.setId(lineId); lineInfoDO.setId(lineId);
lineInfoDO.setRegionId(regionId); lineInfoDO.setRegionId(regionId);
lineInfoDO.setInvestRegionId(investRegionId);
lineInfoDO.setUpdateTime(new Date()); lineInfoDO.setUpdateTime(new Date());
return lineInfoDAO.updateLineInfo(lineInfoDO); return lineInfoDAO.updateLineInfo(lineInfoDO);
} }
@@ -674,7 +675,7 @@ public class LineServiceImpl implements LineService {
if (lineInfo == null) { if (lineInfo == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
if (lineInfo.getRegionId() != null&&lineInfo.getRegionId() != 0 ){ if ((lineInfo.getRegionId() != null&&lineInfo.getRegionId() != 0) && lineInfo.getInvestRegionId() != null&&lineInfo.getInvestRegionId() != 0){
return true; return true;
} }
return false; return false;

View File

@@ -182,8 +182,10 @@ public class LineInfoController {
@ApiOperation("修改所属大区/分公司") @ApiOperation("修改所属大区/分公司")
@GetMapping("/updateLineRegion") @GetMapping("/updateLineRegion")
public ResponseResult<Integer> updateLineRegion(@RequestParam("regionId")Long regionId,@RequestParam("lineId")Long lineId) { public ResponseResult<Integer> updateLineRegion(@RequestParam("regionId")Long regionId,
return ResponseResult.success(lineService.updateRegionId(regionId,lineId)); @RequestParam("investRegionId")Long investRegionId,
@RequestParam("lineId")Long lineId) {
return ResponseResult.success(lineService.updateRegionId(regionId,investRegionId,lineId));
} }
@ApiOperation("判断是否有所属大区/分公司 0否 1是") @ApiOperation("判断是否有所属大区/分公司 0否 1是")
@GetMapping("/hasLineRegion") @GetMapping("/hasLineRegion")