新增商户端订单通知(通过公众号)
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
* 注意:
|
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.modules.customer.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import co.yixiang.domain.BaseDomain;
|
||||
|
||||
/**
|
||||
* @author Bug
|
||||
* @date 2020-12-10
|
||||
*/
|
||||
@Data
|
||||
@TableName("yx_store_customer")
|
||||
public class YxStoreCustomer extends BaseDomain {
|
||||
/** id */
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/** 用户昵称 */
|
||||
private String nickName;
|
||||
|
||||
/** openId */
|
||||
@NotBlank(message = "请用户扫码后提交")
|
||||
private String openId;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
/** 是否启用 */
|
||||
private Integer isEnable;
|
||||
|
||||
|
||||
public void copy(YxStoreCustomer source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
* 注意:
|
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.modules.customer.service;
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.customer.domain.YxStoreCustomer;
|
||||
import co.yixiang.modules.customer.service.dto.YxStoreCustomerDto;
|
||||
import co.yixiang.modules.customer.service.dto.YxStoreCustomerQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import co.yixiang.domain.PageResult;
|
||||
/**
|
||||
* @author Bug
|
||||
* @date 2020-12-10
|
||||
*/
|
||||
public interface YxStoreCustomerService extends BaseService<YxStoreCustomer>{
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
PageResult<YxStoreCustomerDto> queryAll(YxStoreCustomerQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreCustomerDto>
|
||||
*/
|
||||
List<YxStoreCustomer> queryAll(YxStoreCustomerQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCustomerDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
* 注意:
|
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.modules.customer.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bug
|
||||
* @date 2020-12-10
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCustomerDto implements Serializable {
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 用户昵称 */
|
||||
private String nickName;
|
||||
|
||||
/** openId */
|
||||
private String openId;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 添加时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
|
||||
private Integer isDel;
|
||||
|
||||
/** 是否启用 */
|
||||
private Integer isEnable;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
* 注意:
|
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.modules.customer.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author Bug
|
||||
* @date 2020-12-10
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCustomerQueryCriteria{
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
* 注意:
|
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.modules.customer.service.impl;
|
||||
|
||||
import co.yixiang.modules.customer.domain.YxStoreCustomer;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.customer.service.YxStoreCustomerService;
|
||||
import co.yixiang.modules.customer.service.dto.YxStoreCustomerDto;
|
||||
import co.yixiang.modules.customer.service.dto.YxStoreCustomerQueryCriteria;
|
||||
import co.yixiang.modules.customer.service.mapper.YxStoreCustomerMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import co.yixiang.domain.PageResult;
|
||||
/**
|
||||
* @author Bug
|
||||
* @date 2020-12-10
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreCustomer")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreCustomerServiceImpl extends BaseServiceImpl<YxStoreCustomerMapper, YxStoreCustomer> implements YxStoreCustomerService {
|
||||
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
//@Cacheable
|
||||
public PageResult<YxStoreCustomerDto> queryAll(YxStoreCustomerQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreCustomer> page = new PageInfo<>(queryAll(criteria));
|
||||
return generator.convertPageInfo(page,YxStoreCustomerDto.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
//@Cacheable
|
||||
public List<YxStoreCustomer> queryAll(YxStoreCustomerQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCustomer.class, criteria));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void download(List<YxStoreCustomerDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreCustomerDto yxStoreCustomer : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("用户昵称", yxStoreCustomer.getNickName());
|
||||
map.put("openId", yxStoreCustomer.getOpenId());
|
||||
map.put("备注", yxStoreCustomer.getRemark());
|
||||
map.put("添加时间", yxStoreCustomer.getCreateTime());
|
||||
map.put("修改时间", yxStoreCustomer.getUpdateTime());
|
||||
map.put(" isDel", yxStoreCustomer.getIsDel());
|
||||
map.put("是否启用", yxStoreCustomer.getIsEnable());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
* 注意:
|
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.modules.customer.service.mapper;
|
||||
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.customer.domain.YxStoreCustomer;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author Bug
|
||||
* @date 2020-12-10
|
||||
*/
|
||||
@Repository
|
||||
public interface YxStoreCustomerMapper extends CoreMapper<YxStoreCustomer> {
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package co.yixiang.modules.customer.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单通知用户表 接收订单通知的用户 查询结果对象
|
||||
* </p>
|
||||
*
|
||||
* @author LionCity
|
||||
* @date 2020-04-02
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(description = "订单通知用户表")
|
||||
public class YzCustomerVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty(value = "openId")
|
||||
private String openId;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "创建时间 创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间 最后更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
Reference in New Issue
Block a user