compliance_audit

master
wangning 7 years ago
parent 8cadcab799
commit 95075381f5

@ -145,4 +145,6 @@ public interface RetailAppService {
void uploadAuthFiles(JSONObject device,ClientAuthFilesInfo clientAuthFilesInfo); void uploadAuthFiles(JSONObject device,ClientAuthFilesInfo clientAuthFilesInfo);
void updateMerchantInfo(JSONObject device, ClientUpdateInfo clientUpdateInfo); void updateMerchantInfo(JSONObject device, ClientUpdateInfo clientUpdateInfo);
void applyToCompliance(JSONObject device);
} }

@ -373,6 +373,20 @@ public class RetailAppServiceImp implements RetailAppService {
} }
} }
@Override
public void applyToCompliance(JSONObject device) {
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
if(client==null){
throw new NotFoundException("Merchant Not Found");
}
if(account==null){
throw new NotFoundException("Account Not Found");
}
clientManager.applyToCompliance(client.getString("client_moniker"),account);
}
@Override @Override
public void updateClient(JSONObject device, AppClientBean appClientBean) { public void updateClient(JSONObject device, AppClientBean appClientBean) {
String clientType = device.getString("client_type"); String clientType = device.getString("client_type");
@ -410,6 +424,7 @@ public class RetailAppServiceImp implements RetailAppService {
public JSONObject getClientInfoMe(JSONObject device) { public JSONObject getClientInfoMe(JSONObject device) {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
JSONObject client = clientMapper.findClient(device.getIntValue("client_id")); JSONObject client = clientMapper.findClient(device.getIntValue("client_id"));
if (StringUtils.isEmpty(client.getString("store_photo"))|| StringUtils.isEmpty(client.getString("logo_url"))|| StringUtils.isEmpty(client.getString("company_photo"))) { if (StringUtils.isEmpty(client.getString("store_photo"))|| StringUtils.isEmpty(client.getString("logo_url"))|| StringUtils.isEmpty(client.getString("company_photo"))) {
result.put("base_info_lack", true); result.put("base_info_lack", true);
} }
@ -420,6 +435,7 @@ public class RetailAppServiceImp implements RetailAppService {
} }
} }
result.putAll(file); result.putAll(file);
result.put("approve_result",client.getIntValue("approve_result"));
return result; return result;
} }

@ -1,32 +1,5 @@
package au.com.royalpay.payment.manage.appclient.web; package au.com.royalpay.payment.manage.appclient.web;
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException; import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService; import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
import au.com.royalpay.payment.manage.activities.monsettledelay.core.ActMonDelaySettleService; import au.com.royalpay.payment.manage.activities.monsettledelay.core.ActMonDelaySettleService;
@ -40,7 +13,6 @@ import au.com.royalpay.payment.manage.bill.core.BillOrderService;
import au.com.royalpay.payment.manage.bill.core.BillService; import au.com.royalpay.payment.manage.bill.core.BillService;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientUpdateInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientUpdateInfo;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport; import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean; import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager; import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
@ -54,6 +26,33 @@ import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO; import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
/** /**
* Created by yishuqian on 28/03/2017. * Created by yishuqian on 28/03/2017.
*/ */
@ -78,8 +77,6 @@ public class RetailAppController {
private ManualSettleSupport manualSettleSupport; private ManualSettleSupport manualSettleSupport;
@Resource @Resource
private AttachmentClient attachmentClient; private AttachmentClient attachmentClient;
@Resource
private ClientManager clientManager;
@RequestMapping(value = "/token", method = RequestMethod.PUT) @RequestMapping(value = "/token", method = RequestMethod.PUT)
@ -251,6 +248,12 @@ public class RetailAppController {
retailAppService.updateMerchantInfo(device,info); retailAppService.updateMerchantInfo(device,info);
} }
@RequestMapping(value = "/client/compliance_audit", method = RequestMethod.POST)
@ResponseBody
public void commitAudit(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
retailAppService.applyToCompliance(device);
}
@RequestMapping(value = "/client/realtime", method = RequestMethod.GET) @RequestMapping(value = "/client/realtime", method = RequestMethod.GET)
public JSONObject getClientInfoRealtime(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { public JSONObject getClientInfoRealtime(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return retailAppService.getClientInfoRealtime(device); return retailAppService.getClientInfoRealtime(device);
@ -527,5 +530,4 @@ public class RetailAppController {
return attachmentClient.uploadFile(file,false); return attachmentClient.uploadFile(file,false);
} }
} }

Loading…
Cancel
Save