Commit dc063b1d authored by licc's avatar licc

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

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