| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | | |
| | | //设置登录时间 |
| | |
| | | mx.setNickName(com.xzx.gc.common.utils.StringUtils.decode(mx.getNickName())); |
| | | } |
| | | // 待完成订单总数 |
| | | Map<String, Object> osMap = orderMapper.queryCuserOrderByUserIdCount1(mx.getUserId()); |
| | | mx.setOrderStatus3(Integer.parseInt(osMap.get("count1").toString())); |
| | | mx.setOrderStatus5(Integer.parseInt(osMap.get("count").toString())); |
| | | // Map<String, Object> osMap = orderMapper.queryCuserOrderByUserIdCount1(mx.getUserId()); |
| | | Map<String, Object> orderIng = orderMapper.queryCuserOrderByUserIdOrderIng(mx.getUserId()); |
| | | Map<String, Object> orderDone = orderMapper.queryCuserOrderByUserIdOrderDone(mx.getUserId()); |
| | | mx.setOrderStatus3(Integer.parseInt(orderIng.get("count").toString())); |
| | | mx.setOrderStatus5(Integer.parseInt(orderDone.get("count").toString())); |
| | | |
| | | //查询用户首次下单时间和最近下单时间 |
| | | List<OrderInfo> byCreateUserId = orderService.findByCreateUserId(mx.getUserId(), null); |
| | |
| | | map.put("money", DoubleUtil.roundTwo(String.valueOf(map.get("money")))); |
| | | map.put("score", DoubleUtil.roundTwo(String.valueOf(map.get("score")))); |
| | | map.put("weight", DoubleUtil.roundThree(String.valueOf(map.get("weight")))); |
| | | |
| | | map.put("name", String.valueOf((ObjectUtil.isEmpty(map.get("name"))?"-":m.get("name")))); |
| | | map.put("name", String.valueOf((ObjectUtil.isEmpty(map.get("name"))?"-":map.get("name")))); |
| | | map.put("createtime", String.valueOf(map.get("createTime"))); |
| | | |
| | | String type = String.valueOf(map.get("type")); |
| | | if("1".equals(type)){ |
| | | List<CategaryVo> categaryVos = orderMapper.selectListByOrderId(String.valueOf(map.get("orderId"))); |
| | | map.put("categary",categaryVos); |
| | | } |
| | | if("2".equals(type)){ |
| | | List<CategaryVo> categaryVos = orderMapper.selectJHYListByOrderId(String.valueOf(map.get("orderId"))); |
| | | map.put("categary",categaryVos); |
| | | } |
| | | } |
| | | m.put("orderList", odlist); |
| | | m.put("count", pageInfo.getTotal()); |
| | |
| | | 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; |
| | | } |
| | | } |