UserMerchantWrapper.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the dreamlu.net developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: Chill 庄骞 (smallchill@163.com)
  16. */
  17. package org.springblade.modules.system.wrapper;
  18. import org.springblade.core.mp.support.BaseEntityWrapper;
  19. import org.springblade.core.tool.utils.BeanUtil;
  20. import org.springblade.modules.system.entity.UserMerchant;
  21. import org.springblade.modules.system.vo.UserMerchantVO;
  22. import java.util.Objects;
  23. /**
  24. * 商家用户表包装类,返回视图层所需的字段
  25. *
  26. * @author BladeX
  27. * @since 2024-07-16
  28. */
  29. public class UserMerchantWrapper extends BaseEntityWrapper<UserMerchant, UserMerchantVO> {
  30. public static UserMerchantWrapper build() {
  31. return new UserMerchantWrapper();
  32. }
  33. @Override
  34. public UserMerchantVO entityVO(UserMerchant userMerchant) {
  35. Objects.requireNonNull(userMerchant);
  36. return BeanUtil.copy(userMerchant, UserMerchantVO.class);
  37. //User createUser = UserCache.getUser(userMerchant.getCreateUser());
  38. //User updateUser = UserCache.getUser(userMerchant.getUpdateUser());
  39. //userMerchantVO.setCreateUserName(createUser.getName());
  40. //userMerchantVO.setUpdateUserName(updateUser.getName());
  41. //return userMerchantVO;
  42. }
  43. }