Commit 46bf893f authored by renjie's avatar renjie

account bug

parent 5a4e4c3e
...@@ -453,7 +453,7 @@ public class AccountController { ...@@ -453,7 +453,7 @@ public class AccountController {
return resultDto; return resultDto;
} }
@RequestMapping(path = "/authorize/details") @RequestMapping(path = "/authorize/details", method = RequestMethod.GET)
public ResultDto getAuthorizeDetails(Principal principal) { public ResultDto getAuthorizeDetails(Principal principal) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
try { try {
...@@ -469,7 +469,7 @@ public class AccountController { ...@@ -469,7 +469,7 @@ public class AccountController {
return resultDto; return resultDto;
} }
@RequestMapping(path = "/authorize/files") @RequestMapping(path = "/authorize/files", method = RequestMethod.GET)
public ResultDto getAuthorizeFiles(Principal principal, HttpServletResponse response) { public ResultDto getAuthorizeFiles(Principal principal, HttpServletResponse response) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
try { try {
...@@ -502,11 +502,10 @@ public class AccountController { ...@@ -502,11 +502,10 @@ public class AccountController {
return resultDto; return resultDto;
} }
@RequestMapping(path = "/alipay/login") @RequestMapping(path = "/ali/login", method = RequestMethod.GET)
public String save(HttpServletRequest request,HttpServletResponse response) { 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 //回调地址必须经encode
return_url = java.net.URLEncoder.encode(return_url); return_url = java.net.URLEncoder.encode(return_url);
//重定向到授权页面 //重定向到授权页面
...@@ -514,7 +513,7 @@ public class AccountController { ...@@ -514,7 +513,7 @@ public class AccountController {
return "redirect:"+ VpsAlipayConfig.ALIPAY_AUTH_URL + "?app_id=" + alipayConfig.getAPPID() + "&scope=auth_user&redirect_uri=" + return_url; 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) { public void alipayWithdraw(HttpServletRequest request, HttpServletResponse response) {
//获取支付宝GET过来反馈信息 //获取支付宝GET过来反馈信息
Map<String,String> params = new HashMap<String,String>(); Map<String,String> params = new HashMap<String,String>();
......
...@@ -56,7 +56,7 @@ public class AccountRepositoryCustomImpl implements AccountRepositoryCustom { ...@@ -56,7 +56,7 @@ public class AccountRepositoryCustomImpl implements AccountRepositoryCustom {
public Account findByPromotion(String code) { public Account findByPromotion(String code) {
Document doc = new Document(); Document doc = new Document();
BasicQuery basicQuery = new BasicQuery(doc); 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); Account account = mongoTemplate.findOne(basicQuery, Account.class);
if (account == null) 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