Commit 5a723c63 by 吕明尚

修改次卡后台管理系统

parent d214bc24
......@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.SecondaryCardLog;
import share.system.domain.vo.SecondaryCardLogVo;
import share.system.service.SecondaryCardLogService;
import javax.servlet.http.HttpServletResponse;
......@@ -32,9 +33,9 @@ public class SecondaryCardLogController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:list')")
@GetMapping("/list")
public TableDataInfo list(SecondaryCardLog secondaryCardLog) {
public TableDataInfo list(SecondaryCardLogVo secondaryCardLog) {
startPage();
List<SecondaryCardLog> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
return getDataTable(list);
}
......@@ -44,9 +45,9 @@ public class SecondaryCardLogController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:secondaryCardLog:export')")
@Log(title = "次卡使用记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SecondaryCardLog secondaryCardLog) {
List<SecondaryCardLog> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
ExcelUtil<SecondaryCardLog> util = new ExcelUtil<SecondaryCardLog>(SecondaryCardLog.class);
public void export(HttpServletResponse response, SecondaryCardLogVo secondaryCardLog) {
List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
ExcelUtil<SecondaryCardLogVo> util = new ExcelUtil<SecondaryCardLogVo>(SecondaryCardLogVo.class);
util.exportExcel(response, list, "次卡使用记录数据");
}
......
......@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.SecondaryCardOrder;
import share.system.domain.vo.SecondaryCardOrderVo;
import share.system.service.SecondaryCardOrderService;
import javax.servlet.http.HttpServletResponse;
......@@ -32,9 +33,9 @@ public class SecondaryCardOrderController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:list')")
@GetMapping("/list")
public TableDataInfo list(SecondaryCardOrder secondaryCardOrder) {
public TableDataInfo list(SecondaryCardOrderVo secondaryCardOrder) {
startPage();
List<SecondaryCardOrder> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
List<SecondaryCardOrderVo> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
return getDataTable(list);
}
......@@ -44,9 +45,9 @@ public class SecondaryCardOrderController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:secondaryCardOrder:export')")
@Log(title = "次卡购买记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SecondaryCardOrder secondaryCardOrder) {
List<SecondaryCardOrder> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
ExcelUtil<SecondaryCardOrder> util = new ExcelUtil<SecondaryCardOrder>(SecondaryCardOrder.class);
public void export(HttpServletResponse response, SecondaryCardOrderVo secondaryCardOrder) {
List<SecondaryCardOrderVo> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
ExcelUtil<SecondaryCardOrderVo> util = new ExcelUtil<SecondaryCardOrderVo>(SecondaryCardOrderVo.class);
util.exportExcel(response, list, "次卡购买记录数据");
}
......
......@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import share.common.core.controller.BaseController;
import share.common.core.page.TableDataInfo;
import share.system.domain.SecondaryCardLog;
import share.system.domain.vo.SecondaryCardLogVo;
import share.system.service.SecondaryCardLogService;
import java.util.List;
......@@ -27,9 +27,9 @@ public class SecondaryCardLogController extends BaseController {
* 查询次卡使用记录列表
*/
@GetMapping("/list")
public TableDataInfo list(SecondaryCardLog secondaryCardLog) {
public TableDataInfo list(SecondaryCardLogVo secondaryCardLog) {
startPage();
List<SecondaryCardLog> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
return getDataTable(list);
}
......
......@@ -9,7 +9,7 @@ import share.common.core.domain.R;
import share.common.core.page.TableDataInfo;
import share.common.core.redis.RedisUtil;
import share.common.utils.JsonConvertUtil;
import share.system.domain.SecondaryCardOrder;
import share.system.domain.vo.SecondaryCardOrderVo;
import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse;
import share.system.service.SecondaryCardOrderService;
......@@ -35,9 +35,9 @@ public class SecondaryCardOrderController extends BaseController {
* 查询次卡购买记录列表
*/
@GetMapping("/list")
public TableDataInfo list(SecondaryCardOrder secondaryCardOrder) {
public TableDataInfo list(SecondaryCardOrderVo secondaryCardOrder) {
startPage();
List<SecondaryCardOrder> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
List<SecondaryCardOrderVo> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
return getDataTable(list);
}
......
......@@ -15,4 +15,8 @@ public class SecondaryCardLogVo extends SecondaryCardLog {
private String packName;
//套餐金额
private BigDecimal packPrice;
//配置名称
private String confName;
//次卡金额
private BigDecimal confAmount;
}
......@@ -2,6 +2,7 @@ package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SecondaryCardLog;
import share.system.domain.vo.SecondaryCardLogVo;
import java.util.List;
......@@ -26,7 +27,7 @@ public interface SecondaryCardLogMapper extends BaseMapper<SecondaryCardLog> {
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录集合
*/
public List<SecondaryCardLog> selectSecondaryCardLogList(SecondaryCardLog secondaryCardLog);
public List<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo secondaryCardLog);
/**
* 新增次卡使用记录
......
......@@ -2,6 +2,7 @@ package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.SecondaryCardOrder;
import share.system.domain.vo.SecondaryCardOrderVo;
import java.util.List;
......@@ -26,7 +27,7 @@ public interface SecondaryCardOrderMapper extends BaseMapper<SecondaryCardOrder>
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录集合
*/
public List<SecondaryCardOrder> selectSecondaryCardOrderList(SecondaryCardOrder secondaryCardOrder);
public List<SecondaryCardOrderVo> selectSecondaryCardOrderList(SecondaryCardOrderVo secondaryCardOrder);
/**
* 新增次卡购买记录
......
......@@ -2,6 +2,7 @@ package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SecondaryCardLog;
import share.system.domain.vo.SecondaryCardLogVo;
import java.util.List;
......@@ -26,7 +27,7 @@ public interface SecondaryCardLogService extends IService<SecondaryCardLog> {
* @param secondaryCardLog 次卡使用记录
* @return 次卡使用记录集合
*/
public List<SecondaryCardLog> selectSecondaryCardLogList(SecondaryCardLog secondaryCardLog);
public List<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo secondaryCardLog);
/**
* 新增次卡使用记录
......
......@@ -2,6 +2,7 @@ package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.SecondaryCardOrder;
import share.system.domain.vo.SecondaryCardOrderVo;
import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse;
......@@ -28,7 +29,7 @@ public interface SecondaryCardOrderService extends IService<SecondaryCardOrder>
* @param secondaryCardOrder 次卡购买记录
* @return 次卡购买记录集合
*/
public List<SecondaryCardOrder> selectSecondaryCardOrderList(SecondaryCardOrder secondaryCardOrder);
public List<SecondaryCardOrderVo> selectSecondaryCardOrderList(SecondaryCardOrderVo secondaryCardOrder);
/**
* 新增次卡购买记录
......
......@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.common.utils.DateUtils;
import share.system.domain.SecondaryCardLog;
import share.system.domain.vo.SecondaryCardLogVo;
import share.system.mapper.SecondaryCardLogMapper;
import share.system.service.SecondaryCardLogService;
......@@ -39,7 +40,7 @@ public class SecondaryCardLogServiceImpl extends ServiceImpl<SecondaryCardLogMap
* @return 次卡使用记录
*/
@Override
public List<SecondaryCardLog> selectSecondaryCardLogList(SecondaryCardLog secondaryCardLog) {
public List<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo secondaryCardLog) {
return secondaryCardLogMapper.selectSecondaryCardLogList(secondaryCardLog);
}
......
......@@ -15,6 +15,7 @@ import share.system.domain.SConsumer;
import share.system.domain.SecondaryCardConf;
import share.system.domain.SecondaryCardOrder;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.SecondaryCardOrderVo;
import share.system.mapper.SecondaryCardOrderMapper;
import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse;
......@@ -60,7 +61,7 @@ public class SecondaryCardOrderServiceImpl extends ServiceImpl<SecondaryCardOrde
* @return 次卡购买记录
*/
@Override
public List<SecondaryCardOrder> selectSecondaryCardOrderList(SecondaryCardOrder secondaryCardOrder) {
public List<SecondaryCardOrderVo> selectSecondaryCardOrderList(SecondaryCardOrderVo secondaryCardOrder) {
return secondaryCardOrderMapper.selectSecondaryCardOrderList(secondaryCardOrder);
}
......
......@@ -54,12 +54,11 @@
c.remark
from s_secondary_card_conf c join s_pack p on c.pack_id = p.id
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="secondaryCardAmount != null ">and secondary_card_amount = #{secondaryCardAmount}</if>
<if test="packId != null ">and pack_id = #{packId}</if>
<if test="validityPeriod != null ">and validity_period = #{validityPeriod}</if>
<if test="number != null ">and number = #{number}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if>
<if test="name != null and name != ''">and c.name like concat('%', #{name}, '%')</if>
<if test="secondaryCardAmount != null ">and c.secondary_card_amount = #{secondaryCardAmount}</if>
<if test="packId != null ">and c.pack_id = #{packId}</if>
<if test="validityPeriod != null ">and c.validity_period = #{validityPeriod}</if>
<if test="number != null ">and c.number = #{number}</if>
</where>
</select>
......
......@@ -7,6 +7,8 @@
<resultMap type="SecondaryCardLogVo" id="SecondaryCardLogResult">
<result property="id" column="id"/>
<result property="consumerSecondaryCardId" column="consumer_secondary_card_id"/>
<result property="confName" column="conf_name"/>
<result property="confAmount" column="conf_amount"/>
<result property="consumerId" column="consumer_id"/>
<result property="nickName" column="nick_name"/>
<result property="avatar" column="avatar"/>
......@@ -41,16 +43,18 @@
from s_secondary_card_log
</sql>
<select id="selectSecondaryCardLogList" parameterType="SecondaryCardLog" resultMap="SecondaryCardLogResult">
<select id="selectSecondaryCardLogList" parameterType="SecondaryCardLogVo" resultMap="SecondaryCardLogResult">
select l.id,
l.consumer_secondary_card_id,
c1.name as 'conf_name',
c1.secondary_card_amount as 'conf_amount',
l. consumer_id,
c.name as nick_name,
c.nick_name as 'nick_name',
c.avatar,
l.phone,
l.pack_id,
p.name as pack_name,
p.price as pack_price,
p.name as 'pack_name',
p.price as 'pack_price',
l.usage_count,
l.residue_count,
l.is_delete,
......@@ -60,6 +64,8 @@
l.update_time,
l.remark
from s_secondary_card_log l join s_pack p on l.pack_id = p.id join s_consumer c on l.consumer_id = c.id
join s_consumer_secondary_card s on l.consumer_secondary_card_id = s.id join s_secondary_card_conf c1 on
s.secondary_card_conf_id = c1.id
<where>
<if test="consumerSecondaryCardId != null ">and l.consumer_secondary_card_id = #{consumerSecondaryCardId}
</if>
......
......@@ -4,15 +4,21 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.SecondaryCardOrderMapper">
<resultMap type="SecondaryCardOrder" id="SecondaryCardOrderResult">
<resultMap type="SecondaryCardOrderVo" id="SecondaryCardOrderResult">
<result property="id" column="id"/>
<result property="secondaryCardNo" column="secondary_card_no"/>
<result property="outTradeNo" column="out_trade_no"/>
<result property="terminalTrace" column="terminal_trace"/>
<result property="secondaryCardAmount" column="secondary_card_amount"/>
<result property="secondaryCardConfId" column="secondary_card_conf_id"/>
<result property="confName" column="conf_name"/>
<result property="confAmount" column="conf_amount"/>
<result property="consumerId" column="consumer_id"/>
<result property="nickName" column="nick_name"/>
<result property="avatar" column="avatar"/>
<result property="phone" column="phone"/>
<result property="packName" column="pack_name"/>
<result property="packPrice" column="pack_price"/>
<result property="payType" column="pay_type"/>
<result property="payStatus" column="pay_status"/>
<result property="payTime" column="pay_time"/>
......@@ -46,7 +52,31 @@
</sql>
<select id="selectSecondaryCardOrderList" parameterType="SecondaryCardOrder" resultMap="SecondaryCardOrderResult">
<include refid="selectSecondaryCardOrderVo"/>
select o.id,
o.secondary_card_no,
o.out_trade_no,
o.terminal_trace,
o. secondary_card_amount,
o. secondary_card_conf_id,
c.name as 'conf_name',
c.secondary_card_amount as 'conf_amount',
p.name as pack_name,
p.price as pack_price,
o. consumer_id,
c1.nick_name as 'nick_name',
c1.avatar,
o. phone,
o. pay_type,
o. pay_status,
o. pay_time,
o. is_delete,
o. create_by,
o. create_time,
o. update_by,
o. update_time,
o. remark
from s_secondary_card_order o join s_secondary_card_conf c on o.secondary_card_conf_id = c.id
join s_consumer c1 on o.consumer_id = c1.id join s_pack p on p.id = c.pack_id
<where>
<if test="secondaryCardNo != null and secondaryCardNo != ''">and secondary_card_no = #{secondaryCardNo}
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment