Commit dc063b1d authored by licc's avatar licc

修改用户充值记录列表接口

parent a96484cf
......@@ -18,6 +18,13 @@ public interface CardMapper extends BaseMapper<CardInfo> {
*/
int add(List<CardInfo> cardInfos);
/**
* 编辑
* @param cardInfo 信息
* @return 结果
*/
int edit(CardInfo cardInfo);
/**
* 根据密码获取充值卡信息
*
......
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.LoginRecord;
import cn.wisenergy.model.app.PayRecord;
import cn.wisenergy.model.vo.PayRecordShowVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -9,6 +8,9 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @author 86187
*/
public interface PayRecordMapper extends BaseMapper<PayRecord> {
int add(PayRecord payRecord);
......
......@@ -72,6 +72,17 @@
</foreach>
</insert>
<update id="edit" parameterType="cn.wisenergy.model.app.CardInfo">
UPDATE
<include refid="table"/>
<set>
<include refid="updateCondition"/>
</set>
<where>
id = #{id}
</where>
</update>
<select id="getBySecretKey" resultType="cn.wisenergy.model.app.CardInfo">
select
<include refid="cols_all"/>
......
......@@ -63,7 +63,7 @@
</insert>
<select id="getList" resultType="cn.wisenergy.model.vo.PayRecordShowVo">
select
<include refid="cols_all"/>
id as recordId,type,result,pay_limit as `limit`,create_time as payTime
from
<include refid="table"/>
<where>
......@@ -89,8 +89,10 @@
</select>
<select id="getById" resultMap="advertisingMap">
select <include refid="cols_all"/>
from <include refid="table"/>
select
<include refid="cols_all"/>
from
<include refid="table"/>
<where>
user_id=#{userId}
and
......
package cn.wisenergy.model.dto;
import cn.wisenergy.model.app.ScoreInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -12,6 +11,7 @@ import java.util.Date;
* @ Description: 用户列表展示dto
* @ Author : 86187
* @ Date : 2021/1/7 10:47
* @author 86187
*/
@Data
@ApiModel(value = "UserInfoDto")
......
......@@ -44,7 +44,7 @@ public class PayRecordShowVo implements Serializable {
* 充值时间
*/
@ApiModelProperty(value = "充值时间",name = "payTime")
private Integer payTime;
private Date payTime;
}
......@@ -97,7 +97,7 @@ public class VolunteerManager {
if (PayType.REFILL_CARD.getCode().equals(addLimitVo.getPayType())) {
//1、更新充值卡状态
cardInfo.setStatus(CardStatus.ALREADY_USED.getCode());
int count = cardMapper.updateById(cardInfo);
int count = cardMapper.edit(cardInfo);
if (count == 0) {
return false;
}
......
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