From e29dff84a18c5ccbb891ce760487d45db67a8e17 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期五, 01 十一月 2024 10:27:09 +0800 Subject: [PATCH] 2024-11-01 获取虚拟卡常用充值金额(单位分) --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeProfile.java | 49 +++++++++ pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardCtrl.java | 15 +++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeProfileMapper.java | 36 +++++++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRechargeProfile.java | 31 ++++++ pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeProfileMapper.xml | 103 ++++++++++++++++++++ pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java | 12 ++ 6 files changed, 246 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeProfileMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeProfileMapper.java new file mode 100644 index 0000000..eac20da --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeProfileMapper.java @@ -0,0 +1,36 @@ +package com.dy.pipIrrGlobal.daoSe; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile; +import com.dy.pipIrrGlobal.voSe.VoRechargeProfile; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @author ZhuBaoMin + * @date 2024-11-01 9:40 + * @LastEditTime 2024-11-01 9:40 + * @Description + */ + +@Mapper +public interface SeRechargeProfileMapper extends BaseMapper<SeRechargeProfile> { + int deleteByPrimaryKey(Long id); + + int insert(SeRechargeProfile record); + + int insertSelective(SeRechargeProfile record); + + SeRechargeProfile selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(SeRechargeProfile record); + + int updateByPrimaryKey(SeRechargeProfile record); + + /** + * 鑾峰彇铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃� + * @return + */ + List<VoRechargeProfile> gerRechargeProfiles(); +} \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeProfile.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeProfile.java new file mode 100644 index 0000000..7b4a1f4 --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeProfile.java @@ -0,0 +1,49 @@ +package com.dy.pipIrrGlobal.pojoSe; + +/** + * @author ZhuBaoMin + * @date 2024-11-01 9:40 + * @LastEditTime 2024-11-01 9:40 + * @Description 铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃疄浣撶被 + */ + +import com.alibaba.fastjson2.annotation.JSONField; +import com.alibaba.fastjson2.writer.ObjectWriterImplToString; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.dy.common.po.BaseEntity; +import lombok.*; + +@TableName(value="se_recharge_profile", autoResultMap = true) +@Data +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class SeRechargeProfile implements BaseEntity { + public static final long serialVersionUID = 202411010943001L; + + /** + * 涓婚敭 + */ + @JSONField(serializeUsing= ObjectWriterImplToString.class) + @TableId(type = IdType.INPUT) + private Long id; + + /** + * 鍏呭�奸噾棰� + */ + private Integer rechargeAmount; + + /** + * 鎺掑簭 + */ + private Integer sort; + + /** + * 閫昏緫鍒犻櫎鏍囪瘑;鏈垹闄や负0锛屽凡鍒犻櫎涓哄垹闄ゆ椂闂� + */ + @JSONField(serializeUsing= ObjectWriterImplToString.class) + private Long deleted; +} \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRechargeProfile.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRechargeProfile.java new file mode 100644 index 0000000..81f1e79 --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRechargeProfile.java @@ -0,0 +1,31 @@ +package com.dy.pipIrrGlobal.voSe; + +import com.alibaba.fastjson2.annotation.JSONField; +import com.alibaba.fastjson2.writer.ObjectWriterImplToString; +import com.dy.common.po.BaseEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import lombok.Data; + +/** + * @author ZhuBaoMin + * @date 2024-11-01 9:46 + * @LastEditTime 2024-11-01 9:46 + * @Description 铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濊鍥惧璞� + */ + +@Data +@JsonPropertyOrder({"profileId", "rechargeAmount", "sort"}) +public class VoRechargeProfile implements BaseEntity { + private static final long serialVersionUID = 202411010948001L; + + /** + * 閰嶇疆ID + */ + @JSONField(serializeUsing= ObjectWriterImplToString.class) + private Long profileId; + + /** + * 鍏呭�奸噾棰� + */ + private Integer rechargeAmount; +} diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeProfileMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeProfileMapper.xml new file mode 100644 index 0000000..987b18e --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeProfileMapper.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.dy.pipIrrGlobal.daoSe.SeRechargeProfileMapper"> + <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile"> + <!--@mbg.generated--> + <!--@Table se_recharge_profile--> + <id column="id" jdbcType="BIGINT" property="id" /> + <result column="recharge_amount" jdbcType="INTEGER" property="rechargeAmount" /> + <result column="sort" jdbcType="INTEGER" property="sort" /> + <result column="deleted" jdbcType="BIGINT" property="deleted" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, recharge_amount, sort, deleted + </sql> + <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> + <!--@mbg.generated--> + select + <include refid="Base_Column_List" /> + from se_recharge_profile + where id = #{id,jdbcType=BIGINT} + </select> + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> + <!--@mbg.generated--> + delete from se_recharge_profile + where id = #{id,jdbcType=BIGINT} + </delete> + <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile"> + <!--@mbg.generated--> + insert into se_recharge_profile (id, recharge_amount, sort, + deleted) + values (#{id,jdbcType=BIGINT}, #{rechargeAmount,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, + #{deleted,jdbcType=BIGINT}) + </insert> + <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile"> + <!--@mbg.generated--> + insert into se_recharge_profile + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="rechargeAmount != null"> + recharge_amount, + </if> + <if test="sort != null"> + sort, + </if> + <if test="deleted != null"> + deleted, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id,jdbcType=BIGINT}, + </if> + <if test="rechargeAmount != null"> + #{rechargeAmount,jdbcType=INTEGER}, + </if> + <if test="sort != null"> + #{sort,jdbcType=INTEGER}, + </if> + <if test="deleted != null"> + #{deleted,jdbcType=BIGINT}, + </if> + </trim> + </insert> + <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile"> + <!--@mbg.generated--> + update se_recharge_profile + <set> + <if test="rechargeAmount != null"> + recharge_amount = #{rechargeAmount,jdbcType=INTEGER}, + </if> + <if test="sort != null"> + sort = #{sort,jdbcType=INTEGER}, + </if> + <if test="deleted != null"> + deleted = #{deleted,jdbcType=BIGINT}, + </if> + </set> + where id = #{id,jdbcType=BIGINT} + </update> + <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile"> + <!--@mbg.generated--> + update se_recharge_profile + set recharge_amount = #{rechargeAmount,jdbcType=INTEGER}, + sort = #{sort,jdbcType=INTEGER}, + deleted = #{deleted,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + </update> + + <!--鑾峰彇铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃�--> + <select id="gerRechargeProfiles" resultType="com.dy.pipIrrGlobal.voSe.VoRechargeProfile"> + SELECT + id AS profileId, + recharge_amount AS rechargeAmount + FROM se_recharge_profile + ORDER BY sort + </select> + + + +</mapper> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardCtrl.java index b8dd640..3e6b1fd 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardCtrl.java @@ -5,6 +5,7 @@ import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.pojoSe.SeVcOperate; import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard; +import com.dy.pipIrrGlobal.voSe.VoRechargeProfile; import com.dy.pipIrrGlobal.voSe.VoVcRecharge; import com.dy.pipIrrGlobal.voSe.VoVirtualCard; import com.dy.pipIrrWechat.result.WechatResultCode; @@ -329,4 +330,18 @@ return BaseResponseUtils.buildException(e.getMessage()) ; } } + + /** + * 鑾峰彇铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃� + * @return + */ + @GetMapping(path = "/gerRechargeProfiles") + public BaseResponse<List<VoRechargeProfile>> gerRechargeProfiles(){ + try { + return BaseResponseUtils.buildSuccess(virtualCardSv.gerRechargeProfiles()); + } catch (Exception e) { + log.error("鑾峰彇铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } } diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java index 903bf55..9957fdf 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java @@ -6,6 +6,7 @@ import com.dy.pipIrrGlobal.daoSe.*; import com.dy.pipIrrGlobal.pojoSe.*; import com.dy.pipIrrGlobal.voSe.VoOrders; +import com.dy.pipIrrGlobal.voSe.VoRechargeProfile; import com.dy.pipIrrGlobal.voSe.VoVcRecharge; import com.dy.pipIrrGlobal.voSe.VoVirtualCard; import com.dy.pipIrrWechat.result.WechatResultCode; @@ -51,6 +52,9 @@ @Autowired private SeVcOperateMapper seVcOperateMapper; + + @Autowired + private SeRechargeProfileMapper seRechargeProfileMapper; @Value("${vc.alarmValue}") private Integer alarmValue; @@ -386,4 +390,12 @@ seVcOperateMapper.insert(po); return po.getId(); } + + /** + * 鑾峰彇铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃� + * @return + */ + public List<VoRechargeProfile> gerRechargeProfiles() { + return seRechargeProfileMapper.gerRechargeProfiles(); + } } \ No newline at end of file -- Gitblit v1.8.0