|
|
@@ -1,13 +1,16 @@ |
|
|
|
package com.tuoheng.api.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.tuoheng.api.entity.domain.Merchant; |
|
|
|
import com.tuoheng.api.entity.domain.User; |
|
|
|
import com.tuoheng.api.entity.domain.WestreamAct; |
|
|
|
import com.tuoheng.api.entity.request.MerchantQuery; |
|
|
|
import com.tuoheng.api.mapper.IdentityMapper; |
|
|
|
import com.tuoheng.api.mapper.MerchantMapper; |
|
|
|
import com.tuoheng.api.mapper.UserMapper; |
|
|
|
import com.tuoheng.api.service.IMerchantService; |
|
|
|
import com.tuoheng.common.common.BaseServiceImpl; |
|
|
|
import com.tuoheng.common.utils.CommonUtils; |
|
|
@@ -28,6 +31,9 @@ public class MerchantServiceImpl extends BaseServiceImpl<MerchantMapper, Merchan |
|
|
|
@Autowired |
|
|
|
private MerchantMapper merchantMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private UserMapper userMapper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult queryPage(MerchantQuery query) { |
|
|
|
if (null == query.getPage() || null == query.getLimit()) { |
|
|
@@ -47,6 +53,12 @@ public class MerchantServiceImpl extends BaseServiceImpl<MerchantMapper, Merchan |
|
|
|
.orderByDesc(Merchant::getCreateTime)); |
|
|
|
|
|
|
|
for (Merchant record : pageData.getRecords()) { |
|
|
|
|
|
|
|
User user = userMapper.selectById(record.getUserId()); |
|
|
|
if(ObjectUtil.isNotNull(user)){ |
|
|
|
record.setRealname(user.getRealname()); |
|
|
|
record.setMobile(user.getMobile()); |
|
|
|
} |
|
|
|
if(StringUtils.isNotEmpty(record.getShopsImage())){ |
|
|
|
record.setShopsImage(CommonUtils.getMultipleUrl(record.getShopsImage())); |
|
|
|
} |