File was renamed from zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java |
| | |
| | | package com.matrix.system.shopXcx.api; |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.biz.dao.BizUserDao; |
| | | import com.matrix.biz.service.BizUserService; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.tools.HttpCurlUtil; |
| | |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | @Autowired |
| | | private BizUserDao bizUserDao; |
| | | |
| | | |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | String openId = loginUser.getOpenId(); |
| | | BizUser bizUser = bizUserService.findByOpenId(openId); |
| | | |
| | | //处理用户当前所在店铺 |
| | | /* |
| | | if(bizUser.getStaff()!=null){ |
| | | //当前用户是员工账号 |
| | | bizUser.setBusiness(bussinesssDao.selectById(bizUser.getStaff().getBusinessId())); |
| | | bizUser.setRole(bizUser.getStaff().getRole()); |
| | | }else{ |
| | | //当前用户是boss账号 |
| | | bizUser.setBusiness(bussinesssDao.findByUserOpenId(bizUser.getOpenId())); |
| | | bizUser.setRole(AppConstance.User_ROLE_BOSS); |
| | | }*/ |
| | | |
| | | AjaxResult res = new AjaxResult(); |
| | | res.putInMap("userInfo", bizUser); |
| | | res.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * 获取其他用户简化信息 |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年9月5日 |
| | | * @param openId |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getOtherUserInfo/{openId}") |
| | | public @ResponseBody |
| | | AjaxResult getOtherUserInfo(@PathVariable String openId) { |
| | | BizUser bizUser = bizUserService.findByOpenId(openId); |
| | | AjaxResult res = new AjaxResult(); |
| | | res.putInMap("userInfo", bizUser); |
| | | res.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return res; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 接收用户信息 |