|
|
@ -1,6 +1,8 @@ |
|
|
|
package com.yxt.yythmall.biz.appletbanner; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
@ -57,4 +59,16 @@ public class AppletBannerService extends ServiceImpl<AppletBannerMapper, AppletB |
|
|
|
}); |
|
|
|
return voList; |
|
|
|
} |
|
|
|
|
|
|
|
public void doSaveOrUpdate(AppletBanner dto) { |
|
|
|
if (StrUtil.isBlank(dto.getSid())) { |
|
|
|
dto.setSid(IdUtil.fastSimpleUUID()); |
|
|
|
baseMapper.insert(dto); |
|
|
|
return; |
|
|
|
} |
|
|
|
AppletBanner entity = this.fetchBySid(dto.getSid()); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.updateById(entity); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|