Commit 0ca4a35b by fudahua

门店信息包含总部还是代理信息

parent 48b095f5
......@@ -217,18 +217,20 @@ public class MaterialController extends WebBaseController{
* @return
*/
@RequestMapping("/material-share")
public HaobanResponse materialShare(String materialId, String toWxEnterpriseIds) {
LoginVO login = (LoginVO) AuthRequestUtil.getLoginUser();
public HaobanResponse materialShare(String materialIds, String toWxEnterpriseIds) {
LoginVO login = (LoginVO) AuthRequestUtil.getLoginUser();
String[] wxEids = toWxEnterpriseIds.split(",");
for (String wxEid : wxEids) {
ServiceResponse<Void> response = materialApiService.shareMaterial(login.getWxEnterpriseId(), wxEid, materialId);
if (response.getCode() == 1 || response.getCode() == 4) {
continue;
}
HaoBanErrCode.ERR_DEFINE.setMsg(response.getMessage());
return resultResponse(HaoBanErrCode.ERR_DEFINE);
}
String[] maIds = toWxEnterpriseIds.split(",");
for (String maId : maIds) {
for (String wxEid : wxEids) {
ServiceResponse<Void> response = materialApiService.shareMaterial(login.getWxEnterpriseId(), wxEid, maId);
if (response.getCode() == 1 || response.getCode() == 4) {
continue;
}
HaoBanErrCode.ERR_DEFINE.setMsg(response.getMessage());
return resultResponse(HaoBanErrCode.ERR_DEFINE);
}
}
return resultResponse(HaoBanErrCode.ERR_1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment