| @@ -0,0 +1,57 @@ | |||||
| package com.iformall.controller.market; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.domain.po.WxActivity; | |||||
| import com.iformall.domain.po.WxCarPayOrder; | |||||
| import com.iformall.enums.EnumActivityStatus; | |||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.service.WxActivityService; | |||||
| import com.iformall.service.park.pay.WxParkPayService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| @RestController | |||||
| @RequestMapping("wxCarPayOrder") | |||||
| @Api(description = "停车支付订单") | |||||
| public class WxCarPayOrderController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxParkPayService wxParkPayService; | |||||
| @ApiOperation("分页列表接口") | |||||
| @GetMapping("list") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData list(@ModelAttribute WxCarPayOrder wxCarPayOrder, Integer pageNum, Integer pageSize) { | |||||
| if (null == wxCarPayOrder) wxCarPayOrder = new WxCarPayOrder(); | |||||
| wxCarPayOrder.updateTenantInfo(getTenantInfo()); | |||||
| wxCarPayOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| final PageInfo<WxCarPayOrder> page = wxParkPayService.listPayOrderAsPage(wxCarPayOrder, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @ApiOperation("总和") | |||||
| @GetMapping("sum") | |||||
| public ResultData sum(@ModelAttribute WxCarPayOrder wxCarPayOrder) { | |||||
| if (null == wxCarPayOrder) wxCarPayOrder = new WxCarPayOrder(); | |||||
| wxCarPayOrder.updateTenantInfo(getTenantInfo()); | |||||
| Integer total = wxParkPayService.sumCarPayOrder(wxCarPayOrder); | |||||
| return new ResultData(total); | |||||
| } | |||||
| } | |||||
| @@ -52,4 +52,9 @@ public class WxCarPayOrder extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer notifyCountLimit; | private Integer notifyCountLimit; | ||||
| @TableField(exist = false) | |||||
| private Date begin; | |||||
| @TableField(exist = false) | |||||
| private Date end; | |||||
| } | } | ||||
| @@ -15,4 +15,6 @@ public interface WxCarPayOrderMapper extends CommonMapper<WxCarPayOrder, Long> { | |||||
| WxCarPayOrder findOneByParkOderNo(@Param("parkOrderNo")String parkOrderNo,@Param("tenantId")String tenantId); | WxCarPayOrder findOneByParkOderNo(@Param("parkOrderNo")String parkOrderNo,@Param("tenantId")String tenantId); | ||||
| Integer sum(WxCarPayOrder wxCarPayOrder); | |||||
| } | } | ||||
| @@ -24,5 +24,7 @@ public interface WxParkPayService { | |||||
| Integer fee,Date paidTime,String transcationId,String merchantAccount,Long merchantId,String merchantName) throws Exception; | Integer fee,Date paidTime,String transcationId,String merchantAccount,Long merchantId,String merchantName) throws Exception; | ||||
| public WxCarPayOrder detailWxCarPayOrder(Long id,String tenantId); | public WxCarPayOrder detailWxCarPayOrder(Long id,String tenantId); | ||||
| public Integer sumCarPayOrder(WxCarPayOrder record); | |||||
| } | } | ||||
| @@ -248,4 +248,9 @@ public class WxParkPayServiceImpl implements WxParkPayService { | |||||
| return wxCarPayOrderMapper.selectById(id, tenantId); | return wxCarPayOrderMapper.selectById(id, tenantId); | ||||
| } | } | ||||
| @Override | |||||
| public Integer sumCarPayOrder(WxCarPayOrder record) { | |||||
| return wxCarPayOrderMapper.sum(record); | |||||
| } | |||||
| } | } | ||||
| @@ -95,6 +95,14 @@ | |||||
| and `car_vendor` <= #{carVendor} | and `car_vendor` <= #{carVendor} | ||||
| </if> | </if> | ||||
| <if test=" null != begin "> | |||||
| and `create_time` >= #{begin} | |||||
| </if> | |||||
| <if test=" null != end "> | |||||
| and `create_time` <= #{end} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -120,5 +128,11 @@ | |||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_car_pay_order where tenant_id = #{tenantId} and `park_order_no` = #{parkOrderNo} | from wx_car_pay_order where tenant_id = #{tenantId} and `park_order_no` = #{parkOrderNo} | ||||
| </select> | </select> | ||||
| <select id="sum" parameterType="com.iformall.domain.po.WxCarPayOrder" resultType="Integer"> | |||||
| select sum(pay_amount) | |||||
| from wx_car_pay_order | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||