| | |
| | | import com.mzl.flower.dto.response.system.UserDetailsDTO; |
| | | import com.mzl.flower.dto.response.system.UserListDTO; |
| | | import com.mzl.flower.entity.point.CustomerPoint; |
| | | import com.mzl.flower.entity.supplier.SupplierSub; |
| | | import com.mzl.flower.entity.system.*; |
| | | import com.mzl.flower.enums.TrueOrFalseEnum; |
| | | import com.mzl.flower.mapper.point.CustomerPointMapper; |
| | | import com.mzl.flower.mapper.supplier.SupplierSubMapper; |
| | | import com.mzl.flower.mapper.system.*; |
| | | import com.mzl.flower.service.customer.CustomerService; |
| | | import com.mzl.flower.service.partner.PartnerService; |
| | |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.ArrayList; |
| | |
| | | private CustomerPointMapper customerPointMapper; |
| | | @Autowired |
| | | private StationService stationService; |
| | | |
| | | @Autowired |
| | | private SupplierSubMapper supplierSubMapper; |
| | | |
| | | |
| | | public User findUserByOpenId(String openId, String sessionKey, String unionId |
| | |
| | | } |
| | | }else if(Constants.USER_TYPE.supplier.name().equals(user.getType())){ |
| | | result.setSupplierDTO(supplierService.getCurrentSupplier()); |
| | | SupplierSub sub = supplierSubMapper.getCurrentSupplier(SecurityUtils.getUserId()); |
| | | if (!ObjectUtils.isEmpty(sub)) { |
| | | result.setIsSubSupplier(true); |
| | | result.setSupplierSub(sub); |
| | | } else { |
| | | result.setIsSubSupplier(false); |
| | | result.setSupplierSub(null); |
| | | } |
| | | }else if(Constants.USER_TYPE.partner.name().equals(user.getType())){ |
| | | result.setPartnerDTO(partnerService.getCurrentPartner()); |
| | | }else if (Constants.USER_TYPE.admin.name().equals(user.getType())){ |