查询会员订单数量bug修复
This commit is contained in:
parent
52410b73f1
commit
9ea2ecf552
|
|
@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Select;
|
|||
public interface ShopUserMapper extends BaseMapper<TbShopUser> {
|
||||
|
||||
@Select("<script>" +
|
||||
"SELECT su.id as id, su.head_img as headImg, su.name as nickName, su.sex as sex, " +
|
||||
"SELECT su.id as id, su.user_id as user_id, su.head_img as headImg, su.name as nickName, su.sex as sex, " +
|
||||
"su.amount as amount, 0 as totalScore, su.telephone as telephone, u.last_log_in_at as lastLoginAt, " +
|
||||
"su.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt " +
|
||||
"FROM tb_shop_user su " +
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class TbShopUserServiceImpl implements TbShopUserService {
|
|||
shopUserInfoVo.setTotalScore(0);
|
||||
});
|
||||
}
|
||||
Integer orderNumber=tbOrderInfoRepository.countByUserIdAndStatusAndShopId(shopUserInfoVo.getId().toString(),criteria.getShopId());
|
||||
Integer orderNumber=tbOrderInfoRepository.countByUserIdAndStatusAndShopId(shopUserInfoVo.getUserId().toString(),criteria.getShopId());
|
||||
shopUserInfoVo.setOrderNumber(Objects.isNull(orderNumber)?0:orderNumber);
|
||||
shopUserInfoVo.setInMoney(tbShopUserRepository.sumAmount(shopUserInfoVo.getId()));
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import java.math.BigDecimal;
|
|||
@Data
|
||||
public class ShopUserInfoVo implements Serializable {
|
||||
private Integer id;
|
||||
private Integer userId;
|
||||
private String headImg;
|
||||
private String nickName;
|
||||
private Object sex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue