更新师傅状态
This commit is contained in:
parent
0ae1e87b4d
commit
5e0afb3ce6
|
|
@ -202,6 +202,18 @@ public class WorkerController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/changeStatus")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult changeStatus(Worker worker){
|
||||||
|
try {
|
||||||
|
workerService.updateWorker(worker);
|
||||||
|
return AjaxResult.success("修改成功");
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
|
return AjaxResult.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/settled")
|
@PostMapping("/settled")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,9 @@
|
||||||
/* 用户状态显示 */
|
/* 用户状态显示 */
|
||||||
function statusTools(row) {
|
function statusTools(row) {
|
||||||
if (row.status == 0) {
|
if (row.status == 0) {
|
||||||
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.workerId + '\')"></i> ';
|
|
||||||
} else {
|
|
||||||
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.workerId + '\')"></i> ';
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.workerId + '\')"></i> ';
|
||||||
|
} else {
|
||||||
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.workerId + '\')"></i> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue