jyy
2021-03-16 2511686fa3bcc154dad551a4bc8ef6839037a8c7
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
File was renamed from zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java
@@ -1,7 +1,6 @@
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;
@@ -12,6 +11,7 @@
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;
@@ -39,8 +39,7 @@
   @Autowired
   private RedisUserLoginUtils redisUserLoginUtils;
   @Autowired
   private BizUserDao bizUserDao;
   @Autowired
   WeChatApiTools weChatApiTools;
@@ -128,43 +127,12 @@
      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;
   }
   /**
    * 接收用户信息