Compare commits
No commits in common. "ed9c2d43c0ef1bd3b5256cb9620a8037cd0f223e" and "8a02234dcca4deaf890d30fce93e885c20e2a383" have entirely different histories.
ed9c2d43c0
...
8a02234dcc
|
|
@ -35,8 +35,7 @@
|
|||
"Bash(cat \"/e/code/智柜宝/shop-back-end/agileboot-domain/src/main/java/com/agileboot/domain/system/user/dto/UserDTO.java\")",
|
||||
"Bash(cat \"/e/code/智柜宝/shop-back-end/agileboot-domain/src/main/java/com/agileboot/domain/system/user/query/SearchUserQuery.java\")",
|
||||
"Bash(./mvnw clean compile -pl agileboot-api -am -DskipTests)",
|
||||
"Bash(./mvnw clean compile -pl agileboot-api,agileboot-domain -am -DskipTests)",
|
||||
"Bash(./mvnw clean compile -pl agileboot-domain -am -DskipTests)"
|
||||
"Bash(./mvnw clean compile -pl agileboot-api,agileboot-domain -am -DskipTests)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ import com.agileboot.domain.qywx.authCorpInfo.AuthCorpInfoApplicationService;
|
|||
import com.agileboot.domain.qywx.authCorpInfo.db.QyAuthCorpInfoEntity;
|
||||
import com.agileboot.domain.qywx.user.db.QyUserEntity;
|
||||
import com.agileboot.domain.qywx.user.db.QyUserService;
|
||||
import com.agileboot.domain.wx.user.db.WxUserEntity;
|
||||
import com.agileboot.domain.wx.user.db.WxUserService;
|
||||
import com.agileboot.domain.shop.approval.command.AddReturnApprovalCommand;
|
||||
import com.agileboot.domain.shop.approval.command.UpdateReturnApprovalCommand;
|
||||
import com.agileboot.domain.shop.approval.model.ReturnApprovalModel;
|
||||
|
|
@ -95,7 +93,6 @@ public class OrderApplicationService {
|
|||
private final AccessTokenApplicationService accessTokenApplicationService;
|
||||
private final QyUserService qyUserService;
|
||||
private final Ab98UserService ab98UserService;
|
||||
private final WxUserService wxUserService;
|
||||
@Autowired
|
||||
private WxshopConfig wxshopConfig;
|
||||
|
||||
|
|
@ -516,14 +513,6 @@ public class OrderApplicationService {
|
|||
wrapper.or()
|
||||
.eq("openid", ab98User.getOpenid());
|
||||
}
|
||||
|
||||
// 如果该 ab98UserId 在 wx_user 表中存在绑定的微信用户,则查询条件再加上 openid
|
||||
WxUserEntity wxUser = wxUserService.getByAb98UserId(ab98User.getAb98UserId());
|
||||
if (wxUser != null && StringUtils.isNotBlank(wxUser.getOpenid())) {
|
||||
// 添加 or 条件,根据 wx_user 表中的 openid 查询订单
|
||||
wrapper.or()
|
||||
.eq("openid", wxUser.getOpenid());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,10 +22,6 @@ import com.agileboot.domain.wx.user.dto.WxUserDTO;
|
|||
import com.agileboot.domain.wx.user.model.WxUserModel;
|
||||
import com.agileboot.domain.wx.user.model.WxUserModelFactory;
|
||||
import com.agileboot.domain.wx.user.query.SearchWxUserQuery;
|
||||
import com.agileboot.domain.qywx.user.db.QyUserEntity;
|
||||
import com.agileboot.domain.qywx.user.db.QyUserService;
|
||||
import com.agileboot.domain.qywx.user.dto.QyUserDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -52,8 +48,6 @@ public class WxUserApplicationService {
|
|||
|
||||
private final Ab98UserApplicationService ab98UserApplicationService;
|
||||
|
||||
private final QyUserService qyUserService;
|
||||
|
||||
/**
|
||||
* 获取微信用户列表(分页)
|
||||
*/
|
||||
|
|
@ -221,32 +215,6 @@ public class WxUserApplicationService {
|
|||
userDTO = getUserDetailByOpenid(openid);
|
||||
}
|
||||
|
||||
// 如果该用户绑定了ab98UserId,则查询Ab98User信息并设置到DTO中
|
||||
if (userDTO != null && userDTO.getAb98UserId() != null) {
|
||||
Ab98UserEntity ab98UserEntity = ab98UserService.getById(userDTO.getAb98UserId());
|
||||
if (ab98UserEntity != null) {
|
||||
userDTO.setAb98Name(ab98UserEntity.getName());
|
||||
userDTO.setAb98FaceImg(ab98UserEntity.getFaceImg());
|
||||
}
|
||||
|
||||
// 查询是否有企业微信用户绑定了该ab98UserId
|
||||
LambdaQueryWrapper<QyUserEntity> qyWrapper = new LambdaQueryWrapper<>();
|
||||
qyWrapper.eq(QyUserEntity::getAb98UserId, userDTO.getAb98UserId())
|
||||
.eq(QyUserEntity::getDeleted, false);
|
||||
QyUserEntity qyUserEntity = qyUserService.getOne(qyWrapper);
|
||||
if (qyUserEntity != null) {
|
||||
userDTO.setQyUserId(qyUserEntity.getId().longValue());
|
||||
|
||||
// 构建qyUser Map,包含id、userid、name、avatar字段
|
||||
java.util.Map<String, Object> qyUserMap = new java.util.HashMap<>();
|
||||
qyUserMap.put("id", qyUserEntity.getId());
|
||||
qyUserMap.put("userid", qyUserEntity.getUserid());
|
||||
qyUserMap.put("name", qyUserEntity.getName());
|
||||
qyUserMap.put("avatar", qyUserEntity.getAvatar());
|
||||
userDTO.setQyUser(qyUserMap);
|
||||
}
|
||||
}
|
||||
|
||||
return userDTO;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,12 +62,4 @@ public interface WxUserService extends IService<WxUserEntity> {
|
|||
* @return 是否成功
|
||||
*/
|
||||
boolean updateBalance(Long wxUserId, Integer balance);
|
||||
|
||||
/**
|
||||
* 根据ab98UserId获取微信用户
|
||||
*
|
||||
* @param ab98UserId 汇邦云用户ID
|
||||
* @return 微信用户信息
|
||||
*/
|
||||
WxUserEntity getByAb98UserId(Long ab98UserId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,17 +98,4 @@ public class WxUserServiceImpl extends ServiceImpl<WxUserMapper, WxUserEntity> i
|
|||
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxUserEntity getByAb98UserId(Long ab98UserId) {
|
||||
if (ab98UserId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<WxUserEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(WxUserEntity::getAb98UserId, ab98UserId)
|
||||
.eq(WxUserEntity::getDeleted, 0);
|
||||
|
||||
return this.getOne(wrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,16 +68,4 @@ public class WxUserDTO {
|
|||
|
||||
@ExcelColumn(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelColumn(name = "汇邦云用户名")
|
||||
private String ab98Name;
|
||||
|
||||
@ExcelColumn(name = "汇邦云用户头像")
|
||||
private String ab98FaceImg;
|
||||
|
||||
/**
|
||||
* 企业微信用户信息Map
|
||||
* 包含: id, userid, name, avatar
|
||||
*/
|
||||
private Object qyUser;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue