| | |
| | | import cc.mrbird.febs.dapp.dto.HlmBasicPerkDto; |
| | | import cc.mrbird.febs.dapp.dto.MallGoodsUpdateDto; |
| | | import cc.mrbird.febs.dapp.dto.MallOrderInfoDto; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.dapp.entity.MallGoods; |
| | | import cc.mrbird.febs.dapp.entity.MallGoodsCategory; |
| | | import cc.mrbird.febs.dapp.entity.MallOrderInfo; |
| | | import cc.mrbird.febs.dapp.entity.*; |
| | | import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum; |
| | | import cc.mrbird.febs.dapp.mapper.*; |
| | | import cc.mrbird.febs.dapp.service.IAdminMallGoodsService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | private final DappFundFlowDao dappFundFlowDao; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final MallGoodsCategoryMapper mallGoodsCategoryMapper; |
| | | |
| | | private final PlatformBannerMapper platformBannerMapper; |
| | | |
| | | @Override |
| | | public IPage<MallGoods> getCategoryListInPage(MallGoods mallGoods, QueryRequest request) { |
| | |
| | | return adminMallGoodsCategoryTreeVos; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PlatformBanner> findPlatformBannerInPage(PlatformBanner platformBannerEntity, |
| | | QueryRequest request) { |
| | | Page<PlatformBanner> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<PlatformBanner> platformBannerEntitys = platformBannerMapper.findPlatformBannerInPage(page, platformBannerEntity); |
| | | return platformBannerEntitys; |
| | | } |
| | | |
| | | @Override |
| | | public PlatformBanner selectPlatformBannerById(long id) { |
| | | PlatformBanner platformBannerEntity = platformBannerMapper.selectById(id); |
| | | return platformBannerEntity; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public FebsResponse platformBannerConfirm(@Valid PlatformBanner platformBannerEntity) { |
| | | platformBannerMapper.updateById(platformBannerEntity); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public FebsResponse platformBannerDelete(@NotNull(message = "{required}") Long id) { |
| | | platformBannerMapper.deleteById(id); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void platformBannerAdd(@Valid PlatformBanner platformBannerEntity) { |
| | | PlatformBanner platformBannerEntityAdd = new PlatformBanner(); |
| | | platformBannerEntityAdd.setImageUrl(platformBannerEntity.getImageUrl()); |
| | | platformBannerEntityAdd.setIsInside(platformBannerEntity.getIsInside()); |
| | | platformBannerEntityAdd.setIsJump(platformBannerEntity.getIsJump()); |
| | | platformBannerEntityAdd.setIsTop(platformBannerEntity.getIsTop()); |
| | | platformBannerEntityAdd.setJumpUrl(platformBannerEntity.getJumpUrl()); |
| | | platformBannerEntityAdd.setName(platformBannerEntity.getName()); |
| | | platformBannerEntityAdd.setShowPort(platformBannerEntity.getShowPort()); |
| | | platformBannerEntityAdd.setSort(platformBannerEntity.getSort()); |
| | | platformBannerMapper.insert(platformBannerEntityAdd); |
| | | |
| | | } |
| | | |
| | | public void updateDataDic(String type, String code, String value) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(type, code); |
| | | if (dic != null) { |