Commit 86136bc9 by zhangxingmin

根据保单号批量删除预计发佣数据

parent 088170a8
...@@ -87,4 +87,14 @@ public class ApiExpectedFortuneController implements ApiExpectedFortuneFeignClie ...@@ -87,4 +87,14 @@ public class ApiExpectedFortuneController implements ApiExpectedFortuneFeignClie
public Result<Boolean> isGenerate(String policyNo) { public Result<Boolean> isGenerate(String policyNo) {
return apiExpectedFortuneService.isGenerate(policyNo); return apiExpectedFortuneService.isGenerate(policyNo);
} }
/**
* 根据保单号批量删除预计发佣数据
* @param policyNo
* @return
*/
@Override
public Result batchDelByPolicyNo(String policyNo) {
return apiExpectedFortuneService.batchDelByPolicyNo(policyNo);
}
} }
...@@ -23,4 +23,6 @@ public interface ApiExpectedFortuneService { ...@@ -23,4 +23,6 @@ public interface ApiExpectedFortuneService {
Result<IPage<ApiExpectedFortunePageResponse>> page(ApiExpectedFortunePageRequest request); Result<IPage<ApiExpectedFortunePageResponse>> page(ApiExpectedFortunePageRequest request);
Result<Boolean> isGenerate(String policyNo); Result<Boolean> isGenerate(String policyNo);
Result batchDelByPolicyNo(String policyNo);
} }
...@@ -424,4 +424,15 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -424,4 +424,15 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
} }
return Result.success(); return Result.success();
} }
/**
* 根据保单号批量删除预计发佣数据
* @param policyNo
* @return
*/
@Override
public Result batchDelByPolicyNo(String policyNo) {
iExpectedFortuneService.batchDelByPolicyNo(policyNo);
return Result.success();
}
} }
...@@ -7,10 +7,7 @@ import com.yd.csf.feign.request.expectedfortune.ApiExpectedFortunePageRequest; ...@@ -7,10 +7,7 @@ import com.yd.csf.feign.request.expectedfortune.ApiExpectedFortunePageRequest;
import com.yd.csf.feign.response.expectedfortune.ApiGenerateExpectedFortuneResponse; import com.yd.csf.feign.response.expectedfortune.ApiGenerateExpectedFortuneResponse;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
...@@ -43,4 +40,12 @@ public interface ApiExpectedFortuneFeignClient { ...@@ -43,4 +40,12 @@ public interface ApiExpectedFortuneFeignClient {
*/ */
@GetMapping("/isGenerate") @GetMapping("/isGenerate")
Result<Boolean> isGenerate(@NotBlank(message = "保单号不能为空") @RequestParam(value = "policyNo") String policyNo); Result<Boolean> isGenerate(@NotBlank(message = "保单号不能为空") @RequestParam(value = "policyNo") String policyNo);
/**
* 根据保单号批量删除预计发佣数据
* @param policyNo
* @return
*/
@DeleteMapping("/batch/del/policyNo")
Result batchDelByPolicyNo(@NotBlank(message = "保单号不能为空") @RequestParam(value = "policyNo") String policyNo);
} }
...@@ -34,6 +34,11 @@ public class ApiExpectedFortuneFeignFallbackFactory implements FallbackFactory<A ...@@ -34,6 +34,11 @@ public class ApiExpectedFortuneFeignFallbackFactory implements FallbackFactory<A
public Result<Boolean> isGenerate(String policyNo) { public Result<Boolean> isGenerate(String policyNo) {
return null; return null;
} }
@Override
public Result batchDelByPolicyNo(String policyNo) {
return null;
}
}; };
} }
} }
...@@ -25,4 +25,6 @@ public interface IExpectedFortuneService extends IService<ExpectedFortune> { ...@@ -25,4 +25,6 @@ public interface IExpectedFortuneService extends IService<ExpectedFortune> {
List<ExpectedFortune> listByPolicyBizId(String policyBizId); List<ExpectedFortune> listByPolicyBizId(String policyBizId);
List<ExpectedFortune> queryList(String policyNo); List<ExpectedFortune> queryList(String policyNo);
Boolean batchDelByPolicyNo(String policyNo);
} }
...@@ -46,4 +46,9 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -46,4 +46,9 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
public List<ExpectedFortune> queryList(String policyNo) { public List<ExpectedFortune> queryList(String policyNo) {
return baseMapper.selectList(new LambdaQueryWrapper<ExpectedFortune>().eq(ExpectedFortune::getPolicyNo,policyNo)); return baseMapper.selectList(new LambdaQueryWrapper<ExpectedFortune>().eq(ExpectedFortune::getPolicyNo,policyNo));
} }
@Override
public Boolean batchDelByPolicyNo(String policyNo) {
return this.remove(new LambdaQueryWrapper<ExpectedFortune>().eq(ExpectedFortune::getPolicyNo,policyNo));
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment