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) {
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_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);
}

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

@ -4,6 +4,11 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
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;
/**
@ -67,7 +72,7 @@ public class ClientUpdateInfo {
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
if (client_apply_id==null){
if (client_apply_id == null) {
res.remove("client_apply_id");
}
return res;
@ -78,8 +83,18 @@ public class ClientUpdateInfo {
obj.remove("client_moniker");
return obj;
}
public JSONObject appClientInfo(){
public JSONObject appClientInfo() {
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_id");
obj.remove("merchant_video_url");
@ -94,11 +109,16 @@ public class ClientUpdateInfo {
obj.remove("industry");
obj.remove("alipayIndustry");
obj.remove("country");
obj.remove("company_phone");
return obj;
}
public String getClientMoniker() {
return clientMoniker.toUpperCase();
if (StringUtils.isEmpty(this.clientMoniker)) {
return null;
} else {
return clientMoniker.toUpperCase();
}
}
public void setClientMoniker(String clientMoniker) {

Loading…
Cancel
Save