| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | reqJson.put("name", reqJson.getString("username")); |
| | | reqJson.put("storeId", storeId); |
| | | reqJson.put("storeTypeCd", storeTypeCd); |
| | | responseEntity = this.callCenterService(restTemplate, pd, reqJson.toJSONString(), ServiceConstant.SERVICE_API_URL + "/api/user.staff.add", HttpMethod.POST); |
| | | responseEntity = this.callCenterService(restTemplate, pd, reqJson.toJSONString(), "user.staff.add", HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | paramIn.put("storeId", storeId); |
| | | //if (StringUtil.isEmpty(staffName)) { |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.staff.infos" + super.mapToUrlParam(paramIn), HttpMethod.GET); |
| | | "query.staff.infos" + super.mapToUrlParam(paramIn), HttpMethod.GET); |
| | | /* } else { |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.staff.byName?rows=" + rows + "&page=" + page + "&storeId=" + storeId + "&name=" + staffName, HttpMethod.GET); |
| | | "query.staff.byName?rows=" + rows + "&page=" + page + "&storeId=" + storeId + "&name=" + staffName, HttpMethod.GET); |
| | | }*/ |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | |
| | | paramIn.put("name", paramIn.getString("username")); |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/user.staff.modify", HttpMethod.POST); |
| | | "user.staff.modify", HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | newParam.put("storeId", result.getStoreId()); |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate, pd, newParam.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/user.staff.delete", HttpMethod.POST); |
| | | "user.staff.delete", HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd"); |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.privilegeGroup.noAddPrivilegeGroup?userId=" |
| | | "query.privilegeGroup.noAddPrivilegeGroup?userId=" |
| | | + _paramObj.getString("userId") + "&storeId=" + storeId + "&storeTypeCd=" + storeTypeCd, |
| | | HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd"); |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.privilege.noAddPrivilege?userId=" |
| | | "query.privilege.noAddPrivilege?userId=" |
| | | + _paramObj.getString("userId") + "&storeId=" + storeId + "&storeTypeCd=" + storeTypeCd, |
| | | HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate, pd, _paramObj.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/add.privilege.userPrivilege", |
| | | "add.privilege.userPrivilege", |
| | | HttpMethod.POST); |
| | | |
| | | return responseEntity; |
| | |
| | | |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate, pd, _paramObj.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/delete.privilege.userPrivilege", |
| | | "delete.privilege.userPrivilege", |
| | | HttpMethod.POST); |
| | | |
| | | return responseEntity; |