9 changed files with 282 additions and 0 deletions
@ -1,4 +1,45 @@ |
|||||
package com.bnyer.img.service; |
package com.bnyer.img.service; |
||||
|
|
||||
|
import com.bnyer.img.domain.Banner; |
||||
|
import com.bnyer.img.vo.BannerVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface BannerService { |
public interface BannerService { |
||||
|
|
||||
|
/** |
||||
|
* 新增banner |
||||
|
* @param banner - |
||||
|
* @return - |
||||
|
*/ |
||||
|
int insert(Banner banner); |
||||
|
|
||||
|
/** |
||||
|
* 修改banner |
||||
|
* @param banner - |
||||
|
* @return - |
||||
|
*/ |
||||
|
int update(Banner banner); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除banner |
||||
|
* @param ids ids |
||||
|
* @return - |
||||
|
*/ |
||||
|
int delete(List<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 查询banner分页 |
||||
|
* @param bannerName banner名 |
||||
|
* @param source 平台 |
||||
|
* @return - |
||||
|
*/ |
||||
|
List<Banner> queryPage(String bannerName,String source); |
||||
|
|
||||
|
/** |
||||
|
* 查询小程序banner列表 |
||||
|
* @param source 平台 |
||||
|
* @return - |
||||
|
*/ |
||||
|
List<BannerVo> queryList(String source); |
||||
} |
} |
||||
|
|||||
@ -1,4 +1,43 @@ |
|||||
package com.bnyer.img.service; |
package com.bnyer.img.service; |
||||
|
|
||||
|
import com.bnyer.img.domain.Feedback; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface FeedBackService { |
public interface FeedBackService { |
||||
|
|
||||
|
/** |
||||
|
* 新增反馈 |
||||
|
* @param feedback 反馈 |
||||
|
* @return - |
||||
|
*/ |
||||
|
int insert(Feedback feedback); |
||||
|
|
||||
|
/** |
||||
|
* 编辑反馈 |
||||
|
* @param feedback |
||||
|
* @return |
||||
|
*/ |
||||
|
int update(Feedback feedback); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除反馈 |
||||
|
* @param ids 主键ids |
||||
|
* @return - |
||||
|
*/ |
||||
|
int delete(List<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 查询反馈分页 |
||||
|
* @param source 平台渠道来源 |
||||
|
* @return - |
||||
|
*/ |
||||
|
List<Feedback> queryPage(String source); |
||||
|
|
||||
|
/** |
||||
|
* 获取反馈详情 |
||||
|
* @param id 主键id |
||||
|
* @return - |
||||
|
*/ |
||||
|
Feedback queryDetails(Long id); |
||||
} |
} |
||||
|
|||||
@ -1,4 +1,45 @@ |
|||||
package com.bnyer.img.service; |
package com.bnyer.img.service; |
||||
|
|
||||
|
import com.bnyer.img.domain.Type; |
||||
|
import com.bnyer.img.vo.TypeVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface TypeService { |
public interface TypeService { |
||||
|
|
||||
|
/** |
||||
|
* 新增图片分类 |
||||
|
* @param type 类型 |
||||
|
* @return - |
||||
|
*/ |
||||
|
int insert(Type type); |
||||
|
|
||||
|
/** |
||||
|
* 修改图片类型 |
||||
|
* @param type 类型 |
||||
|
* @return - |
||||
|
*/ |
||||
|
int update(Type type); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除图片分类 |
||||
|
* @param ids 主键ids |
||||
|
* @return - |
||||
|
*/ |
||||
|
int delete(List<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 查询图片分类分页 |
||||
|
* @param typeName 分类名称 |
||||
|
* @return - |
||||
|
*/ |
||||
|
List<Type> queryPage(String typeName); |
||||
|
|
||||
|
/** |
||||
|
* 小程序端查询图片分类列表 |
||||
|
* @return - |
||||
|
*/ |
||||
|
List<TypeVo> queryList(); |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|||||
@ -1,10 +1,50 @@ |
|||||
package com.bnyer.img.service.impl; |
package com.bnyer.img.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.bnyer.img.domain.Feedback; |
||||
|
import com.bnyer.img.mapper.FeedbackMapper; |
||||
import com.bnyer.img.service.FeedBackService; |
import com.bnyer.img.service.FeedBackService; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
@Service |
@Service |
||||
@Slf4j |
@Slf4j |
||||
public class FeedBackServiceImpl implements FeedBackService { |
public class FeedBackServiceImpl implements FeedBackService { |
||||
|
|
||||
|
@Autowired |
||||
|
private FeedbackMapper feedbackMapper; |
||||
|
|
||||
|
@Override |
||||
|
public int insert(Feedback feedback) { |
||||
|
feedback.setCreateTime(new Date()); |
||||
|
feedback.setUpdateTime(new Date()); |
||||
|
return feedbackMapper.insert(feedback); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int update(Feedback feedback) { |
||||
|
feedback.setUpdateTime(new Date()); |
||||
|
return feedbackMapper.updateById(feedback); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int delete(List<Long> ids) { |
||||
|
return feedbackMapper.deleteBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Feedback> queryPage(String source) { |
||||
|
LambdaQueryWrapper<Feedback> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(Feedback::getSource,source); |
||||
|
return feedbackMapper.selectList(wrapper); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Feedback queryDetails(Long id) { |
||||
|
return feedbackMapper.selectById(id); |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -1,10 +1,53 @@ |
|||||
package com.bnyer.img.service.impl; |
package com.bnyer.img.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.bnyer.common.core.utils.StringUtils; |
||||
|
import com.bnyer.img.domain.Type; |
||||
|
import com.bnyer.img.mapper.TypeMapper; |
||||
import com.bnyer.img.service.TypeService; |
import com.bnyer.img.service.TypeService; |
||||
|
import com.bnyer.img.vo.TypeVo; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
@Service |
@Service |
||||
@Slf4j |
@Slf4j |
||||
public class TypeServiceImpl implements TypeService { |
public class TypeServiceImpl implements TypeService { |
||||
|
|
||||
|
@Autowired |
||||
|
private TypeMapper typeMapper; |
||||
|
|
||||
|
@Override |
||||
|
public int insert(Type type) { |
||||
|
type.setCreateTime(new Date()); |
||||
|
type.setUpdateTime(new Date()); |
||||
|
return typeMapper.insert(type); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int update(Type type) { |
||||
|
type.setUpdateTime(new Date()); |
||||
|
return typeMapper.updateById(type); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public int delete(List<Long> ids) { |
||||
|
return typeMapper.deleteBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Type> queryPage(String typeName) { |
||||
|
LambdaQueryWrapper<Type> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.like(StringUtils.isNotNull(typeName), Type::getTypeName, typeName); |
||||
|
wrapper.orderByDesc(Type::getSort); |
||||
|
return typeMapper.selectList(wrapper); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TypeVo> queryList() { |
||||
|
return typeMapper.queryList(); |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,37 @@ |
|||||
|
package com.bnyer.img.vo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.bnyer.img.domain.BaseDomain; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.*; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@ApiModel("banner响应体") |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@ToString |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class BannerVo implements Serializable { |
||||
|
@ApiModelProperty(value="id") |
||||
|
private Long id; |
||||
|
|
||||
|
@ApiModelProperty(value="banner名称") |
||||
|
private String bannerName; |
||||
|
|
||||
|
@ApiModelProperty(value="banner图片地址") |
||||
|
private String bannerImg; |
||||
|
|
||||
|
@ApiModelProperty(value="banner跳转地址") |
||||
|
private String bannerUrl; |
||||
|
|
||||
|
@ApiModelProperty(value="平台(0->通用;1->抖音;2->快手;3->微信)") |
||||
|
private String source; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.bnyer.img.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.*; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@ApiModel("图片分类响应类") |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@ToString |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class TypeVo implements Serializable { |
||||
|
|
||||
|
@ApiModelProperty(value="id") |
||||
|
private Long id; |
||||
|
|
||||
|
@ApiModelProperty(value="分类类型") |
||||
|
private String typeName; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
} |
||||
Loading…
Reference in new issue