Commit 46bf893f authored by renjie's avatar renjie

account bug

parent 5a4e4c3e
......@@ -453,7 +453,7 @@ public class AccountController {
return resultDto;
}
@RequestMapping(path = "/authorize/details")
@RequestMapping(path = "/authorize/details", method = RequestMethod.GET)
public ResultDto getAuthorizeDetails(Principal principal) {
ResultDto resultDto = new ResultDto();
try {
......@@ -469,7 +469,7 @@ public class AccountController {
return resultDto;
}
@RequestMapping(path = "/authorize/files")
@RequestMapping(path = "/authorize/files", method = RequestMethod.GET)
public ResultDto getAuthorizeFiles(Principal principal, HttpServletResponse response) {
ResultDto resultDto = new ResultDto();
try {
......@@ -502,11 +502,10 @@ public class AccountController {
return resultDto;
}
@RequestMapping(path = "/alipay/login")
@RequestMapping(path = "/ali/login", method = RequestMethod.GET)
public String save(HttpServletRequest request,HttpServletResponse response) {
Map<String,String> maps = new HashMap<String ,String>();
//页面回调地址 必须与应用中的设置一样
String return_url = "http://localhost/alipay/withdraw";
String return_url = "http://localhost:1729/alipay/withdraw";
//回调地址必须经encode
return_url = java.net.URLEncoder.encode(return_url);
//重定向到授权页面
......@@ -514,7 +513,7 @@ public class AccountController {
return "redirect:"+ VpsAlipayConfig.ALIPAY_AUTH_URL + "?app_id=" + alipayConfig.getAPPID() + "&scope=auth_user&redirect_uri=" + return_url;
}
@RequestMapping(path = "/alipay/withdraw")
@RequestMapping(path = "/ali/withdraw")
public void alipayWithdraw(HttpServletRequest request, HttpServletResponse response) {
//获取支付宝GET过来反馈信息
Map<String,String> params = new HashMap<String,String>();
......
......@@ -56,7 +56,7 @@ public class AccountRepositoryCustomImpl implements AccountRepositoryCustom {
public Account findByPromotion(String code) {
Document doc = new Document();
BasicQuery basicQuery = new BasicQuery(doc);
basicQuery.addCriteria(where("promotion.code").is(code));
basicQuery.addCriteria(where("promotion.code").is(code).and("parent").exists(false));
Account account = mongoTemplate.findOne(basicQuery, Account.class);
if (account == null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment