|
|
@@ -11,6 +11,7 @@ import com.dk.common.response.ResponseCodeEnum;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
import com.dk.common.response.ResponseResultVO;
|
|
|
import com.dk.mdm.feign.CompanyFeign;
|
|
|
+import com.dk.mdm.feign.UserFeign;
|
|
|
import com.dk.mdm.infrastructure.convert.mst.StaffConvert;
|
|
|
import com.dk.mdm.infrastructure.util.AuthUtils;
|
|
|
import com.dk.mdm.mapper.common.CommonMapper;
|
|
|
@@ -41,7 +42,8 @@ import java.util.*;
|
|
|
public class StaffService extends BaseService<Staff> {
|
|
|
@Resource
|
|
|
private CompanyFeign companyFeign;
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private UserFeign userFeign;
|
|
|
|
|
|
@Override
|
|
|
public BaseMapper<Staff> getRepository() {
|
|
|
@@ -117,6 +119,15 @@ public class StaffService extends BaseService<Staff> {
|
|
|
staff.setStaffId(codeMap.get("outId").toString());
|
|
|
staff.setStaffCode(codeMap.get("outNote").toString());
|
|
|
super.insert(staff);
|
|
|
+ // 讲电话和名称插入微信用户表里
|
|
|
+
|
|
|
+ // 更新 被邀请人员的微信用户的cpid 加入公司
|
|
|
+ Map<String, Object> collectQuery = new HashMap<>();
|
|
|
+ collectQuery.put("currentCp", staff.getCpId());
|
|
|
+ collectQuery.put("userName", staff.getStaffName());
|
|
|
+ collectQuery.put("userPhone", staff.getStaffPhone());
|
|
|
+ userFeign.registerFeign(collectQuery);
|
|
|
+
|
|
|
return ResponseResultUtil.success(staff);
|
|
|
}
|
|
|
|