Commit 5e840c54 by qwmqiuwenmin

fix

parent 345778b8
......@@ -5,6 +5,8 @@ import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.commons.util.GlobalInfo;
import com.gic.commons.util.GlobalVar;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.app.customer.service.api.service.InnerApiService;
import com.gic.haoban.base.api.common.Constant;
import com.gic.haoban.base.api.common.ServiceResponse;
......@@ -76,6 +78,9 @@ public class MessageApiServiceImpl implements MessageApiService {
private InnerApiService innerApiService;
private final String CONTACT_APP = "contactSuiteId";
@Autowired
private StoreService storeService;
@Override
public void gicMessageReceive(GicMessageDTO gicMessageDTO) {
......@@ -137,6 +142,14 @@ public class MessageApiServiceImpl implements MessageApiService {
}
departmentDTO.setWxEnterpriseId(enterprise.getWxEnterpriseId());
if(dto.getChangeType() == GicEditType.ADD.getCode()){
Integer isStore = departmentDTO.getIsStore();
if(isStore == 1){
//不是线上门店 不新增
StoreDTO store = storeService.getStore(departmentDTO.getRelatedId());
if(store == null || store.getStatus() != 2){
return;
}
}
ServiceResponse response = this.departmentApiService.add(departmentDTO);
GicClerkDTO gicClerkDTO = dto.getGicClerkDTO();
if(gicClerkDTO != null){
......@@ -147,6 +160,14 @@ public class MessageApiServiceImpl implements MessageApiService {
}else if(dto.getChangeType() == GicEditType.UPDATE.getCode()){
TabHaobanDepartment department = this.departmentService.selectByRelatedId(dto.getId());
if(department == null){
Integer isStore = departmentDTO.getIsStore();
if(isStore == 1){
//不是线上门店 不新增
StoreDTO store = storeService.getStore(departmentDTO.getRelatedId());
if(store == null || store.getStatus() != 2){
return;
}
}
ServiceResponse response = this.departmentApiService.add(departmentDTO);
log.info("添加结果:{}", JSON.toJSONString(response));
}else {
......
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