标签管理文件同步推送
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.label.LabelAddDTO;
|
||||
import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:23
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface LabelService {
|
||||
|
||||
/**
|
||||
* 获取数组列表
|
||||
*
|
||||
* @param dto 查询条件
|
||||
*/
|
||||
List<LabelListVo> getLabelList(LabelListDTO dto);
|
||||
|
||||
/**
|
||||
* 添加标签组
|
||||
* @param dto 新增标签组信息
|
||||
*/
|
||||
void addLabel(LabelAddDTO dto);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.label.LabelAddDTO;
|
||||
import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:24
|
||||
* @version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class LabelServiceImpl implements LabelService {
|
||||
|
||||
@Autowired
|
||||
private HyPartnerLabelMapper labelMapper;
|
||||
|
||||
/**
|
||||
* 获取数组列表
|
||||
*
|
||||
* @param dto 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<LabelListVo> getLabelList(LabelListDTO dto) {
|
||||
return labelMapper.getLabelList(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加标签组
|
||||
* @param dto 新增标签组信息
|
||||
*/
|
||||
@Override
|
||||
public void addLabel(LabelAddDTO dto) {
|
||||
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelDO.setLabelGroupId(dto.getLabelGroupId());
|
||||
labelDO.setLabelName(dto.getLabelName());
|
||||
labelDO.setEditUserId(userId);
|
||||
labelDO.setEditDate(new Date());
|
||||
labelDO.setCreateUserId(userId);
|
||||
labelDO.setUpdateUserId(userId);
|
||||
labelMapper.insertSelective(labelDO);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user