|
|
@@ -22,6 +22,7 @@ import com.uas.platform.core.model.Status;
|
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
import com.uas.sso.entity.PartnershipRecordView;
|
|
|
import com.uas.sso.util.AccountUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -214,19 +215,9 @@ public class VendorServiceImpl implements VendorService{
|
|
|
public void addPartnerShipRecord(Vendor vendor, String appId) {
|
|
|
PartnershipRecord shipRecord = new PartnershipRecord(appId, vendor);
|
|
|
PartnershipRecordView record = new PartnershipRecordView();
|
|
|
- record.setAppId(shipRecord.getAppId());
|
|
|
- record.setCustName(shipRecord.getCustName());
|
|
|
- record.setCustUID(shipRecord.getCustUID());
|
|
|
+ BeanUtils.copyProperties(shipRecord, record, PartnershipRecordView.class);
|
|
|
record.setCustUserCode(Long.valueOf(shipRecord.getCustUserCode()));
|
|
|
- record.setCustUserEmail(shipRecord.getCustUserEmail());
|
|
|
- record.setCustUserName(shipRecord.getCustUserName());
|
|
|
- record.setCustUserTel(shipRecord.getCustUserTel());
|
|
|
- record.setVendName(shipRecord.getVendName());
|
|
|
- record.setVendUID(shipRecord.getVendUID());
|
|
|
record.setVendUserCode(Long.valueOf(shipRecord.getVendUserCode()));
|
|
|
- record.setVendUserEmail(shipRecord.getVendUserEmail());
|
|
|
- record.setVendUserName(shipRecord.getVendUserName());
|
|
|
- record.setVendUserTel(shipRecord.getVendUserTel());
|
|
|
try {
|
|
|
AccountUtils.synchronizeRecord(record);
|
|
|
vendor.setSynchStatus(Constant.YES);
|