修改了充值的逻辑 , 修改了登录页的Logo
This commit is contained in:
parent
f84a36c525
commit
6567f30330
@ -1,7 +1,9 @@
|
|||||||
package cn.com.tenlion.operator.controller.resource.packageorder;
|
package cn.com.tenlion.operator.controller.resource.packageorder;
|
||||||
|
|
||||||
|
import cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoAppDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoDTO;
|
import cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoDTO;
|
||||||
import cn.com.tenlion.operator.pojo.vos.packageorder.PackageOrderAppVO;
|
import cn.com.tenlion.operator.pojo.vos.packageorder.PackageOrderAppVO;
|
||||||
|
import cn.com.tenlion.operator.service.packageinfo.IPackageInfoService;
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
@ -38,6 +40,22 @@ public class PackageOrderResourceController extends DefaultBaseController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPackageOrderService packageOrderService;
|
private IPackageOrderService packageOrderService;
|
||||||
|
@Autowired
|
||||||
|
private IPackageInfoService iPackageInfoService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "套餐包详情", notes = "套餐包详情接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||||
|
@ApiImplicitParam(name = "packageInfoId", value = "套餐包ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("getByNo/{packageNo}")
|
||||||
|
public PackageOrderDTO getByNo(@PathVariable("packageNo") String packageNo) {
|
||||||
|
PackageOrderDTO orderDTO = packageOrderService.getByPackageNo(packageNo);
|
||||||
|
PackageInfoAppDTO appDTO = iPackageInfoService.getById(orderDTO.getPackageInfoId());
|
||||||
|
orderDTO.setPackageInfoAppDTO(appDTO);
|
||||||
|
return orderDTO;
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "套餐包详情", notes = "套餐包详情接口")
|
@ApiOperation(value = "套餐包详情", notes = "套餐包详情接口")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ -47,48 +65,52 @@ public class PackageOrderResourceController extends DefaultBaseController {
|
|||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("get/{packageOrderId}")
|
@GetMapping("get/{packageOrderId}")
|
||||||
public PackageOrderDTO get(@PathVariable("packageOrderId") String packageOrderId) {
|
public PackageOrderDTO get(@PathVariable("packageOrderId") String packageOrderId) {
|
||||||
return packageOrderService.get(packageOrderId);
|
PackageOrderDTO orderDTO = packageOrderService.get(packageOrderId);
|
||||||
|
PackageInfoAppDTO appDTO = iPackageInfoService.getById(orderDTO.getPackageInfoId());
|
||||||
|
orderDTO.setPackageInfoAppDTO(appDTO);
|
||||||
|
return orderDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "套餐包删除-订单", notes = "套餐包删除-订单接口")
|
@ApiOperation(value = "套餐包删除-订单", notes = "套餐包删除-订单接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("update-close/{packageNo}")
|
@PostMapping("update-close/{packageNo}")
|
||||||
@CheckRequestBodyAnnotation
|
@CheckRequestBodyAnnotation
|
||||||
public SuccessResult updateClose(@PathVariable String packageNo) {
|
public SuccessResultData<String> updateClose(@PathVariable String packageNo) {
|
||||||
try{
|
try{
|
||||||
packageOrderService.updateClose(packageNo);
|
packageOrderService.updateClose(packageNo);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
throw new UpdateException(e.getMessage());
|
return new SuccessResultData<String>(e.getMessage());
|
||||||
}
|
}
|
||||||
return new SuccessResult();
|
return new SuccessResultData<String>("Success");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "套餐包到账-订单", notes = "套餐包到账-订单接口")
|
@ApiOperation(value = "套餐包到账-订单", notes = "套餐包到账-订单接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("update-pay/{packageNo}")
|
@PostMapping("update-pay/{packageNo}/{packageAccountItem}")
|
||||||
@CheckRequestBodyAnnotation
|
@CheckRequestBodyAnnotation
|
||||||
public SuccessResult updatePay(@PathVariable String packageNo) {
|
public SuccessResultData<String> updatePay(@PathVariable String packageNo, @PathVariable String packageAccountItem) {
|
||||||
try{
|
try{
|
||||||
PackageOrderAppVO packageOrderVO = new PackageOrderAppVO();
|
PackageOrderAppVO packageOrderVO = new PackageOrderAppVO();
|
||||||
|
packageOrderVO.setPackageAccountItem(packageAccountItem);
|
||||||
packageOrderVO.setAccountRechargeId(packageNo);
|
packageOrderVO.setAccountRechargeId(packageNo);
|
||||||
packageOrderService.updateOrder(packageOrderVO);
|
packageOrderService.updateOrder(packageOrderVO);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
throw new UpdateException(e.getMessage());
|
return new SuccessResultData<String>(e.getMessage());
|
||||||
}
|
}
|
||||||
return new SuccessResult();
|
return new SuccessResultData<String>("Success");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增套餐包-订单", notes = "新增套餐包-订单接口")
|
@ApiOperation(value = "新增套餐包-订单", notes = "新增套餐包-订单接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
@CheckRequestBodyAnnotation
|
@CheckRequestBodyAnnotation
|
||||||
public SuccessResult save(@RequestBody PackageOrderAppVO packageOrderVO) {
|
public SuccessResultData<String> save(@RequestBody PackageOrderAppVO packageOrderVO) {
|
||||||
try{
|
try{
|
||||||
packageOrderService.saveOrder(packageOrderVO);
|
packageOrderService.saveOrder(packageOrderVO);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
throw new SaveException(e.getMessage());
|
return new SuccessResultData<String>(e.getMessage());
|
||||||
}
|
}
|
||||||
return new SuccessResult();
|
return new SuccessResultData<String>("Success");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "指定套餐包订单列表", notes = "指定套餐包订单列表接口")
|
@ApiOperation(value = "指定套餐包订单列表", notes = "指定套餐包订单列表接口")
|
||||||
|
@ -16,14 +16,21 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class PackageOrderAppVO {
|
public class PackageOrderAppVO {
|
||||||
|
|
||||||
@ApiModelProperty(name = "packageInfoId", value = "套餐ID")
|
@ApiModelProperty(name = "packageInfoId", value = "套餐ID")
|
||||||
@CheckEmptyAnnotation(name = "套餐ID")
|
|
||||||
private String packageInfoId;
|
private String packageInfoId;
|
||||||
@ApiModelProperty(name = "userId", value = "用户ID")
|
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||||
@CheckEmptyAnnotation(name = "用户ID")
|
|
||||||
private String userId;
|
private String userId;
|
||||||
@ApiModelProperty(name = "accountRechargeId", value = "用户充值记录ID")
|
@ApiModelProperty(name = "accountRechargeId", value = "用户充值记录ID")
|
||||||
@CheckEmptyAnnotation(name = "用户充值记录")
|
|
||||||
private String accountRechargeId;
|
private String accountRechargeId;
|
||||||
|
@ApiModelProperty(name = "accountRechargeId", value = "用户充值记录ID")
|
||||||
|
private String packageAccountItem;
|
||||||
|
|
||||||
|
public String getPackageAccountItem() {
|
||||||
|
return packageAccountItem == null ? "" : packageAccountItem.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackageAccountItem(String packageAccountItem) {
|
||||||
|
this.packageAccountItem = packageAccountItem;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAccountRechargeId() {
|
public String getAccountRechargeId() {
|
||||||
return accountRechargeId == null ? "" : accountRechargeId.trim();
|
return accountRechargeId == null ? "" : accountRechargeId.trim();
|
||||||
|
@ -196,24 +196,12 @@ public class PackageOrderServiceImpl extends DefaultBaseService implements IPack
|
|||||||
if(orderDTO.getPackagePayStatus().equals("1")) { // 当前状态已经是已支付的不做操作
|
if(orderDTO.getPackagePayStatus().equals("1")) { // 当前状态已经是已支付的不做操作
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PackageInfoDTO packageInfoDTO = iPackageInfoService.getByPackageInfoId(packageOrderVO.getPackageInfoId());
|
|
||||||
/**
|
/**
|
||||||
* 1. 创建流水
|
* 1. 更改到账时间 , 状态
|
||||||
*/
|
|
||||||
AccountItemVO vo = new AccountItemVO();
|
|
||||||
vo.setType(2);
|
|
||||||
vo.setMode(2);
|
|
||||||
vo.setAccountId(packageOrderVO.getUserId());
|
|
||||||
vo.setOrderId(orderDTO.getPackageOrderId());
|
|
||||||
vo.setAccountMoney(packageInfoDTO.getPackageMoney());
|
|
||||||
vo.setDescription("购买" + (packageInfoDTO.getPackageType().equals("ALL") ? "全托管" : "写材料" ) + "套餐包 " + packageInfoDTO.getPackageCount() + " 件:" + packageInfoDTO.getPackageName());
|
|
||||||
String accountItemId = iAccountItemService.saveReturnId(vo);
|
|
||||||
/**
|
|
||||||
* 2. 更改到账时间 , 状态
|
|
||||||
*/
|
*/
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("packageNo", packageOrderVO.getAccountRechargeId());// 关联支付
|
params.put("packageNo", packageOrderVO.getAccountRechargeId());// 关联支付
|
||||||
params.put("packageAccountItem", accountItemId); // 关联扣款流水
|
params.put("packageAccountItem", packageOrderVO.getPackageAccountItem()); // 关联扣款流水
|
||||||
params.put("packagePayStatus", "1"); // 已支付
|
params.put("packagePayStatus", "1"); // 已支付
|
||||||
params.put("packagePay", DateUtil.getTime()); // 支付时间
|
params.put("packagePay", DateUtil.getTime()); // 支付时间
|
||||||
packageOrderDao.updatePay(params);
|
packageOrderDao.updatePay(params);
|
||||||
|
@ -11,12 +11,15 @@ import cn.com.tenlion.operator.pojo.bos.accountrecharge.AccountRechargeBO;
|
|||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargeDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargeDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
||||||
|
import cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoDTO;
|
||||||
|
import cn.com.tenlion.operator.pojo.dtos.packageorder.PackageOrderDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.user.info.UserInfoDTO;
|
import cn.com.tenlion.operator.pojo.dtos.user.info.UserInfoDTO;
|
||||||
import cn.com.tenlion.operator.pojo.pos.accountrecharge.AccountRechargePO;
|
import cn.com.tenlion.operator.pojo.pos.accountrecharge.AccountRechargePO;
|
||||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemVO;
|
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemVO;
|
||||||
import cn.com.tenlion.operator.pojo.vos.accountrecharge.AccountRechargeVO;
|
import cn.com.tenlion.operator.pojo.vos.accountrecharge.AccountRechargeVO;
|
||||||
import cn.com.tenlion.operator.pojo.vos.packageorder.PackageOrderAppVO;
|
import cn.com.tenlion.operator.pojo.vos.packageorder.PackageOrderAppVO;
|
||||||
import cn.com.tenlion.operator.properties.SystemApiPathProperties;
|
import cn.com.tenlion.operator.properties.SystemApiPathProperties;
|
||||||
|
import cn.com.tenlion.operator.service.packageinfo.IPackageInfoService;
|
||||||
import cn.com.tenlion.operator.service.packageorder.IPackageOrderService;
|
import cn.com.tenlion.operator.service.packageorder.IPackageOrderService;
|
||||||
import cn.com.tenlion.operator.serviceother.operator.accountitem.IAccountItemService;
|
import cn.com.tenlion.operator.serviceother.operator.accountitem.IAccountItemService;
|
||||||
import cn.com.tenlion.operator.serviceother.operator.accountrecharge.IAccountRechargeService;
|
import cn.com.tenlion.operator.serviceother.operator.accountrecharge.IAccountRechargeService;
|
||||||
@ -392,6 +395,8 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPackageOrderService iPackageOrderService;
|
private IPackageOrderService iPackageOrderService;
|
||||||
|
@Autowired
|
||||||
|
private IPackageInfoService iPackageInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void updateCheck(String accountRechargeId, RechargeCheckEnum check, String checkRemark, String accountItemId, String orderId, String successTime) {
|
public synchronized void updateCheck(String accountRechargeId, RechargeCheckEnum check, String checkRemark, String accountItemId, String orderId, String successTime) {
|
||||||
@ -420,10 +425,25 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
|||||||
AccountRechargeDTO dto = get(accountRechargeId);
|
AccountRechargeDTO dto = get(accountRechargeId);
|
||||||
// 绑定了套餐包 & 已对账 & 已到账
|
// 绑定了套餐包 & 已对账 & 已到账
|
||||||
if(!StringUtils.isEmpty(dto.getPackageInfoId()) && dto.getReconciliationStatus().equals("1") && dto.getRechargeCheck().equals("2")) {
|
if(!StringUtils.isEmpty(dto.getPackageInfoId()) && dto.getReconciliationStatus().equals("1") && dto.getRechargeCheck().equals("2")) {
|
||||||
|
PackageInfoDTO packageInfoDTO = iPackageInfoService.get(dto.getPackageInfoId());
|
||||||
|
PackageOrderDTO orderDTO = iPackageOrderService.getByPackageNo(accountRechargeId);
|
||||||
|
/**
|
||||||
|
* 1. 创建流水
|
||||||
|
*/
|
||||||
|
AccountItemVO vo = new AccountItemVO();
|
||||||
|
vo.setType(2);
|
||||||
|
vo.setMode(2);
|
||||||
|
vo.setAccountId(orderDTO.getCreator());
|
||||||
|
vo.setOrderId(orderDTO.getPackageOrderId());
|
||||||
|
vo.setAccountMoney(packageInfoDTO.getPackageMoney());
|
||||||
|
vo.setDescription("购买" + (packageInfoDTO.getPackageType().equals("ALL") ? "全托管" : "写材料" ) + "套餐包 " + packageInfoDTO.getPackageCount() + " 件:" + packageInfoDTO.getPackageName());
|
||||||
|
String accountItemId1 = iAccountItemService.saveReturnId(vo);
|
||||||
|
|
||||||
PackageOrderAppVO appVO = new PackageOrderAppVO();
|
PackageOrderAppVO appVO = new PackageOrderAppVO();
|
||||||
appVO.setPackageInfoId(dto.getPackageInfoId());
|
appVO.setPackageInfoId(dto.getPackageInfoId());
|
||||||
appVO.setUserId(dto.getCreator());
|
appVO.setUserId(dto.getCreator());
|
||||||
appVO.setAccountRechargeId(dto.getAccountRechargeId());
|
appVO.setAccountRechargeId(dto.getAccountRechargeId());
|
||||||
|
appVO.setPackageAccountItem(accountItemId1);
|
||||||
iPackageOrderService.updateOrder(appVO);
|
iPackageOrderService.updateOrder(appVO);
|
||||||
}
|
}
|
||||||
// 绑定了套餐包 & 已对账 & 已关闭
|
// 绑定了套餐包 & 已对账 & 已关闭
|
||||||
|
@ -176,6 +176,7 @@
|
|||||||
<!-- 套餐包-订单详情 -->
|
<!-- 套餐包-订单详情 -->
|
||||||
<select id="get" parameterType="map" resultMap="packageOrderDTO">
|
<select id="get" parameterType="map" resultMap="packageOrderDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.package_order_id,
|
||||||
t1.package_info_id,
|
t1.package_info_id,
|
||||||
t1.package_total_money,
|
t1.package_total_money,
|
||||||
t1.package_total_count,
|
t1.package_total_count,
|
||||||
@ -183,9 +184,10 @@
|
|||||||
t1.package_total_surplus_count,
|
t1.package_total_surplus_count,
|
||||||
t1.package_no,
|
t1.package_no,
|
||||||
t1.package_pay,
|
t1.package_pay,
|
||||||
t1.package_order_id,
|
|
||||||
t1.package_account_item,
|
t1.package_account_item,
|
||||||
t1.package_pay_status
|
t1.package_pay_status,
|
||||||
|
t1.creator,
|
||||||
|
t1.gmt_create
|
||||||
FROM
|
FROM
|
||||||
operator_package_order t1
|
operator_package_order t1
|
||||||
WHERE
|
WHERE
|
||||||
|
Loading…
Reference in New Issue
Block a user