|
|
|
@@ -4,6 +4,10 @@ import cn.binarywang.wx.miniapp.api.WxMaService; |
|
|
|
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
|
|
|
import com.simple.annotation.AuthIgnore; |
|
|
|
import com.simple.common.ErrorCode; |
|
|
|
import com.simple.domain.po.WxMall; |
|
|
|
import com.simple.domain.po.WxMerchant; |
|
|
|
import com.simple.service.WxMallService; |
|
|
|
import com.simple.service.WxMerchantService; |
|
|
|
import com.simple.utils.IPUtil; |
|
|
|
import me.chanjar.weixin.common.error.WxErrorException; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
@@ -38,6 +42,40 @@ public class WxMerchantBUserController extends BaseController |
|
|
|
@Autowired |
|
|
|
private WxMerchantBUserService wxMerchantBUserService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxMallService wxMallService; |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("查寻当bUser详情接口") |
|
|
|
@GetMapping("/detail") |
|
|
|
public ResultData detail() { |
|
|
|
Map resultMap = new HashMap(); |
|
|
|
|
|
|
|
WxMerchantBUser user = wxMerchantBUserService.getById(getUser().getId()); |
|
|
|
|
|
|
|
if (user==null) |
|
|
|
return new ResultData(ErrorCode.USER_IS_EMPTY, ErrorCode.USER_IS_EMPTY.getMessage()); |
|
|
|
|
|
|
|
WxMerchant merchant = wxMerchantService.getById(user.getMerchantId()); |
|
|
|
|
|
|
|
if (merchant==null) |
|
|
|
return new ResultData(ErrorCode.MCH_INFO_NOT_FOUND, ErrorCode.MCH_INFO_NOT_FOUND.getMessage()); |
|
|
|
|
|
|
|
WxMall mall = wxMallService.getByTenantId(merchant.getTenantId()); |
|
|
|
if (mall==null) |
|
|
|
return new ResultData(ErrorCode.MCH_INFO_NOT_FOUND, ErrorCode.MCH_INFO_NOT_FOUND.getMessage()); |
|
|
|
|
|
|
|
resultMap.put("phone",user.getPhone()); |
|
|
|
resultMap.put("name",user.getName()); |
|
|
|
resultMap.put("merchant_name",merchant.getName()); |
|
|
|
resultMap.put("mall_name",mall.getName()); |
|
|
|
|
|
|
|
return new ResultData(Result.SUCCESS,"查询成功",resultMap); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 用户登录 |
|
|
|
* @param map |
|
|
|
|