Commit aa06e733 authored by renjie's avatar renjie

企业认证

parent 57b70e74
...@@ -55,6 +55,8 @@ public class Account { ...@@ -55,6 +55,8 @@ public class Account {
private int shopCount = 0; private int shopCount = 0;
private int authorized; // 0: 未认证; 1: 已认证;
private List<String> queryIpUrlList = Arrays.asList( private List<String> queryIpUrlList = Arrays.asList(
"http://lumtest.com/myip.json", "http://lumtest.com/myip.json",
"http://api.myip.com", "http://api.myip.com",
...@@ -254,4 +256,12 @@ public class Account { ...@@ -254,4 +256,12 @@ public class Account {
public void setQueryIpUrlList(List<String> queryIpUrlList) { public void setQueryIpUrlList(List<String> queryIpUrlList) {
this.queryIpUrlList = queryIpUrlList; this.queryIpUrlList = queryIpUrlList;
} }
public int getAuthorized() {
return authorized;
}
public void setAuthorized(int authorized) {
this.authorized = authorized;
}
} }
package com.edgec.browserbackend.account.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "companyauthorize")
public class CompanyAuthorize {
@Id
private String id;
private int type; //0 -- 企业, 1 -- 个体工商户
private String name;
private String signUpNumber;
private String licensePhotoId;
}
...@@ -772,6 +772,9 @@ public class AccountServiceImpl implements AccountService { ...@@ -772,6 +772,9 @@ public class AccountServiceImpl implements AccountService {
whiteList.addAll(update.getWhiteList()); whiteList.addAll(update.getWhiteList());
account.setWhiteList(whiteList); account.setWhiteList(whiteList);
if (update.getAuthorized() == 1)
account.setAuthorized(1);
log.debug("account {} changes has been saved", name); log.debug("account {} changes has been saved", name);
if (!org.apache.commons.lang3.StringUtils.equalsIgnoreCase(preEmail, update.getEmail())) { if (!org.apache.commons.lang3.StringUtils.equalsIgnoreCase(preEmail, update.getEmail())) {
Account account1 = repository.findByEmail(update.getEmail()); Account account1 = repository.findByEmail(update.getEmail());
......
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