取参问题
This commit is contained in:
parent
8d714a4dd7
commit
0ae1e87b4d
|
|
@ -9,6 +9,8 @@ import com.ghy.common.enums.WorkerCertifyStatus;
|
||||||
import com.ghy.common.enums.WorkerStatus;
|
import com.ghy.common.enums.WorkerStatus;
|
||||||
import com.ghy.common.json.JSONObject;
|
import com.ghy.common.json.JSONObject;
|
||||||
import com.ghy.common.utils.ExceptionUtil;
|
import com.ghy.common.utils.ExceptionUtil;
|
||||||
|
import com.ghy.common.utils.ObjectUtils;
|
||||||
|
import com.ghy.common.utils.StringUtils;
|
||||||
import com.ghy.common.utils.poi.ExcelUtil;
|
import com.ghy.common.utils.poi.ExcelUtil;
|
||||||
import com.ghy.system.domain.SysArea;
|
import com.ghy.system.domain.SysArea;
|
||||||
import com.ghy.system.service.ISysAreaService;
|
import com.ghy.system.service.ISysAreaService;
|
||||||
|
|
@ -199,21 +201,21 @@ public class WorkerCertificationController extends BaseController
|
||||||
try {
|
try {
|
||||||
int result = workerCertificationService.changeStatus(ids, status);
|
int result = workerCertificationService.changeStatus(ids, status);
|
||||||
if(result > 0){
|
if(result > 0){
|
||||||
// 是否绑定了银行卡
|
String [] idArray = ids.split(",");
|
||||||
List<WorkerBank> workerBanks = workerBankService.getByWorkerIds(ids);
|
for (String id : idArray){
|
||||||
|
WorkerCertification workerCertification = workerCertificationService.selectWorkerCertificationByWorkerCertificationId(id);
|
||||||
// 没有绑定了银行卡的用户
|
// 是否绑定了银行卡
|
||||||
if(CollectionUtils.isEmpty(workerBanks)){
|
WorkerBank workerBank = workerBankService.getByWorkerId(workerCertification.getWorkerId());
|
||||||
return AjaxResult.success("操作成功!");
|
// 没有绑定了银行卡的用户
|
||||||
}
|
if(ObjectUtils.isEmpty(workerBank)){
|
||||||
|
return AjaxResult.success("操作成功!");
|
||||||
// 绑定了的话更新师傅状态
|
}
|
||||||
workerBanks.forEach(workerBank -> {
|
|
||||||
Worker worker = new Worker();
|
Worker worker = new Worker();
|
||||||
worker.setWorkerId(workerBank.getWorkerId());
|
worker.setWorkerId(workerBank.getWorkerId());
|
||||||
worker.setStatus(0);
|
worker.setStatus(0);
|
||||||
workerService.updateWorker(worker);
|
workerService.updateWorker(worker);
|
||||||
});
|
}
|
||||||
|
|
||||||
return AjaxResult.success("操作成功!");
|
return AjaxResult.success("操作成功!");
|
||||||
}else {
|
}else {
|
||||||
return AjaxResult.warn("操作失败!");
|
return AjaxResult.warn("操作失败!");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue