| @@ -69,15 +69,15 @@ public class WxPayOrderController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("根据id删除接口") | |||||
| @GetMapping("/del") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| @SystemControllerLog(description = "支付订单-删除") | |||||
| public ResultData delete(Long id) { | |||||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::delete"); | |||||
| wxPayOrderService.deleteById(id); | |||||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||||
| } | |||||
| // @ApiOperation("根据id删除接口") | |||||
| // @GetMapping("/del") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // @SystemControllerLog(description = "支付订单-删除") | |||||
| // public ResultData delete(Long id) { | |||||
| // logger.debug("[" + getIpAddr() + "] WxPayOrderController::delete"); | |||||
| // wxPayOrderService.deleteById(id); | |||||
| // return new ResultData(Result.SUCCESS, "删除成功", null); | |||||
| // } | |||||
| @ApiOperation("根据id查询接口") | @ApiOperation("根据id查询接口") | ||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| @@ -85,7 +85,7 @@ public class WxPayOrderController extends BaseController { | |||||
| @SystemControllerLog(description = "支付订单-查询") | @SystemControllerLog(description = "支付订单-查询") | ||||
| public ResultData findById(Long id) { | public ResultData findById(Long id) { | ||||
| logger.debug("[" + getIpAddr() + "] WxPayOrderController::findById"); | logger.debug("[" + getIpAddr() + "] WxPayOrderController::findById"); | ||||
| return new ResultData(Result.SUCCESS, "查询成功", wxPayOrderService.getById(id)); | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxPayOrderService.getById(id,getTenantInfo().getTenantId())); | |||||
| } | } | ||||
| @ApiOperation(value = "更新支付订单状态", notes = "{\"payOrderId\":\"string\",\"orderId\":\"string\",\"status\":integer,\"reason\":\"string\"}") | @ApiOperation(value = "更新支付订单状态", notes = "{\"payOrderId\":\"string\",\"orderId\":\"string\",\"status\":integer,\"reason\":\"string\"}") | ||||
| @@ -215,7 +215,7 @@ public class WxMicroPayController extends BaseController { | |||||
| // record.setBUserId(getUser().getId()); | // record.setBUserId(getUser().getId()); | ||||
| // record.setOrderId(orderId); | // record.setOrderId(orderId); | ||||
| WxPayOrder po = wxPayOrderService.getById(payOrderId); | |||||
| WxPayOrder po = wxPayOrderService.getById(payOrderId,getTenantInfo().getTenantId()); | |||||
| if (null == po) { | if (null == po) { | ||||
| return new ResultData(ErrorCode.PAY_ORDER_NOT_FOUND); | return new ResultData(ErrorCode.PAY_ORDER_NOT_FOUND); | ||||
| } | } | ||||
| @@ -179,7 +179,7 @@ public class WxPayOrderController extends BaseController { | |||||
| logger.error("/api/pay/updatePayOrder error : payOrderId不能为空: " + paramMap.toString()); | logger.error("/api/pay/updatePayOrder error : payOrderId不能为空: " + paramMap.toString()); | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "payOrderId非法"+payOrderId+"[payOrderIdStr:"+payOrderIdStr+"]"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "payOrderId非法"+payOrderId+"[payOrderIdStr:"+payOrderIdStr+"]"); | ||||
| } | } | ||||
| payOrder = wxPayOrderService.getById(payOrderId); | |||||
| payOrder = wxPayOrderService.getById(payOrderId,payOrder.getTenantId()); | |||||
| if (null == payOrder) { | if (null == payOrder) { | ||||
| return new ResultData(ErrorCode.PAY_ORDER_ERROR, "未查询到payOrder."); | return new ResultData(ErrorCode.PAY_ORDER_ERROR, "未查询到payOrder."); | ||||
| } | } | ||||
| @@ -269,19 +269,19 @@ public class WxPayOrderController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("根据id删除接口") | |||||
| @GetMapping("/del") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData delete(Long id) { | |||||
| wxPayOrderService.deleteById(id); | |||||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||||
| } | |||||
| // @ApiOperation("根据id删除接口") | |||||
| // @GetMapping("/del") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData delete(Long id) { | |||||
| // wxPayOrderService.deleteById(id); | |||||
| // return new ResultData(Result.SUCCESS, "删除成功", null); | |||||
| // } | |||||
| @ApiOperation("根据id查询接口") | @ApiOperation("根据id查询接口") | ||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| public ResultData findById(Long id) { | public ResultData findById(Long id) { | ||||
| return new ResultData(Result.SUCCESS, "查询成功", wxPayOrderService.getById(id)); | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxPayOrderService.getById(id,getTenantInfo().getTenantId())); | |||||
| } | } | ||||
| @@ -1,12 +1,17 @@ | |||||
| package com.iformall.mapper; | package com.iformall.mapper; | ||||
| import java.util.*; | import java.util.*; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxPayOrder; | import com.iformall.domain.po.WxPayOrder; | ||||
| import com.iformall.domain.vo.WxPayOrderVo; | import com.iformall.domain.vo.WxPayOrderVo; | ||||
| public interface WxPayOrderMapper extends CommonMapper<WxPayOrder, Long> { | public interface WxPayOrderMapper extends CommonMapper<WxPayOrder, Long> { | ||||
| WxPayOrder selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| List<WxPayOrder> findList(WxPayOrder wxPayOrder); | List<WxPayOrder> findList(WxPayOrder wxPayOrder); | ||||
| //List<WxPayOrderVo> findListOfPaidOrderByDate(Map dateMap); | //List<WxPayOrderVo> findListOfPaidOrderByDate(Map dateMap); | ||||
| @@ -131,7 +131,7 @@ public interface WxPayOrderService { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| WxPayOrder getById(Long id); | |||||
| WxPayOrder getById(Long id,String tenantId); | |||||
| /** | /** | ||||
| * 根据obj获得实体 | * 根据obj获得实体 | ||||
| @@ -148,7 +148,7 @@ public interface WxPayOrderService { | |||||
| * | * | ||||
| * @param id | * @param id | ||||
| */ | */ | ||||
| void deleteById(Long id); | |||||
| //void deleteById(Long id); | |||||
| public boolean isOrderGroupCoupon(WxPayOrder record, WxCoupon wxCoupon); | public boolean isOrderGroupCoupon(WxPayOrder record, WxCoupon wxCoupon); | ||||
| @@ -1204,8 +1204,8 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public WxPayOrder getById(Long id) { | |||||
| return wxPayOrderMapper.selectById(id); | |||||
| public WxPayOrder getById(Long id,String tenantId) { | |||||
| return wxPayOrderMapper.selectById(id,tenantId); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -1229,10 +1229,10 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public void deleteById(Long id) { | |||||
| wxPayOrderMapper.deleteById(id); | |||||
| } | |||||
| // @Override | |||||
| // public void deleteById(Long id) { | |||||
| // wxPayOrderMapper.deleteById(id); | |||||
| // } | |||||
| @@ -142,6 +142,10 @@ | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | <if test=" null != sortColumns">order by ${sortColumns}</if> | ||||
| </sql> | </sql> | ||||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||||
| select <include refid="allColumns"/> from wx_pay_order where id = #{id} and tenant_id = #{tenantId} | |||||
| </select> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxPayOrder" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.WxPayOrder" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||