| | |
| | | import com.mzl.flower.entity.payment.OrderItemSales; |
| | | import com.mzl.flower.entity.payment.OrderSalesItem; |
| | | import com.mzl.flower.entity.supplier.Supplier; |
| | | import com.mzl.flower.entity.supplier.SupplierSub; |
| | | import com.mzl.flower.mapper.customer.CustomerMapper; |
| | | import com.mzl.flower.mapper.flower.FlowerCategoryMapper; |
| | | import com.mzl.flower.mapper.member.MemberMapper; |
| | | import com.mzl.flower.mapper.partner.PartnerMapper; |
| | | import com.mzl.flower.mapper.supplier.SupplierMapper; |
| | | import com.mzl.flower.mapper.supplier.SupplierSubMapper; |
| | | import com.mzl.flower.mapper.system.UserMapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.security.oauth2.common.OAuth2RefreshToken; |
| | | import org.springframework.security.oauth2.provider.token.TokenStore; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | |
| | | |
| | | @Autowired |
| | | protected SupplierMapper supplierMapper; |
| | | |
| | | @Autowired |
| | | protected SupplierSubMapper supplierSubMapper; |
| | | |
| | | @Autowired |
| | | protected PartnerMapper partnerMapper; |
| | |
| | | Supplier s = supplierMapper.selectOne(new QueryWrapper<Supplier>() |
| | | .eq("user_id", userId)); |
| | | if(s == null){ |
| | | SupplierSub sub = supplierSubMapper.getCurrentSupplier(SecurityUtils.getUserId()); |
| | | if (!ObjectUtils.isEmpty(sub)) { |
| | | s = supplierMapper.selectById(sub.getSupplierId()); |
| | | return s; |
| | | } else { |
| | | throw new ValidationException("供应商信息未认证,请到个人中心进行认证"); |
| | | } |
| | | |
| | | } |
| | | return s; |
| | | } |
| | | |