Commit 48b095f5 by fudahua

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

parent a4749138
......@@ -181,14 +181,6 @@ public class MaterialDTO implements Serializable{
this.updateTime = updateTime;
}
public String getMediaid() {
return mediaId;
}
public void setMediaid(String mediaid) {
this.mediaid = mediaid;
}
public String getWxImgUrl() {
return wxImgUrl;
}
......
......@@ -299,6 +299,8 @@ public class MaterialApiServiceImpl implements MaterialApiService {
}
materialDTO.setWxEnterpriseId(toWxEnterpriseId);
materialDTO.setFromMaterialId(materialId);
materialDTO.setMediaId(null);
materialDTO.setWxLastUploadTime(null);
materialService.insertMaterial(materialDTO);
return res;
}
......
......@@ -267,7 +267,7 @@
select
<include refid="Base_Column_List"/>
from tab_haoban_material
where from_material_id = #{materialId,jdbcType=VARCHAR}
where from_material_id = #{fromMaterialId,jdbcType=VARCHAR}
and status_flag=1
and wx_enterprise_id=#{wxEnterpriseId}
</select>
......
......@@ -217,15 +217,19 @@ public class MaterialController extends WebBaseController{
* @return
*/
@RequestMapping("/material-share")
public HaobanResponse materialShare(String materialId, String toWxEnterpriseId) {
public HaobanResponse materialShare(String materialId, String toWxEnterpriseIds) {
LoginVO login = (LoginVO) AuthRequestUtil.getLoginUser();
ServiceResponse<Void> response = materialApiService.shareMaterial(login.getWxEnterpriseId(), toWxEnterpriseId, materialId);
if (response.getCode() == 1) {
return resultResponse(HaoBanErrCode.ERR_1);
} else {
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);
}
return resultResponse(HaoBanErrCode.ERR_1);
}
}
package com.gic.haoban.manage.web.vo;
import java.io.Serializable;
import java.util.List;
/**
* Created 2018/10/22.
*
* @author hua
*/
public class MaterialShareVo implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private List<String> fairList;
private List<String> successList;
}
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