| | |
| | | package com.xcong.excoin.modules.systemSetting.service.Impl;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.validation.Valid;
|
| | | import javax.validation.constraints.NotNull;
|
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.xcong.excoin.common.entity.FebsResponse;
|
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.AppVersionEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformNoticeEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.AppVersionMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformBannerMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformNoticeMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformSymbolsSkuMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformTradeSettingMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.service.SystemSettingService;
|
| | |
| | | private final PlatformSymbolsSkuMapper platformSymbolsSkuMapper;
|
| | |
|
| | | private final PlatformBannerMapper platformBannerMapper;
|
| | | |
| | | private final PlatformNoticeMapper platformNoticeMapper;
|
| | | |
| | | private final AppVersionMapper appVersionMapper;
|
| | |
|
| | | @Override
|
| | | public IPage<PlatformTradeSettingEntity> findPlatformTradeSettingInPage(
|
| | |
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void platformBannerAdd() {
|
| | | Map<String, Object> columnMap= new HashMap<>();
|
| | | List<PlatformBannerEntity> selectByMap = platformBannerMapper.selectByMap(columnMap);
|
| | | PlatformBannerEntity platformBannerEntity = selectByMap.get(0);
|
| | | public void platformBannerAdd(@Valid PlatformBannerEntity platformBannerEntity) {
|
| | | PlatformBannerEntity platformBannerEntityAdd = new PlatformBannerEntity();
|
| | | platformBannerEntityAdd.setCreateBy(platformBannerEntity.getCreateBy());
|
| | | platformBannerEntityAdd.setCreateBy("admin");
|
| | | platformBannerEntityAdd.setCreateTime(new Date());
|
| | | platformBannerEntityAdd.setImageUrl(platformBannerEntity.getImageUrl());
|
| | | platformBannerEntityAdd.setIsInside(platformBannerEntity.getIsInside());
|
| | |
| | | platformBannerEntityAdd.setName(platformBannerEntity.getName());
|
| | | platformBannerEntityAdd.setShowPort(platformBannerEntity.getShowPort());
|
| | | platformBannerEntityAdd.setSort(platformBannerEntity.getSort());
|
| | | platformBannerEntityAdd.setUpdateBy(platformBannerEntity.getUpdateBy());
|
| | | platformBannerEntityAdd.setUpdateBy("admin");
|
| | | platformBannerEntityAdd.setUpdateTime(new Date());
|
| | | platformBannerMapper.insert(platformBannerEntityAdd);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse noticeManageConfirm(@Valid PlatformNoticeEntity platformNoticeEntity) {
|
| | | platformNoticeMapper.updateById(platformNoticeEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse noticeManageDelete(@NotNull(message = "{required}") Long id) {
|
| | | platformNoticeMapper.deleteById(id);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void noticeManageAdds(@Valid PlatformNoticeEntity platformNoticeEntity) {
|
| | | PlatformNoticeEntity platformNoticeEntityAdd = new PlatformNoticeEntity();
|
| | | platformNoticeEntityAdd.setCreateTime(new Date());
|
| | | platformNoticeEntityAdd.setCategoryid(1);
|
| | | platformNoticeEntityAdd.setCategoryname("1");
|
| | | platformNoticeEntityAdd.setContent("1");
|
| | | platformNoticeEntityAdd.setSource(platformNoticeEntity.getSource());
|
| | | platformNoticeEntityAdd.setTitle(platformNoticeEntity.getTitle());
|
| | | platformNoticeMapper.insert(platformNoticeEntityAdd);
|
| | | |
| | | }
|
| | |
|
| | | @Override
|
| | | public IPage<PlatformNoticeEntity> findNoticeManageInPage(PlatformNoticeEntity platformNoticeEntity,
|
| | | QueryRequest request) {
|
| | | Page<PlatformNoticeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<PlatformNoticeEntity> platformBannerEntitys = platformNoticeMapper.findPlatformNoticeInPage(page, platformNoticeEntity);
|
| | | return platformBannerEntitys;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public PlatformNoticeEntity selectNoticeManageById(long id) {
|
| | | PlatformNoticeEntity platformNoticeEntity = platformNoticeMapper.selectById(id);
|
| | | return platformNoticeEntity;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public IPage<AppVersionEntity> findAppVersionEntityInPage(AppVersionEntity appVersionEntity, QueryRequest request) {
|
| | | Page<AppVersionEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<AppVersionEntity> appVersionEntitys = appVersionMapper.findAppVersionInPage(page, appVersionEntity);
|
| | | return appVersionEntitys;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public AppVersionEntity selectAppVersionById(long id) {
|
| | | AppVersionEntity appVersionEntity = appVersionMapper.selectById(id);
|
| | | return appVersionEntity;
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse appVersionConfirm(@Valid AppVersionEntity appVersionEntity) {
|
| | | appVersionMapper.updateById(appVersionEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse appVersionDelete(@NotNull(message = "{required}") Long id) {
|
| | | appVersionMapper.deleteById(id);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void appVersionAdds(@Valid AppVersionEntity appVersionEntity) {
|
| | | AppVersionEntity appVersionEntitys = new AppVersionEntity();
|
| | | appVersionEntitys.setCreatetime(new Date());
|
| | | appVersionEntitys.setAddress(appVersionEntity.getAddress());
|
| | | appVersionEntitys.setContent(appVersionEntity.getContent());
|
| | | appVersionEntitys.setType(appVersionEntity.getType());
|
| | | appVersionEntitys.setVersion(appVersionEntity.getVersion()); |
| | | appVersionMapper.insert(appVersionEntitys);
|
| | | |
| | | }
|
| | |
|
| | |
|
| | | }
|