master
wangning 7 years ago
parent 7a55463794
commit ead3536fab

@ -348,6 +348,9 @@ public class RetailAppServiceImp implements RetailAppService {
public void uploadAuthFiles(JSONObject device, ClientAuthFilesInfo clientAuthFilesInfo) { public void uploadAuthFiles(JSONObject device, ClientAuthFilesInfo clientAuthFilesInfo) {
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id")); JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
JSONObject account = clientAccountMapper.findById(device.getString("account_id")); JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
clientAuthFilesInfo.setFile_id_info(null);
clientAuthFilesInfo.setAuthStatus(0);
clientAuthFilesInfo.setFile_agreement_info(null);
clientManager.uploadAuthFiles(account,client.getString("client_moniker"),clientAuthFilesInfo); clientManager.uploadAuthFiles(account,client.getString("client_moniker"),clientAuthFilesInfo);
} }

@ -245,7 +245,7 @@ public class RetailAppController {
return retailAppService.getClientInfo(device); return retailAppService.getClientInfo(device);
} }
@RequestMapping(value = "/client/partnerInfo", method = RequestMethod.PUT) @RequestMapping(value = "/client/apply", method = RequestMethod.PUT)
@ResponseBody @ResponseBody
public void updatePartnerInfo(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody ClientUpdateInfo info) { public void updatePartnerInfo(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody ClientUpdateInfo info) {
retailAppService.updateMerchantInfo(device,info); retailAppService.updateMerchantInfo(device,info);

@ -4,6 +4,11 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
/** /**
@ -78,8 +83,18 @@ public class ClientUpdateInfo {
obj.remove("client_moniker"); obj.remove("client_moniker");
return obj; return obj;
} }
public JSONObject appClientInfo() { public JSONObject appClientInfo() {
JSONObject obj = insertObject(); JSONObject obj = insertObject();
List<String> keys = new ArrayList<>();
obj.keySet().forEach(p -> {
if (StringUtils.isEmpty(obj.getString(p))) {
keys.add(p);
}
});
keys.forEach(p->{
obj.remove(p);
});
obj.remove("client_moniker"); obj.remove("client_moniker");
obj.remove("client_id"); obj.remove("client_id");
obj.remove("merchant_video_url"); obj.remove("merchant_video_url");
@ -94,12 +109,17 @@ public class ClientUpdateInfo {
obj.remove("industry"); obj.remove("industry");
obj.remove("alipayIndustry"); obj.remove("alipayIndustry");
obj.remove("country"); obj.remove("country");
obj.remove("company_phone");
return obj; return obj;
} }
public String getClientMoniker() { public String getClientMoniker() {
if (StringUtils.isEmpty(this.clientMoniker)) {
return null;
} else {
return clientMoniker.toUpperCase(); return clientMoniker.toUpperCase();
} }
}
public void setClientMoniker(String clientMoniker) { public void setClientMoniker(String clientMoniker) {
this.clientMoniker = clientMoniker; this.clientMoniker = clientMoniker;

Loading…
Cancel
Save