Commit 67282a11 by kangxiaoshan

校验客户主账号

parent f18451ec
......@@ -7,14 +7,24 @@
</component>
<component name="ChangeListManager">
<list default="true" id="fcaffbb7-50d8-4ab8-9bad-0a6fbd39f63b" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/main/java/common/model/QcloudAccount.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/common/repository/QcloudAccountRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/common/service/impl/ShareIncomeServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/common/service/impl/ShareIncomeServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/spring/applicationContext.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring/applicationContext.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
......@@ -239,6 +249,10 @@
</option>
</component>
<component name="WindowStateProjectService">
<state x="488" y="48" key="#com.intellij.ide.util.MemberChooser" timestamp="1597321169912">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state x="488" y="48" key="#com.intellij.ide.util.MemberChooser/0.0.1366.728@0.0.1366.728" timestamp="1597321169912" />
<state x="352" y="132" key="#xdebugger.evaluate" timestamp="1596003888437">
<screen x="0" y="0" width="1366" height="728" />
</state>
......@@ -247,70 +261,70 @@
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="461" height="438" key="DebuggerActiveHint/0.0.1366.728@0.0.1366.728" timestamp="1596003841176" />
<state width="1111" height="308" key="GridCell.Tab.0.bottom" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.0.bottom" timestamp="1597321228164">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.0.center" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.0.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.0.center" timestamp="1597321228164">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.0.left" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.0.center/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.0.left" timestamp="1597321228164">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.0.right" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.0.left/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.0.right" timestamp="1597321228164">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.1.bottom" timestamp="1596005108492">
<state width="1111" height="308" key="GridCell.Tab.0.right/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.1.bottom" timestamp="1597321228165">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.bottom/0.0.1366.728@0.0.1366.728" timestamp="1596005108492" />
<state width="1111" height="308" key="GridCell.Tab.1.center" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.1.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321228165" />
<state width="1111" height="308" key="GridCell.Tab.1.center" timestamp="1597321228164">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.center/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.1.left" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.1.center/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.1.left" timestamp="1597321228164">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.left/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.1.right" timestamp="1596005108491">
<state width="1111" height="308" key="GridCell.Tab.1.left/0.0.1366.728@0.0.1366.728" timestamp="1597321228164" />
<state width="1111" height="308" key="GridCell.Tab.1.right" timestamp="1597321228165">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.1.right/0.0.1366.728@0.0.1366.728" timestamp="1596005108491" />
<state width="1111" height="308" key="GridCell.Tab.2.bottom" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.1.right/0.0.1366.728@0.0.1366.728" timestamp="1597321228165" />
<state width="1111" height="308" key="GridCell.Tab.2.bottom" timestamp="1597321227940">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.bottom/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.2.center" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.2.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.2.center" timestamp="1597321227939">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.center/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.2.left" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.2.center/0.0.1366.728@0.0.1366.728" timestamp="1597321227939" />
<state width="1111" height="308" key="GridCell.Tab.2.left" timestamp="1597321227939">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.left/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.2.right" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.2.left/0.0.1366.728@0.0.1366.728" timestamp="1597321227939" />
<state width="1111" height="308" key="GridCell.Tab.2.right" timestamp="1597321227939">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.2.right/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.3.bottom" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.2.right/0.0.1366.728@0.0.1366.728" timestamp="1597321227939" />
<state width="1111" height="308" key="GridCell.Tab.3.bottom" timestamp="1597321227940">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.bottom/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.3.center" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.3.bottom/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.3.center" timestamp="1597321227940">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.center/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.3.left" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.3.center/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.3.left" timestamp="1597321227940">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.left/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.3.right" timestamp="1596005108300">
<state width="1111" height="308" key="GridCell.Tab.3.left/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.3.right" timestamp="1597321227940">
<screen x="0" y="0" width="1366" height="728" />
</state>
<state width="1111" height="308" key="GridCell.Tab.3.right/0.0.1366.728@0.0.1366.728" timestamp="1596005108300" />
<state width="1111" height="308" key="GridCell.Tab.3.right/0.0.1366.728@0.0.1366.728" timestamp="1597321227940" />
<state width="1111" height="308" key="GridCell.Tab.6.bottom" timestamp="1595298613992">
<screen x="0" y="0" width="1366" height="728" />
</state>
......
package common.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
@Entity
public class QcloudAccount {
private Long id;
private String email;
private String company;
private Long accountId;// 账号id
private Date updateTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
}
package common.repository;
import common.model.QcloudAccount;
import org.springframework.data.jpa.repository.JpaRepository;
public interface QcloudAccountRepository extends JpaRepository<QcloudAccount, Long> {
QcloudAccount findByEmail(String email);
}
......@@ -200,9 +200,6 @@ public class ContractServiceImpl implements ContractService {
@Autowired
JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("jdbcTemplateQcloud")
JdbcTemplate jdbcTemplateqCloud;
@Autowired
TransactionUtils transactionUtils;
......@@ -210,6 +207,9 @@ public class ContractServiceImpl implements ContractService {
@Autowired
ShareIncomeService shareIncomeService;
@Autowired
QcloudAccountRepository qcloudAccountRepository;
@Override
public Map<String, Object> checkAccount(String email, String platfrom) {
......@@ -223,6 +223,18 @@ public class ContractServiceImpl implements ContractService {
if ("tkio".equals(platfrom)) {
//account4Web = account4WebRepository.findByEmail(email);
account = accountRepository.findByEmail(email);
if (account == null) {
QcloudAccount qcloudAccount = qcloudAccountRepository.findByEmail(email);
if (qcloudAccount != null) {
account = new Account();
account.setId(qcloudAccount.getId());
account.setCompany(qcloudAccount.getCompany());
account.setEmail(qcloudAccount.getEmail());
}
}
} else if ("io".equals(platfrom)) {
ioAccount4Web = ioAccount4WebRepository.findByEmail(email);
} else if ("adi".equals(platfrom)) {
......@@ -2389,6 +2401,12 @@ public class ContractServiceImpl implements ContractService {
}
});*/
List<QcloudAccount> qcloudAccounts = qcloudAccountRepository.findAll();
qcloudAccounts.stream().map(v -> {
emailDic.put(v.getEmail(), "");
return null;
});
for (int i = 0; i < accountsEmail.size(); i++) {
String e = accountsEmail.get(i);
if (!emailDic.containsKey(e)) {
......
......@@ -344,12 +344,12 @@
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="qClouDataSource" parent="parentDataSource">
<!--<bean id="qClouDataSource" parent="parentDataSource">
<property name="url" value="${qcloudatasource.url}"/>
<property name="username" value="${qcloudatasource.username}"/>
<property name="password" value="${qcloudatasource.password}"/>
</bean>
<bean id="jdbcTemplateQcloud" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="qClouDataSource"></property>
</bean>
</bean>-->
</beans>
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