Commit e8eba62a authored by hezhen's avatar hezhen

Merge branch 'master_position'

parents 6d051ed4 e29df43d
......@@ -138,11 +138,12 @@ public class AppUserRest {
* @return
*/
@RequestMapping(value = "/user/checkBindWechat")
public @ResponseBody JSONObject checkBindWechat(@RequestParam(value="username",defaultValue="")String username) {
public @ResponseBody JSONObject checkBindWechat(@RequestParam(value="username",defaultValue="")String username,
@RequestParam(value="type",defaultValue="0")Integer type) {
if (StringUtils.isBlank(username)) {
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
}
return appPermissionService.checkBindWechat(username);
return appPermissionService.checkBindWechat(username,type);
}
......
......@@ -114,6 +114,9 @@ public class AppPermissionService {
@Autowired
private AppUserPositionTempBiz positionTempBiz;
@Autowired
private AppUserAlipayBiz alipayBiz;
public AppUserInfo validate(String username, String password) {
AppUserInfo info = new AppUserInfo();
......@@ -617,12 +620,20 @@ public class AppPermissionService {
* @return
*/
public JSONObject checkBindWechat(String username) {
public JSONObject checkBindWechat(String username,Integer type) {
JSONObject data = new JSONObject();
try {
AppUserLogin userLogin = appUserLoginBiz.checkeUserLogin(username);
if (userLogin != null) {
String openid = userLogin.getOpenid();
if (type==null||type==0){
openid=userLogin.getWxOpenid();
}else if (type==2){
List<AppUserAlipay> list=alipayBiz.getListByUserId(userLogin.getId());
if (list.size()>0){
openid=list.get(0).getTxAlipay();
}
}
if (StringUtils.isNotBlank(openid)) {
data.put("type", 0); // 已存在
} else {
......
......@@ -54,6 +54,8 @@ public class ActivityUserJoinBiz extends BaseBiz<ActivityUserJoinMapper,Activity
}
insertSelective(userJoin);
ruleBiz.updateById(rule);
//领取优惠卷
receiveCoupn(userId);
}
//领取优惠卷
......
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