|
@@ -273,16 +273,30 @@ public class SmsCheckCustomerInfoController extends JeecgController<SmsCheckCust
|
|
|
@ApiOperation(value = "客户信息-通过id删除", notes = "客户信息-通过id删除")
|
|
@ApiOperation(value = "客户信息-通过id删除", notes = "客户信息-通过id删除")
|
|
|
@DeleteMapping(value = "/delete")
|
|
@DeleteMapping(value = "/delete")
|
|
|
public Result<String> delete(@RequestParam(name = "id") String id) {
|
|
public Result<String> delete(@RequestParam(name = "id") String id) {
|
|
|
- customerInfoService.removeById(id);
|
|
|
|
|
- return Result.OK("删除成功!");
|
|
|
|
|
|
|
+ SmsCheckCustomerInfo byId = customerInfoService.getById(id);
|
|
|
|
|
+ if (byId != null){
|
|
|
|
|
+ Integer checkState = byId.getCheckState();
|
|
|
|
|
+ if (checkState == 0 || checkState == 1 || checkState == 4){
|
|
|
|
|
+ customerInfoService.removeById(id);
|
|
|
|
|
+ return Result.OK("删除成功!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return Result.error("删除失败!");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@AutoLog(value = "客户信息-通过id删除")
|
|
@AutoLog(value = "客户信息-通过id删除")
|
|
|
@ApiOperation(value = "客户信息-通过id删除", notes = "客户信息-通过id删除")
|
|
@ApiOperation(value = "客户信息-通过id删除", notes = "客户信息-通过id删除")
|
|
|
@DeleteMapping(value = "/deleteByIds")
|
|
@DeleteMapping(value = "/deleteByIds")
|
|
|
public Result<String> deleteByIds(@RequestParam(name = "ids") String id) {
|
|
public Result<String> deleteByIds(@RequestParam(name = "ids") String id) {
|
|
|
String[] split = id.split(",");
|
|
String[] split = id.split(",");
|
|
|
for (String s : split) {
|
|
for (String s : split) {
|
|
|
- customerInfoService.removeById(s);
|
|
|
|
|
|
|
+ SmsCheckCustomerInfo byId = customerInfoService.getById(s);
|
|
|
|
|
+ if (byId != null){
|
|
|
|
|
+ Integer checkState = byId.getCheckState();
|
|
|
|
|
+ if (checkState == 0 || checkState == 1 || checkState == 4){
|
|
|
|
|
+ customerInfoService.removeById(s);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return Result.OK("删除成功!");
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
}
|