master
kira 6 years ago
parent bd7459810a
commit 791ec028fe

@ -51,8 +51,8 @@ public class OpenimController {
}
@ManagerMapping(value = "/servant/onoff", method = RequestMethod.PUT,role = {ManagerRole.ADMIN})
public void listServants(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject loginManager, @RequestBody boolean onoff) {
customerServiceService.onoff(loginManager,onoff);
public void listServants(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject loginManager, @RequestBody JSONObject param) {
customerServiceService.onoff(loginManager,param.getBoolean("onoff"));
}
}

@ -178,7 +178,7 @@ public class CustomerServiceServiceImpl implements CustomerServiceService {
private void udpateOrSave(JSONObject servant){
JSONObject record = sysCustomerServiceMapper.findByManagerId(servant.getString("manager_id"));
if(record==null){
JSONObject manager = managerMapper.findById(servant.getString("manager_id"));
JSONObject manager = managerMapper.findDetail(servant.getString("manager_id"));
servant.put("manager_id",manager.getString("manager_id"));
servant.put("user_id",manager.getString("username"));
sysCustomerServiceMapper.save(servant);

Loading…
Cancel
Save