微信支付回调优化
This commit is contained in:
parent
fd71a1ac61
commit
86b0893d8b
|
|
@ -30,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,7 +66,11 @@ public class ApiWxPayController extends BaseController {
|
||||||
TrainCourseUser courseUser = new TrainCourseUser();
|
TrainCourseUser courseUser = new TrainCourseUser();
|
||||||
courseUser.setVipUserId(vipUserOrders.getVipUserId());
|
courseUser.setVipUserId(vipUserOrders.getVipUserId());
|
||||||
courseUser.setTrainCourseId(vipUserOrders.getTrainCourseId());
|
courseUser.setTrainCourseId(vipUserOrders.getTrainCourseId());
|
||||||
trainCourseUserService.insert(courseUser);
|
courseUser.setDelFlag("0");
|
||||||
|
courseUser.setCreateDate(new Date());
|
||||||
|
courseUser.setUpdateDate(new Date());
|
||||||
|
courseUser.setRemarks("微信支付成功回调,订单ID:"+vipUserOrders.getId());
|
||||||
|
trainCourseUserService.insertSelectiveNormal(courseUser);
|
||||||
}
|
}
|
||||||
return WxPayNotifyResponse.success("成功");
|
return WxPayNotifyResponse.success("成功");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,18 +52,31 @@ public abstract interface AbstractBaseService<T> {
|
||||||
public Long selectCount(T entity);
|
public Long selectCount(T entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存(并且自动给填充用户信息)
|
||||||
* @param entity
|
* @param entity
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insert(T entity);
|
public int insert(T entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存不为null的数据
|
* 保存不为null的数据(并且自动给填充用户信息)
|
||||||
* @param entity
|
* @param entity
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertSelective(T entity);
|
public int insertSelective(T entity);
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int insertNormal(T entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存不为null的数据
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int insertSelectiveNormal(T entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除符合条件的数据
|
* 删除符合条件的数据
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,14 @@ public abstract class AbstractBaseServiceImpl<M extends MyMapper<T>, T> implemen
|
||||||
EntityUtils.setCreateAndUpdateInfo(entity);
|
EntityUtils.setCreateAndUpdateInfo(entity);
|
||||||
return mapper.insertSelective(entity);
|
return mapper.insertSelective(entity);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public int insertNormal(T entity) {
|
||||||
|
return mapper.insert(entity);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int insertSelectiveNormal(T entity) {
|
||||||
|
return mapper.insertSelective(entity);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int delete(T entity) {
|
public int delete(T entity) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue