1
0

MerchantBaseServiceImpl.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. package com.emato.biz.service.impl;
  2. import java.util.List;
  3. import com.emato.common.core.domain.AjaxResult;
  4. import com.emato.common.utils.DateUtils;
  5. import org.slf4j.Logger;
  6. import org.slf4j.LoggerFactory;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Service;
  9. import com.emato.biz.mapper.merchant.MerchantBaseMapper;
  10. import com.emato.biz.domain.merchant.MerchantBase;
  11. import com.emato.biz.service.merchant.IMerchantBaseService;
  12. import javax.annotation.Resource;
  13. /**
  14. * 商户基本信息Service业务层处理
  15. *
  16. * @author yangbo
  17. * @date 2021-02-01
  18. */
  19. @Service
  20. public class MerchantBaseServiceImpl implements IMerchantBaseService
  21. {
  22. private static final Logger LOGGER = LoggerFactory.getLogger(MerchantBaseServiceImpl.class);
  23. @Resource
  24. private MerchantBaseMapper merchantBaseMapper;
  25. /**
  26. * 查询所有商户
  27. *
  28. * @return 返回结果
  29. */
  30. @Override
  31. public AjaxResult getAll() {
  32. MerchantBase merchantBase = new MerchantBase();
  33. merchantBase.setIsValid("0");
  34. // 查询商户列表
  35. List<MerchantBase> merchList = merchantBaseMapper.selectMerchantBaseList(merchantBase);
  36. return AjaxResult.success(merchList);
  37. }
  38. /**
  39. * 查询商户基本信息
  40. *
  41. * @param merchSn 商户基本信息ID
  42. * @return 商户基本信息
  43. */
  44. @Override
  45. public MerchantBase selectMerchantBaseById(String merchSn)
  46. {
  47. return merchantBaseMapper.selectMerchantBaseById(merchSn);
  48. }
  49. /**
  50. * 查询商户基本信息列表
  51. *
  52. * @param merchantBase 商户基本信息
  53. * @return 商户基本信息
  54. */
  55. @Override
  56. public List<MerchantBase> selectMerchantBaseList(MerchantBase merchantBase)
  57. {
  58. return merchantBaseMapper.selectMerchantBaseList(merchantBase);
  59. }
  60. /**
  61. * 新增商户基本信息
  62. *
  63. * @param merchantBase 商户基本信息
  64. * @return 结果
  65. */
  66. @Override
  67. public int insertMerchantBase(MerchantBase merchantBase)
  68. {
  69. merchantBase.setCreateTime(DateUtils.getNowDate());
  70. return merchantBaseMapper.insertMerchantBase(merchantBase);
  71. }
  72. /**
  73. * 修改商户基本信息
  74. *
  75. * @param merchantBase 商户基本信息
  76. * @return 结果
  77. */
  78. @Override
  79. public int updateMerchantBase(MerchantBase merchantBase)
  80. {
  81. return merchantBaseMapper.updateMerchantBase(merchantBase);
  82. }
  83. /**
  84. * 批量删除商户基本信息
  85. *
  86. * @param merchSns 需要删除的商户基本信息ID
  87. * @return 结果
  88. */
  89. @Override
  90. public int deleteMerchantBaseByIds(String[] merchSns)
  91. {
  92. return merchantBaseMapper.deleteMerchantBaseByIds(merchSns);
  93. }
  94. /**
  95. * 删除商户基本信息信息
  96. *
  97. * @param merchSn 商户基本信息ID
  98. * @return 结果
  99. */
  100. @Override
  101. public int deleteMerchantBaseById(String merchSn)
  102. {
  103. return merchantBaseMapper.deleteMerchantBaseById(merchSn);
  104. }
  105. }