1.4.4版本,新增模板消息通知、H5端商家管理发货修改及其列表时间显示修复
This commit is contained in:
@ -0,0 +1,44 @@
|
||||
package co.yixiang.modules.manage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import co.yixiang.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 快递公司表
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value="YxExpress对象", description="快递公司表")
|
||||
public class YxExpress extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "快递公司id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "快递公司简称")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "快递公司全称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Boolean isShow;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package co.yixiang.modules.manage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import co.yixiang.modules.manage.entity.YxExpress;
|
||||
import co.yixiang.modules.manage.web.param.YxExpressQueryParam;
|
||||
import co.yixiang.modules.manage.web.vo.YxExpressQueryVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 快递公司表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-12-13
|
||||
*/
|
||||
@Repository
|
||||
public interface YxExpressMapper extends BaseMapper<YxExpress> {
|
||||
|
||||
/**
|
||||
* 根据ID获取查询对象
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
YxExpressQueryVo getYxExpressById(Serializable id);
|
||||
|
||||
/**
|
||||
* 获取分页对象
|
||||
* @param page
|
||||
* @param yxExpressQueryParam
|
||||
* @return
|
||||
*/
|
||||
IPage<YxExpressQueryVo> getYxExpressPageList(@Param("page") Page page, @Param("param") YxExpressQueryParam yxExpressQueryParam);
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package co.yixiang.modules.manage.service;
|
||||
|
||||
import co.yixiang.modules.manage.entity.YxExpress;
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.manage.web.param.YxExpressQueryParam;
|
||||
import co.yixiang.modules.manage.web.vo.YxExpressQueryVo;
|
||||
import co.yixiang.common.web.vo.Paging;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 快递公司表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-12-13
|
||||
*/
|
||||
public interface YxExpressService extends BaseService<YxExpress> {
|
||||
|
||||
/**
|
||||
* 根据ID获取查询对象
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
YxExpressQueryVo getYxExpressById(Serializable id);
|
||||
|
||||
/**
|
||||
* 获取分页对象
|
||||
* @param yxExpressQueryParam
|
||||
* @return
|
||||
*/
|
||||
Paging<YxExpressQueryVo> getYxExpressPageList(YxExpressQueryParam yxExpressQueryParam) throws Exception;
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package co.yixiang.modules.manage.service.impl;
|
||||
|
||||
import co.yixiang.modules.manage.entity.YxExpress;
|
||||
import co.yixiang.modules.manage.mapper.YxExpressMapper;
|
||||
import co.yixiang.modules.manage.service.YxExpressService;
|
||||
import co.yixiang.modules.manage.web.param.YxExpressQueryParam;
|
||||
import co.yixiang.modules.manage.web.vo.YxExpressQueryVo;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import co.yixiang.common.web.vo.Paging;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 快递公司表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-12-13
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class YxExpressServiceImpl extends BaseServiceImpl<YxExpressMapper, YxExpress> implements YxExpressService {
|
||||
|
||||
@Autowired
|
||||
private YxExpressMapper yxExpressMapper;
|
||||
|
||||
@Override
|
||||
public YxExpressQueryVo getYxExpressById(Serializable id){
|
||||
return yxExpressMapper.getYxExpressById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Paging<YxExpressQueryVo> getYxExpressPageList(YxExpressQueryParam yxExpressQueryParam) throws Exception{
|
||||
Page page = setPageParam(yxExpressQueryParam,OrderItem.desc("create_time"));
|
||||
IPage<YxExpressQueryVo> iPage = yxExpressMapper.getYxExpressPageList(page,yxExpressQueryParam);
|
||||
return new Paging(iPage);
|
||||
}
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.common.api.ApiResult;
|
||||
import co.yixiang.common.web.controller.BaseController;
|
||||
import co.yixiang.modules.manage.service.YxExpressService;
|
||||
import co.yixiang.modules.manage.web.dto.OrderTimeDataDTO;
|
||||
import co.yixiang.modules.manage.web.param.OrderDeliveryParam;
|
||||
import co.yixiang.modules.manage.web.param.OrderPriceParam;
|
||||
@ -39,6 +40,7 @@ public class ShoperController extends BaseController {
|
||||
|
||||
private final YxStoreOrderService storeOrderService;
|
||||
//private final YxUserService yxUserService;
|
||||
private final YxExpressService expressService;
|
||||
|
||||
/**
|
||||
* 订单数据统计
|
||||
@ -46,7 +48,6 @@ public class ShoperController extends BaseController {
|
||||
@GetMapping("/admin/order/statistics")
|
||||
@ApiOperation(value = "订单数据统计",notes = "订单数据统计")
|
||||
public ApiResult<Object> statistics(){
|
||||
//int uid = SecurityUtils.getUserId().intValue();
|
||||
|
||||
OrderCountDTO orderCountDTO = storeOrderService.orderData(0);
|
||||
OrderTimeDataDTO orderTimeDataDTO = storeOrderService.getOrderTimeData();
|
||||
@ -89,7 +90,6 @@ public class ShoperController extends BaseController {
|
||||
@GetMapping("/admin/order/detail/{key}")
|
||||
@ApiOperation(value = "订单详情",notes = "订单详情")
|
||||
public ApiResult<Object> orderDetail(@PathVariable String key){
|
||||
int uid = SecurityUtils.getUserId().intValue();
|
||||
|
||||
if(StrUtil.isEmpty(key)) return ApiResult.fail("参数错误");
|
||||
YxStoreOrderQueryVo storeOrder = storeOrderService.getOrderInfo(key,0);
|
||||
@ -107,23 +107,28 @@ public class ShoperController extends BaseController {
|
||||
@ApiOperation(value = "订单改价",notes = "订单改价")
|
||||
public ApiResult<Object> orderPrice(@Validated @RequestBody OrderPriceParam param){
|
||||
|
||||
//if(ObjectUtil.isNotNull(param)) return ApiResult.fail("演示环境禁止操作");
|
||||
int uid = SecurityUtils.getUserId().intValue();
|
||||
|
||||
storeOrderService.editOrderPrice(param);
|
||||
|
||||
return ApiResult.ok("ok");
|
||||
}
|
||||
|
||||
/**
|
||||
* 快递公司
|
||||
*/
|
||||
@GetMapping("/logistics")
|
||||
@ApiOperation(value = "快递公司",notes = "快递公司")
|
||||
public ApiResult<Object> express(){
|
||||
|
||||
return ApiResult.ok(expressService.list());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单发货
|
||||
*/
|
||||
@PostMapping("/admin/order/delivery/keep")
|
||||
@ApiOperation(value = "订单发货",notes = "订单发货")
|
||||
public ApiResult<Object> orderDelivery(@Validated @RequestBody OrderDeliveryParam param){
|
||||
//if(ObjectUtil.isNotNull(param)) return ApiResult.fail("演示环境禁止操作");
|
||||
|
||||
int uid = SecurityUtils.getUserId().intValue();
|
||||
|
||||
storeOrderService.orderDelivery(param);
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
package co.yixiang.modules.manage.web.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import co.yixiang.common.web.param.QueryParam;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 快递公司表 查询参数对象
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @date 2019-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value="YxExpressQueryParam对象", description="快递公司表查询参数")
|
||||
public class YxExpressQueryParam extends QueryParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package co.yixiang.modules.manage.web.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 快递公司表 查询结果对象
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @date 2019-12-13
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="YxExpressQueryVo对象", description="快递公司表查询参数")
|
||||
public class YxExpressQueryVo implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "快递公司id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "快递公司简称")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "快递公司全称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private Boolean isShow;
|
||||
|
||||
}
|
@ -6,12 +6,14 @@ import co.yixiang.common.constant.CommonConstant;
|
||||
import co.yixiang.exception.ErrorRequestException;
|
||||
import co.yixiang.modules.activity.service.YxStoreCombinationService;
|
||||
import co.yixiang.modules.activity.service.YxStorePinkService;
|
||||
import co.yixiang.modules.manage.service.YxExpressService;
|
||||
import co.yixiang.modules.manage.web.dto.ChartDataDTO;
|
||||
import co.yixiang.modules.manage.web.dto.OrderDataDTO;
|
||||
import co.yixiang.modules.manage.web.dto.OrderTimeDataDTO;
|
||||
import co.yixiang.modules.manage.web.param.OrderDeliveryParam;
|
||||
import co.yixiang.modules.manage.web.param.OrderPriceParam;
|
||||
import co.yixiang.modules.manage.web.param.OrderRefundParam;
|
||||
import co.yixiang.modules.manage.web.vo.YxExpressQueryVo;
|
||||
import co.yixiang.modules.monitor.service.RedisService;
|
||||
import co.yixiang.modules.order.entity.YxStoreOrder;
|
||||
import co.yixiang.modules.order.entity.YxStoreOrderCartInfo;
|
||||
@ -44,6 +46,10 @@ import co.yixiang.modules.user.web.vo.YxUserQueryVo;
|
||||
//import co.yixiang.redisson.DelayJob;
|
||||
//import co.yixiang.redisson.DelayJobService;
|
||||
import co.yixiang.modules.task.DelayJobService;
|
||||
import co.yixiang.modules.user.web.vo.YxWechatUserQueryVo;
|
||||
import co.yixiang.modules.wechat.entity.YxWechatTemplate;
|
||||
import co.yixiang.mp.service.WxMpTemplateMessageService;
|
||||
import co.yixiang.modules.wechat.service.YxWechatTemplateService;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import co.yixiang.utils.RedisUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@ -144,8 +150,14 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<YxStoreOrderMapper,
|
||||
@Autowired
|
||||
private YxStorePinkService pinkService;
|
||||
|
||||
// @Value("${job.unpayorder}")
|
||||
// private String overtime;
|
||||
@Autowired
|
||||
private WxMpTemplateMessageService templateMessageService;
|
||||
|
||||
@Autowired
|
||||
private YxWechatTemplateService yxWechatTemplateService;
|
||||
|
||||
@Autowired
|
||||
private YxExpressService expressService;
|
||||
|
||||
|
||||
/**
|
||||
@ -204,18 +216,41 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<YxStoreOrderMapper,
|
||||
|
||||
if(orderQueryVo.getStatus() != 0 || orderQueryVo.getPaid() == 0) throw new ErrorRequestException("订单状态错误");
|
||||
|
||||
YxExpressQueryVo expressQueryVo = expressService
|
||||
.getYxExpressById(Integer.valueOf(param.getDeliveryName()));
|
||||
if(ObjectUtil.isNull(expressQueryVo)) throw new ErrorRequestException("请后台先添加快递公司");
|
||||
|
||||
YxStoreOrder storeOrder = new YxStoreOrder();
|
||||
storeOrder.setId(orderQueryVo.getId());
|
||||
storeOrder.setStatus(1);
|
||||
storeOrder.setDeliveryId(param.getDeliveryId());
|
||||
storeOrder.setDeliveryName(param.getDeliveryName());
|
||||
storeOrder.setDeliveryName(expressQueryVo.getName());
|
||||
storeOrder.setDeliveryType(param.getDeliveryType());
|
||||
storeOrder.setDeliverySn(expressQueryVo.getCode());
|
||||
|
||||
yxStoreOrderMapper.updateById(storeOrder);
|
||||
|
||||
//增加状态
|
||||
orderStatusService.create(storeOrder.getId(),"delivery_goods",
|
||||
"已发货 快递公司:"+param.getDeliveryName()+"快递单号:" +param.getDeliveryId());
|
||||
"已发货 快递公司:"+expressQueryVo.getName()+"快递单号:" +param.getDeliveryId());
|
||||
|
||||
//模板消息通知
|
||||
String siteUrl = RedisUtil.get("site_url");
|
||||
YxWechatUserQueryVo wechatUser = wechatUserService.getYxWechatUserById(orderQueryVo.getUid());
|
||||
if(ObjectUtil.isNotNull(wechatUser)){
|
||||
YxWechatTemplate WechatTemplate = yxWechatTemplateService.getOne(
|
||||
new QueryWrapper<YxWechatTemplate>().eq("tempkey","OPENTM200565259"));
|
||||
//付款成功微信模板通知用户
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("first","亲,宝贝已经启程了,好想快点来到你身边。");
|
||||
map.put("keyword1",storeOrder.getOrderId());//订单号
|
||||
map.put("keyword2",expressQueryVo.getName());
|
||||
map.put("keyword3",param.getDeliveryId());
|
||||
map.put("remark","yshop电商系统为你服务!");
|
||||
templateMessageService.sendWxMpTemplateMessage( wechatUser.getOpenid()
|
||||
,WechatTemplate.getTempid(),
|
||||
siteUrl+"/order/detail/"+orderQueryVo.getOrderId(),map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -837,7 +872,6 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<YxStoreOrderMapper,
|
||||
@Override
|
||||
public void paySuccess(String orderId, String payType) {
|
||||
YxStoreOrderQueryVo orderInfo = getOrderInfo(orderId,0);
|
||||
//System.out.println("orderInfo:"+orderInfo);
|
||||
|
||||
//更新订单状态
|
||||
QueryWrapper<YxStoreOrder> wrapper = new QueryWrapper<>();
|
||||
@ -853,13 +887,26 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<YxStoreOrderMapper,
|
||||
//增加状态
|
||||
orderStatusService.create(orderInfo.getId(),"pay_success","用户付款成功");
|
||||
//支付成功后取消延时队列
|
||||
// DelayJob delayJob = new DelayJob();
|
||||
// delayJob.setOderId(storeOrder.getId());
|
||||
// delayJob.setAClass(CancelOrderService.class);
|
||||
// delayJobService.cancelJob(delayJob);
|
||||
//todo 拼团
|
||||
pinkService.createPink(orderInfo);
|
||||
//todo 模板消息推送
|
||||
//模板消息推送
|
||||
//读取redis配置
|
||||
String siteUrl = RedisUtil.get("site_url");
|
||||
YxWechatUserQueryVo wechatUser = wechatUserService.getYxWechatUserById(orderInfo.getUid());
|
||||
if(ObjectUtil.isNotNull(wechatUser)){
|
||||
YxWechatTemplate WechatTemplate = yxWechatTemplateService.getOne(
|
||||
new QueryWrapper<YxWechatTemplate>().eq("tempkey","OPENTM207791277"));
|
||||
//付款成功微信模板通知用户
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("first","您的订单已支付成功,我们会尽快为您发货。");
|
||||
map.put("keyword1",orderInfo.getOrderId());//订单号
|
||||
map.put("keyword2",orderInfo.getPayPrice().toString());
|
||||
map.put("remark","yshop电商系统为你服务!");
|
||||
templateMessageService.sendWxMpTemplateMessage( wechatUser.getOpenid()
|
||||
,WechatTemplate.getTempid(),
|
||||
siteUrl+"/order/detail/"+orderInfo.getOrderId(),map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,6 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers("/share").anonymous()
|
||||
.antMatchers("/wechat/notify").anonymous()
|
||||
.antMatchers("/wechat/serve").anonymous()
|
||||
.antMatchers("/logistics").anonymous()
|
||||
// 支付宝回调
|
||||
.antMatchers("/api/aliPay/return").anonymous()
|
||||
.antMatchers("/api/aliPay/notify").anonymous()
|
||||
|
@ -0,0 +1,48 @@
|
||||
package co.yixiang.modules.wechat.entity;
|
||||
|
||||
import co.yixiang.common.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板
|
||||
* </p>
|
||||
*
|
||||
* @author xuwenbo
|
||||
* @since 2019-12-10
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "YxWechatTemplate对象", description = "微信模板")
|
||||
public class YxWechatTemplate extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "模板id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "模板编号")
|
||||
private String tempkey;
|
||||
|
||||
@ApiModelProperty(value = "模板名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "回复内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "模板ID")
|
||||
private String tempid;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private String addTime;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package co.yixiang.modules.wechat.mapper;
|
||||
|
||||
import co.yixiang.modules.wechat.entity.YxWechatTemplate;
|
||||
import co.yixiang.modules.wechat.web.param.YxWechatTemplateQueryParam;
|
||||
import co.yixiang.modules.wechat.web.vo.YxWechatTemplateQueryVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xuwenbo
|
||||
* @since 2019-12-10
|
||||
*/
|
||||
@Repository
|
||||
public interface YxWechatTemplateMapper extends BaseMapper<YxWechatTemplate> {
|
||||
|
||||
/**
|
||||
* 根据ID获取查询对象
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
YxWechatTemplateQueryVo getYxWechatTemplateById(Serializable id);
|
||||
|
||||
/**
|
||||
* 获取分页对象
|
||||
* @param page
|
||||
* @param yxWechatTemplateQueryParam
|
||||
* @return
|
||||
*/
|
||||
IPage<YxWechatTemplateQueryVo> getYxWechatTemplatePageList(@Param("page") Page page, @Param("param") YxWechatTemplateQueryParam yxWechatTemplateQueryParam);
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package co.yixiang.modules.wechat.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.common.web.vo.Paging;
|
||||
import co.yixiang.modules.wechat.entity.YxWechatTemplate;
|
||||
import co.yixiang.modules.wechat.web.param.YxWechatTemplateQueryParam;
|
||||
import co.yixiang.modules.wechat.web.vo.YxWechatTemplateQueryVo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xuwenbo
|
||||
* @since 2019-12-10
|
||||
*/
|
||||
public interface YxWechatTemplateService extends BaseService<YxWechatTemplate> {
|
||||
|
||||
/**
|
||||
* 根据ID获取查询对象
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
YxWechatTemplateQueryVo getYxWechatTemplateById(Serializable id) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取分页对象
|
||||
* @param yxWechatTemplateQueryParam
|
||||
* @return
|
||||
*/
|
||||
Paging<YxWechatTemplateQueryVo> getYxWechatTemplatePageList(YxWechatTemplateQueryParam yxWechatTemplateQueryParam) throws Exception;
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package co.yixiang.modules.wechat.service.impl;
|
||||
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import co.yixiang.common.web.vo.Paging;
|
||||
import co.yixiang.modules.wechat.entity.YxWechatTemplate;
|
||||
import co.yixiang.modules.wechat.mapper.YxWechatTemplateMapper;
|
||||
import co.yixiang.modules.wechat.service.YxWechatTemplateService;
|
||||
import co.yixiang.modules.wechat.web.param.YxWechatTemplateQueryParam;
|
||||
import co.yixiang.modules.wechat.web.vo.YxWechatTemplateQueryVo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author xuwenbo
|
||||
* @since 2019-12-10
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WechatTemplateServiceImpl extends BaseServiceImpl<YxWechatTemplateMapper, YxWechatTemplate> implements YxWechatTemplateService {
|
||||
|
||||
@Autowired
|
||||
private YxWechatTemplateMapper yxWechatTemplateMapper;
|
||||
|
||||
@Override
|
||||
public YxWechatTemplateQueryVo getYxWechatTemplateById(Serializable id) throws Exception{
|
||||
return yxWechatTemplateMapper.getYxWechatTemplateById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Paging<YxWechatTemplateQueryVo> getYxWechatTemplatePageList(YxWechatTemplateQueryParam yxWechatTemplateQueryParam) throws Exception{
|
||||
Page page = setPageParam(yxWechatTemplateQueryParam,OrderItem.desc("create_time"));
|
||||
IPage<YxWechatTemplateQueryVo> iPage = yxWechatTemplateMapper.getYxWechatTemplatePageList(page,yxWechatTemplateQueryParam);
|
||||
return new Paging(iPage);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package co.yixiang.modules.wechat.web.param;
|
||||
|
||||
import co.yixiang.common.web.param.QueryParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板 查询参数对象
|
||||
* </p>
|
||||
*
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-10
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value="YxWechatTemplateQueryParam对象", description="微信模板查询参数")
|
||||
public class YxWechatTemplateQueryParam extends QueryParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package co.yixiang.modules.wechat.web.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板 查询结果对象
|
||||
* </p>
|
||||
*
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="YxWechatTemplateQueryVo对象", description="微信模板查询参数")
|
||||
public class YxWechatTemplateQueryVo implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "模板id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "模板编号")
|
||||
private String tempkey;
|
||||
|
||||
@ApiModelProperty(value = "模板名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "回复内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "模板ID")
|
||||
private String tempid;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private String addTime;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="co.yixiang.modules.manage.mapper.YxExpressMapper">
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, code, name, sort, is_show
|
||||
</sql>
|
||||
|
||||
<select id="getYxExpressById" resultType="co.yixiang.modules.manage.web.vo.YxExpressQueryVo">
|
||||
select <include refid="Base_Column_List"/> from yx_express where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getYxExpressPageList" resultType="co.yixiang.modules.manage.web.vo.YxExpressQueryVo">
|
||||
select <include refid="Base_Column_List"/> from yx_express
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -43,11 +43,11 @@ public class CodeGenerator {
|
||||
|
||||
// ############################ 配置部分 start ############################
|
||||
// 模块名称
|
||||
private static final String MODULE_NAME = "user";
|
||||
private static final String MODULE_NAME = "manage";
|
||||
// 作者
|
||||
private static final String AUTHOR = "hupeng";
|
||||
// 生成的表名称
|
||||
private static final String TABLE_NAME = "yx_user_recharge"; // 主键数据库列名称
|
||||
private static final String TABLE_NAME = "yx_express"; // 主键数据库列名称
|
||||
private static final String PK_ID_COLUMN_NAME = "id";
|
||||
// 代码生成策略 true:All/false:SIMPLE
|
||||
private static final boolean GENERATOR_STRATEGY = true;
|
||||
|
Reference in New Issue
Block a user