Merge branch 'develop'

# Conflicts:
#	pom.xml
#	src/main/java/au/com/royalpay/payment/manage/support/cms/web/AppStyleController.java
master
luoyang 5 years ago
commit d8a543257c

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.13</version>
<version>1.2.14</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -229,6 +229,42 @@
</plugins>
</build>
<profiles>
<profile>
<id>officedev</id>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>192.168.0.84:5000/royalpay/serverjre:openj9</image>
</from>
<to>
<image>192.168.0.84:5000/royalpay/manage-dev</image>
<tags>
<tag>latest</tag>
<tag>${docker-image.version}</tag>
</tags>
</to>
<extraDirectory>
<path>extra/</path>
</extraDirectory>
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dev</id>
<build>

@ -31,7 +31,7 @@ public class OneDollarDayActivityController {
return mav;
}
@RequestMapping(value = "/merchant_list", method = RequestMethod.GET)
@GetMapping("/merchant_list")
public JSONObject listMerchants(@RequestParam(required = false) String city, @RequestParam(required = false) String name,
@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "15") int limit) {
return oneDollarDayActivity.listMerchants(city, name, page, limit);

@ -4,10 +4,7 @@ import au.com.royalpay.payment.manage.activities.diet.core.OneDollarDayActivity;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
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.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@ -22,7 +19,7 @@ public class OneDollarDayAnalysisController {
@Resource
private OneDollarDayActivity oneDollarDayActivity;
@RequestMapping(value = "/merchant_list", method = RequestMethod.GET)
@GetMapping("/merchant_list")
public List<JSONObject> listMerchants(@RequestParam(required = false) String city) {
return oneDollarDayActivity.listMerchantsAnalysis(city);
}
@ -32,13 +29,13 @@ public class OneDollarDayAnalysisController {
@RequestParam(required = false) String begin,@RequestParam(required = false) String end
* @return
*/
@RequestMapping(value = "/transaction_analysis", method = RequestMethod.GET)
@GetMapping("/transaction_analysis")
public List<JSONObject> transaction_analysis(@RequestParam Map<String,String> map) {
JSONObject params = JSONObject.parseObject(JSON.toJSONString(map));
return oneDollarDayActivity.getTransactionAnalysis(params);
}
@RequestMapping(value = "/subsidy", method = RequestMethod.GET)
@GetMapping("/subsidy")
public List<JSONObject> transaction_subsidy(@RequestParam Map<String,String> map) {
JSONObject params = JSONObject.parseObject(JSON.toJSONString(map));
return oneDollarDayActivity.getSubsidyInDays(params);

@ -18,12 +18,12 @@ public class OneDollarDayManageController {
@Resource
private OneDollarDayActivity oneDollarDayActivity;
@RequestMapping(value = "/merchants", method = RequestMethod.GET)
@GetMapping("/merchants")
public JSONObject listMerchants() {
return oneDollarDayActivity.listMerchantsDetail();
}
@RequestMapping(value = "/merchants/{clientMoniker}", method = RequestMethod.PUT)
@PutMapping("/merchants/{clientMoniker}")
public void updateMerchant(@PathVariable String clientMoniker, @RequestBody MerchantInfo merchantInfo) {
oneDollarDayActivity.updateMerchant(clientMoniker, merchantInfo);
}

@ -8,9 +8,8 @@ import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Created by yixian on 2017-04-07.
@ -20,9 +19,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
public class OneDollarDayMerchantBindController {
private Logger logger = LoggerFactory.getLogger(getClass());
@RequestMapping(value = "/merchant_bind", method = RequestMethod.GET)
@GetMapping("/merchant_bind")
public String bindMerchantUser(@ModelAttribute(CommonConsts.WECHATINFO) JSONObject user) {
logger.info("one_dollar_day_wechat_bind---------->"+user.toJSONString());
logger.info("one_dollar_day_wechat_bind---------->{}", user);
return "templates/activity/one_dollar_day/merchant_bind";
}
}

@ -1,14 +1,14 @@
package au.com.royalpay.payment.manage.activities.monsettledelay.web;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@RestController
@RequestMapping("/act/mondelay")
public class ActMonDelaySettleController {
@RequestMapping(value = "/desc", method = RequestMethod.GET)
@GetMapping("/desc")
public ModelAndView encourageLogs() {
ModelAndView mav = new ModelAndView("activity/");
return mav;

@ -1,6 +1,5 @@
package au.com.royalpay.payment.manage.analysis.beans.ato;
import com.github.stuxuhai.jpinyin.PinyinException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.joda.time.DateTime;
@ -18,16 +17,7 @@ public interface ATOBulkLine {
default StringBuilder appendAParam(StringBuilder line, String content, int length) {
content = content == null ? "" : StringUtils.trim(content);
content = StringUtils.remove(StringUtils.remove(content, '\r'), '\n');
int contentCharacterLength = content.getBytes().length;
int contentLength = content.length();
if (contentCharacterLength != contentLength) {
try {
content = CharacterUtils.convertToAlphaBet(content);
} catch (PinyinException e) {
e.printStackTrace();
content = "";
}
}
content = CharacterUtils.convertToAlphaBet(content);
content = content.replace("?", " ");
if (content.getBytes().length != content.length()) {
content = "";

@ -1,10 +1,12 @@
package au.com.royalpay.payment.manage.analysis.beans.ato;
import com.github.stuxuhai.jpinyin.ChineseHelper;
import com.github.stuxuhai.jpinyin.PinyinException;
import com.github.stuxuhai.jpinyin.PinyinFormat;
import com.github.stuxuhai.jpinyin.PinyinHelper;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.stream.Collectors;
/**
@ -12,12 +14,19 @@ import java.util.stream.Collectors;
*/
public class CharacterUtils {
public static String convertToAlphaBet(String source) throws PinyinException {
public static String convertToAlphaBet(String source) {
return convertFullWidthToHalfWidth(convertToPinYin(source));
}
public static String convertToPinYin(String source) throws PinyinException {
return PinyinHelper.convertToPinyinString(source, "", PinyinFormat.WITHOUT_TONE).toUpperCase();
public static String convertToPinYin(String source) {
try {
return PinyinHelper.convertToPinyinString(source, "", PinyinFormat.WITHOUT_TONE);
} catch (PinyinException e) {
return source.chars().filter(c -> !ChineseHelper.isChinese((char) c))
.mapToObj(c -> "" + (char) c)
.collect(Collectors.joining());
}
}
public static String convertFullWidthToHalfWidth(String source) {

@ -15,7 +15,6 @@ import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@ -20,7 +20,6 @@ import java.util.List;
*/
@RestController
@RequestMapping(value = "/analysis/amount", method = RequestMethod.GET)
public class AmountAnalysisController {
@Resource
private AmountAnalysisService amountAnalysisService;

@ -4,8 +4,8 @@ import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
import au.com.royalpay.payment.manage.analysis.core.BDAnalysisService;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
@ -47,25 +47,25 @@ public class BDSaleAnalysisController {
@ManagerMapping("/sales/partners/excel")
@ReadOnlyConnection
public void exportExcel(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
bdAnalysisService.exportSalesExcel(analysis,httpResponse,manager);
bdAnalysisService.exportSalesExcel(analysis, httpResponse, manager);
}
@ManagerMapping("/sales/partners/report")
@ReadOnlyConnection
public List<JSONObject> getBDSalePartnerReport(AnalysisBean analysis){
public List<JSONObject> getBDSalePartnerReport(AnalysisBean analysis) {
return bdAnalysisService.getSalesPartnersReportByBD(analysis.toParams(null));
}
@ManagerMapping("/sales/partners/excel_bd")
@ReadOnlyConnection
public void exportPartnerExcelByBd(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
bdAnalysisService.exportPartnerExcelByBd(analysis,httpResponse,manager);
bdAnalysisService.exportPartnerExcelByBd(analysis, httpResponse, manager);
}
@ManagerMapping("/sales/partners/excel_data")
@ReadOnlyConnection
public void exportPartnerExcelByData(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
bdAnalysisService.exportPartnerExcelByData(analysis,httpResponse,manager);
bdAnalysisService.exportPartnerExcelByData(analysis, httpResponse, manager);
}
}

@ -7,18 +7,11 @@ import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Created by yishuqian on 10/11/2016.
@ -38,8 +31,8 @@ public class CustomersAnalysisController {
}
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
return customersAnalysisService.getCustomersAnalysis(params);
@ -54,8 +47,8 @@ public class CustomersAnalysisController {
}
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
return customersAnalysisService.getCustomersAnalysisMonthly(params);
@ -71,8 +64,8 @@ public class CustomersAnalysisController {
}
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
return customersAnalysisService.getChannelAmountAnalysis(params);
@ -87,30 +80,30 @@ public class CustomersAnalysisController {
}
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
return customersAnalysisService.getCBBankChannelAmountAnalysis(params);
}
@ManagerMapping(value = "/ranking/{openid_type}",role = ManagerRole.DEVELOPER)
@ManagerMapping(value = "/ranking/{openid_type}", role = ManagerRole.DEVELOPER)
@ReadOnlyConnection
public JSONObject getCustomersRanking(@PathVariable int openid_type, AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
params.put("openid_type",openid_type);
params.put("openid_type", openid_type);
if (manager.getInteger("org_id") != null) {
params.put("org_id", manager.getIntValue("org_id"));
}
return customersAnalysisService.getCustomersRanking(params,analysis.getPage(),analysis.getLimit());
return customersAnalysisService.getCustomersRanking(params, analysis.getPage(), analysis.getLimit());
}
@ManagerMapping(value = "/ranking/{openid_type}/total",role = ManagerRole.RISK_MANAGER)
@ManagerMapping(value = "/ranking/{openid_type}/total", role = ManagerRole.RISK_MANAGER)
@ReadOnlyConnection
public JSONObject getCustomersTotal(@PathVariable int openid_type, AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
params.put("openid_type",openid_type);
params.put("openid_type", openid_type);
if (manager.getInteger("org_id") != null) {
params.put("org_id", manager.getIntValue("org_id"));
}
@ -118,18 +111,17 @@ public class CustomersAnalysisController {
return customersAnalysisService.getCustomersTotal(params);
}
@ManagerMapping(value = "/{customer_id}/orders",role = ManagerRole.DEVELOPER)
@ManagerMapping(value = "/{customer_id}/orders", role = ManagerRole.DEVELOPER)
@ReadOnlyConnection
public JSONObject getCustomerOrders(@PathVariable String customer_id, TradeLogQuery tradeLogQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = tradeLogQuery.toParams(null);
params.put("customer_id",customer_id);
params.put("status",5);
params.put("customer_id", customer_id);
params.put("status", 5);
if (manager.getInteger("org_id") != null) {
params.put("org_id", manager.getIntValue("org_id"));
}
return customersAnalysisService.getOrdersByOpenid(params,tradeLogQuery.getPage(),tradeLogQuery.getLimit());
return customersAnalysisService.getOrdersByOpenid(params, tradeLogQuery.getPage(), tradeLogQuery.getLimit());
}
}

@ -4,11 +4,11 @@ import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
@ -34,7 +34,7 @@ public class DashboardController {
@ReadOnlyConnection
public JSONObject commonAnalysis1(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getCommonAnalysis1(params);
}
@ -42,7 +42,7 @@ public class DashboardController {
@ReadOnlyConnection
public JSONObject commonAnalysis3(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getCommonAnalysis3(params);
}
@ -50,7 +50,7 @@ public class DashboardController {
@ReadOnlyConnection
public JSONObject commonAnalysis4(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getCommonAnalysis4(params);
}
@ -58,7 +58,7 @@ public class DashboardController {
@ReadOnlyConnection
public JSONObject commonAnalysis2(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getCommonAnalysis2(params);
}
@ -66,7 +66,7 @@ public class DashboardController {
@ReadOnlyConnection
public List<JSONObject> tradeInTypes(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getTradeInTypes(params);
}
@ -88,7 +88,7 @@ public class DashboardController {
orgManager.checkOrg(manager, params);
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd() > 0){
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
@ -99,11 +99,11 @@ public class DashboardController {
@ReadOnlyConnection
public List<JSONObject> tradeInHours(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
return dashboardService.getTradeAnalysisInHours(params);
@ -113,15 +113,15 @@ public class DashboardController {
@ReadOnlyConnection
public List<JSONObject> tradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getTradeAnalysisInDays(params);
}
@ManagerMapping("/new_clients")
@ReadOnlyConnection
public List<JSONObject> clientsTradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
public List<JSONObject> clientsTradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getClientsTradeAnalysisInDays(params);
}
@ -129,11 +129,11 @@ public class DashboardController {
@ReadOnlyConnection
public List<JSONObject> partnersInTypes(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
return dashboardService.getPartnersInTypes(params);
@ -145,11 +145,11 @@ public class DashboardController {
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
params.put("trade_type", trade_type);
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
if (analysis.getGroup_bd() > 0) {
params.put("bd_group_bd", analysis.getGroup_bd());
}
}
@ -160,7 +160,7 @@ public class DashboardController {
@ReadOnlyConnection
public List<JSONObject> tradeInTime(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getTradeAnalysisInTime(params);
}
@ -179,9 +179,9 @@ public class DashboardController {
@ManagerMapping("/Total_platform_amount")
@ReadOnlyConnection
public JSONObject getPlatformAmount(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
public JSONObject getPlatformAmount(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(analysis.getTimezone());
orgManager.checkOrg(manager,params);
orgManager.checkOrg(manager, params);
return dashboardService.getPlatformAmount(params);
}
@ -190,9 +190,9 @@ public class DashboardController {
public JSONObject getDashBoardBaseConfig() {
JSONObject config = sysConfigManager.getSysConfig();
JSONObject limits = new JSONObject();
limits.put("payment.wechat.per_order_limit",config.getString("payment.wechat.per_order_limit"));
limits.put("payment.wechat.individual_daily_limit",config.getString("payment.wechat.individual_daily_limit"));
limits.put("payment.wechat.individual_yearly_limit",config.getString("payment.wechat.individual_yearly_limit"));
limits.put("payment.wechat.per_order_limit", config.getString("payment.wechat.per_order_limit"));
limits.put("payment.wechat.individual_daily_limit", config.getString("payment.wechat.individual_daily_limit"));
limits.put("payment.wechat.individual_yearly_limit", config.getString("payment.wechat.individual_yearly_limit"));
return limits;
}
}

@ -4,8 +4,8 @@ import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
import au.com.royalpay.payment.manage.analysis.core.OrgAnalysisService;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
@ -21,14 +21,14 @@ public class OrgSaleAnalysisController {
@Resource
private OrgAnalysisService orgAnalysisService;
@ManagerMapping(value = "/sales",role = {ManagerRole.DIRECTOR,ManagerRole.OPERATOR,ManagerRole.ADMIN,ManagerRole.FINANCIAL_STAFF})
@ManagerMapping(value = "/sales", role = {ManagerRole.DIRECTOR, ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.FINANCIAL_STAFF})
@ReadOnlyConnection
public List<JSONObject> getSalesAnalysis(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
return orgAnalysisService.getSalesAnalysis(params,manager);
return orgAnalysisService.getSalesAnalysis(params, manager);
}
@ManagerMapping(value = "/{org_id}/partners",role = {ManagerRole.DIRECTOR,ManagerRole.OPERATOR,ManagerRole.ADMIN,ManagerRole.FINANCIAL_STAFF})
@ManagerMapping(value = "/{org_id}/partners", role = {ManagerRole.DIRECTOR, ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.FINANCIAL_STAFF})
@ReadOnlyConnection
public List<JSONObject> getPartnersSales(@PathVariable String org_id, AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
analysis.setOrg_id(org_id);

@ -19,7 +19,7 @@ import java.util.List;
/**
* Created by yishuqian on 9/19/16.
*/
@RequestMapping(value = "/dashboard/partner", method = RequestMethod.GET)
@RequestMapping(value = "/dashboard/partner",method = RequestMethod.GET)
@RestController
public class PartnerDashboardController {
@Resource

@ -4,8 +4,8 @@ import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
import au.com.royalpay.payment.manage.analysis.core.PartnersAnalysisService;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
@ -18,7 +18,7 @@ import java.util.List;
/**
* Created by yishuqian on 08/12/2016.
*/
@RequestMapping(value = "/analysis/partners", method = RequestMethod.GET)
@RequestMapping(value = "/analysis/partners",method = RequestMethod.GET)
@RestController
public class PartnersAnalysisController {
@Resource

@ -7,9 +7,8 @@ import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@ -29,7 +28,7 @@ public class PlatformRevenueController {
@Resource
PlatformRevenueService platformRevenueService;
@RequestMapping(value = "/revenue/month_reports/{month}", method = RequestMethod.GET)
@GetMapping("/revenue/month_reports/{month}")
@ReadOnlyConnection
public JSONObject getMonthPlatformRevenueReport(@PathVariable String month) {
try {
@ -43,7 +42,7 @@ public class PlatformRevenueController {
}
}
@RequestMapping(value = "/revenue/year_reports/{year}", method = RequestMethod.GET)
@GetMapping("/revenue/year_reports/{year}")
@ReadOnlyConnection
public List<JSONObject> getYearPlatformRevenueReport(@PathVariable int year) {
List<JSONObject> platformRevenueYearReport = new ArrayList<JSONObject>();

@ -0,0 +1,117 @@
package au.com.royalpay.payment.manage.appclient.extend;
import au.com.royalpay.payment.manage.mappers.client.AuthHistoryMapper;
import au.com.royalpay.payment.tools.device.entity.DeviceInfo;
import au.com.royalpay.payment.tools.device.support.DeviceRegister;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
/**
* Create by davep at 2019-09-19 12:07
*/
@Service
public class GatewayOAuthRegister implements DeviceRegister {
public static final String CLIENT_TYPE = "oauthclient";
private MerchantInfoProvider provider;
private AuthHistoryMapper authHistoryMapper;
private StringRedisTemplate redisTemplate;
private String prefix;
public GatewayOAuthRegister(MerchantInfoProvider provider, AuthHistoryMapper authHistoryMapper,
StringRedisTemplate redisTemplate, @Value("${app.redis.prefix}") String prefix) {
this.provider = provider;
this.authHistoryMapper = authHistoryMapper;
this.redisTemplate = redisTemplate;
this.prefix = prefix;
}
@Override
public String getDevType() {
return CLIENT_TYPE;
}
@Override
public JSONObject register(String encrypted, int type) {
return null;
}
@Override
public DeviceInfo checkDeviceRequest(HttpServletRequest request) {
return null;
}
@Override
public JSONObject fillDeviceInfo(HttpServletRequest request, String devId, String devType, String accountId) {
JSONObject auth = findAuthDetail(devId);
int clientId = auth.getIntValue("client_id");
JSONObject client = provider.getClientInfo(clientId);
auth.put("client_moniker", client.getString("client_moniker"));
auth.put("client", client);
return auth;
}
private JSONObject findAuthDetail(String authId) {
String authStr = redisTemplate.boundValueOps(authDetailCacheKey(authId)).get();
if (authStr == null) {
JSONObject authObj = authHistoryMapper.find(authId);
if (authObj == null || !authObj.getBooleanValue("is_valid")) {
throw new ForbiddenException("Auth Expired");
}
JSONObject auth = new JSONObject();
auth.put("dev_id", authId);
auth.put("client_type", CLIENT_TYPE);
auth.put("appid", authObj.getString("appid"));
int clientId = authObj.getIntValue("client_id");
auth.put("client_id", clientId);
auth.put("auth_time", authObj.getDate("auth_time"));
auth.put("account_id", authObj.getString("account_id"));
auth.put("authorize_ip", authObj.getString("authorize_ip"));
auth.put("scope", authObj.getString("scope"));
auth.put("grant_scene", authObj.getString("grant_scene"));
return auth;
}
return JSON.parseObject(authStr);
}
private String authDetailCacheKey(String authId) {
return prefix + ":oauth:auth_detail_cache:" + authId;
}
@Override
public JSONObject checkManageDeviceSign(HttpServletRequest request, String sign, String deviceId, String devVersion) {
return null;
}
@Override
public boolean includeDevId() {
return false;
}
@Override
public void signout(JSONObject device) {
}
@Override
public void manageSignout(JSONObject device) {
}
@Override
public void checkClient(Integer clientId) {
JSONObject client = provider.getClientInfo(clientId);
if (client == null || !client.getBooleanValue("is_valid")) {
throw new ForbiddenException("Client Not Exists");
}
}
}

@ -5,33 +5,22 @@ import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.device.manageadvise.AppClientController;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
@AppClientController
@RequestMapping("/api/v1.0/manage/app")
@ -42,162 +31,162 @@ public class ManageAppController {
@Resource
private AttachmentClient attachmentClient;
@RequestMapping(value = "/token", method = RequestMethod.PUT)
@PutMapping("/token")
public void updateDevToken(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestBody JSONObject token) {
manageAppService.updateDevToken(device, token.getString("devToken"));
}
@RequestMapping(value = "/sign_out", method = RequestMethod.PUT)
@PutMapping("/sign_out")
public void signOut(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.sign_out(device);
}
@RequestMapping(value = "/manager_password/{manager_id}", method = RequestMethod.PUT)
@PutMapping("/manager_password/{manager_id}")
public void changePassword(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String manager_id,
@RequestBody @Valid ChangePwdBean change, Errors errors) {
HttpUtils.handleValidErrors(errors);
manageAppService.changeAccountPassword(device, change, manager_id);
}
@RequestMapping(value = "/referrer", method = RequestMethod.GET)
@GetMapping("/referrer")
public List<JSONObject> getReferrerList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getReferrerList(device);
}
@RequestMapping(value = "/attachment/files", method = RequestMethod.POST)
@PostMapping("/attachment/files")
public JSONObject uploadImage(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestParam MultipartFile file) throws Exception {
return attachmentClient.uploadFile(file, false);
}
@RequestMapping(value = "/merchant/register", method = RequestMethod.POST)
@PostMapping("/merchant/register")
public JSONObject registerPartner(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestBody @Valid ClientRegisterInfo registery,
Errors errors) {
HttpUtils.handleValidErrors(errors);
return manageAppService.registerClient(device, registery);
}
@RequestMapping(value = "/merchant/{clientMoniker}/update", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/update")
public void updatePartnerInfo(@PathVariable String clientMoniker, @RequestBody ClientRegisterInfo info,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.updateClientRegisterInfo(device, clientMoniker, info);
}
@RequestMapping(value = "/merchant/{clientMoniker}/delete", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/delete")
public void disablePartnerInfo(@PathVariable String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.disableClientRegisterInfo(device, clientMoniker);
}
@RequestMapping(value = "/merchants", method = RequestMethod.GET)
@GetMapping("/merchants")
public JSONObject listPartners(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, AppMerchantBean query) {
return manageAppService.listPartners(device, query);
}
@RequestMapping(value = "/merchant/{clientMoniker}/detail", method = RequestMethod.GET)
@GetMapping("/merchant/{clientMoniker}/detail")
public JSONObject getClientByMoniker(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.clientDetail(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/bank_account", method = RequestMethod.GET)
@GetMapping("/merchant/{clientMoniker}/bank_account")
public JSONObject getBankAccount(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.clientBankAccount(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/bank_account", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/bank_account")
public void saveBankAccount(@PathVariable String clientMoniker, @RequestBody @Valid BankAccountInfo bankAccount, Errors errors,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
HttpUtils.handleValidErrors(errors);
manageAppService.saveBankAccount(device, clientMoniker, bankAccount);
}
@RequestMapping(value = "/merchant/{clientMoniker}/rates", method = RequestMethod.GET)
@GetMapping("/merchant/{clientMoniker}/rates")
public Map<String,List<JSONObject>> getRates(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getRates(device, clientMoniker);
}
@RequestMapping(value = "/merchant/rate_config", method = RequestMethod.GET)
@GetMapping("/merchant/rate_config")
public JSONObject getConfigRates(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getConfigRates(device);
}
@RequestMapping(value = "/merchant/{clientMoniker}/rates", method = RequestMethod.POST)
@PostMapping("/merchant/{clientMoniker}/rates")
public void newRate(@PathVariable String clientMoniker, @RequestBody JSONObject config, Errors errors,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
HttpUtils.handleValidErrors(errors);
manageAppService.newConfigRate(device, clientMoniker, config);
}
@RequestMapping(value = "/merchant/{clientMoniker}/compliance/green_channel", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/compliance/green_channel")
public void commitToGreenChannel(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.commitToGreenChannel(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/make_agree_file", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/make_agree_file")
public void commitToDoAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.commitToDoAgreeFile(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/to_compliance", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/to_compliance")
public void commitToCompliance(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.commitToCompliance(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/file", method = RequestMethod.GET)
@GetMapping("/merchant/{clientMoniker}/file")
public JSONObject getAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getAuthFiles(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/file", method = RequestMethod.PUT)
@PutMapping("/merchant/{clientMoniker}/file")
public void uploadAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientAuthFilesInfo filesInfo, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.uploadAuthFiles(device, clientMoniker, filesInfo);
}
@RequestMapping(value = "/version", method = RequestMethod.GET)
@GetMapping("/version")
public JSONObject getAppVersion(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getNewVersion(device);
}
@RequestMapping(value = "/commons", method = RequestMethod.GET)
@GetMapping("/commons")
public JSONObject getCommons(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getCommons(device);
}
@RequestMapping(value = "/org_prize/list", method = RequestMethod.GET)
@GetMapping("/org_prize/list")
public List<JSONObject> getOrgPrizeList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getOrgPrizeList(device);
}
@RequestMapping(value = "/bd/kpi", method = RequestMethod.GET)
@GetMapping("/bd/kpi")
public JSONObject getBdConfigKpi(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getBdConfigKpi(device);
}
@RequestMapping(value = "/bd/list", method = RequestMethod.GET)
@GetMapping("/bd/list")
public List<JSONObject> getBdPrizeList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getBdPrizeList(device);
}
@RequestMapping(value = "/prize/rules", method = RequestMethod.GET)
@GetMapping("/prize/rules")
public JSONObject getPrizeRulesUrl(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getPrizeRulesUrl(device);
}
@RequestMapping(value = "/product/list", method = RequestMethod.GET)
@GetMapping("/product/list")
public JSONObject listProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, ProductBean productBean) {
return manageAppService.listProduct(device, productBean);
}
@RequestMapping(value = "/product/save", method = RequestMethod.POST)
@PostMapping("/product/save")
public void saveProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device,@RequestBody ProductBean productBean) {
manageAppService.saveProduct(device, productBean);
}
@RequestMapping(value = "/product/update", method = RequestMethod.PUT)
@PutMapping("/product/update")
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device,@RequestBody ProductBean productBean) {
manageAppService.updateProduct(device, productBean);
}
@RequestMapping(value = "/product/delete/{commodity_id}", method = RequestMethod.PUT)
@PutMapping("/product/delete/{commodity_id}")
public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String commodity_id) {
manageAppService.deleteProduct(device, commodity_id);
}

@ -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);
}
}

@ -26,22 +26,22 @@ public class RetailAppFundController {
@Resource
private XPlanFundProcesor xPlanFundProcesor;
@RequestMapping(method = RequestMethod.GET)
@GetMapping
public List<JSONObject> listFunds(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return fundsConfigService.listAvailableFunds();
}
@RequestMapping(value = "/xplan/desc", method = RequestMethod.GET)
@GetMapping("/xplan/desc")
public JSONObject checkXPlanStatus(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return xPlanFundConfigService.fundDesc(getMoniker(device));
}
@RequestMapping(value = "/xplan/status", method = RequestMethod.GET)
@GetMapping("/xplan/status")
public JSONObject checkClientStatus(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return xPlanFundConfigService.clientAnalysis(getMoniker(device));
}
@RequestMapping(value = "/xplan/status/join", method = RequestMethod.PUT)
@PutMapping("/xplan/status/join")
public void joinPlan(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
xPlanFundConfigService.clientJoinRequest(getMoniker(device), device.getString("account_id"));
}
@ -50,12 +50,12 @@ public class RetailAppFundController {
return device.getJSONObject("client").getString("client_moniker");
}
@RequestMapping(value = "/xplan/status/auto_deposit", method = RequestMethod.PUT)
@PutMapping("/xplan/status/auto_deposit")
public void configAutoDeposit(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject enable) {
xPlanFundConfigService.switchAutoDeposit(getMoniker(device), device.getString("account_id"), enable.getBooleanValue("enable"));
}
@RequestMapping(value = "/xplan/status/auto_deposit_amount", method = RequestMethod.PUT)
@PutMapping("/xplan/status/auto_deposit_amount")
public void configAutoDepositAmount(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject amount) {
BigDecimal limit = null;
try {
@ -68,23 +68,23 @@ public class RetailAppFundController {
xPlanFundConfigService.configAutoDepositLimitAmount(getMoniker(device), device.getString("account_id"), limit);
}
@RequestMapping(value = "/xplan/transactions", method = RequestMethod.GET)
@GetMapping("/xplan/transactions")
public JSONObject listTransactions(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(required = false) String type,
@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "20") int limit) {
return xPlanFundProcesor.listTransactionHistory(getMoniker(device),type, page, limit);
}
@RequestMapping(value = "/xplan/transactions/{transactionId}", method = RequestMethod.GET)
@GetMapping("/xplan/transactions/{transactionId}")
public JSONObject transactionStatus(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String transactionId) {
return xPlanFundProcesor.transactionStatus(getMoniker(device), transactionId);
}
@RequestMapping(value = "/xplan/deposit", method = RequestMethod.GET)
@GetMapping("/xplan/deposit")
public JSONObject depositPreCheck(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return xPlanFundProcesor.depositCheck(device.getString("account_id"));
}
@RequestMapping(value = "/xplan/deposit/{requestId}", method = RequestMethod.PUT)
@PutMapping("/xplan/deposit/{requestId}")
public JSONObject deposit(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String requestId, @RequestBody JSONObject deposit) {
BigDecimal amount = null;
try {
@ -97,12 +97,12 @@ public class RetailAppFundController {
return xPlanFundProcesor.deposit(requestId, device.getString("account_id"), device.getString("dev_id"), amount);
}
@RequestMapping(value = "/xplan/withdraw", method = RequestMethod.GET)
@GetMapping("/xplan/withdraw")
public JSONObject withdrawCheck(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return xPlanFundProcesor.withdrawCheck(device.getString("account_id"));
}
@RequestMapping(value = "/xplan/withdraw/{requestId}", method = RequestMethod.PUT)
@PutMapping("/xplan/withdraw/{requestId}")
public JSONObject withdraw(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String requestId, @RequestBody JSONObject withdraw) {
BigDecimal amount = null;
try {

@ -45,17 +45,17 @@ public class RetailValidationController {
@Resource
private RetailAppService retailAppService;
@RequestMapping(value = "/devices/{devType}/register", method = RequestMethod.POST)
@PostMapping("/devices/{devType}/register")
public JSONObject register(@RequestBody String registeration, @PathVariable String devType) {
return deviceSupport.register(devType, registeration);
}
@RequestMapping(value = "/devices/{devType}/manage/register", method = RequestMethod.POST)
@PostMapping("/devices/{devType}/manage/register")
public JSONObject manageRegister(@RequestBody String registeration, @PathVariable String devType) {
return manageDeviceSupport.register(devType, registeration);
}
@RequestMapping(value = "/sign_in_check", method = RequestMethod.POST)
@PostMapping("/sign_in_check")
public JSONObject signIn(@RequestBody @Valid RetailLoginInfo loginInfo, Errors errors) {
HttpUtils.handleValidErrors(errors);
String codeValue = signInStatusManager.getVerifyCode(loginInfo.getCaptchaKey());
@ -78,7 +78,7 @@ public class RetailValidationController {
return client;
}
@RequestMapping(value = "/manage/sign_in_check", method = RequestMethod.POST)
@PostMapping("/manage/sign_in_check")
public JSONObject manageSignIn(@RequestBody @Valid RetailLoginInfo loginInfo, Errors errors) {
HttpUtils.handleValidErrors(errors);
String codeValue = signInStatusManager.getVerifyCode(loginInfo.getCaptchaKey());
@ -107,7 +107,7 @@ public class RetailValidationController {
return manager;
}
@RequestMapping(value = "/wechat_app_signin", method = RequestMethod.POST)
@PostMapping("/wechat_app_signin")
public JSONObject partnerWechatAppSignIn(@RequestBody JSONObject data) {
JSONObject res = signInStatusManager.partnerWechatAppSignIn(data.getString("code"));
if (!res.getBooleanValue("not_exists")) {
@ -116,7 +116,7 @@ public class RetailValidationController {
return res;
}
@RequestMapping(value = "/captcha", method = RequestMethod.GET)
@GetMapping("/captcha")
public JSONObject getCaptchaForDevice(@RequestParam(defaultValue = "false") boolean imgurl) throws IOException {
String capText = RandomStringUtils.random(4, false, true);
System.out.println("登陆验证码: " + capText);
@ -142,12 +142,12 @@ public class RetailValidationController {
/**
* 广
*/
@RequestMapping(value = "/ads", method = RequestMethod.GET)
@GetMapping("/ads")
public JSONObject getAd() {
return retailAppService.getAd();
}
@RequestMapping(value = "/ads/{article_id}", method = RequestMethod.GET)
@GetMapping("/ads/{article_id}")
public JSONObject getAdDetail(@PathVariable String article_id) {
return retailAppService.getAdDetail( article_id);
}

@ -21,12 +21,12 @@ public class SimpleClientApplyController {
@Resource
private SysConfigManager sysConfigManager;
@RequestMapping(value = "/account/check", method = RequestMethod.GET)
@GetMapping("/account/check")
public void checkAccountName(@RequestParam String nation_code,@RequestParam String phone) {
simpleClientApplyService.checkAccountName(phone,nation_code);
}
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}/jump", method = RequestMethod.GET)
@GetMapping("/account/mail/{address}/verify/{codeKey}/jump")
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String address,@RequestParam String username) {
simpleClientApplyService.checkOrGenerateVerifyMailKey(address, codeKey);
ModelAndView view = new ModelAndView("mail/verify_mail");
@ -36,7 +36,7 @@ public class SimpleClientApplyController {
return view;
}
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}", method = RequestMethod.POST)
@PostMapping("/account/mail/{address}/verify/{codeKey}")
@ResponseBody
public void verifyMail(@PathVariable String codeKey, @PathVariable String address, @RequestBody JSONObject account) {
simpleClientApplyService.checkOrGenerateVerifyMailKey(address, codeKey);
@ -44,7 +44,7 @@ public class SimpleClientApplyController {
simpleClientApplyService.deleteVerifyMailKey(codeKey);
}
@RequestMapping(value = "/info/update/{username}/step1", method = RequestMethod.POST)
@PostMapping("/info/update/{username}/step1")
@ResponseBody
public JSONObject registerCompanyInfoStep1(@PathVariable String username, @RequestBody @Valid ClientPreApplyStep1Bean account) {
JSONObject result = new JSONObject();
@ -55,13 +55,13 @@ public class SimpleClientApplyController {
return result;
}
@RequestMapping(value = "/info/phone/{phone_number}/verify", method = RequestMethod.POST)
@PostMapping("/info/phone/{phone_number}/verify")
@ResponseBody
public void getAndSendSmsCode(@PathVariable String phone_number, @RequestParam String nation_code, HttpServletRequest request) {
simpleClientApplyService.getAndSendSmsCode(phone_number, nation_code, request);
}
@RequestMapping(value = "/info/update/{username}", method = RequestMethod.POST)
@PostMapping("/info/update/{username}")
public void registerCompanyInfo(@PathVariable String username, @RequestBody @Valid ClientPreApplyBean applyBean) {
simpleClientApplyService.checkOrGenerateRegisterProcessKey(username,applyBean.getCodeKey());
if(StringUtils.isNotEmpty(applyBean.getBsb_no().trim())){
@ -70,19 +70,19 @@ public class SimpleClientApplyController {
simpleClientApplyService.saveOrUpdateApplyInfo(applyBean.insertObject(), username);
}
@RequestMapping(value = "/info/bank/{bsb_no}", method = RequestMethod.GET)
@GetMapping("/info/bank/{bsb_no}")
public JSONObject getBankInfo(@PathVariable String bsb_no, @RequestParam String username, @RequestParam String codeKey) {
simpleClientApplyService.checkOrGenerateRegisterProcessKey(username, codeKey);
return simpleClientApplyService.getBankInfo(bsb_no);
}
@RequestMapping(value = "/config/sys_rates", method = RequestMethod.GET)
@GetMapping("/config/sys_rates")
public JSONObject getSysRate() {
JSONObject sysConfig = sysConfigManager.getSysConfig();
return JSONObject.parseObject(sysConfig.getString("sys_apply_rates"));
}
@RequestMapping(value = "/send/mail/subscribe", method = RequestMethod.GET)
@GetMapping("/send/mail/subscribe")
public void sendSubscribeMail(@RequestParam(value = "mail", required = true) String mail, @RequestParam("lang") String lang) {
simpleClientApplyService.subscribeNewsletter(mail, lang);
}

@ -4,15 +4,8 @@ import au.com.royalpay.payment.manage.apps.bean.CustomerImpressionQuery;
import au.com.royalpay.payment.manage.apps.core.CustomerImpressionService;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.device.advise.AppClientController;
import com.alibaba.fastjson.JSONObject;
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.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -22,20 +15,20 @@ public class CustomerImpressionController {
@Resource
private CustomerImpressionService customerImpressionService;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@GetMapping("/list")
@ResponseBody
public JSONObject list(CustomerImpressionQuery customerImpressionQuery, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
customerImpressionQuery.setClient_id(app.getInteger("client_id"));
return customerImpressionService.listPageble(customerImpressionQuery);
}
@RequestMapping(value = "/{customer_id}", method = RequestMethod.GET)
@GetMapping("/{customer_id}")
@ResponseBody
public JSONObject find(@PathVariable String customer_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {
return customerImpressionService.findOne(app.getIntValue("client_id"), customer_id);
}
@RequestMapping(value = "/{customer_id}", method = RequestMethod.PUT)
@PutMapping("/{customer_id}")
@ResponseBody
public void modifyNameRemark(@PathVariable String customer_id, @RequestBody JSONObject customerInfo,
@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject app) {

@ -17,7 +17,7 @@ public class CustomerRMIController {
@Resource
private ClientConfigService clientConfigService;
@RequestMapping(value = "/{client_moniker}", method = RequestMethod.GET)
@GetMapping("/{client_moniker}")
@ResponseBody
public JSONObject checkPointsAfterPay(@PathVariable String client_moniker, @ModelAttribute(CommonConsts.APP_INFO) JSONObject app) {
JSONObject result = clientManager.getClientInfoByMoniker(client_moniker);

@ -19,7 +19,7 @@ public class SSOCallbackController {
@Resource
private SSOSupport ssoSupport;
@RequestMapping(value = "/manager/{ssoKey}", method = RequestMethod.GET)
@GetMapping("/manager/{ssoKey}")
public void managerSsoCallback(@PathVariable String ssoKey, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
HttpServletResponse response) throws IOException {
SSOSupport.RefererInfo referer = ssoSupport.getCachedReferer(ssoKey, "manager");
@ -32,7 +32,7 @@ public class SSOCallbackController {
response.sendRedirect(url);
}
@RequestMapping(value = "/client/{ssoKey}", method = RequestMethod.GET)
@GetMapping("/client/{ssoKey}")
public void clientSsoCallback(@PathVariable String ssoKey, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject clientAccount,
HttpServletResponse response) throws IOException {
SSOSupport.RefererInfo referer = ssoSupport.getCachedReferer(ssoKey, "client");

@ -21,7 +21,7 @@ public class SSOSignInController {
@Resource
private SSOSupport ssoSupport;
@RequestMapping(value = "/manager_sign_in", method = RequestMethod.GET)
@GetMapping("/manager_sign_in")
public void managerSignIn(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @ModelAttribute(CommonConsts.APP_INFO) JSONObject app,
@RequestParam("callback") String referer,
HttpServletResponse response) throws IOException {
@ -36,7 +36,7 @@ public class SSOSignInController {
}
}
@RequestMapping(value = "/manager_sign_in/{code}/manager", method = RequestMethod.GET)
@GetMapping("/manager_sign_in/{code}/manager")
public JSONObject getManagerInfo(@ModelAttribute(CommonConsts.APP_INFO) JSONObject app, @PathVariable String code) {
if (app.getBooleanValue("invalid_ip")){
throw new ForbiddenException("InvalidIP");
@ -48,7 +48,7 @@ public class SSOSignInController {
return manager;
}
@RequestMapping(value = "/client_sign_in", method = RequestMethod.GET)
@GetMapping("/client_sign_in")
public void clientSignIn(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject clientUser, @ModelAttribute(CommonConsts.APP_INFO) JSONObject app,
@RequestParam("callback") String referer,
HttpServletResponse response) throws IOException {
@ -63,7 +63,7 @@ public class SSOSignInController {
}
}
@RequestMapping(value = "/client_sign_in/{code}/account", method = RequestMethod.GET)
@GetMapping("/client_sign_in/{code}/account")
public JSONObject getClientInfo(@ModelAttribute(CommonConsts.APP_INFO) JSONObject app, @PathVariable String code) {
if (app.getBooleanValue("invalid_ip")){
throw new ForbiddenException("InvalidIP");

@ -24,7 +24,7 @@ public class CityPartnerController {
return cityPartnerService.listAllRequests();
}
@RequestMapping(value = "/{requestId}/handle", method = RequestMethod.PUT)
@PutMapping("/{requestId}/handle")
public void handleRequest(@PathVariable String requestId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
cityPartnerService.handleRequest(requestId, manager);
}

@ -3,25 +3,17 @@ package au.com.royalpay.payment.manage.citypartner.web;
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
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.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
/**
* Created by yixian on 2017-03-08.
*/
@ -32,23 +24,23 @@ public class CityPartnerPrizeController {
@Resource
private CityPartnerPrizeService cityPartnerPrizeService;
@RequestMapping(value = "/generate", method = RequestMethod.POST)
@PostMapping("/generate")
public void generate(@RequestBody JSONObject param) {
String month = param.getString("month");
cityPartnerPrizeService.generate(month);
}
@RequestMapping("/months")
@GetMapping("/months")
public List<JSONObject> listAvailableMonths(@RequestParam String year) {
return cityPartnerPrizeService.listAvailableMonths(year);
}
@RequestMapping(value = "/export/{monthStr}", method = RequestMethod.GET)
@GetMapping("/export/{monthStr}")
public void exportExcel(@PathVariable String monthStr,HttpServletResponse httpResponse) throws Exception {
cityPartnerPrizeService.exportMonthFiles(monthStr,httpResponse);
}
@RequestMapping(value = "/months/{monthStr}")
@GetMapping(value = "/months/{monthStr}")
public JSONObject getCityPartnersPrizeInfo(@PathVariable String monthStr) {
List<JSONObject> partnerPrizeInfos = cityPartnerPrizeService.getCityPartnerPrizeInfoList(monthStr);
Map<String, List<JSONObject>> partenerPrizeMap = new HashMap<>();
@ -131,7 +123,7 @@ public class CityPartnerPrizeController {
return cityPartnerPrizeService.getCityPartnerPrizeDetail(monthStr, orgId);
}
@RequestMapping(value = "/referrer/generate", method = RequestMethod.POST)
@PostMapping("/referrer/generate")
public void generateReferrer(@RequestBody JSONObject param) {
String month = param.getString("month");
cityPartnerPrizeService.generateReferrer(month);
@ -142,12 +134,12 @@ public class CityPartnerPrizeController {
return cityPartnerPrizeService.getReferrerPrizeDetail(monthStr, orgId);
}
@RequestMapping("/referrer/months")
@GetMapping("/referrer/months")
public List<JSONObject> listReferrerAvailableMonths(@RequestParam String year) {
return cityPartnerPrizeService.listReferrerAvailableMonths(year);
}
@RequestMapping(value = "/referrer/months/{monthStr}")
@GetMapping(value = "/referrer/months/{monthStr}")
public JSONObject getReferrerPrizeInfo(@PathVariable String monthStr) {
List<JSONObject> partnerPrizeInfos = cityPartnerPrizeService.getReferrerPrizeInfoList(monthStr);
Map<String, List<JSONObject>> partenerPrizeMap = new HashMap<>();
@ -198,12 +190,12 @@ public class CityPartnerPrizeController {
return cityPartnerPrizeService.getAgentPrizeDetail(monthStr, orgId);
}
@RequestMapping("/agent/months")
@GetMapping("/agent/months")
public List<JSONObject> listAgentAvailableMonths(@RequestParam String year) {
return cityPartnerPrizeService.listAgentAvailableMonths(year);
}
@RequestMapping(value = "/agent/months/{monthStr}")
@GetMapping(value = "/agent/months/{monthStr}")
public JSONObject getAgentPrizeInfo(@PathVariable String monthStr) {
List<JSONObject> partnerPrizeList = cityPartnerPrizeService.getCityPartnerPrizeInfoList(monthStr);
Map<String, JSONObject> countPartnerPrizeMap = new HashMap<>();
@ -290,18 +282,18 @@ public class CityPartnerPrizeController {
return result;
}
@RequestMapping(value = "/senior/generate", method = RequestMethod.POST)
@PostMapping("/senior/generate")
public void generateSenior(@RequestBody JSONObject param) {
String month = param.getString("month");
cityPartnerPrizeService.generate(month);
}
@RequestMapping(value = "/senior/{orgId}", method = RequestMethod.GET)
@GetMapping("/senior/{orgId}")
public void findOne(@RequestParam String monthStr, @PathVariable String orgId) {
cityPartnerPrizeService.getSenior(monthStr,orgId);
}
@RequestMapping(value = "/senior/{orgId}/details", method = RequestMethod.GET)
@GetMapping("/senior/{orgId}/details")
public List<JSONObject> findDetail(@RequestParam String monthStr, @PathVariable String orgId) {
JSONObject params = new JSONObject();
params.put("monthStr",monthStr);

@ -5,21 +5,11 @@ import au.com.royalpay.payment.manage.custom.beans.QueryCustomVo;
import au.com.royalpay.payment.manage.custom.core.CustomService;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject;
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.bind.annotation.RestController;
import java.util.List;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@RestController
@PartnerMapping(value = "/custom")
@ -28,35 +18,35 @@ public class CustomController {
@Resource
private CustomService customService;
@RequestMapping(value = "/{report_id}", method = RequestMethod.GET)
@GetMapping("/{report_id}")
public JSONObject findOne(@PathVariable String report_id) {
return customService.findOneWithDetail(report_id);
}
@RequestMapping(value = "/query", method = RequestMethod.GET)
@GetMapping("/query")
public JSONObject queryWithTran(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, QueryCustomVo queryCustomVo) {
JSONObject param = queryCustomVo.toParam();
param.put("client_id", partner.getIntValue("client_id"));
return customService.query(param, queryCustomVo.getPage(), queryCustomVo.getLimit());
}
@RequestMapping(value = "", method = RequestMethod.POST)
@PostMapping("")
@ResponseBody
public void add(@RequestBody AddCustomVO addCustomVO) {
customService.add(addCustomVO);
}
@RequestMapping(value = "/channelCustom", method = RequestMethod.GET)
@GetMapping("/channelCustom")
public List<JSONObject> channelCustomConfigs(@RequestParam String channel) {
return customService.channelCustomConfigs(channel);
}
@RequestMapping(value = "/{report_id}/resend", method = RequestMethod.POST)
@PostMapping("/{report_id}/resend")
public void resend(@PathVariable String report_id) {
customService.resend(report_id);
}
@RequestMapping(value = "/{report_id}/customResult", method = RequestMethod.GET)
@GetMapping("/{report_id}/customResult")
public void getCustomResult(@PathVariable String report_id) {
customService.getCustomResult(report_id);
}

@ -13,17 +13,17 @@ public class CustomerPaymentInfoController {
@Resource
private CustomerPaymentInfoService customerPaymentInfoService;
@RequestMapping(value = "/update", method = RequestMethod.POST)
@PostMapping("/update")
public void savePaymentInfo(@RequestBody JSONObject paymentInfo) {
customerPaymentInfoService.save(paymentInfo);
}
@RequestMapping(value = "/update", method = RequestMethod.PUT)
@PutMapping("/update")
public void updatePaymentInfo(@RequestBody JSONObject paymentInfo) {
customerPaymentInfoService.update(paymentInfo);
}
@RequestMapping(value = "/{openid}/check", method = RequestMethod.GET)
@GetMapping("/{openid}/check")
public JSONObject selectPaymentInfo(@PathVariable String openid) {
return customerPaymentInfoService.selectPaymentInfoByOpenId(openid);
}

@ -9,11 +9,7 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
@ -29,7 +25,7 @@ public class EncourageMoneyController {
private EncourageService encourageService;
@RequestMapping(value = "/orders/{orderId}", method = RequestMethod.GET)
@GetMapping("/orders/{orderId}")
public JSONObject takeEncourageMoney(@PathVariable String orderId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser,
@ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) {
throw new BadRequestException("当前活动暂不支持");
@ -45,12 +41,12 @@ public class EncourageMoneyController {
// return encourageService.takeEncourageMoney(orderId, user_id);
}
@RequestMapping(value = "/orders/{orderId}/crit", method = RequestMethod.PUT)
@PutMapping("/orders/{orderId}/crit")
public JSONObject takeEncourageMoneyCrit(@PathVariable String orderId) {
return encourageService.doubleEncourageMoney(orderId);
}
@RequestMapping(value = "/my", method = RequestMethod.GET)
@GetMapping("/my")
public ModelAndView encourageLogs(@ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser, @ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) {
ModelAndView mav = new ModelAndView("activity/encourage_money/my");
JSONObject user = new JSONObject();
@ -73,12 +69,12 @@ public class EncourageMoneyController {
return mav;
}
@RequestMapping(value = "/desc", method = RequestMethod.GET)
@GetMapping("/desc")
public ModelAndView descPage() {
return new ModelAndView("activity/encourage_money/desc");
}
@RequestMapping(value = "/merchants", method = RequestMethod.GET)
@GetMapping("/merchants")
public ModelAndView merchantsPage() {
return new ModelAndView("activity/encourage_money/merchants");
}

@ -20,32 +20,32 @@ public class EncourageMoneyManageController {
@Resource
private EncourageService encourageService;
@RequestMapping(value = "/events", method = RequestMethod.GET)
@GetMapping("/events")
public List<JSONObject> listEvents() {
return encourageService.listEvents();
}
@RequestMapping(value = "/events", method = RequestMethod.POST)
@PostMapping("/events")
public JSONObject newEvent(@RequestBody EncourageEventParameters parameters) {
return encourageService.newEvent(parameters);
}
@RequestMapping(value = "/events/{eventId}", method = RequestMethod.GET)
@GetMapping("/events/{eventId}")
public JSONObject eventReport(@PathVariable String eventId) {
return encourageService.eventReport(eventId);
}
@RequestMapping(value = "/events/{eventId}/parameters", method = RequestMethod.PUT)
@PutMapping("/events/{eventId}/parameters")
public void setEventParameters(@PathVariable String eventId, @RequestBody EncourageEventParameters parameters) {
encourageService.updateParameters(eventId, parameters);
}
@RequestMapping(value = "/events/{eventId}/receive_logs", method = RequestMethod.GET)
@GetMapping("/events/{eventId}/receive_logs")
public JSONObject listReceiveLogs(@PathVariable String eventId, ReceiveLogQueryBean query) {
return encourageService.listReceiveLogs(eventId, query);
}
@RequestMapping(value = "/events/{eventId}/use_logs", method = RequestMethod.GET)
@GetMapping("/events/{eventId}/use_logs")
public JSONObject listUseLogs(@PathVariable String eventId, @RequestParam(defaultValue = "1") int page,
@RequestParam(defaultValue = "20") int limit) {
return encourageService.listUseLogs(eventId, page, limit);

@ -23,7 +23,7 @@ public class NewYearRedPacketController {
@Resource
private CustomerRewardLogService customerRewardLogService;
@RequestMapping(value = "/reward", method = RequestMethod.GET)
@GetMapping("/reward")
public String takeReward(@ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser,
@ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) {
// String user_id = "o32MzuA5H8KNIYAO2a__BGS-3iXs";
@ -49,7 +49,7 @@ public class NewYearRedPacketController {
// return encourageService.takeEncourageMoney(orderId, user_id);
}
@RequestMapping(value = "/{reward_id}", method = RequestMethod.GET)
@GetMapping("/{reward_id}")
public ModelAndView getReward(@PathVariable String reward_id){
ModelAndView mav = new ModelAndView("activity/new_year_reward/reward");
JSONObject reward = customerRewardLogService.getRewardDetail(reward_id);
@ -57,25 +57,25 @@ public class NewYearRedPacketController {
return mav;
}
@RequestMapping(value = "/description", method = RequestMethod.GET)
@GetMapping("/description")
public ModelAndView takeDescription(){
ModelAndView mav = new ModelAndView("activity/new_year_reward/description");
return mav;
}
@ResponseBody
@RequestMapping(value = "/coupons", method = RequestMethod.GET)
@GetMapping("/coupons")
public void saveCoupons(@RequestParam("type2")int type2,@RequestParam("type3")int type3,@RequestParam("type1")String type1,@RequestParam("date")String date){
customerRewardLogService.saveReward(type2,type3,type1,date);
}
@RequestMapping(value = "/redpacks/{rewardId}", method = RequestMethod.POST)
@PostMapping("/redpacks/{rewardId}")
public void updateRedpackStatus(HttpServletRequest request, @RequestHeader String sign, @RequestHeader long timestamp, @PathVariable String rewardId) {
// mpWechatApi(request.getRequestURI(), sign, timestamp);
// redpackSupport.checkRedpack(rewardId);
}
@RequestMapping(value = "/resendRedpacks", method = RequestMethod.GET)
@GetMapping("/resendRedpacks")
public void updateRedpackStatus(){
customerRewardLogService.reSendRedPacks();
}

@ -15,7 +15,7 @@ public class PointsController {
private CustomerPointsService customerPointsService;
private String whiteIps = "";
@RequestMapping(value = "/init/{customer_id}", method = RequestMethod.GET)
@GetMapping("/init/{customer_id}")
@ResponseBody
public String getInitPoints(@PathVariable String customer_id, @RequestParam("channel") String channel) {
int points = customerPointsService.getOldPoints(customer_id, channel);

@ -2,10 +2,7 @@ package au.com.royalpay.payment.manage.dev.web;
import com.alibaba.fastjson.JSONObject;
import com.maxmind.geoip.LookupService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -16,7 +13,7 @@ public class IPController {
@Resource
private LookupService lookupService;
@RequestMapping(value = "/{ipAddr}", method = RequestMethod.GET)
@GetMapping("/{ipAddr}")
public String getIpInfo(@PathVariable String ipAddr) {
String city = lookupService.getLocation(ipAddr).city;
return city;

@ -1,10 +1,7 @@
package au.com.royalpay.payment.manage.dev.web;
import au.com.royalpay.payment.manage.analysis.core.EstimateAnalysisService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -18,12 +15,12 @@ public class LogAmountController {
@Resource
private EstimateAnalysisService estimateAnalysisService;
@RequestMapping(value = "/create/settle/amountLog/{date}", method = RequestMethod.GET)
@GetMapping("/create/settle/amountLog/{date}")
public void createSettleAmountLog(@PathVariable String date) throws Exception {
estimateAnalysisService.initSettleAmount(date);
}
@RequestMapping(value = "/create/transaction/amountLog/{date}", method = RequestMethod.GET)
@GetMapping("/create/transaction/amountLog/{date}")
public void createTransactionAmountLog(@PathVariable String date) throws Exception {
estimateAnalysisService.initTransactionData(date);
}

@ -6,6 +6,7 @@ import au.com.royalpay.payment.manage.support.email.MailSendingEvent;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -21,7 +22,7 @@ import java.util.Date;
public class MailTestController implements ApplicationEventPublisherAware {
private ApplicationEventPublisher publisher;
@RequestMapping(value = "/mail", method = RequestMethod.POST)
@PostMapping("/mail")
public void sendTestMail() throws MessagingException {
MailSendingEvent evt = new MailSendingEvent(this, "Test");
evt.password("Daqo5434").username("dev@royalpay.com.au");

@ -2,13 +2,12 @@ package au.com.royalpay.payment.manage.dev.web;
import au.com.royalpay.payment.manage.bdprize.core.BDPrizeService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@RestController
@ -18,19 +17,19 @@ public class MangerAppRulesController {
@Resource
private BDPrizeService bdPrizeService;
@RequestMapping(value = "/org", method = RequestMethod.GET)
@GetMapping("/org")
public ModelAndView hrefOrgRules() {
ModelAndView view = new ModelAndView("app/org_prize_rules");
return view;
}
@RequestMapping(value = "/bd", method = RequestMethod.GET)
@GetMapping("/bd")
public ModelAndView hrefBdRules() {
ModelAndView view = new ModelAndView("app/bd_prize_rules");
return view;
}
@RequestMapping(value = "/bd/config", method = RequestMethod.GET)
@GetMapping("/bd/config")
public List<JSONObject> bdConfigRates() {
return bdPrizeService.getRateConfig();
}

@ -6,6 +6,7 @@ import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import com.alibaba.fastjson.JSONObject;
import org.joda.time.DateTime;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -22,7 +23,7 @@ public class TestAPPController {
@Resource
private DashboardService dashboardService;
@RequestMapping(value = "/trade_log", method = RequestMethod.GET)
@GetMapping("/trade_log")
public List<JSONObject> getTradeLogs(HttpServletResponse response) {
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Allow-Credentials", "true");

@ -78,8 +78,6 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
/**
* Created by yixian on 2016-07-06.
*/
@ -376,7 +374,7 @@ public class TestController implements ApplicationEventPublisherAware {
throw new BadRequestException("退款单不存在");
}
JSONObject order = orderMapper.find(refundOrder.getString("order_id"));
Assert.notNull(order);
Assert.notNull(order, "order not exists");
String channel = order.getString("order_channel");
JSONObject res = new JSONObject();
TradeType type = TradeType.fromGatewayNumber(order.getIntValue("gateway"));
@ -426,31 +424,31 @@ public class TestController implements ApplicationEventPublisherAware {
this.publisher = applicationEventPublisher;
}
@RequestMapping(value = "/send_message", method = RequestMethod.PUT)
@PutMapping("/send_message")
public void sendMassageByCode(@RequestBody @Valid Message message, Errors errors) {
HttpUtils.handleValidErrors(errors);
JSONObject params = message.insertObject();
retailAppService.sendMassageByCode(params);
}
@RequestMapping(value = "/alipay/doclear/{date}", method = RequestMethod.GET)
@GetMapping("/alipay/doclear/{date}")
public void doAliapyClear(@PathVariable String date) throws Exception {
platformClearService.verifySettleLogByDate(date, date, "Alipay");
}
@RequestMapping(value = "/send_merchant_message", method = RequestMethod.PUT)
@PutMapping("/send_merchant_message")
public void sendmerchantMessage(@RequestBody SendWechatMessage sendWechatMessage) {
wechatMessageService.sendMessageByMerchant(sendWechatMessage);
}
@RequestMapping(value = "/send_roles_message", method = RequestMethod.PUT)
@PutMapping("/send_roles_message")
public void sendRolesMessage(@RequestBody SendWechatMessage sendWechatMessage) {
wechatMessageService.sendMessageByRoles(sendWechatMessage);
}
@RequestMapping(value = "/send_personal_message", method = RequestMethod.PUT)
@PutMapping("/send_personal_message")
public void sendPersonalMessage(@RequestBody SendWechatMessage sendWechatMessage) {
wechatMessageService.sendMessageByOpenId(sendWechatMessage);

@ -26,49 +26,49 @@ public class XPlanFundSysConfigController {
@Resource
private XPlanFundProcesor xPlanFundProcesor;
@RequestMapping(value = "/base", method = RequestMethod.GET)
@GetMapping("/base")
public XPlanFundConfig getBaseConfig() {
return xPlanFundConfigService.configuration();
}
@RequestMapping(value = "/base", method = RequestMethod.PUT)
@PutMapping("/base")
public void updateFundConfig(@RequestBody @Valid XPlanFundConfig xPlanFundConfig, Errors errors, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
HttpUtils.handleValidErrors(errors);
xPlanFundConfigService.configuration(xPlanFundConfig, manager);
}
@RequestMapping(value = "/analysis", method = RequestMethod.GET)
@GetMapping("/analysis")
public JSONObject getAnalysis() {
return xPlanFundConfigService.analysisStatus();
}
@RequestMapping(value = "/clients", method = RequestMethod.GET)
@GetMapping("/clients")
public JSONObject listClients(ClientQueryParams params) {
return xPlanFundConfigService.clients(params.toParams(), params.getPage(), params.getLimit());
}
@RequestMapping(value = "/clients/{clientMoniker}", method = RequestMethod.PUT)
@PutMapping("/clients/{clientMoniker}")
public void configClient(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
xPlanFundConfigService.configClient(clientMoniker, manager);
}
@RequestMapping(value = "/clients/{clientMoniker}", method = RequestMethod.GET)
@GetMapping("/clients/{clientMoniker}")
public JSONObject getClientInfo(@PathVariable String clientMoniker) {
return xPlanFundConfigService.clientAnalysis(clientMoniker);
}
@RequestMapping(value = "/clients/{clientMoniker}/transactions", method = RequestMethod.GET)
@GetMapping("/clients/{clientMoniker}/transactions")
public JSONObject clientTransaction(@PathVariable String clientMoniker, @RequestParam(required = false) String type,
@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "15") int limit) {
return xPlanFundProcesor.listTransactionHistory(clientMoniker, type, page, limit);
}
@RequestMapping(value = "/clients/{clientMoniker}/transactions/{transactionId}", method = RequestMethod.GET)
@GetMapping("/clients/{clientMoniker}/transactions/{transactionId}")
public JSONObject getTransactionInfo(@PathVariable String clientMoniker, @PathVariable String transactionId) {
return xPlanFundProcesor.transactionStatus(clientMoniker, transactionId);
}
@RequestMapping(value = "/interests", method = RequestMethod.GET)
@GetMapping("/interests")
public JSONObject listInterests(@RequestParam(required = false) String from, @RequestParam(required = false) String to,
@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "15") int limit) {
return xPlanFundProcesor.interestHistory(from, to, page, limit);

@ -2,9 +2,10 @@ package au.com.royalpay.payment.manage.logview.web;
import au.com.royalpay.payment.manage.logview.beans.NotifyQueryBean;
import au.com.royalpay.payment.manage.logview.core.NotifyLogRepository;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -21,8 +22,8 @@ public class NotifyLogController {
@Resource
private NotifyLogRepository notifyLogRepository;
@RequestMapping
public JSONObject listNotifyLogs(NotifyQueryBean notifyQueryBean){
@GetMapping
public JSONObject listNotifyLogs(NotifyQueryBean notifyQueryBean) {
return notifyLogRepository.listNotifyLogs(notifyQueryBean);
}
}

@ -2,10 +2,10 @@ package au.com.royalpay.payment.manage.management.clearing.web;
import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
import au.com.royalpay.payment.manage.tradelog.beans.ClearingLogQuery;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;

@ -28,7 +28,7 @@ public class FinancialController {
@Resource
private CleanService cleanService;
@RequestMapping(value = "/validated_dates/{month}", method = RequestMethod.GET)
@GetMapping("/validated_dates/{month}")
public List<String> listMonthValidatedDays(@PathVariable String month) {
try {
Date mon = DateUtils.parseDate(month, new String[]{"yyyyMM"});
@ -38,7 +38,7 @@ public class FinancialController {
}
}
@RequestMapping(value = "/order_validations/{date}", method = RequestMethod.GET)
@GetMapping("/order_validations/{date}")
public JSONObject getCheckReport(@PathVariable String date, @RequestParam(defaultValue = "false") boolean fix,
@RequestParam(name = "use_cache", defaultValue = "true") boolean useCache) {
try {
@ -49,7 +49,7 @@ public class FinancialController {
}
}
@RequestMapping(value = "/clean_logs", method = RequestMethod.GET)
@GetMapping("/clean_logs")
public JSONObject getDailyTransactions(@RequestParam String date, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
try {
Date dt = DateUtils.parseDate(date, new String[]{"yyyyMMdd"});
@ -59,7 +59,7 @@ public class FinancialController {
}
}
@RequestMapping(value = "/settlement/month_reports/{month}", method = RequestMethod.GET)
@GetMapping("/settlement/month_reports/{month}")
public List<JSONObject> getMonthSettlementReport(@PathVariable String month) {
try {
Date dt = DateUtils.parseDate(month, new String[]{"yyyyMM"});
@ -70,7 +70,7 @@ public class FinancialController {
}
}
@RequestMapping(value = "/settlement/month_reports/{month}/xls", method = RequestMethod.GET)
@GetMapping("/settlement/month_reports/{month}/xls")
public void getMonthSettlementReportExcel(@PathVariable String month, HttpServletResponse response) throws IOException {
try {
Date dt = DateUtils.parseDate(month, new String[]{"yyyyMM"});

@ -5,20 +5,11 @@ import au.com.royalpay.payment.manage.management.sysconfig.core.PermissionPartne
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.system.core.PermissionClientModulesService;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject;
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.RestController;
import java.util.List;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Created by yixian on 2017-02-28.
@ -34,17 +25,17 @@ public class SysPermissionClientController {
private ClientManager clientManager;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@GetMapping("/list")
public List<JSONObject> list(@RequestParam String client_moniker) {
return permissionClientModulesService.listByClientMoniker(client_moniker);
}
@RequestMapping(value = "/{id}", method = RequestMethod.POST)
@PostMapping("/{id}")
public void modify(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject loginManager, @PathVariable Long id, @RequestBody PermissionClientVO permissionClientVO) {
permissionClientModulesService.switchValid(id,permissionClientVO.getIsValid(),loginManager);
}
@RequestMapping(value = "/init", method = RequestMethod.POST)
@PostMapping("/init")
public void init(@RequestBody JSONObject param) {
JSONObject client = clientManager.getClientInfoByMoniker(param.getString("client_moniker"));
permissionPartnerManager.permissionClientModuleSave(client.getIntValue("client_id"),client.getString("client_moniker"));

@ -9,11 +9,7 @@ import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
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.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -28,42 +24,42 @@ public class SysPermissionConfigController {
@Resource
private PermissionManager permissionManager;
@RequestMapping(value = "/synchronize", method = RequestMethod.POST)
@PostMapping("/synchronize")
public void synchronizeFunctions() {
permissionManager.synchronizeFunctions();
}
@RequestMapping(value = "/functions", method = RequestMethod.GET)
@GetMapping("/functions")
public JSONObject listFunctions() {
return permissionManager.listFunctions();
}
@RequestMapping(value = "/functions/{funcId}.end", method = RequestMethod.PUT)
@PutMapping("/functions/{funcId}.end")
public void updateFunctionInfo(@PathVariable String funcId, @RequestBody FuncInfo funcInfo) {
permissionManager.updateFuncInfo(funcId, funcInfo);
}
@RequestMapping(value = "/functions/{funcId}/modules", method = RequestMethod.PUT)
@PutMapping("/functions/{funcId}/modules")
public void setFuncModule(@PathVariable String funcId, @RequestBody JSONObject module) {
permissionManager.setFunctionModule(funcId, module.getString("module_name"));
}
@RequestMapping(value = "/modules", method = RequestMethod.GET)
@GetMapping("/modules")
public List<JSONObject> listModules() {
return permissionManager.listModules();
}
@RequestMapping(value = "/modules/{moduleName}.end", method = RequestMethod.PUT)
@PutMapping("/modules/{moduleName}.end")
public void updateModule(@PathVariable String moduleName, @RequestBody ModuleInfo module) {
permissionManager.saveOrUpdateModule(moduleName, module);
}
@RequestMapping(value = "/modules/{moduleName}.end", method = RequestMethod.DELETE)
@DeleteMapping("/modules/{moduleName}.end")
public void deleteModule(@PathVariable String moduleName) {
permissionManager.checkAndDeleteModule(moduleName);
}
@RequestMapping(value = "/roles/{roleMask}/functions", method = RequestMethod.GET)
@GetMapping("/roles/{roleMask}/functions")
public List<String> listRoleAuthorizedFunctions(@PathVariable String roleMask) {
try {
int mask = Integer.parseInt(roleMask, 2);
@ -78,7 +74,7 @@ public class SysPermissionConfigController {
throw new BadRequestException("Invalid role mask:" + roleMask);
}
@RequestMapping(value = "/roles/{roleMask}/functions",method = RequestMethod.PUT)
@PutMapping(value = "/roles/{roleMask}/functions")
public void authorizeRole(@PathVariable String roleMask, @RequestBody List<String> functions){
try {
int mask = Integer.parseInt(roleMask, 2);

@ -9,11 +9,7 @@ import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import com.alibaba.fastjson.JSONObject;
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.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -28,42 +24,42 @@ public class SysPermissionPartnerConfigController {
@Resource
private PermissionPartnerManager permissionPartnerManager;
@RequestMapping(value = "/synchronize", method = RequestMethod.POST)
@PostMapping("/synchronize")
public void synchronizeFunctions() {
permissionPartnerManager.synchronizeFunctions();
}
@RequestMapping(value = "/functions", method = RequestMethod.GET)
@GetMapping("/functions")
public JSONObject listFunctions() {
return permissionPartnerManager.listFunctions();
}
@RequestMapping(value = "/functions/{funcId}.end", method = RequestMethod.PUT)
@PutMapping("/functions/{funcId}.end")
public void updateFunctionInfo(@PathVariable String funcId, @RequestBody FuncInfo funcInfo) {
permissionPartnerManager.updateFuncInfo(funcId, funcInfo);
}
@RequestMapping(value = "/functions/{funcId}/modules", method = RequestMethod.PUT)
@PutMapping("/functions/{funcId}/modules")
public void setFuncModule(@PathVariable String funcId, @RequestBody JSONObject module) {
permissionPartnerManager.setFunctionModule(funcId, module.getString("module_name"));
}
@RequestMapping(value = "/modules", method = RequestMethod.GET)
@GetMapping("/modules")
public List<JSONObject> listModuless() {
return permissionPartnerManager.listModules();
}
@RequestMapping(value = "/modules/{moduleName}.end", method = RequestMethod.PUT)
@PutMapping("/modules/{moduleName}.end")
public void updateModulee(@PathVariable String moduleName, @RequestBody PartnerModuleInfo module) {
permissionPartnerManager.saveOrUpdateModule(moduleName, module);
}
@RequestMapping(value = "/modules/{moduleName}.end", method = RequestMethod.DELETE)
@DeleteMapping("/modules/{moduleName}.end")
public void deleteModulee(@PathVariable String moduleName) {
permissionPartnerManager.checkAndDeleteModule(moduleName);
}
@RequestMapping(value = "/roles/{roleMask}/functions", method = RequestMethod.GET)
@GetMapping("/roles/{roleMask}/functions")
public List<String> listRoleAuthorizedFunctions(@PathVariable String roleMask) {
try {
int mask = Integer.parseInt(roleMask, 2);

@ -0,0 +1,19 @@
package au.com.royalpay.payment.manage.mappers.client;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
/**
* Create by davep at 2019-08-16 15:05
*/
@AutoMapper(tablename = "log_client_app_authentication", pkName = "auth_id")
public interface AuthHistoryMapper {
@AutoSql(type = SqlType.SELECT)
JSONObject find(@Param("auth_id") String authId);
}

@ -55,7 +55,7 @@ public class MerchantIdManageController {
}
@RequestMapping(value = "/common_sub_merchant_id", method = RequestMethod.GET)
@GetMapping("/common_sub_merchant_id")
@RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject listCommonSubMerchantId(@RequestParam(required = false) String sub_merchant_id,
@RequestParam int page, @RequestParam(defaultValue = "true") boolean is_valid) {
@ -63,7 +63,7 @@ public class MerchantIdManageController {
return PageListUtils.buildPageListResult(list);
}
@RequestMapping(value = "/common_sub_merchant_id/{sub_merchant_id}", method = RequestMethod.POST)
@PostMapping("/common_sub_merchant_id/{sub_merchant_id}")
@RequireManager(role = {ManagerRole.OPERATOR})
public void addCommonSubMerchantId(@PathVariable String sub_merchant_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject record = new JSONObject();
@ -73,13 +73,13 @@ public class MerchantIdManageController {
merchantIdManageService.save(record);
}
@RequestMapping(value = "/common_sub_merchant_id/{sub_merchant_id}", method = RequestMethod.PUT)
@PutMapping("/common_sub_merchant_id/{sub_merchant_id}")
@RequireManager(role = {ManagerRole.OPERATOR})
public void disableCommonSubMerchantId(@PathVariable String sub_merchant_id) {
merchantIdManageService.disable(sub_merchant_id);
}
@RequestMapping(value = "/qrcode/{sub_merchant_id}", method = RequestMethod.PUT)
@PutMapping("/qrcode/{sub_merchant_id}")
@RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject getClientQrCodeImg(@PathVariable String sub_merchant_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return merchantIdManageService.getClientQrCodeImg(manager,sub_merchant_id);

@ -168,7 +168,7 @@ public class PartnerApplyController {
return clientApply.listBDByOrg(org_id);
}
@RequestMapping(value = "/export_xls", method = RequestMethod.GET)
@GetMapping("/export_xls")
public void exportApplyPartnerList(HttpServletResponse httpResponse,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception{
clientApply.exportApplyPartnerList(manager, httpResponse);

@ -48,7 +48,7 @@ public class PartnerManageController {
clientManager.exportClients(manager, query, resp);
}
@RequestMapping(value = "/list", method = RequestMethod.GET)
@GetMapping("/list")
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT, ManagerRole.DIRECTOR})
public List<JSONObject> lisPartners(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {
return clientManager.listPartners(manager, query);
@ -62,7 +62,7 @@ public class PartnerManageController {
return result;
}
@RequestMapping(value = "/init/check_code_isvalid", method = RequestMethod.GET)
@GetMapping("/init/check_code_isvalid")
public boolean getMerchantIsValid(@RequestParam String clientMoniker) {
return clientManager.getMerchantIsValid(clientMoniker);
}
@ -405,7 +405,7 @@ public class PartnerManageController {
return clientManager.listClientBankAccounts(manager, clientMoniker);
}
@RequestMapping(value = "/{clientMoniker}/bank_account/bank_info/{bsb_no}", method = RequestMethod.GET)
@GetMapping("/{clientMoniker}/bank_account/bank_info/{bsb_no}")
public JSONObject getBankInfo(@PathVariable String clientMoniker, @PathVariable String bsb_no,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.getBankInfo(manager, clientMoniker, bsb_no);
@ -478,7 +478,7 @@ public class PartnerManageController {
clientManager.newConfigRate(manager, clientMoniker, config);
}
@RequestMapping(value = "/sys_rates", method = RequestMethod.GET)
@GetMapping("/sys_rates")
public JSONObject getSysRate() {
return clientManager.getSysRateConfig();
}
@ -765,14 +765,14 @@ public class PartnerManageController {
clientManager.reSubYeepayMerchantApplication(clientMoniker, merchantInfo, manager);
}
@RequestMapping(value = "/compliance", method = RequestMethod.GET)
@GetMapping("/compliance")
@RequireManager(role = {ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {
return clientManager.comListPartnerSelection(manager, query);
}
@RequestMapping(value = "/{clientMoniker}/cb_bankpay/link", method = RequestMethod.GET)
@GetMapping("/{clientMoniker}/cb_bankpay/link")
public void switchPaymentWay(@PathVariable String clientMoniker, HttpServletResponse response) throws IOException {
clientManager.switchPaymentConfig(clientMoniker, response);
}
@ -782,7 +782,7 @@ public class PartnerManageController {
clientManager.switchCBBankLink(manager, clientMoniker, pass.getBooleanValue("allow"));
}
@RequestMapping(value = "/{clientMoniker}/jump/link", method = RequestMethod.GET)
@GetMapping("/{clientMoniker}/jump/link")
public String jumpCBBankPayLink(@PathVariable String clientMoniker) {
return clientManager.cbBankPayLink(clientMoniker);
}
@ -792,7 +792,7 @@ public class PartnerManageController {
clientManager.subYeepayMerchantAdd(clientMoniker, merchantInfo, manager);
}
@RequestMapping(value = "/{clientMoniker}/cb_bankpay/link/pc", method = RequestMethod.GET)
@GetMapping("/{clientMoniker}/cb_bankpay/link/pc")
public void switchPaymentWayPC(@PathVariable String clientMoniker, HttpServletResponse response) throws IOException {
clientManager.switchPaymentConfigPC(clientMoniker, response);
}

@ -12,13 +12,7 @@ import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
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.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -38,13 +32,13 @@ public class OpenimController {
@Resource
private CustomerServiceService customerServiceService;
@RequestMapping(value = "/check", method = RequestMethod.PUT)
@PutMapping("/check")
@RequireManager
public JSONObject check(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return customerServiceService.checkAndSaveManager(manager);
}
@RequestMapping(value = "/signin", method = RequestMethod.POST)
@PostMapping("/signin")
public void partnerSignIn(@RequestBody @Valid LoginInfo loginInfo, Errors errors, HttpServletResponse response) throws Exception {
HttpUtils.handleValidErrors(errors);
HttpUtils.setCookie(response, CommonConsts.MANAGER_STATUS,signInStatusManager.managerSignIn(loginInfo));

@ -11,13 +11,7 @@ import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
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.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -33,37 +27,37 @@ public class OrgManageController {
@Resource
private OrgManager orgManager;
@RequestMapping(method = RequestMethod.GET)
@GetMapping
@RequireManager
public List<JSONObject> listOrgs(@RequestParam(defaultValue = "false") boolean detail) {
return orgManager.listOrgs(detail);
}
@RequestMapping(value = "/senior",method = RequestMethod.GET)
@GetMapping(value = "/senior")
@RequireManager
public List<JSONObject> listSeniorOrgs() {
return orgManager.listSeniorOrgs();
}
@RequestMapping(value = "/orgChild",method = RequestMethod.GET)
@GetMapping(value = "/orgChild")
@RequireManager
public List<JSONObject> listOrgsWithChid(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,OrgInfo orgInfo) {
return orgManager.listOrgsWithChid(manager,orgInfo);
}
@RequestMapping(value = "/child",method = RequestMethod.GET)
@GetMapping(value = "/child")
@RequireManager
public List<JSONObject> listOrgAndChild(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,OrgInfo orgInfo) {
return orgManager.listOrgAndChild(manager);
}
@RequestMapping(value = "/listsOrg", method = RequestMethod.GET)
@GetMapping("/listsOrg")
@RequireManager
public JSONObject listsOrg(OrgInfo orgInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return orgManager.listAllOrgs(orgInfo,manager);
}
@RequestMapping(value = "/list_all_Org", method = RequestMethod.GET)
@GetMapping("/list_all_Org")
@RequireManager
public List<JSONObject> listAllOrg() {
return orgManager.listAllOrg();

@ -14,11 +14,7 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.io.IOException;
@ -54,7 +50,7 @@ public class PromotionRootController {
return model;
}
@RequestMapping(value = "/clients/{clientMoniker}/aggregate", method = RequestMethod.GET)
@GetMapping("/clients/{clientMoniker}/aggregate")
public void clientPromotionRoot(@PathVariable String clientMoniker, @RequestHeader("User-Agent") String userAgent, HttpServletResponse response) {
String url = null;
/*if (userAgent.toLowerCase().contains("micromessenger") ) {

@ -20,7 +20,7 @@ public class ActCustomerLMController {
@Resource
private CustomerLMService customerLMService;
@RequestMapping(value = "/acts", method = RequestMethod.GET)
@GetMapping("/acts")
public JSONObject listActivities(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit) {
return customerLMService.listActivities(page, limit);
}
@ -31,27 +31,27 @@ public class ActCustomerLMController {
// }
@RequestMapping(value = "/acts/{act_id}", method = RequestMethod.GET)
@GetMapping("/acts/{act_id}")
public JSONObject getActDetail(@PathVariable String act_id) {
return customerLMService.getActDetail(act_id);
}
@RequestMapping(value = "/acts/{act_id}", method = RequestMethod.PUT)
@PutMapping("/acts/{act_id}")
public void updateActivity(@PathVariable String act_id, @RequestBody CustomerRedpackActBean actBean) throws Exception {
customerLMService.updateActivity(act_id, actBean.toJson());
}
@RequestMapping(value = "/acts/{actId}/partners", method = RequestMethod.GET)
@GetMapping("/acts/{actId}/partners")
public List<JSONObject> getClientApplyWithDetail(@PathVariable String actId) throws Exception {
return customerLMService.getClientApplyWithDetail(actId);
}
@RequestMapping(value = "/acts/{act_id}/partners/{client_moniker}", method = RequestMethod.POST)
@PostMapping("/acts/{act_id}/partners/{client_moniker}")
public void addClientApply(@PathVariable String act_id, @PathVariable String client_moniker, @RequestBody JSONObject params) throws Exception {
customerLMService.addClientApply(act_id, client_moniker,params);
}
@RequestMapping(value = "/acts/{actId}/partners/{clientMoniker}", method = RequestMethod.DELETE)
@DeleteMapping("/acts/{actId}/partners/{clientMoniker}")
public void removeClientApply(@PathVariable String actId, @PathVariable String clientMoniker) throws Exception {
customerLMService.removeClientApply(actId, clientMoniker);
}

@ -22,27 +22,27 @@ public class RiskController {
@Resource
private RiskMerchantService riskMerchantService;
@RequestMapping(value = "/records", method = RequestMethod.GET)
@GetMapping("/records")
public JSONObject list(QueryRiskRecord recordQuery) {
return riskMerchantService.getRiskRecords(recordQuery);
}
@RequestMapping(value = "/records/{record_id}", method = RequestMethod.GET)
@GetMapping("/records/{record_id}")
public JSONObject getById(@PathVariable String record_id) {
return riskMerchantService.getRecordById(record_id);
}
@RequestMapping(value = "/records/{record_id}/dropOrder", method = RequestMethod.PUT)
@PutMapping("/records/{record_id}/dropOrder")
public void dropOrder(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String record_id) {
riskMerchantService.dropOrderRiskRecord(manager, record_id);
}
@RequestMapping(value = "/records/{record_id}/noop", method = RequestMethod.PUT)
@PutMapping("/records/{record_id}/noop")
public void noop(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String record_id) {
riskMerchantService.noopRiskRecord(manager, record_id);
}
@RequestMapping(value = "/records/{record_id}/directly", method = RequestMethod.PUT)
@PutMapping("/records/{record_id}/directly")
public void directly(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String record_id) {
riskMerchantService.dealRiskRecordDirectly(manager, record_id);
}
@ -53,49 +53,49 @@ public class RiskController {
riskMerchantService.dealRiskRecord(manager,dealRiskRecord);
}
@RequestMapping(value = "/orders", method = RequestMethod.GET)
@GetMapping("/orders")
public JSONObject getRiskOrders(QueryRiskOrder queryRiskOrder) {
return riskMerchantService.getRiskOrders(queryRiskOrder);
}
@RequestMapping(value = "/white/{clientMoniker}", method = RequestMethod.POST)
@PostMapping("/white/{clientMoniker}")
public void addWhiteList(@PathVariable String clientMoniker) {
riskMerchantService.addWhiteList(clientMoniker);
}
@RequestMapping(value = "/white/{clientMoniker}/disable", method = RequestMethod.PUT)
@PutMapping("/white/{clientMoniker}/disable")
public void disableWhiteList(@PathVariable String clientMoniker) {
riskMerchantService.disableWhiteList(clientMoniker);
}
@RequestMapping(value = "/records/uploadFiles", method = RequestMethod.POST)
@PostMapping("/records/uploadFiles")
public void addRecordLog(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@RequestBody AddRiskDetailLog addRiskDetailLog) {
// riskMerchantService.addDetailLog(addRiskDetailLog,manager);
}
@RequestMapping(value = "/details", method = RequestMethod.GET)
@GetMapping("/details")
public JSONObject listDetails(QueryRiskDetail queryRiskDetail) {
return riskMerchantService.getRiskDetails(queryRiskDetail);
}
@RequestMapping(value = "/details/remark", method = RequestMethod.POST)
@PostMapping("/details/remark")
public void addDetailRemark(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody AddRiskDetailLog addRiskDetailLog) {
riskMerchantService.addDetailLog(addRiskDetailLog, manager);
}
@RequestMapping(value = "/attention", method = RequestMethod.GET)
@GetMapping("/attention")
public JSONObject listMerchant(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, QueryAttentionMerchants queryAttention) {
return riskMerchantService.listAttentionMerchants(manager, queryAttention);
}
@RequestMapping(value = "/attention/{clientMoniker}", method = RequestMethod.POST)
@PostMapping("/attention/{clientMoniker}")
public void addMerchant(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker, @RequestBody JSONObject params) {
riskMerchantService.addAttentionMerchant(manager, clientMoniker, params);
}
@RequestMapping(value = "/attention/{clientMoniker}", method = RequestMethod.PUT)
@PutMapping("/attention/{clientMoniker}")
public void disableRiskMerchant(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
riskMerchantService.disableAttentionMerchant(manager, clientMoniker);
}

@ -170,7 +170,7 @@ public class RiskBusinessController {
riskBusinessService.banRiskEvent(risk_id);
}
@RequestMapping(value = "/commitWaitRiskStatus/{risk_id}/{codeKey}", method = RequestMethod.PUT)
@PutMapping("/commitWaitRiskStatus/{risk_id}/{codeKey}")
public void commitWaitRiskStatus(@PathVariable String risk_id,@PathVariable String codeKey,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
riskBusinessService.commitWaitRiskStatus(risk_id, codeKey, manager);
}

@ -27,7 +27,7 @@ public class RiskFileUploadController {
* @param risk_id
* @return
*/
@RequestMapping(value = "/{risk_id}/{codeKey}", method = RequestMethod.GET)
@GetMapping("/{risk_id}/{codeKey}")
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String risk_id) {
//检查codekey是否有效
// riskUploadService.checkUploadMailKey(codeKey,risk_id);
@ -45,7 +45,7 @@ public class RiskFileUploadController {
* @param codeKey
* @param material
*/
@RequestMapping(value = "/{codeKey}", method = RequestMethod.POST)
@PostMapping("/{codeKey}")
public void upload(@PathVariable String codeKey,
@RequestBody JSONObject material,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {

@ -2,11 +2,9 @@ package au.com.royalpay.payment.manage.riskbusiness.web;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.xml.bind.util.JAXBSource;
import java.util.List;
/**

@ -26,15 +26,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.ui.Model;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.CookieValue;
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.RequestHeader;
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.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.awt.image.BufferedImage;
@ -78,7 +70,7 @@ public class SignInController {
private CustomerPaymentInfoService customerPaymentInfoService;
@RequestMapping(value = "/partner_signin", method = RequestMethod.POST)
@PostMapping("/partner_signin")
public void partnerSignIn(@CookieValue(CommonConsts.CODE_KEY) String codeKey, @RequestBody @Valid LoginInfo loginInfo, Errors errors, HttpServletResponse response) throws Exception {
HttpUtils.handleValidErrors(errors);
String codeValue = signInStatusManager.getVerifyCode(codeKey);
@ -95,7 +87,7 @@ public class SignInController {
HttpUtils.setCookie(response, CommonConsts.PARTNER_STATUS, statusKey);
}
@RequestMapping(value = "/partner_signin_wechat_qrcode", method = RequestMethod.GET)
@GetMapping("/partner_signin_wechat_qrcode")
public JSONObject newClientWechatSigninQRCode() {
return signInStatusManager.newClientWechatSignInQRCode();
}
@ -107,7 +99,7 @@ public class SignInController {
return view;
}
@RequestMapping(value = "/partner_signin_wechat_qrcode/{codeId}/check", method = RequestMethod.GET)
@GetMapping("/partner_signin_wechat_qrcode/{codeId}/check")
public void checkPartnerLoginStatus(@PathVariable String codeId, HttpServletResponse response) {
String statusKey = signInStatusManager.checkQRCodeClientLoginStatus(codeId);
HttpUtils.setCookie(response, CommonConsts.PARTNER_STATUS, statusKey);
@ -121,7 +113,7 @@ public class SignInController {
response.sendRedirect(target == null ? "/index.html" : target);
}
@RequestMapping(value = "/manager_signin", method = RequestMethod.POST)
@PostMapping("/manager_signin")
public void managerSignIn(@CookieValue(CommonConsts.CODE_KEY) String codeKey, @RequestBody @Valid LoginInfo loginInfo, Errors errors, HttpServletResponse response) throws Exception {
String codeValue = signInStatusManager.getVerifyCode(codeKey);
if (codeValue == null) {
@ -138,7 +130,7 @@ public class SignInController {
HttpUtils.setCookie(response, CommonConsts.MANAGER_STATUS, statusKey);
}
@RequestMapping(value = "/manager_signin_wechat_qrcode", method = RequestMethod.GET)
@GetMapping("/manager_signin_wechat_qrcode")
public JSONObject newManagerWechatSigninQRCode() {
return signInStatusManager.newManagerWechatSignInQRCode();
}
@ -149,7 +141,7 @@ public class SignInController {
return new ModelAndView("manager_bind_success");
}
@RequestMapping(value = "/manager_signin_wechat_qrcode/{codeId}/check", method = RequestMethod.GET)
@GetMapping("/manager_signin_wechat_qrcode/{codeId}/check")
public void checkQRCodeManagerLoginStatus(@PathVariable String codeId, HttpServletResponse response) {
String statusKey = signInStatusManager.managerQRCodeSignInStatus(codeId);
HttpUtils.setCookie(response, CommonConsts.MANAGER_STATUS, statusKey);
@ -226,7 +218,7 @@ public class SignInController {
HttpUtils.dropCookie(response, CommonConsts.PARTNER_STATUS);
}
@RequestMapping(value = "captcha-login", method = RequestMethod.GET)
@GetMapping("captcha-login")
public void getKaptchaImage(HttpServletResponse response) throws Exception {
// HttpSession session = request.getSession();
response.setDateHeader("Expires", 0);
@ -255,7 +247,7 @@ public class SignInController {
}
@RequestMapping(value = "/partner_forgetpassword", method = RequestMethod.POST)
@PostMapping("/partner_forgetpassword")
public String partnerForgetPassword(@CookieValue(CommonConsts.CODE_KEY) String codeKey, @RequestBody @Valid FindPwdBean findPwdBean, Errors errors, HttpServletResponse response) throws Exception {
HttpUtils.handleValidErrors(errors);
String codeValue = signInStatusManager.getVerifyCode(codeKey);
@ -279,7 +271,7 @@ public class SignInController {
}
@RequestMapping(value = "/partner_changepassword_page/{codeKey}", method = RequestMethod.GET)
@GetMapping("/partner_changepassword_page/{codeKey}")
public ModelAndView partnerChangePassword(@PathVariable String codeKey, Model model) throws Exception {
String codeValue = signInStatusManager.getChangePasswordVerifyCode(codeKey);
if (codeValue == null) {
@ -290,7 +282,7 @@ public class SignInController {
return view;
}
@RequestMapping(value = "/partner_changepassword", method = RequestMethod.POST)
@PostMapping("/partner_changepassword")
public void partnerChangePassword(@RequestBody @Valid FindPwdBean findPwdBean, Errors errors) throws Exception {
HttpUtils.handleValidErrors(errors);
String codeValue = signInStatusManager.getChangePasswordVerifyCode(findPwdBean.getVerifyCode());
@ -320,13 +312,13 @@ public class SignInController {
}
//APP QRCODE
@RequestMapping(value = "/partner_signin_app_qrcode", method = RequestMethod.GET)
@GetMapping("/partner_signin_app_qrcode")
public JSONObject newClientAppSigninQRCode() {
return signInStatusManager.newClientAppSignInQRCode();
}
@RequestMapping(value = "/partner_signin_app_qrcode/{codeId}/check", method = RequestMethod.GET)
@GetMapping("/partner_signin_app_qrcode/{codeId}/check")
public void checkQRCodeAppLoginStatus(@PathVariable String codeId, HttpServletResponse response) {
String statusKey = signInStatusManager.appQRCodeSignInStatus(codeId);
HttpUtils.setCookie(response, CommonConsts.PARTNER_STATUS, statusKey);
@ -338,7 +330,7 @@ public class SignInController {
return new ModelAndView("manager_bind_success");
}
@RequestMapping(value = "/partner_signin_qrcode/verify/{codeId}", method = RequestMethod.GET)
@GetMapping("/partner_signin_qrcode/verify/{codeId}")
public void verifyQRCode(@PathVariable String codeId, @RequestHeader("User-Agent") String ua, HttpServletResponse response) throws IOException {
if (ua.toLowerCase().contains("micromessenger")) {
response.sendRedirect("/global/userstatus/partner_signin_qrcode/" + codeId);
@ -351,19 +343,19 @@ public class SignInController {
throw new ForbiddenException("error.not_support_browser");
}
@RequestMapping(value = "/customer_wechat_qrcode", method = RequestMethod.GET)
@GetMapping("/customer_wechat_qrcode")
public JSONObject customerQRCode() {
return signInStatusManager.customerQRCode();
}
@ConsumersAction
@RequestMapping(value = "/customer_qrcode_scan/{codeId}", method = RequestMethod.GET)
@GetMapping("/customer_qrcode_scan/{codeId}")
public ModelAndView scanCustomerWechatQrcode(@PathVariable String codeId, @ModelAttribute(CommonConsts.CONSUMER_INFO) JSONObject customerInfo) {
signInStatusManager.scanCustomerQrcode(codeId, customerInfo.getString("customer_id"));
return new ModelAndView("manager_bind_success");
}
@RequestMapping(value = "/customer_wechat_qrcode/{codeId}/check", method = RequestMethod.GET)
@GetMapping("/customer_wechat_qrcode/{codeId}/check")
public JSONObject getCustomerID(@PathVariable String codeId, HttpServletResponse response,@RequestParam(value = "pay_info",defaultValue = "false") boolean pay_info) {
JSONObject result = new JSONObject();
String statusKey = signInStatusManager.getWechatCustomerId(codeId);
@ -379,7 +371,7 @@ public class SignInController {
* @param username
* @param type emailphone
*/
@RequestMapping(value = "/client/reset_pwd/{type}/{username}", method = RequestMethod.PUT)
@PutMapping("/client/reset_pwd/{type}/{username}")
public void resetMerchantPwd(@PathVariable("username") String username,@PathVariable("type") String type) {
JSONObject account = signInAccountService.getClientByUsername(username);
signInAccountService.getClientResetPwdCode(account,type);
@ -390,7 +382,7 @@ public class SignInController {
*
* @param info
*/
@RequestMapping(value = "/client/reset_pwd", method = RequestMethod.PUT)
@PutMapping("/client/reset_pwd")
public void resetClientPwd(@RequestBody LoginInfo info) {
JSONObject account = signInAccountService.getClientByUsername(info.getLoginId());
signInAccountService.verifyClientCaptcha(account, info.getVerifyCode());
@ -403,7 +395,7 @@ public class SignInController {
* @param username
* @param type emailphone
*/
@RequestMapping(value = "/manager/reset_pwd/{type}/{username}", method = RequestMethod.PUT)
@PutMapping("/manager/reset_pwd/{type}/{username}")
public void resetManagerPwd(@PathVariable("username") String username,@PathVariable("type") String type) {
JSONObject account = signInAccountService.getManagerByUsername(username);
signInAccountService.getClientResetPwdCode(account,type);
@ -414,7 +406,7 @@ public class SignInController {
*
* @param info
*/
@RequestMapping(value = "/manager/reset_pwd", method = RequestMethod.PUT)
@PutMapping("/manager/reset_pwd")
public void resetManagerPwd(@RequestBody LoginInfo info) {
JSONObject account = signInAccountService.getManagerByUsername(info.getLoginId());
signInAccountService.verifyManagerCaptcha(account, info.getVerifyCode());

@ -1,5 +1,7 @@
package au.com.royalpay.payment.manage.support.abafile;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
@ -30,6 +32,7 @@ public class SettleRemarkTemplateDescriber {
replacers = new ArrayList<>();
replacers.add(new ClientMonikerReplacer());
replacers.add(new SettleDateReplacer());
replacers.add(new SettleAmountReplacer());
}
public String compile() {
@ -90,4 +93,21 @@ public class SettleRemarkTemplateDescriber {
return "";
}
}
class SettleAmountReplacer implements Replacer {
@Override
public boolean match(String group) {
return "settle_cent".equals(group) || "settle_amount".equals(group);
}
@Override
public String replacement(String group, SettleRemarkTemplateDescriber describer) {
if ("settle_cent".equals(group)) {
return CurrencyAmountUtils.toCent(describer.settle.getBigDecimal("clearing_amount"), PlatformEnvironment.getEnv().getForeignCurrency()) + "";
} else {
return CurrencyAmountUtils.scalePlatformCurrency(describer.settle.getBigDecimal("clearing_amount")).toPlainString();
}
}
}
}

@ -25,33 +25,33 @@ public class AttachmentController {
@Resource
private YeePayClient yeePayClient;
@RequestMapping(value = "/files", method = RequestMethod.POST)
@PostMapping("/files")
@RequirePartner
@RequireManager
public JSONObject uploadImage(@RequestParam MultipartFile file) throws IOException {
return attachmentClient.uploadFile(file,false);
}
@RequestMapping(value = "/yeepayFiles", method = RequestMethod.POST)
@PostMapping("/yeepayFiles")
@RequirePartner
@RequireManager
public FileUploadResult uploadYeepayImage(@RequestParam MultipartFile file) throws IOException {
return yeePayClient.uploadFile(file.getOriginalFilename(),"VOUCHER",file.getInputStream());
}
@RequestMapping(value = "/riskFiles", method = RequestMethod.POST)
@PostMapping("/riskFiles")
public JSONObject uploadRiskImage(@RequestParam MultipartFile file) throws IOException {
return attachmentClient.uploadFile(file,false);
}
@RequestMapping(value = "/secret_files", method = RequestMethod.POST)
@PostMapping("/secret_files")
@RequirePartner
@RequireManager
public JSONObject uploadFile(@RequestParam MultipartFile file) throws IOException {
return attachmentClient.uploadFile(file,true);
}
@RequestMapping(value = "/files/{fileId}", method = RequestMethod.GET)
@GetMapping("/files/{fileId}")
public void getFileUrl(@PathVariable String fileId, HttpServletResponse response) throws IOException {
String url = attachmentClient.getFileUrl(fileId);
response.sendRedirect(url);

@ -15,32 +15,32 @@ public class AppStyleController {
@Resource
private AppStyleService appStyleService;
@RequestMapping(value = "/style_group", method = RequestMethod.GET)
@GetMapping("/style_group")
public JSONObject listAppStyleGroup(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit) {
return appStyleService.listAppStyleGroup(page, limit);
}
@RequestMapping(value = "/style_group/{style_id}", method = RequestMethod.GET)
@GetMapping("/style_group/{style_id}")
public JSONObject getAppStyleByStyleId(@PathVariable String style_id) {
return appStyleService.getAppStyleByStyleId(style_id);
}
@RequestMapping(value = "/style_group/{style_id}", method = RequestMethod.PUT)
@PutMapping("/style_group/{style_id}")
public void switchGroupByStyleId(@PathVariable String style_id) {
appStyleService.switchGroupByStyleId(style_id);
}
@RequestMapping(value = "/style_group", method = RequestMethod.POST)
@PostMapping("/style_group")
public void addOneGroupAppStyle(@RequestParam String style_id, @RequestBody JSONObject appStyleGroup) {
appStyleService.addAppStyle(style_id, appStyleGroup);
}
@RequestMapping(value = "/style_group/{style_id}/style", method = RequestMethod.PUT)
@PutMapping("/style_group/{style_id}/style")
public void updateAppStyleByStyleId(@PathVariable String style_id,@RequestParam String originStyleId, @RequestBody JSONObject appStyleGroup) {
appStyleService.updateAppStyleByStyleId(style_id, originStyleId, appStyleGroup);
}
@RequestMapping(value = "/style_group/{style_id}/{is_valid}", method = RequestMethod.PUT)
@PutMapping("/style_group/{style_id}/{is_valid}")
public void updateAppStyleStatus(@PathVariable String style_id,@PathVariable Boolean is_valid) {
appStyleService.updateAppStyleStatus(style_id, is_valid);
}

@ -33,22 +33,22 @@ public class CMSController {
return royalPayCMSSupport.saveArticle(catId, article, manager);
}
@RequestMapping(value = "/{articleId}", method = RequestMethod.PUT)
@PutMapping("/{articleId}")
public void editArticle(@RequestBody @Valid ArticleBean article, @PathVariable String catId, @PathVariable String articleId) {
royalPayCMSSupport.updateArticle(catId, articleId, article);
}
@RequestMapping(value = "/{articleId}", method = RequestMethod.GET)
@GetMapping("/{articleId}")
public JSONObject getArticleDetail(@PathVariable String catId, @PathVariable String articleId) {
return royalPayCMSSupport.getArticle(catId, articleId);
}
@RequestMapping(value = "/{articleId}/publish_status", method = RequestMethod.PUT)
@PutMapping("/{articleId}/publish_status")
public void setArticlePublishStatus(@PathVariable String catId, @PathVariable String articleId, @RequestBody JSONObject status) {
royalPayCMSSupport.publishArticle(catId, articleId, status.getBooleanValue("published"));
}
@RequestMapping(value = "/{articleId}/recommended", method = RequestMethod.PUT)
@PutMapping("/{articleId}/recommended")
public void setArticleRecommended(@PathVariable String catId, @PathVariable String articleId, @RequestBody JSONObject status) {
royalPayCMSSupport.recommendArticle(catId, articleId, status.getBooleanValue("recommended"));
}

@ -4,10 +4,7 @@ import au.com.royalpay.payment.manage.system.core.MailGunService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@ -21,13 +18,13 @@ public class MailCallBackController {
@Resource
private MailGunService mailService;
@RequestMapping(value = "/callback", method = RequestMethod.POST)
@PostMapping("/callback")
public void dealSuccessNptify(@RequestBody String content) throws Exception {
mailService.dealNotify(content);
}
@RequestMapping(value = "/callback/dropped", method = RequestMethod.POST)
@PostMapping("/callback/dropped")
public void contractList(HttpServletRequest req, HttpServletResponse res) throws Exception {
mailService.dealDroppedNotify(req.getParameterMap());
}

@ -31,7 +31,7 @@ public class RefundController {
private RefundReviewMapper refundReviewMapper;
@RequestMapping(value = "/orders/{orderId}/refund_check", method = RequestMethod.GET)
@GetMapping("/orders/{orderId}/refund_check")
@ReadOnlyConnection
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
@RequirePartner
@ -39,27 +39,27 @@ public class RefundController {
return refundService.checkOrderRefundAmount(orderId, account);
}
@RequestMapping(value = "/orders/offReview", method = RequestMethod.POST)
@PostMapping("/orders/offReview")
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
public void offReview(@RequestBody JSONObject review, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
refundService.offRefundReviewOrder(review, manager);
}
@RequestMapping(value = "/orders/{orderId}/refund_orderInfo", method = RequestMethod.GET)
@GetMapping("/orders/{orderId}/refund_orderInfo")
@ReadOnlyConnection
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
public JSONObject refundOrderInfo(@PathVariable String orderId) {
return refundService.checkOrderRefundInfo(orderId);
}
@RequestMapping(value = "/orders/needReview", method = RequestMethod.GET)
@GetMapping("/orders/needReview")
@ReadOnlyConnection
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
public JSONObject listNeedReviewRefundOrders(RefundReviewBean reviewBean) {
return refundService.listNeedReviewRefundOrders(reviewBean);
}
@RequestMapping(value = "/orders/notifyReview", method = RequestMethod.GET)
@GetMapping("/orders/notifyReview")
@ReadOnlyConnection
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
public int notifyReviewRefundOrders() {
@ -82,13 +82,13 @@ public class RefundController {
return view;
}
@RequestMapping(value = "/json/auditions", method = RequestMethod.GET)
@GetMapping("/json/auditions")
@ReadOnlyConnection
public JSONObject auditionListPageJson(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return refundService.auditionsFromAccount(account);
}
@RequestMapping(value = "/json/auditions/{auditionId}", method = RequestMethod.GET)
@GetMapping("/json/auditions/{auditionId}")
@ReadOnlyConnection
public JSONObject auditionPageJson(@PathVariable String auditionId, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return refundService.auditionInfoByAccount(auditionId, account);
@ -99,7 +99,7 @@ public class RefundController {
refundService.auditRefundByAccount(account, auditionId, agree.getBooleanValue("agree"));
}
@RequestMapping(value = "/review/{reviewId}", method = RequestMethod.GET)
@GetMapping("/review/{reviewId}")
@ReadOnlyConnection
public ModelAndView reviewRefundPage(@PathVariable String reviewId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject user) {
ModelAndView view = new ModelAndView("refund_review");
@ -107,7 +107,7 @@ public class RefundController {
return view;
}
@RequestMapping(value = "/review/check/{reviewId}", method = RequestMethod.GET)
@GetMapping("/review/check/{reviewId}")
@ReadOnlyConnection
public ModelAndView refundStatusCheck(@PathVariable String reviewId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject user) {
ModelAndView view = new ModelAndView("refund_review_client");
@ -115,13 +115,13 @@ public class RefundController {
return view;
}
@RequestMapping(value = "/auditions/{auditionId}/wx_audit", method = RequestMethod.PUT)
@PutMapping("/auditions/{auditionId}/wx_audit")
public JSONObject audit(@PathVariable String auditionId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser, @RequestBody JSONObject audit) {
refundService.auditRefundByOpenId(auditionId, wxUser.getString("openid"), audit.getBooleanValue("pass"));
return new JSONObject();
}
@RequestMapping(value = "/review/orders/{orderId}", method = RequestMethod.POST)
@PostMapping("/review/orders/{orderId}")
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
public void reviewNewRefund(@PathVariable String orderId, @RequestBody JSONObject fee,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ -135,7 +135,7 @@ public class RefundController {
}
}
@RequestMapping(value = "/orders/{orderId}", method = RequestMethod.POST)
@PostMapping("/orders/{orderId}")
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT})
@RequirePartner
public JSONObject newRefundOrder(@PathVariable String orderId, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,

@ -0,0 +1,12 @@
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.master.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.schema-name=royalpay
spring.datasource.host=192.168.0.84:3306
spring.datasource.master.jdbc-url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.master.username=root
spring.datasource.master.password=rpayplus
spring.datasource.slave.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.slave.jdbc-url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.slave.username=root
spring.datasource.slave.password=rpayplus

@ -918,6 +918,7 @@
</div>
</div>
</div>
<hr/>
<div class="panel-body">
<div class="form-horizontal">

@ -0,0 +1,19 @@
package au.com.royalpay.payment.manage.analysis.beans.ato;
import com.github.stuxuhai.jpinyin.PinyinException;
import org.junit.Assert;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Create by davep at 2019-09-04 11:07
*/
public class CharacterUtilsTest {
@Test
public void convertToAlphaBet() {
String res = CharacterUtils.convertToAlphaBet("605/110 \bQueens Road Hurstville");
Assert.assertEquals("605/110 Queens Road Hurstville",res);
}
}
Loading…
Cancel
Save