xiaoyong931011
2021-11-19 38efbb4a62ccdd98e4122fc879dd230795ef8ce3
gc-user/src/main/java/com/xzx/gc/user/service/UserService.java
@@ -23,8 +23,11 @@
import com.xzx.gc.model.user.*;
import com.xzx.gc.user.dto.AddressDto;
import com.xzx.gc.user.dto.RayaltyDto;
import com.xzx.gc.user.dto.TgmxInfoListDto;
import com.xzx.gc.user.mapper.*;
import com.xzx.gc.user.vo.CategaryVo;
import com.xzx.gc.user.vo.TgmxInfoListVo;
import com.xzx.gc.user.vo.UserIdentityVo;
import com.xzx.gc.util.DoubleUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
@@ -107,6 +110,15 @@
        userInfo.setDelFlag(Constants.DEL_NOT_FLAG);
        List<UserInfo> userInfo1 = userMapper.select(userInfo);
        return userInfo1;
    }
    public UserIdentityVo userIdentity(String userId) {
        AccountInfo accountInfo = accountService.findByUserIdForbidden(userId);
        UserIdentityVo userIdentityVo = new UserIdentityVo();
        userIdentityVo.setIsHead(accountInfo.getIsHead());
        return userIdentityVo;
    }
@@ -431,6 +443,12 @@
                    String collectScore = StrUtil.isEmpty(accountInfo.getCollectScore()) ? "0":accountInfo.getCollectScore();
                    mx.setCollectScore(new BigDecimal(collectScore).setScale( 2, BigDecimal.ROUND_DOWN ));
                }
                String mobilePhone = mx.getMobilePhone();
                if(StrUtil.isNotEmpty(mobilePhone)){
                    String tgrPhone = orderMapper.selectTGRMobileByPhone(mobilePhone);
                    mx.setTgrPhone(StrUtil.isEmpty(tgrPhone) ? "-" : tgrPhone);
                }
            }
@@ -888,4 +906,15 @@
        userMapper.insertSelective(userInfo);
    }
    public Map<String, Object> tgmxInfo(TgmxInfoListDto model) {
        PageHelper.startPage(model.getPage(), model.getLimit());
        List<TgmxInfoListVo> maps = userMapper.tgmxInfo(model);
        PageInfo pageInfo = new PageInfo(maps);
        int count = Convert.toInt(pageInfo.getTotal());
        Map<String, Object> map = new HashMap<>();
        map.put("data", maps);
        map.put("count", count);
        map.put("code", 0);
        return map;
    }
}