doum
3 天以前 7ec3683c8e41460f4bb0bd3a6677198742313e2b
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -45,6 +45,7 @@
import com.doumee.dao.web.response.WxAuthorizeVO;
import com.doumee.service.business.MemberService;
import com.doumee.service.business.SmsEmailService;
import com.doumee.service.business.YwCustomerH5AuthService;
import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl;
import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl;
import com.doumee.service.system.SystemLoginService;
@@ -127,6 +128,9 @@
    @Autowired
    private SystemLoginService systemLoginService; 
    @Autowired
    private YwCustomerH5AuthService ywCustomerH5AuthService;
    
    @Value("${debug_model}")
    private Boolean isDebug;
@@ -1773,6 +1777,11 @@
     */
    @Override
    public WxAuthorizeVO ywWxAuthorize(String code){
        return ywWxAuthorize(code, LoginUserInfo.H5_USER_OPS);
    }
    @Override
    public WxAuthorizeVO ywWxAuthorize(String code, Integer userType){
        if(StringUtils.isBlank(code)){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
@@ -1793,7 +1802,14 @@
            }
        }
        wxAuthorizeVO.setOpenid(openId);
        //根据openId 查询用户信息
        if(Constants.equalsInteger(userType, LoginUserInfo.H5_USER_CUSTOMER)){
            String token = ywCustomerH5AuthService.loginByOpenId(openId);
            if(StringUtils.isNotBlank(token)){
                wxAuthorizeVO.setToken(token);
            }
            return wxAuthorizeVO;
        }
        //根据openId 查询运维用户信息
        SystemUser user = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda()
                .eq(SystemUser::getOpenid,openId)
                .eq(SystemUser::getDeleted,Boolean.FALSE)