|
|
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
+import com.uas.account.util.AccountUtils;
|
|
|
import com.uas.message.mail.service.MailService;
|
|
|
import com.uas.platform.b2b.dao.EnterpriseDao;
|
|
|
import com.uas.platform.b2b.dao.InvitationRecordDao;
|
|
|
@@ -109,7 +110,7 @@ public class InvitationRecordServiceImpl implements InvitationRecordService {
|
|
|
if (record.getVenduseremail() != null) {
|
|
|
oldrecord.setVenduseremail(record.getVenduseremail().trim());
|
|
|
}
|
|
|
- invitationRecordDao.save(oldrecord);
|
|
|
+ record = invitationRecordDao.save(oldrecord);
|
|
|
if (oldrecord.getVenduseremail() != null) {
|
|
|
try {
|
|
|
mailService.send(messageConf.getTplInvitationForB2B(), record.getVenduseremail(), model);
|
|
|
@@ -165,6 +166,17 @@ public class InvitationRecordServiceImpl implements InvitationRecordService {
|
|
|
map.put("success", "邀请发送失败");
|
|
|
}
|
|
|
}
|
|
|
+ // 同步一个数据到账户中心(不是必须,不判断状态)
|
|
|
+ try {
|
|
|
+ record.setUser(null);
|
|
|
+ record.setId(null);
|
|
|
+ record.setSamecount(null);
|
|
|
+ record.setVenduu(null);
|
|
|
+ record.setBussinesscode(SystemSession.getUser().getEnterprise().getEnBussinessCode());
|
|
|
+ AccountUtils.synchroInvitation(FlexJsonUtils.toJsonDeep(record));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
return map;
|
|
|
}
|
|
|
|