Commit b48bf17b by 徐高华

Merge branch 'developer' of http://git.gicdev.com/haoban3.0/haoban-manage3.0.git into developer

parents 3a4b005a c3a25ec9
......@@ -47,6 +47,8 @@ public class HmClerkRelationQDTO implements Serializable {
*/
private Integer overFlag;
private Integer addNum;
private String staffId;
private String staffName;
......@@ -186,5 +188,13 @@ public class HmClerkRelationQDTO implements Serializable {
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public Integer getAddNum() {
return addNum;
}
public void setAddNum(Integer addNum) {
this.addNum = addNum;
}
}
......@@ -9,6 +9,7 @@ import com.gic.haoban.manage.service.service.hm.HmClerkRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
......@@ -36,6 +37,11 @@ public class HmClerkRelationServiceImpl implements HmClerkRelationService {
@Override
public int insert(HmClerkRelationQDTO hmClerkRelationQDTO) {
hmClerkRelationQDTO.setStatus(1);
hmClerkRelationQDTO.setCreateTime(new Date());
hmClerkRelationQDTO.setUpdateTime(new Date());
hmClerkRelationQDTO.setOverFlag(0);
hmClerkRelationQDTO.setAddNum(0);
return this.tabHaobanHmClerkRelationMapper.insert(EntityUtil.changeEntityByOrika(TabHaobanHmClerkRelation.class, hmClerkRelationQDTO));
}
......
......@@ -131,8 +131,14 @@ public class MessageApiServiceImpl implements MessageApiService {
QywxCallBackDTO dto = JSON.parseObject(param, QywxCallBackDTO.class);
log.info("【成员部门同步回调处理】dto={}", JSON.toJSONString(param));
String suiteId = dto.getSuiteId();
String authCorpId = dto.getAuthCorpId();
String staffThirdWxEnterpriseId = config.getStaffThirdWxEnterpriseId();
if (staffThirdWxEnterpriseId.contains(suiteId)) {
if (staffThirdWxEnterpriseId.contains(authCorpId) ) {
log.info("处理定制特殊企业同步:{}",authCorpId);
if (CONTACT_APP.equals(suiteId) || SELF_APP.equals(suiteId)) {
log.info("自建和客户联系回调不处理");
return;
}
//处理部门
dealQywxThirdDepartment(dto);
//处理成员
......
......@@ -321,8 +321,9 @@ public class StaffApiServiceImpl implements StaffApiService {
String staffThirdWxEnterpriseId = config.getStaffThirdWxEnterpriseId();
UserDTO user = null;
if (staffThirdWxEnterpriseId.contains(corpid)) {
UserDTO userThird = qywxUserApiService.getWorkWxUser(corpid, config.getWxSuiteid(), userId);
user = qywxUserApiService.getSelfWorkWxUser(corpid, secretSetting.getSecretVal(), userThird.getOpen_userid());
user = qywxUserApiService.getWorkWxUser(corpid, config.getWxSuiteid(), userId);
UserDTO userSelf = qywxUserApiService.getSelfWorkWxUser(corpid, secretSetting.getSecretVal(), user.getOpen_userid());
user.setName(userSelf.getName());
} else {
user = qywxUserApiService.getSelfWorkWxUser(corpid, secretSetting.getSecretVal(), userId);
}
......
......@@ -62,6 +62,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
......@@ -420,6 +421,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
*/
private void insertHmClerkRelation(HmQrcodeQDTO hmQrcodeQDTO, String wxEnterpriseId, Long hmId, List<String> clerkIdList) {
List<HmClerkRelationQDTO> clerkRelationQDTOS = new ArrayList<>();
Date now = new Date();
for (String clerkId : clerkIdList) {
StaffClerkRelationDTO clerkRelationDTO = staffClerkRelationService.getByClerkId(clerkId);
HmClerkRelationQDTO hmClerkRelationQDTO = new HmClerkRelationQDTO();
......@@ -450,6 +452,11 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
hmClerkRelationQDTO.setStaffName(tabHaobanStaff.getStaffName());
}
}
hmClerkRelationQDTO.setStatus(1);
hmClerkRelationQDTO.setCreateTime(now);
hmClerkRelationQDTO.setUpdateTime(now);
hmClerkRelationQDTO.setOverFlag(0);
hmClerkRelationQDTO.setAddNum(0);
clerkRelationQDTOS.add(hmClerkRelationQDTO);
}
hmClerkRelationService.insertBatch(clerkRelationQDTOS);
......
......@@ -24,7 +24,7 @@
</resultMap>
<sql id="Base_Column_List">
hm_id, wx_user_id, wx_enterprise_id, enterprise_id, store_id,
relation_id,hm_id, wx_user_id, wx_enterprise_id, enterprise_id, store_id,
store_name, store_code, clerk_id, clerk_name, clerk_code, status,
create_time, update_time, over_flag, add_num,staff_id,staff_name
</sql>
......
......@@ -43,7 +43,7 @@ public class HmQrcodeListQO implements Serializable {
}
public static class InFields {
private Long hmId;
private String hmId;
/**
* 1单人 2多人
......@@ -77,11 +77,11 @@ public class HmQrcodeListQO implements Serializable {
private String storeId;
public Long getHmId() {
public String getHmId() {
return hmId;
}
public void setHmId(Long hmId) {
public void setHmId(String hmId) {
this.hmId = hmId;
}
......
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