Commit 285a39b2 by 吕明尚

修改后台管理系统

parent e190b028
......@@ -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.Recharge;
import share.system.domain.vo.RechargeVo;
import share.system.service.RechargeService;
import javax.servlet.http.HttpServletResponse;
......@@ -32,9 +33,9 @@ public class RechargeController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:recharge:list')")
@GetMapping("/list")
public TableDataInfo list(Recharge recharge) {
public TableDataInfo list(RechargeVo recharge) {
startPage();
List<Recharge> list = rechargeService.selectRechargeList(recharge);
List<RechargeVo> list = rechargeService.selectRechargeList(recharge);
return getDataTable(list);
}
......@@ -44,9 +45,9 @@ public class RechargeController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:recharge:export')")
@Log(title = "充值记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Recharge recharge) {
List<Recharge> list = rechargeService.selectRechargeList(recharge);
ExcelUtil<Recharge> util = new ExcelUtil<Recharge>(Recharge.class);
public void export(HttpServletResponse response, RechargeVo recharge) {
List<RechargeVo> list = rechargeService.selectRechargeList(recharge);
ExcelUtil<RechargeVo> util = new ExcelUtil<RechargeVo>(RechargeVo.class);
util.exportExcel(response, list, "充值记录数据");
}
......
......@@ -14,6 +14,7 @@ import share.common.enums.BusinessType;
import share.common.utils.JsonConvertUtil;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.Recharge;
import share.system.domain.vo.RechargeVo;
import share.system.request.CreateRechargeRequest;
import share.system.response.RechargePayResultResponse;
import share.system.service.RechargeService;
......@@ -40,9 +41,9 @@ public class RechargeController extends BaseController {
* 查询充值记录列表
*/
@GetMapping("/list")
public TableDataInfo list(Recharge recharge) {
public TableDataInfo list(RechargeVo recharge) {
startPage();
List<Recharge> list = rechargeService.selectRechargeList(recharge);
List<RechargeVo> list = rechargeService.selectRechargeList(recharge);
return getDataTable(list);
}
......@@ -51,9 +52,9 @@ public class RechargeController extends BaseController {
*/
@Log(title = "充值记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Recharge recharge) {
List<Recharge> list = rechargeService.selectRechargeList(recharge);
ExcelUtil<Recharge> util = new ExcelUtil<Recharge>(Recharge.class);
public void export(HttpServletResponse response, RechargeVo recharge) {
List<RechargeVo> list = rechargeService.selectRechargeList(recharge);
ExcelUtil<RechargeVo> util = new ExcelUtil<RechargeVo>(RechargeVo.class);
util.exportExcel(response, list, "充值记录数据");
}
......
......@@ -79,8 +79,8 @@ public class EquityMembersOrder extends BaseEntity {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date payTime;
/**
......
......@@ -91,8 +91,8 @@ public class Recharge extends BaseEntity {
/**
* 充值时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "充值时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "充值时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date rechargeDate;
/**
......@@ -118,8 +118,8 @@ public class Recharge extends BaseEntity {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date payTime;
......
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.Recharge;
@Data
public class RechargeVo extends Recharge {
private String nickName;
private String avatar;
}
......@@ -2,6 +2,7 @@ package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.Recharge;
import share.system.domain.vo.RechargeVo;
import java.util.List;
......@@ -26,7 +27,7 @@ public interface RechargeMapper extends BaseMapper<Recharge> {
* @param recharge 充值记录
* @return 充值记录集合
*/
public List<Recharge> selectRechargeList(Recharge recharge);
public List<RechargeVo> selectRechargeList(RechargeVo recharge);
/**
* 新增充值记录
......
......@@ -2,6 +2,7 @@ package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.Recharge;
import share.system.domain.vo.RechargeVo;
import share.system.request.CreateRechargeRequest;
import share.system.response.RechargePayResultResponse;
......@@ -28,7 +29,7 @@ public interface RechargeService extends IService<Recharge> {
* @param recharge 充值记录
* @return 充值记录集合
*/
public List<Recharge> selectRechargeList(Recharge recharge);
public List<RechargeVo> selectRechargeList(RechargeVo recharge);
/**
* 新增充值记录
......
......@@ -15,6 +15,7 @@ import share.common.utils.DateUtils;
import share.common.utils.bean.BeanUtils;
import share.system.domain.*;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.RechargeVo;
import share.system.mapper.RechargeMapper;
import share.system.request.CreateRechargeRequest;
import share.system.response.RechargePayResultResponse;
......@@ -65,7 +66,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
* @return 充值记录
*/
@Override
public List<Recharge> selectRechargeList(Recharge recharge) {
public List<RechargeVo> selectRechargeList(RechargeVo recharge) {
return rechargeMapper.selectRechargeList(recharge);
}
......
......@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.RechargeMapper">
<resultMap type="Recharge" id="RechargeResult">
<resultMap type="RechargeVo" id="RechargeResult">
<result property="id" column="id"/>
<result property="rechargeNo" column="recharge_no"/>
<result property="rechargeAmount" column="recharge_amount"/>
......@@ -15,6 +15,8 @@
<result property="consumerCouponIds" column="consumer_coupon_ids"/>
<result property="rechargeConfId" column="recharge_conf_id"/>
<result property="consumerId" column="consumer_id"/>
<result property="nickName" column="nick_name"/>
<result property="avatar" column="avatar"/>
<result property="phone" column="phone"/>
<result property="rechargeDate" column="recharge_date"/>
<result property="isDelete" column="is_delete"/>
......@@ -53,26 +55,53 @@
from s_recharge
</sql>
<select id="selectRechargeList" parameterType="Recharge" resultMap="RechargeResult">
<include refid="selectRechargeVo"/>
<select id="selectRechargeList" parameterType="RechargeVo" resultMap="RechargeResult">
select r.id,
r.recharge_no,
r.recharge_amount,
r.pay_type,
r.give_amount,
r.give_type,
r. status,
r.consumer_coupon_ids,
r.recharge_conf_id,
r. consumer_id,
c.nick_name,
c.avatar,
r. phone,
r. recharge_date,
r. is_delete,
r. create_by,
r. create_time,
r. update_by,
r.update_time,
r. remark,
r. out_trade_no,
r.terminal_trace,
r.pay_time
from s_recharge r join s_consumer c on r.consumer_id = c.id
<where>
<if test="rechargeNo != null and rechargeNo != ''">and recharge_no = #{rechargeNo}</if>
<if test="rechargeAmount != null ">and recharge_amount = #{rechargeAmount}</if>
<if test="payType != null ">and pay_type = #{payType}</if>
<if test="giveAmount != null ">and give_amount = #{giveAmount}</if>
<if test="giveType != null and giveType != ''">and give_type = #{giveType}</if>
<if test="status != null ">and status = #{status}</if>
<if test="consumerCouponIds != null and consumerCouponIds != ''">and consumer_coupon_ids =
<if test="nickName != null and nickName != ''">and c.nick_name like concat('%', #{nickName},'%')
</if>
<if test="phone != null and phone != ''">and r.phone like concat('%', #{phone},'%')
</if>
<if test="rechargeNo != null and rechargeNo != ''">and r.recharge_no = #{rechargeNo}</if>
<if test="rechargeAmount != null ">and r.recharge_amount = #{rechargeAmount}</if>
<if test="payType != null ">and r.pay_type = #{payType}</if>
<if test="giveAmount != null ">and r.give_amount = #{giveAmount}</if>
<if test="giveType != null and giveType != ''">and r.give_type = #{giveType}</if>
<if test="status != null ">and r.status = #{status}</if>
<if test="consumerCouponIds != null and consumerCouponIds != ''">and r.consumer_coupon_ids =
#{consumerCouponIds}
</if>
<if test="rechargeConfId != null ">and recharge_conf_id = #{rechargeConfId}</if>
<if test="consumerId != null ">and consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="rechargeDate != null ">and recharge_date = #{rechargeDate}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if>
<if test="outTradeNo != null and outTradeNo != ''">and out_trade_no = #{outTradeNo}</if>
<if test="terminalTrace != null and terminalTrace != ''">and terminal_trace = #{terminalTrace}</if>
<if test="payTime != null ">and pay_time = #{payTime}</if>
<if test="rechargeConfId != null ">and r.recharge_conf_id = #{rechargeConfId}</if>
<if test="consumerId != null ">and r.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and r.phone = #{phone}</if>
<if test="rechargeDate != null ">and r.recharge_date = #{rechargeDate}</if>
<if test="isDelete != null ">and r.is_delete = #{isDelete}</if>
<if test="outTradeNo != null and outTradeNo != ''">and r.out_trade_no = #{outTradeNo}</if>
<if test="terminalTrace != null and terminalTrace != ''">and r.terminal_trace = #{terminalTrace}</if>
<if test="payTime != null ">and r.pay_time = #{payTime}</if>
</where>
</select>
......
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