|
|
|
@ -29,10 +29,8 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
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.UpdateSurchargeDTO;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
@ -42,6 +40,9 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
@ -50,10 +51,6 @@ 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;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -88,24 +85,24 @@ public class RetailAppController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private RiskUploadService riskUploadService;
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/token", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/token")
|
|
|
|
|
public void updateDevToken(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject token) {
|
|
|
|
|
retailAppService.updateDevToken(device, token.getString("devToken"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/sub_partners", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/sub_partners")
|
|
|
|
|
public List<JSONObject> listSubPartners(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.listSubClients(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/common", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/common")
|
|
|
|
|
public JSONObject getTransactionCommonData(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getTransactionCommonData(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查询7天的交易金额
|
|
|
|
|
@RequestMapping(value = "/common/week", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/common/week")
|
|
|
|
|
public List<JSONObject> getTransactionCommonWeekData(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getTransactionCommonWeekData(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
@ -117,16 +114,17 @@ public class RetailAppController {
|
|
|
|
|
* @param appQueryBean
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/trade_common", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/trade_common")
|
|
|
|
|
public JSONObject getTradeCommonData(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getTradeCommonDate(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
@RequestMapping(value = "/trade/refund", method = RequestMethod.GET)
|
|
|
|
|
|
|
|
|
|
@GetMapping("/trade/refund")
|
|
|
|
|
public JSONObject getRefunds(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getRefunds(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/trade_common_new", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/trade_common_new")
|
|
|
|
|
public JSONObject getTradeCommonDataNew(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getTradeCommonDateNew(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
@ -136,17 +134,17 @@ public class RetailAppController {
|
|
|
|
|
return retailAppService.getCustomersAndOrdersInDays(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/orders", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/orders")
|
|
|
|
|
public JSONObject listOrders(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean query) {
|
|
|
|
|
return retailAppService.listOrders(device, query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/orders_new", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/orders_new")
|
|
|
|
|
public JSONObject listOrdersNew(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean query) {
|
|
|
|
|
return retailAppService.listOrdersNew(device, query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/orders/share_code", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/orders/share_code")
|
|
|
|
|
public JSONObject listOrdersShareCode(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean query) {
|
|
|
|
|
return retailAppService.listOrdersShareCode(device, query);
|
|
|
|
|
}
|
|
|
|
@ -163,21 +161,21 @@ public class RetailAppController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/{client_id}/settlement_logs/{clearingDetailId}/analysis/{channel}")
|
|
|
|
|
public Map<String,JSONObject> channelAndDayOfAnalysis(@PathVariable int client_id, @PathVariable String clearingDetailId,
|
|
|
|
|
@PathVariable String channel,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
if ("all".equals(channel)){
|
|
|
|
|
public Map<String, JSONObject> channelAndDayOfAnalysis(@PathVariable int client_id, @PathVariable String clearingDetailId,
|
|
|
|
|
@PathVariable String channel, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
if ("all".equals(channel)) {
|
|
|
|
|
channel = "null";
|
|
|
|
|
}
|
|
|
|
|
return retailAppService.channelAndDayOfAnalysis(client_id, clearingDetailId,channel,device);
|
|
|
|
|
return retailAppService.channelAndDayOfAnalysis(client_id, clearingDetailId, channel, device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 消息模块begin */
|
|
|
|
|
@RequestMapping(value = "/notice", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/notice")
|
|
|
|
|
public JSONObject listNotices(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam Map<String, Object> params) {
|
|
|
|
|
return retailAppService.listNotices(device, (JSONObject) JSON.toJSON(params));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/notice/{noticeId}", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/notice/{noticeId}")
|
|
|
|
|
public void updateNoticePartnerHasRead(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String noticeId,
|
|
|
|
|
@RequestBody JSONObject account_param) {
|
|
|
|
|
if (!device.getString("account_id").equals(account_param.getString("account_id"))) {
|
|
|
|
@ -186,64 +184,64 @@ public class RetailAppController {
|
|
|
|
|
retailAppService.updateReadStatus(device, noticeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/notice/{noticeId}/stopNotice", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/notice/{noticeId}/stopNotice")
|
|
|
|
|
public void updateNoticePartnerHasRead(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String noticeId) {
|
|
|
|
|
retailAppService.updateReadStatus(device, noticeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/notice/{noticeId}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/notice/{noticeId}")
|
|
|
|
|
public JSONObject getNoticeId(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String noticeId) {
|
|
|
|
|
return retailAppService.getNoticeDetailById(device, noticeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/notice/unread", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/notice/unread")
|
|
|
|
|
public List<JSONObject> latestNotice(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getLatestNotice(device.getIntValue("client_id"));
|
|
|
|
|
}
|
|
|
|
|
/* 消息模块end */
|
|
|
|
|
|
|
|
|
|
/* 我的页面begin */
|
|
|
|
|
@RequestMapping(value = "/partner_password/{account_id}", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/partner_password/{account_id}")
|
|
|
|
|
public void changePassword(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String account_id,
|
|
|
|
|
@RequestBody @Valid ChangePwdBean change, Errors errors) {
|
|
|
|
|
HttpUtils.handleValidErrors(errors);
|
|
|
|
|
retailAppService.changeAccountPassword(device, change, account_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bank_account", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/bank_account")
|
|
|
|
|
public JSONObject getBankAccountInfo(@ModelAttribute("RETAIL_DEVICE") JSONObject device) {
|
|
|
|
|
return retailAppService.bankAccountInfo(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/current_rate", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/current_rate")
|
|
|
|
|
public JSONObject getClientRate(@ModelAttribute("RETAIL_DEVICE") JSONObject device) {
|
|
|
|
|
return retailAppService.getClientCurrentRate(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/current_rate_new", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/current_rate_new")
|
|
|
|
|
public JSONObject getClientCurrentRateNew(@ModelAttribute("RETAIL_DEVICE") JSONObject device) {
|
|
|
|
|
return retailAppService.getClientCurrentRateNew(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/sign_out", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/sign_out")
|
|
|
|
|
public void signOut(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
retailAppService.sign_out(device);
|
|
|
|
|
}
|
|
|
|
|
/* 我的页面end */
|
|
|
|
|
|
|
|
|
|
/* 活动页面 begin */
|
|
|
|
|
@RequestMapping(value = "/activities", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/activities")
|
|
|
|
|
public JSONObject getActivities(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(defaultValue = "activity_page") String type,
|
|
|
|
|
@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit) {
|
|
|
|
|
return retailAppService.getActivities(device, type, page, limit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/activities/{article_id}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/activities/{article_id}")
|
|
|
|
|
public JSONObject getActivityDetail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String article_id) {
|
|
|
|
|
return retailAppService.getActivityDetail(device, article_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/activities/window", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/activities/window")
|
|
|
|
|
public JSONObject getActivityDetail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.checkT1Client(device);
|
|
|
|
|
}
|
|
|
|
@ -256,46 +254,46 @@ public class RetailAppController {
|
|
|
|
|
* @param device
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/version", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/version")
|
|
|
|
|
public JSONObject getAppVersion(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getNewVersion(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client")
|
|
|
|
|
public JSONObject getClientInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getClientInfo(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/apply", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/client/apply")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void updatePartnerInfo(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody ClientUpdateInfo info) {
|
|
|
|
|
public void updatePartnerInfo(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody ClientUpdateInfo info) {
|
|
|
|
|
logger.info(info.toString());
|
|
|
|
|
retailAppService.updateMerchantInfo(device,info);
|
|
|
|
|
retailAppService.updateMerchantInfo(device, info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/compliance_audit", method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/client/compliance_audit")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void commitAudit(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
retailAppService.applyToCompliance(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/realtime", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/realtime")
|
|
|
|
|
public JSONObject getClientInfoRealtime(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getClientInfoRealtime(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/me", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/me")
|
|
|
|
|
public JSONObject getClientMyInfoRealtime(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getClientInfoMe(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/verify/email", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/client/verify/email")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public JSONObject sendVerifyEmail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.sendVerifyEmail(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/check", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/check")
|
|
|
|
|
public JSONObject getCheckClientInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
JSONObject defaultResult = new JSONObject();
|
|
|
|
|
defaultResult.put("rate_expire", false);
|
|
|
|
@ -304,72 +302,72 @@ public class RetailAppController {
|
|
|
|
|
return defaultResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/checkContract", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/checkContract")
|
|
|
|
|
public JSONObject getCheckClientInfoV2(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
String version = device.getString("version");
|
|
|
|
|
if("2.9.3".equals(version)){
|
|
|
|
|
if ("2.9.3".equals(version)) {
|
|
|
|
|
throw new BadRequestException("test");
|
|
|
|
|
}
|
|
|
|
|
return retailAppService.getCheckClientInfo(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/client")
|
|
|
|
|
public void updateClient(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody AppClientBean appClientBean) {
|
|
|
|
|
retailAppService.updateClient(device, appClientBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/file", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/file")
|
|
|
|
|
public JSONObject getAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getAuthFiles(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/file", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/client/file")
|
|
|
|
|
public void uploadAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody ClientAuthFilesInfo filesInfo) {
|
|
|
|
|
retailAppService.uploadAuthFiles(device, filesInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/daily_transactions/date/{dateStr}", method = RequestMethod.GET)
|
|
|
|
|
public JSONObject listDailyTransactions(@PathVariable String dateStr, @RequestParam(defaultValue = "Australia/Melbourne") String timezone,@RequestParam(required = false) String app_client_ids,
|
|
|
|
|
@GetMapping("/daily_transactions/date/{dateStr}")
|
|
|
|
|
public JSONObject listDailyTransactions(@PathVariable String dateStr, @RequestParam(defaultValue = "Australia/Melbourne") String timezone, @RequestParam(required = false) String app_client_ids,
|
|
|
|
|
@RequestParam(defaultValue = "false") boolean thisdevice, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.listDailyTransactions(dateStr, timezone, thisdevice, device,app_client_ids);
|
|
|
|
|
return retailAppService.listDailyTransactions(dateStr, timezone, thisdevice, device, app_client_ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/modify/retail_surcharge", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/modify/retail_surcharge")
|
|
|
|
|
public JSONObject setCustomerPayForSurcharge(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject config) {
|
|
|
|
|
return retailAppService.updateRetailConfig(device, config.getBooleanValue("retail_surcharge"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/modify/require_remark", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/modify/require_remark")
|
|
|
|
|
public JSONObject setRequireRemarkConfig(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject enable) {
|
|
|
|
|
return retailAppService.setRequireRemarkConfig(device, enable.getBooleanValue("enabled"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/modify/require_custinfo", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/modify/require_custinfo")
|
|
|
|
|
public JSONObject setRequireCustInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject enable) {
|
|
|
|
|
return retailAppService.setRequireCustInfoConfig(device, enable.getBooleanValue("enabled"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/current_user", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/current_user")
|
|
|
|
|
public JSONObject currentDeviceUser(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.userInfo(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cash_back/common", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/cash_back/common")
|
|
|
|
|
public JSONObject getCashbackCommData(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getCashbackCommData(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cash_back/records", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/cash_back/records")
|
|
|
|
|
public JSONObject getCashbackRecords(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getCashbackRecords(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cash_back/drawlogs", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/cash_back/drawlogs")
|
|
|
|
|
public JSONObject getCashbackDrawLogs(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getCashbackDrawLogs(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cash_back/draw_deposits", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/cash_back/draw_deposits")
|
|
|
|
|
public void drawDeposits(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject cashObj) {
|
|
|
|
|
try {
|
|
|
|
|
BigDecimal draw_amount = cashObj.getBigDecimal("draw_amount");
|
|
|
|
@ -379,7 +377,7 @@ public class RetailAppController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cash_back/clean_info", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/cash_back/clean_info")
|
|
|
|
|
public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,
|
|
|
|
|
@RequestParam(value = "client_id", required = false) String client_id) {
|
|
|
|
|
if (client_id == null) {
|
|
|
|
@ -388,53 +386,53 @@ public class RetailAppController {
|
|
|
|
|
return retailAppService.getCashbackCleanInfo(device, client_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/partner_signin_app_qrcode/{codeId}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/partner_signin_app_qrcode/{codeId}")
|
|
|
|
|
public void partnerAppSigninViaQRCode(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String codeId) {
|
|
|
|
|
signInStatusManager.clientQRCodeAppSignIn(device, codeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 优惠券Begin */
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/coupon/used", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/coupon/used")
|
|
|
|
|
public JSONObject getCoupons(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(value = "page", defaultValue = "1") int page,
|
|
|
|
|
@RequestParam(value = "limit", defaultValue = "10") int limit) {
|
|
|
|
|
return retailAppService.getCoupons(device, page, limit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/coupon/{coupon_log_id}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/coupon/{coupon_log_id}")
|
|
|
|
|
public JSONObject getCouponDetail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String coupon_log_id) {
|
|
|
|
|
return retailAppService.getCouponById(device, coupon_log_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/coupon/use/{coupon_log_id}", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/coupon/use/{coupon_log_id}")
|
|
|
|
|
public void useCoupon(@PathVariable String coupon_log_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
retailAppService.useCoupon(device, coupon_log_id);
|
|
|
|
|
}
|
|
|
|
|
/* 优惠券End */
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/{bill_id}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/bills/{bill_id}")
|
|
|
|
|
public JSONObject getBill(@PathVariable("bill_id") String bill_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return billService.getBillDetail(bill_id, device.getIntValue("client_id"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/list", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/bills/list")
|
|
|
|
|
public JSONObject getBills(QueryBillBean queryBillBean, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return billService.queryBills(device.getIntValue("client_id"), queryBillBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/bills")
|
|
|
|
|
public JSONObject addBill(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody NewBillBean newBillBean) {
|
|
|
|
|
JSONObject result = billService.save(device.getIntValue("client_id"), newBillBean);
|
|
|
|
|
result.remove("bill");
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/{bill_id}/close", method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/bills/{bill_id}/close")
|
|
|
|
|
public void closeBill(@PathVariable("bill_id") String bill_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
billService.updateBillStatus(bill_id, "2", device.getIntValue("client_id"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/bills/orders/{bill_id}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/bills/orders/{bill_id}")
|
|
|
|
|
public JSONObject getBillOrders(@PathVariable("bill_id") String bill_id, QueryBillOrderBean queryBillOrderBean,
|
|
|
|
|
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
JSONObject result = billOrderService.query(bill_id, device.getIntValue("client_id"), queryBillOrderBean);
|
|
|
|
@ -443,30 +441,30 @@ public class RetailAppController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/acts", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/acts")
|
|
|
|
|
public List<JSONObject> getIndexAct(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return appActService.listAppActs();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/act/mondelay/desc", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/act/mondelay/desc")
|
|
|
|
|
public ModelAndView getActDetail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
ModelAndView mav = new ModelAndView("activity/mondelay/mondelay");
|
|
|
|
|
mav.addAllObjects(actMonDelaySettleService.getActDetail(device));
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/act/mondelay/apply", method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/act/mondelay/apply")
|
|
|
|
|
public void apply(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
actMonDelaySettleService.actApply(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/act/mondelay/cancel", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/act/mondelay/cancel")
|
|
|
|
|
public void cancel(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
actMonDelaySettleService.cancelAct(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/file/agree", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/file/agree")
|
|
|
|
|
public JSONObject generateSourceAgreeFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
JSONObject file = clientContractService.getSourceAgreement(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
@ -474,17 +472,17 @@ public class RetailAppController {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/file/agree/confirm", method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/file/agree/confirm")
|
|
|
|
|
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
clientContractService.confirmSourceAgreement(device.getIntValue("client_id"), device.getString("account_id"), "App");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/manual_settle", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/manual_settle")
|
|
|
|
|
public JSONObject getManualSettleStatus(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return manualSettleSupport.findCurrentSettle(device.getIntValue("client_id"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/manual_settle", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/manual_settle")
|
|
|
|
|
public JSONObject requestManualSettle(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject data) {
|
|
|
|
|
String settleToStr = data.getString("settle_to");
|
|
|
|
|
if (settleToStr == null) {
|
|
|
|
@ -498,40 +496,40 @@ public class RetailAppController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/manual_settle", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/client/manual_settle")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject data) {
|
|
|
|
|
retailAppService.changeManualSettle(device,data.getBoolean("manual_settle"));
|
|
|
|
|
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject data) {
|
|
|
|
|
retailAppService.changeManualSettle(device, data.getBoolean("manual_settle"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/qrcode", method = RequestMethod.GET)
|
|
|
|
|
public JSONObject getQrcode(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestParam(required = false,defaultValue = "0") int client_id, QRCodeConfig config,@RequestParam(required = false,defaultValue = "0") int app_client_ids) {
|
|
|
|
|
if(client_id==0){
|
|
|
|
|
@GetMapping("/qrcode")
|
|
|
|
|
public JSONObject getQrcode(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestParam(required = false, defaultValue = "0") int client_id, QRCodeConfig config, @RequestParam(required = false, defaultValue = "0") int app_client_ids) {
|
|
|
|
|
if (client_id == 0) {
|
|
|
|
|
client_id = device.getIntValue("client_id");
|
|
|
|
|
}
|
|
|
|
|
if(app_client_ids!=0){
|
|
|
|
|
if (app_client_ids != 0) {
|
|
|
|
|
client_id = app_client_ids;
|
|
|
|
|
}
|
|
|
|
|
return retailAppService.getQrcode(device,config,client_id);
|
|
|
|
|
return retailAppService.getQrcode(device, config, client_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/surcharge", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/surcharge")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody UpdateSurchargeDTO updateSurchargeDTO) {
|
|
|
|
|
retailAppService.changeSurchargeEnable(device, updateSurchargeDTO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/invoice",method = RequestMethod.GET)
|
|
|
|
|
public JSONObject getInvoiceData(@ModelAttribute(RETAIL_DEVICE) JSONObject device,AppQueryBean appQueryBean) throws Exception {
|
|
|
|
|
return retailAppService.getInvoiceData(device,appQueryBean);
|
|
|
|
|
@GetMapping("/invoice")
|
|
|
|
|
public JSONObject getInvoiceData(@ModelAttribute(RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) throws Exception {
|
|
|
|
|
return retailAppService.getInvoiceData(device, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/invoice/file",method = RequestMethod.GET)
|
|
|
|
|
public void getInvoiceFile(@ModelAttribute(RETAIL_DEVICE) JSONObject device,AppQueryBean appQueryBean,HttpServletResponse httpResponse) throws Exception {
|
|
|
|
|
retailAppService.getInvoiceFile(device,appQueryBean,httpResponse);
|
|
|
|
|
@GetMapping("/invoice/file")
|
|
|
|
|
public void getInvoiceFile(@ModelAttribute(RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean, HttpServletResponse httpResponse) throws Exception {
|
|
|
|
|
retailAppService.getInvoiceFile(device, appQueryBean, httpResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/surcharge", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/surcharge")
|
|
|
|
|
public JSONObject changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
JSONObject client = retailAppService.getClientInfoRealtime(device);
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
@ -543,53 +541,54 @@ public class RetailAppController {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/attachment/files",method = RequestMethod.POST)
|
|
|
|
|
public JSONObject uploadImage(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestParam MultipartFile file) throws Exception {
|
|
|
|
|
return attachmentClient.uploadFile(file,false);
|
|
|
|
|
@PostMapping("/attachment/files")
|
|
|
|
|
public JSONObject uploadImage(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestParam MultipartFile file) throws Exception {
|
|
|
|
|
return attachmentClient.uploadFile(file, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/openim/check",method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/openim/check")
|
|
|
|
|
public JSONObject openimCheck(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.openimCheck(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/openim/chat",method = RequestMethod.POST)
|
|
|
|
|
public void openimChat(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject param) {
|
|
|
|
|
retailAppService.addUnreadMsg(device,param);
|
|
|
|
|
@PostMapping("/openim/chat")
|
|
|
|
|
public void openimChat(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject param) {
|
|
|
|
|
retailAppService.addUnreadMsg(device, param);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/ctrip/check",method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/ctrip/check")
|
|
|
|
|
public JSONObject ctripCheck(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.ctripCheck(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/ctrip/coupon/{couponId}",method = RequestMethod.GET)
|
|
|
|
|
public JSONObject ctripCheck(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@PathVariable String couponId) {
|
|
|
|
|
return retailAppService.ctripCouponInfo(device,couponId);
|
|
|
|
|
@GetMapping("/ctrip/coupon/{couponId}")
|
|
|
|
|
public JSONObject ctripCheck(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @PathVariable String couponId) {
|
|
|
|
|
return retailAppService.ctripCouponInfo(device, couponId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cus/coupon_accuess_log/{client_moniker}", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/cus/coupon_accuess_log/{client_moniker}")
|
|
|
|
|
public JSONObject getCouponLogByClientMoniker(@PathVariable String client_moniker, AppQueryBean appQueryBean) {
|
|
|
|
|
return retailAppService.getCouponCusCouponLog(client_moniker, appQueryBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cus/coupon_accuess_log/{coupon_id}", method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/cus/coupon_accuess_log/{coupon_id}")
|
|
|
|
|
public void saveCouponAccuessLog(@PathVariable String coupon_id, @RequestParam int client_id, String remark) {
|
|
|
|
|
retailAppService.saveCouponAccuessLog(client_id, coupon_id, remark);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/style", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/style")
|
|
|
|
|
public JSONObject getStyle() {
|
|
|
|
|
return retailAppService.getStyle();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cus/coupon_accuess_log/{accuess_id}", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/cus/coupon_accuess_log/{accuess_id}")
|
|
|
|
|
public void updateCouponAccuessLog(@PathVariable String accuess_id, String remark) {
|
|
|
|
|
retailAppService.cancelCouponAccuessLog(accuess_id, remark);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* app端获取风控通知信息
|
|
|
|
|
*
|
|
|
|
|
* @param clientId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -600,6 +599,7 @@ public class RetailAppController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* app端风控事件列表接口
|
|
|
|
|
*
|
|
|
|
|
* @param riskEventQuery
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -620,6 +620,7 @@ public class RetailAppController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* app端风控事件详情接口
|
|
|
|
|
*
|
|
|
|
|
* @param riskId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -633,6 +634,7 @@ public class RetailAppController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* app端获取风控事件上传的材料信息
|
|
|
|
|
*
|
|
|
|
|
* @param riskId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -643,6 +645,7 @@ public class RetailAppController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* app端上传调单材料接口
|
|
|
|
|
*
|
|
|
|
|
* @param material
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(value = "/risk/business/events")
|
|
|
|
@ -650,59 +653,63 @@ public class RetailAppController {
|
|
|
|
|
retailAppService.submitMaterial(material, device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/risk/business/upload/files", method = RequestMethod.POST)
|
|
|
|
|
@PostMapping("/risk/business/upload/files")
|
|
|
|
|
public JSONObject uploadImage(@RequestParam MultipartFile file) throws Exception {
|
|
|
|
|
return attachmentClient.uploadFile(file,false);
|
|
|
|
|
return attachmentClient.uploadFile(file, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 接收关联邮箱的验证码
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param email contact_email
|
|
|
|
|
* @param email contact_email
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/account/email",method = RequestMethod.PUT)
|
|
|
|
|
public void bindAccountEmail(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject email) throws Exception {
|
|
|
|
|
retailAppService.bindAccountEmail(device,email);
|
|
|
|
|
@PutMapping("/account/email")
|
|
|
|
|
public void bindAccountEmail(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject email) throws Exception {
|
|
|
|
|
retailAppService.bindAccountEmail(device, email);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关联邮箱
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param params 验证码
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/account/email/bind",method = RequestMethod.PUT)
|
|
|
|
|
public void updateAccountEmail(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject params) throws Exception {
|
|
|
|
|
retailAppService.updateAccountEmail(device,params);
|
|
|
|
|
@PutMapping("/account/email/bind")
|
|
|
|
|
public void updateAccountEmail(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject params) throws Exception {
|
|
|
|
|
retailAppService.updateAccountEmail(device, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 接收关联手机的验证码
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param phone contact_phone
|
|
|
|
|
* @param phone contact_phone
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/account/phone",method = RequestMethod.PUT)
|
|
|
|
|
public void bindAccountPhone(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject phone) throws Exception {
|
|
|
|
|
retailAppService.bindAccountPhone(device,phone);
|
|
|
|
|
@PutMapping("/account/phone")
|
|
|
|
|
public void bindAccountPhone(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject phone) throws Exception {
|
|
|
|
|
retailAppService.bindAccountPhone(device, phone);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关联手机
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param params 验证码
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/account/phone/bind",method = RequestMethod.PUT)
|
|
|
|
|
public void updateAccountPhone(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject params) throws Exception {
|
|
|
|
|
retailAppService.updateAccountPhone(device,params);
|
|
|
|
|
@PutMapping("/account/phone/bind")
|
|
|
|
|
public void updateAccountPhone(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject params) throws Exception {
|
|
|
|
|
retailAppService.updateAccountPhone(device, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 验证退款密码
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/refund/passwd/verify", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/refund/passwd/verify")
|
|
|
|
|
public void verifyRefundPassword(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject json) {
|
|
|
|
|
retailAppService.verifyRefundPassword(device, json);
|
|
|
|
|
}
|
|
|
|
@ -710,87 +717,93 @@ public class RetailAppController {
|
|
|
|
|
/**
|
|
|
|
|
* 重置退款密码
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/refund/passwd/reset", method = RequestMethod.PUT)
|
|
|
|
|
@PutMapping("/refund/passwd/reset")
|
|
|
|
|
public void resetRefundPassWord(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject json) {
|
|
|
|
|
retailAppService.resetRefundPassword(device, json);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{notice_id}/toggleCBBankChannel", method = RequestMethod.PUT)
|
|
|
|
|
public JSONObject toggleCBBankChannel(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@PathVariable("notice_id") String noticeId) {
|
|
|
|
|
return retailAppService.toggleCBBankChannel(device,noticeId);
|
|
|
|
|
@PutMapping("/{notice_id}/toggleCBBankChannel")
|
|
|
|
|
public JSONObject toggleCBBankChannel(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable("notice_id") String noticeId) {
|
|
|
|
|
return retailAppService.toggleCBBankChannel(device, noticeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cbbank_pay/toggleCustomerSurcharge", method = RequestMethod.PUT)
|
|
|
|
|
public JSONObject toggleCBBankCustomerSurcharge(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject customerSurcharge) {
|
|
|
|
|
@PutMapping("/cbbank_pay/toggleCustomerSurcharge")
|
|
|
|
|
public JSONObject toggleCBBankCustomerSurcharge(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject customerSurcharge) {
|
|
|
|
|
return retailAppService.toggleCBBankCustomerSurcharge(device, customerSurcharge.getBooleanValue("customerSurcharge"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/cbbank_pay/aggregate_file", method = RequestMethod.GET)
|
|
|
|
|
public void getCBBankAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,HttpServletResponse httpResponse) {
|
|
|
|
|
@GetMapping("/cbbank_pay/aggregate_file")
|
|
|
|
|
public void getCBBankAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, HttpServletResponse httpResponse) {
|
|
|
|
|
retailAppService.getCBBankAggregateFile(device, httpResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/client/auth_file/status", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/auth_file/status")
|
|
|
|
|
public JSONObject getClientAuthFileStatus(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getClientAuthFileStatus(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 原合同文件
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/client/aggregate_file", method = RequestMethod.GET)
|
|
|
|
|
@GetMapping("/client/aggregate_file")
|
|
|
|
|
public JSONObject getSourceAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
return retailAppService.getSourceAggregateFile(device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 合成后的合同文件
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param file 签名的url图片
|
|
|
|
|
* @param file 签名的url图片
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/client/aggregate_file", method = RequestMethod.POST)
|
|
|
|
|
public JSONObject getClientAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam MultipartFile file, @RequestHeader("User-Agent") String ua) throws IOException {
|
|
|
|
|
@PostMapping("/client/aggregate_file")
|
|
|
|
|
public JSONObject getClientAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam MultipartFile file, @RequestHeader("User-Agent") String ua) throws IOException {
|
|
|
|
|
return retailAppService.getClientAggregateFile(device, file, ua);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提交待审核文件
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param filesInfo 合规文件url
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/client/auth_file", method = RequestMethod.PUT)
|
|
|
|
|
public List<JSONObject> uploadGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestBody ClientAuthFilesInfo filesInfo){
|
|
|
|
|
@PutMapping("/client/auth_file")
|
|
|
|
|
public List<JSONObject> uploadGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody ClientAuthFilesInfo filesInfo) {
|
|
|
|
|
return retailAppService.uploadGreenChannelAuthFiles(device, filesInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除待审核文件
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @param fileId 合规文件Id
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/client/auth_file/{fileId}/delete", method = RequestMethod.PUT)
|
|
|
|
|
public void deleteGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@PathVariable String fileId){
|
|
|
|
|
@PutMapping("/client/auth_file/{fileId}/delete")
|
|
|
|
|
public void deleteGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String fileId) {
|
|
|
|
|
retailAppService.deleteGreenChannelAuthFiles(device, fileId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提交审核
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/client/auth_file/commit_to_compliance", method = RequestMethod.POST)
|
|
|
|
|
public void commitToComplianceAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device){
|
|
|
|
|
@PostMapping("/client/auth_file/commit_to_compliance")
|
|
|
|
|
public void commitToComplianceAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
|
|
|
|
|
retailAppService.commitAuthFilesToCompliance(device, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提交审核
|
|
|
|
|
*
|
|
|
|
|
* @param device
|
|
|
|
|
* @params photoInfo 图片或网站
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/client/auth_file/commit_to_compliance_new", method = RequestMethod.POST)
|
|
|
|
|
public void commitToComplianceAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject photoInfo){
|
|
|
|
|
@PostMapping("/client/auth_file/commit_to_compliance_new")
|
|
|
|
|
public void commitToComplianceAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject photoInfo) {
|
|
|
|
|
retailAppService.commitAuthFilesToCompliance(device, photoInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|