Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
7 文件已重命名
4个文件已删除
31个文件已修改
11个文件已添加
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeActiveCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoActiveCard; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/5 17:39 |
| | | * @LastEditTime 2023/12/5 17:39 |
| | | * @date 2023/12/8 16:53 |
| | | * @LastEditTime 2023/12/8 16:53 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SeActiveCardMapper { |
| | | public interface SeActiveCardMapper extends BaseMapper<SeActiveCard> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeActiveCard record); |
| | |
| | | * @return |
| | | */ |
| | | List<VoActiveCard> getActiveCards(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据水卡编号和操作类型删除某卡补卡记录 |
| | | * @param cardId |
| | | * @param operateType |
| | | * @return |
| | | */ |
| | | Integer deleteByIdAndOperateType(@Param("cardId") Long cardId, @Param("operateType") Byte operateType); |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCancel; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoCancel; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.dy.pipIrrGlobal.voSe.VoCancel; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 13:38 |
| | | * @LastEditTime 2023/12/6 13:38 |
| | | * @date 2023/12/9 10:14 |
| | | * @LastEditTime 2023/12/9 10:14 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SeCancelMapper { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeLoss; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoLoss; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.dy.pipIrrGlobal.voSe.VoLoss; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 9:09 |
| | | * @LastEditTime 2023/12/6 9:09 |
| | | * @date 2023/12/9 8:55 |
| | | * @LastEditTime 2023/12/9 8:55 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SeLossMapper { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/8 15:25 |
| | | * @LastEditTime 2023/12/8 15:25 |
| | | * @Description |
| | | */ |
| | | public interface SeRechargeHistoryMapper { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeRechargeHistory record); |
| | | |
| | | int insertSelective(SeRechargeHistory record); |
| | | |
| | | SeRechargeHistory selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(SeRechargeHistory record); |
| | | |
| | | int updateByPrimaryKey(SeRechargeHistory record); |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRecharge; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoRecharge; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/8 15:25 |
| | | * @LastEditTime 2023/12/8 15:25 |
| | | * @Description |
| | | */ |
| | | public interface SeRechargeMapper { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | |
| | | |
| | | int insertSelective(SeRecharge record); |
| | | |
| | | //SeRecharge selectByPrimaryKey(Long id); |
| | | SeRecharge selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(SeRecharge record); |
| | | |
| | |
| | | Long getRecordCount(Map<?, ?> params); |
| | | |
| | | List<VoRecharge> getRecharges(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据水卡编号删除充值记录 |
| | | * @param cardId |
| | | * @return |
| | | */ |
| | | Integer deleteByCardId(@Param("cardId") Long cardId); |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeReversal; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoReversal; |
| | | import com.dy.pipIrrGlobal.voSe.VoReversal; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 15:41 |
| | | * @LastEditTime 2023/12/6 15:41 |
| | | * @date 2023/12/11 9:17 |
| | | * @LastEditTime 2023/12/11 9:17 |
| | | * @Description |
| | | */ |
| | | public interface SeReversalMapper { |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeUnlock; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoUnlock; |
| | | import com.dy.pipIrrGlobal.voSe.VoUnlock; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 14:40 |
| | | * @LastEditTime 2023/12/6 14:40 |
| | | * @date 2023/12/11 9:11 |
| | | * @LastEditTime 2023/12/11 9:11 |
| | | * @Description |
| | | */ |
| | | public interface SeUnlockMapper { |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/5 17:39 |
| | | * @LastEditTime 2023/12/5 17:39 |
| | | * @date 2023/12/8 16:53 |
| | | * @LastEditTime 2023/12/8 16:53 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | @AllArgsConstructor |
| | | @Schema(name = "开卡/补卡实体") |
| | | public class SeActiveCard implements BaseEntity { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | public static final long serialVersionUID = 202312071927001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水卡编号不小于{min}", min = 1) |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 卡片费用 |
| | |
| | | private Byte operatetype; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | } |
| | |
| | | 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 io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 13:38 |
| | | * @LastEditTime 2023/12/6 13:38 |
| | | * @date 2023/12/9 10:14 |
| | | * @LastEditTime 2023/12/9 10:14 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡注销实体") |
| | | public class SeCancel { |
| | | public class SeCancel implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "水卡编号必须为大于0的整数") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 退款金额 |
| | | */ |
| | | @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "退款金额不小于{min}字", min = 1) |
| | | private Double refund; |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 退款方式;1-现金 |
| | | */ |
| | | * 退款金额 |
| | | */ |
| | | @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "退款金额不小于{min}字", min = 1) |
| | | private Float refund; |
| | | |
| | | /** |
| | | * 退款方式;1-现金 |
| | | */ |
| | | @Schema(description = "退款方式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "退款方式必须为大于0的整数") |
| | | private Byte refundtype; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 9:09 |
| | | * @LastEditTime 2023/12/6 9:09 |
| | | * @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 io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 8:55 |
| | | * @LastEditTime 2023/12/9 8:55 |
| | | * @Description |
| | | */ |
| | | |
| | | /** |
| | | * 水卡挂失表 |
| | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "挂失实体") |
| | | public class SeLoss { |
| | | public class SeLoss implements BaseEntity { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水卡编号不小于{min}", min = 1) |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 余额 |
| | | */ |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 余额 |
| | | */ |
| | | @Schema(description = "余额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "卡片余额不小于{min}", min = 0) |
| | | private Double money; |
| | | private Float money; |
| | | |
| | | /** |
| | | * 退款金额 |
| | | */ |
| | | * 退款金额 |
| | | */ |
| | | @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "退款金额不小于{min}", min = 0) |
| | | private Double refund; |
| | | private Float refund; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | |
| | | 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 io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 水卡充值表; |
| | | */ |
| | | * 水卡充值表; |
| | | */ |
| | | |
| | | @TableName(value="se_recharge", autoResultMap = true) |
| | | @Data |
| | |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水卡编号不小于{min}", min = 1) |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | | */ |
| | | private Double money; |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 充值金额 |
| | | */ |
| | | private Double amount; |
| | | * 卡片余额 |
| | | */ |
| | | @Schema(description = "卡片余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "卡片余额不能为空") |
| | | @Length(message = "卡片余额不小于{min}", min = 0) |
| | | private Float money; |
| | | |
| | | /** |
| | | * 赠送金额 |
| | | */ |
| | | private Double gift; |
| | | * 充值金额 |
| | | */ |
| | | @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "充值金额不能为空") |
| | | @Length(message = "充值金额不小于{min}", min = 0) |
| | | private Float amount; |
| | | |
| | | /** |
| | | * 充值后余额 |
| | | */ |
| | | private Double afterrecharge; |
| | | * 赠送金额 |
| | | */ |
| | | @Schema(description = "赠送金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "赠送金额不小于{min}", min = 0) |
| | | private Float gift; |
| | | |
| | | /** |
| | | * 付款方式编号 |
| | | */ |
| | | * 充值后余额 |
| | | */ |
| | | @Schema(description = "充值后余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "充值后余额不小于{min}", min = 0) |
| | | private Float afterrecharge; |
| | | |
| | | /** |
| | | * 付款方式编号 |
| | | */ |
| | | @Schema(description = "付款方式编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "付款方式编号不大于{max},不小于{min}", min = 1, max = 4) |
| | | private Long paymentid; |
| | | |
| | | /** |
| | | * 水价 |
| | | */ |
| | | @Schema(description = "水价", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水价不小于{min}", min = 0) |
| | | private Float price; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getCardid() { |
| | | return cardid; |
| | | } |
| | | |
| | | public void setCardid(Long cardid) { |
| | | this.cardid = cardid; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(Double money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public Double getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(Double amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public Double getGift() { |
| | | return gift; |
| | | } |
| | | |
| | | public void setGift(Double gift) { |
| | | this.gift = gift; |
| | | } |
| | | |
| | | public Double getAfterrecharge() { |
| | | return afterrecharge; |
| | | } |
| | | |
| | | public void setAfterrecharge(Double afterrecharge) { |
| | | this.afterrecharge = afterrecharge; |
| | | } |
| | | |
| | | public Long getPaymentid() { |
| | | return paymentid; |
| | | } |
| | | |
| | | public void setPaymentid(Long paymentid) { |
| | | this.paymentid = paymentid; |
| | | } |
| | | |
| | | public String getRemarks() { |
| | | return remarks; |
| | | } |
| | | |
| | | public void setRemarks(String remarks) { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public Long getOperator() { |
| | | return operator; |
| | | } |
| | | |
| | | public void setOperator(Long operator) { |
| | | this.operator = operator; |
| | | } |
| | | |
| | | public Date getOperatedt() { |
| | | return operatedt; |
| | | } |
| | | |
| | | public void setOperatedt(Date operatedt) { |
| | | this.operatedt = operatedt; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | |
| | | 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 io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/7 20:33 |
| | | * @LastEditTime 2023/12/7 20:33 |
| | | * @Description |
| | | */ |
| | | |
| | | /** |
| | | * 充值历史表 |
| | | */ |
| | | |
| | | @TableName(value="se_recharge_history", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡充值历史实体") |
| | | public class SeRechargeHistory implements BaseEntity { |
| | | public static final long serialVersionUID = 202312080812001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水卡编号不小于{min}", min = 1) |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | | */ |
| | | @Schema(description = "卡片余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "卡片余额不能为空") |
| | | @Length(message = "卡片余额不小于{min}", min = 0) |
| | | private Float money; |
| | | |
| | | /** |
| | | * 充值金额 |
| | | */ |
| | | @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "充值金额不能为空") |
| | | @Length(message = "充值金额不小于{min}", min = 0) |
| | | private Float amount; |
| | | |
| | | /** |
| | | * 赠送金额 |
| | | */ |
| | | @Schema(description = "赠送金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "赠送金额不小于{min}", min = 0) |
| | | private Float gift; |
| | | |
| | | /** |
| | | * 充值后余额 |
| | | */ |
| | | @Schema(description = "充值后余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "充值后余额不小于{min}", min = 0) |
| | | private Float afterrecharge; |
| | | |
| | | /** |
| | | * 付款方式编号 |
| | | */ |
| | | @Schema(description = "付款方式编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "付款方式编号不大于{max},不小于{min}", min = 1, max = 4) |
| | | private Long paymentid; |
| | | |
| | | /** |
| | | * 水价 |
| | | */ |
| | | @Schema(description = "水价", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水价不小于{min}", min = 0) |
| | | private Float price; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | |
| | | } |
| | |
| | | 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 io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 15:41 |
| | | * @LastEditTime 2023/12/6 15:41 |
| | | * @date 2023/12/11 9:17 |
| | | * @LastEditTime 2023/12/11 9:17 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡冲正实体") |
| | | public class SeReversal { |
| | | public class SeReversal implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "水卡编号必须为大于0的整数") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | | */ |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | | */ |
| | | @Schema(description = "卡片余额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "卡片余额不小于{min}字", min = 1) |
| | | private Double cardbalance; |
| | | private Float cardbalance; |
| | | |
| | | /** |
| | | * 系统余额 |
| | | */ |
| | | * 系统余额 |
| | | */ |
| | | @Schema(description = "系统余额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "系统余额不小于{min}字", min = 1) |
| | | private Double systembalance; |
| | | private Float systembalance; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | } |
| | |
| | | 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 io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 14:40 |
| | | * @LastEditTime 2023/12/6 14:40 |
| | | * @date 2023/12/11 9:11 |
| | | * @LastEditTime 2023/12/11 9:11 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "水卡解锁实体") |
| | | public class SeUnlock { |
| | | public class SeUnlock implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "水卡编号必须为大于0的整数") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 剩余金额 |
| | | */ |
| | | @Schema(description = "剩余金额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "剩余金额不小于{min}字", min = 1) |
| | | private Double money; |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | * 剩余金额 |
| | | */ |
| | | @Schema(description = "剩余金额", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "剩余金额不小于{min}字", min = 1) |
| | | private Float money; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | } |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoActiveCard.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoCancel.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoLoss.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.dy.pipIrrGlobal.util.Double2Serializer; |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoRecharge.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoReversal.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoUnlock.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | <!--@Table se_active_card--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="cardCost" jdbcType="INTEGER" property="cardcost" /> |
| | | <result column="paymentId" jdbcType="BIGINT" property="paymentid" /> |
| | | <result column="reissueAmount" jdbcType="DOUBLE" property="reissueamount" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`, |
| | | id, cardId, clientId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`, |
| | | operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--根据水卡编号和操作类型删除某卡补卡记录--> |
| | | <delete id="deleteByIdAndOperateType"> |
| | | DELETE FROM se_active_card WHERE id = ${cardId} AND operateType = ${operateType} |
| | | </delete> |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard" useGeneratedKeys="true"> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard"> |
| | | <!--@mbg.generated--> |
| | | insert into se_active_card (cardId, cardCost, paymentId, |
| | | reissueAmount, operateType, remarks, |
| | | `operator`, operateDt) |
| | | values (#{cardid,jdbcType=BIGINT}, #{cardcost,jdbcType=INTEGER}, #{paymentid,jdbcType=BIGINT}, |
| | | #{reissueamount,jdbcType=DOUBLE}, #{operatetype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}) |
| | | insert into se_active_card (id, cardId, clientId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{cardcost,jdbcType=INTEGER}, |
| | | #{paymentid,jdbcType=BIGINT}, |
| | | #{reissueamount,jdbcType=DOUBLE}, |
| | | #{operatetype,jdbcType=TINYINT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_active_card (cardId, clientId, cardCost, --> |
| | | <!-- paymentId, reissueAmount, operateType, --> |
| | | <!-- remarks, `operator`, operateDt--> |
| | | <!-- )--> |
| | | <!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardcost,jdbcType=INTEGER}, --> |
| | | <!-- #{paymentid,jdbcType=BIGINT}, #{reissueamount,jdbcType=DOUBLE}, #{operatetype,jdbcType=TINYINT}, --> |
| | | <!-- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}--> |
| | | <!-- )--> |
| | | <!-- </insert>--> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_active_card |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="cardcost != null"> |
| | | cardCost, |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="cardcost != null"> |
| | | #{cardcost,jdbcType=INTEGER}, |
| | |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="cardcost != null"> |
| | | cardCost = #{cardcost,jdbcType=INTEGER}, |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | update se_active_card |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | cardCost = #{cardcost,jdbcType=INTEGER}, |
| | | paymentId = #{paymentid,jdbcType=BIGINT}, |
| | | reissueAmount = #{reissueamount,jdbcType=DOUBLE}, |
| | |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_active_card act ON act.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | FROM se_active_card act |
| | | INNER JOIN ba_client cli ON act.clientId = cli.id |
| | | INNER JOIN se_client_card card ON act.cardId = card.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "operateType != null and operateType > 0"> |
| | |
| | | </if> |
| | | |
| | | <if test = "activeTimeStart != null and activeTimeStop != null"> |
| | | AND card.createDt BETWEEN #{activeTimeStart} AND #{activeTimeStop} |
| | | AND act.operateDt BETWEEN #{activeTimeStart} AND #{activeTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定的条件获取开卡记录--> |
| | | <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.pojoSe.VoActiveCard"> |
| | | <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.voSe.VoActiveCard"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | card.state, |
| | | (CASE |
| | | WHEN card.state = 1 THEN |
| | | "正常" |
| | | WHEN card.state = 2 THEN |
| | | "已注销" |
| | | ELSE |
| | | "已挂失" |
| | | END) AS stateName, |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | card.state, |
| | | (CASE |
| | | WHEN card.state = 1 THEN "正常" |
| | | WHEN card.state = 2 THEN "已注销" |
| | | ELSE "已挂失" |
| | | END) AS stateName, |
| | | act.reissueAmount, |
| | | act.cardCost, |
| | | act.paymentId, |
| | | (SELECT `name` FROM ba_user WHERE id = act.operator) AS operator, |
| | | act.operateDt |
| | | FROM se_client_card card |
| | | INNER JOIN se_active_card act ON act.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | FROM se_active_card act |
| | | INNER JOIN ba_client cli ON act.clientId = cli.id |
| | | INNER JOIN se_client_card card ON act.cardId = card.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "operateType != null and operateType > 0"> |
| | |
| | | </if> |
| | | |
| | | <if test = "activeTimeStart != null and activeTimeStop != null"> |
| | | AND card.createDt BETWEEN #{activeTimeStart} AND #{activeTimeStop} |
| | | AND act.operateDt BETWEEN #{activeTimeStart} AND #{activeTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | <!--@Table se_cancel--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="refund" jdbcType="FLOAT" property="refund" /> |
| | | <result column="refundType" jdbcType="TINYINT" property="refundtype" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, refund, refundType, remarks, `operator`, operateDt |
| | | id, cardId, clientId, refund, refundType, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | delete from se_cancel |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel" useGeneratedKeys="true"> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel"> |
| | | <!--@mbg.generated--> |
| | | insert into se_cancel (cardId, refund, refundType, |
| | | remarks, `operator`, operateDt |
| | | ) |
| | | values (#{cardid,jdbcType=BIGINT}, #{refund,jdbcType=FLOAT}, #{refundtype,jdbcType=TINYINT}, |
| | | #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP} |
| | | ) |
| | | insert into se_cancel (id, cardId, clientId, refund, refundType, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{refund,jdbcType=FLOAT}, |
| | | #{refundtype,jdbcType=TINYINT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_cancel (cardId, clientId, refund, --> |
| | | <!-- refundType, remarks, `operator`, --> |
| | | <!-- operateDt)--> |
| | | <!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{refund,jdbcType=FLOAT}, --> |
| | | <!-- #{refundtype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, --> |
| | | <!-- #{operatedt,jdbcType=TIMESTAMP})--> |
| | | <!-- </insert>--> |
| | | |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_cancel |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="refund != null"> |
| | | refund, |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="refund != null"> |
| | | #{refund,jdbcType=FLOAT}, |
| | |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="refund != null"> |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | update se_cancel |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | refundType = #{refundtype,jdbcType=TINYINT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_cancel cancel ON cancel.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | FROM se_cancel can |
| | | INNER JOIN se_client_card card ON can.cardId = card.id |
| | | INNER JOIN ba_client cli ON can.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | </if> |
| | | |
| | | <if test = "cancelTimeStart != null and cancelTimeStop != null"> |
| | | AND card.cancelDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop} |
| | | AND can.operateDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定的条件获取注销记录--> |
| | | <select id="getCancels" resultType="com.dy.pipIrrGlobal.pojoSe.VoCancel"> |
| | | <select id="getCancels" resultType="com.dy.pipIrrGlobal.voSe.VoCancel"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | cancel.refund, |
| | | (CASE |
| | | WHEN cancel.refundType = 1 THEN |
| | | "现金" |
| | | END) AS refundTypeName, |
| | | cancel.refundType, |
| | | (SELECT `name` FROM ba_user WHERE id = cancel.operator) AS operator, |
| | | cancel.operateDt |
| | | FROM se_client_card card |
| | | INNER JOIN se_cancel cancel ON cancel.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | can.refund, |
| | | (CASE |
| | | WHEN can.refundType = 1 THEN "现金" |
| | | END) AS refundTypeName, |
| | | can.refundType, |
| | | (SELECT `name` FROM ba_user WHERE id = can.operator) AS operator, |
| | | can.operateDt |
| | | FROM se_cancel can |
| | | INNER JOIN se_client_card card ON can.cardId = card.id |
| | | INNER JOIN ba_client cli ON can.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | </if> |
| | | |
| | | <if test = "cancelTimeStart != null and cancelTimeStop != null"> |
| | | AND card.cancelDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop} |
| | | AND can.operateDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | SELECT id AS cardId FROM se_client_card WHERE cardAddr = #{cardAddr} |
| | | </select> |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true"> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_card (cardAddr, clientId, money, |
| | | `state`, createDt, replaceDt, |
| | | rechargeDt, lossDtDt, cancelDt, |
| | | unlockDt, reversalDt, consumeDt, |
| | | lastOper, remarks) |
| | | values (#{cardaddr,jdbcType=VARCHAR}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, |
| | | #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, #{replacedt,jdbcType=TIMESTAMP}, |
| | | #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, #{canceldt,jdbcType=TIMESTAMP}, |
| | | #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, #{consumedt,jdbcType=TIMESTAMP}, |
| | | #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}) |
| | | insert into se_client_card (id, cardAddr, clientId, money, `state`, createDt, replaceDt, rechargeDt, lossDtDt, cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardaddr,jdbcType=VARCHAR}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, |
| | | #{state,jdbcType=TINYINT}, |
| | | #{createdt,jdbcType=TIMESTAMP}, |
| | | #{replacedt,jdbcType=TIMESTAMP}, |
| | | #{rechargedt,jdbcType=TIMESTAMP}, |
| | | #{lossdtdt,jdbcType=TIMESTAMP}, |
| | | #{canceldt,jdbcType=TIMESTAMP}, |
| | | #{unlockdt,jdbcType=TIMESTAMP}, |
| | | #{reversaldt,jdbcType=TIMESTAMP}, |
| | | #{consumedt,jdbcType=TIMESTAMP}, |
| | | #{lastoper,jdbcType=TINYINT}, |
| | | #{remarks,jdbcType=VARCHAR}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_client_card (cardAddr, clientId, money, --> |
| | | <!-- `state`, createDt, replaceDt, --> |
| | | <!-- rechargeDt, lossDtDt, cancelDt, --> |
| | | <!-- unlockDt, reversalDt, consumeDt, --> |
| | | <!-- lastOper, remarks)--> |
| | | <!-- values (#{cardaddr,jdbcType=VARCHAR}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, --> |
| | | <!-- #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, #{replacedt,jdbcType=TIMESTAMP}, --> |
| | | <!-- #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, #{canceldt,jdbcType=TIMESTAMP}, --> |
| | | <!-- #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, #{consumedt,jdbcType=TIMESTAMP}, --> |
| | | <!-- #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR})--> |
| | | <!-- </insert>--> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_card |
| | |
| | | <!--@Table se_loss--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="refund" jdbcType="FLOAT" property="refund" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, money, refund, remarks, `operator`, operateDt |
| | | id, cardId, clientId, money, refund, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | delete from se_loss |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss" useGeneratedKeys="true"> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss"> |
| | | <!--@mbg.generated--> |
| | | insert into se_loss (cardId, money, refund, |
| | | remarks, `operator`, operateDt |
| | | ) |
| | | values (#{cardid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, #{refund,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP} |
| | | ) |
| | | insert into se_loss (id, cardId, clientId, money, refund, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, |
| | | #{refund,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_loss (cardId, clientId, money, --> |
| | | <!-- refund, remarks, `operator`, --> |
| | | <!-- operateDt)--> |
| | | <!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, --> |
| | | <!-- #{refund,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, --> |
| | | <!-- #{operatedt,jdbcType=TIMESTAMP})--> |
| | | <!-- </insert>--> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_loss |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | update se_loss |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_loss loss ON loss.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | FROM se_loss loss |
| | | INNER JOIN se_client_card card ON loss.cardId = card.id |
| | | INNER JOIN ba_client cli ON loss.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | </if> |
| | | |
| | | <if test = "lossTimeStart != null and lossTimeStop != null"> |
| | | AND card.lossDtDt BETWEEN #{lossTimeStart} AND #{lossTimeStop} |
| | | AND loss.operateDt BETWEEN #{lossTimeStart} AND #{lossTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定的条件获取挂失记录--> |
| | | <select id="getLosses" resultType="com.dy.pipIrrGlobal.pojoSe.VoLoss"> |
| | | <select id="getLosses" resultType="com.dy.pipIrrGlobal.voSe.VoLoss"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | loss.money, |
| | | (SELECT `name` FROM ba_user WHERE id = loss.operator) AS operator, |
| | | loss.operateDt |
| | | FROM se_client_card card |
| | | INNER JOIN se_loss loss ON loss.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | loss.money, |
| | | (SELECT `name` FROM ba_user WHERE id = loss.operator) AS operator, |
| | | loss.operateDt |
| | | FROM se_loss loss |
| | | INNER JOIN se_client_card card ON loss.cardId = card.id |
| | | INNER JOIN ba_client cli ON loss.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | </if> |
| | | |
| | | <if test = "lossTimeStart != null and lossTimeStop != null"> |
| | | AND card.lossDtDt BETWEEN #{lossTimeStart} AND #{lossTimeStop} |
| | | AND loss.operateDt BETWEEN #{lossTimeStart} AND #{lossTimeStop} |
| | | </if> |
| | | </where> |
| | | |
New file |
| | |
| | | <?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.SeRechargeHistoryMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_recharge_history--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="amount" jdbcType="FLOAT" property="amount" /> |
| | | <result column="gift" jdbcType="FLOAT" property="gift" /> |
| | | <result column="afterRecharge" jdbcType="FLOAT" property="afterrecharge" /> |
| | | <result column="paymentId" jdbcType="BIGINT" property="paymentid" /> |
| | | <result column="price" jdbcType="FLOAT" property="price" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks, |
| | | `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from se_recharge_history |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from se_recharge_history |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_recharge_history (id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, |
| | | #{amount,jdbcType=FLOAT}, |
| | | #{gift,jdbcType=FLOAT}, |
| | | #{afterrecharge,jdbcType=FLOAT}, |
| | | #{paymentid,jdbcType=BIGINT}, |
| | | #{price,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_recharge_history |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | | </if> |
| | | <if test="amount != null"> |
| | | amount, |
| | | </if> |
| | | <if test="gift != null"> |
| | | gift, |
| | | </if> |
| | | <if test="afterrecharge != null"> |
| | | afterRecharge, |
| | | </if> |
| | | <if test="paymentid != null"> |
| | | paymentId, |
| | | </if> |
| | | <if test="price != null"> |
| | | price, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator`, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="amount != null"> |
| | | #{amount,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="gift != null"> |
| | | #{gift,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="afterrecharge != null"> |
| | | #{afterrecharge,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="paymentid != null"> |
| | | #{paymentid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="price != null"> |
| | | #{price,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory"> |
| | | <!--@mbg.generated--> |
| | | update se_recharge_history |
| | | <set> |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="amount != null"> |
| | | amount = #{amount,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="gift != null"> |
| | | gift = #{gift,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="afterrecharge != null"> |
| | | afterRecharge = #{afterrecharge,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="paymentid != null"> |
| | | paymentId = #{paymentid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="price != null"> |
| | | price = #{price,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory"> |
| | | <!--@mbg.generated--> |
| | | update se_recharge_history |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | amount = #{amount,jdbcType=FLOAT}, |
| | | gift = #{gift,jdbcType=FLOAT}, |
| | | afterRecharge = #{afterrecharge,jdbcType=FLOAT}, |
| | | paymentId = #{paymentid,jdbcType=BIGINT}, |
| | | price = #{price,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <?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.SeRechargeMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeRecharge"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_recharge--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="amount" jdbcType="FLOAT" property="amount" /> |
| | | <result column="gift" jdbcType="FLOAT" property="gift" /> |
| | | <result column="afterRecharge" jdbcType="FLOAT" property="afterrecharge" /> |
| | | <result column="paymentId" jdbcType="BIGINT" property="paymentid" /> |
| | | <result column="price" jdbcType="FLOAT" property="price" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, money, amount, gift, afterRecharge, paymentId, remarks, `operator`, operateDt |
| | | id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks, |
| | | `operator`, operateDt |
| | | </sql> |
| | | |
| | | <!-- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- select --> |
| | | <!-- <include refid="Base_Column_List" />--> |
| | | <!-- from se_recharge--> |
| | | <!-- where id = #{id,jdbcType=BIGINT}--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from se_recharge |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from se_recharge |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge" useGeneratedKeys="true"> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge"> |
| | | <!--@mbg.generated--> |
| | | insert into se_recharge (cardId, money, amount, |
| | | gift, afterRecharge, paymentId, |
| | | remarks, `operator`, operateDt |
| | | ) |
| | | values (#{cardid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, #{amount,jdbcType=FLOAT}, |
| | | #{gift,jdbcType=FLOAT}, #{afterrecharge,jdbcType=FLOAT}, #{paymentid,jdbcType=BIGINT}, |
| | | #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP} |
| | | ) |
| | | insert into se_recharge (id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, |
| | | #{amount,jdbcType=FLOAT}, |
| | | #{gift,jdbcType=FLOAT}, |
| | | #{afterrecharge,jdbcType=FLOAT}, |
| | | #{paymentid,jdbcType=BIGINT}, |
| | | #{price,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_recharge (cardId, clientId, money, --> |
| | | <!-- amount, gift, afterRecharge, --> |
| | | <!-- paymentId, price, remarks, --> |
| | | <!-- `operator`, operateDt)--> |
| | | <!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, --> |
| | | <!-- #{amount,jdbcType=FLOAT}, #{gift,jdbcType=FLOAT}, #{afterrecharge,jdbcType=FLOAT}, --> |
| | | <!-- #{paymentid,jdbcType=BIGINT}, #{price,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, --> |
| | | <!-- #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP})--> |
| | | <!-- </insert>--> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | <if test="paymentid != null"> |
| | | paymentId, |
| | | </if> |
| | | <if test="price != null"> |
| | | price, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks, |
| | | </if> |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <if test="paymentid != null"> |
| | | #{paymentid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="price != null"> |
| | | #{price,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge"> |
| | | <!--@mbg.generated--> |
| | | update se_recharge |
| | | <set> |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | <if test="paymentid != null"> |
| | | paymentId = #{paymentid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="price != null"> |
| | | price = #{price,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | </if> |
| | |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge"> |
| | | <!--@mbg.generated--> |
| | | update se_recharge |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | amount = #{amount,jdbcType=FLOAT}, |
| | | gift = #{gift,jdbcType=FLOAT}, |
| | | afterRecharge = #{afterrecharge,jdbcType=FLOAT}, |
| | | paymentId = #{paymentid,jdbcType=BIGINT}, |
| | | price = #{price,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据水卡编号删除充值记录--> |
| | | <delete id="deleteByCardId" parameterType="java.lang.Long"> |
| | | DELETE FROM se_recharge WHERE cardId = ${cardId} |
| | | </delete> |
| | | |
| | | <!--根据指定的条件获取充值记录--> |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_recharge rec ON card.id = rec.cardId |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | COUNT(*) AS recordCount |
| | | FROM se_recharge_history rec |
| | | INNER JOIN se_client_card card ON rec.cardId = card.id |
| | | INNER JOIN ba_client cli ON rec.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | </if> |
| | | |
| | | <if test = "rechargeTimeStart != null and rechargeTimeStop != null"> |
| | | AND card.rechargeDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop} |
| | | AND rec.operateDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据制定的条件获取充值记录--> |
| | | <select id="getRecharges" resultType="com.dy.pipIrrGlobal.pojoSe.VoRecharge"> |
| | | <!--根据指定的条件获取充值记录--> |
| | | <select id="getRecharges" resultType="com.dy.pipIrrGlobal.voSe.VoRecharge"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | rec.amount, |
| | | rec.afterRecharge, |
| | | rec.paymentId, |
| | | rec.price, |
| | | (SELECT `name` FROM ba_user WHERE id = rec.operator) AS operator, rec.operateDt |
| | | FROM se_client_card card |
| | | INNER JOIN se_recharge rec ON card.id = rec.cardId |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | (@i:=@i+1) AS id, |
| | | cli.name AS clientName, |
| | | rec.clientId, |
| | | card.cardAddr, |
| | | rec.amount, |
| | | rec.afterRecharge, |
| | | rec.paymentId, |
| | | rec.price, |
| | | (SELECT `name` FROM ba_user WHERE id = rec.operator) AS operator, |
| | | rec.operateDt |
| | | FROM se_recharge_history rec |
| | | INNER JOIN se_client_card card ON rec.cardId = card.id |
| | | INNER JOIN ba_client cli ON rec.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | </if> |
| | | |
| | | <if test = "rechargeTimeStart != null and rechargeTimeStop != null"> |
| | | AND card.rechargeDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop} |
| | | AND rec.operateDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | <!--@Table se_reversal--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="cardBalance" jdbcType="FLOAT" property="cardbalance" /> |
| | | <result column="systemBalance" jdbcType="FLOAT" property="systembalance" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, cardBalance, systemBalance, remarks, `operator`, operateDt |
| | | id, cardId, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | delete from se_reversal |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true"> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> |
| | | <!--@mbg.generated--> |
| | | insert into se_reversal (cardId, cardBalance, systemBalance, |
| | | remarks, `operator`, operateDt |
| | | ) |
| | | values (#{cardid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, #{systembalance,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP} |
| | | ) |
| | | insert into se_reversal (id, cardId, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{cardbalance,jdbcType=FLOAT}, |
| | | #{systembalance,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_reversal (cardId, clientId, cardBalance, --> |
| | | <!-- systemBalance, remarks, `operator`, --> |
| | | <!-- operateDt)--> |
| | | <!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, --> |
| | | <!-- #{systembalance,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, --> |
| | | <!-- #{operatedt,jdbcType=TIMESTAMP})--> |
| | | <!-- </insert>--> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_reversal |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | cardBalance, |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | #{cardbalance,jdbcType=FLOAT}, |
| | |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | cardBalance = #{cardbalance,jdbcType=FLOAT}, |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | update se_reversal |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | cardBalance = #{cardbalance,jdbcType=FLOAT}, |
| | | systemBalance = #{systembalance,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | <!--根据指定的条件获取冲正记录数--> |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_reversal rev ON rev.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | |
| | | </select> |
| | | |
| | | <!--根据指定的条件获取冲正记录--> |
| | | <select id="getReversals" resultType="com.dy.pipIrrGlobal.pojoSe.VoReversal"> |
| | | <select id="getReversals" resultType="com.dy.pipIrrGlobal.voSe.VoReversal"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | rev.cardBalance, |
| | | (SELECT `name` FROM ba_user WHERE id = rev.operator) AS operator, |
| | | rev.operateDt |
| | | FROM se_client_card card |
| | | INNER JOIN se_reversal rev ON rev.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | rev.cardBalance, |
| | | (SELECT `name` FROM ba_user WHERE id = rev.operator) AS operator, |
| | | rev.operateDt |
| | | FROM se_reversal rev |
| | | INNER JOIN se_client_card card ON rev.cardId = card.id |
| | | INNER JOIN ba_client cli ON rev.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | </if> |
| | | |
| | | <if test = "reversalTimeStart != null and reversalTimeStop != null"> |
| | | AND card.unlockDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop} |
| | | AND rev.operateDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | <!--@Table se_unlock--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardId, money, remarks, `operator`, operateDt |
| | | id, cardId, clientId, money, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | delete from se_unlock |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock" useGeneratedKeys="true"> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock"> |
| | | <!--@mbg.generated--> |
| | | insert into se_unlock (cardId, money, remarks, |
| | | `operator`, operateDt) |
| | | values (#{cardid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}) |
| | | insert into se_unlock (id, cardId, clientId, money, remarks, `operator`, operateDt) |
| | | values (#{id,jdbcType=BIGINT}, |
| | | #{cardid,jdbcType=BIGINT}, |
| | | #{clientid,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | |
| | | <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock" useGeneratedKeys="true">--> |
| | | <!-- <!–@mbg.generated–>--> |
| | | <!-- insert into se_unlock (cardId, clientId, money, --> |
| | | <!-- remarks, `operator`, operateDt--> |
| | | <!-- )--> |
| | | <!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, --> |
| | | <!-- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}--> |
| | | <!-- )--> |
| | | <!-- </insert>--> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_unlock |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | update se_unlock |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_unlock unl ON unl.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | FROM se_unlock unl |
| | | INNER JOIN se_client_card card ON unl.cardId = card.id |
| | | INNER JOIN ba_client cli ON unl.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | </if> |
| | | |
| | | <if test = "unlocklTimeStart != null and unlockTimeStop != null"> |
| | | AND card.unlockDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop} |
| | | AND unl.operateDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定的条件获取解锁记录--> |
| | | <select id="getUnlocks" resultType="com.dy.pipIrrGlobal.pojoSe.VoUnlock"> |
| | | <select id="getUnlocks" resultType="com.dy.pipIrrGlobal.voSe.VoUnlock"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | unl.money, |
| | | (SELECT `name` FROM ba_user WHERE id = unl.operator) AS operator, |
| | | unl.operateDt |
| | | FROM se_client_card card |
| | | INNER JOIN se_unlock unl ON unl.cardId = card.id |
| | | INNER JOIN ba_client cli ON card.clientId = cli.id |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | unl.money, |
| | | (SELECT `name` FROM ba_user WHERE id = unl.operator) AS operator, |
| | | unl.operateDt |
| | | FROM se_unlock unl |
| | | INNER JOIN se_client_card card ON unl.cardId = card.id |
| | | INNER JOIN ba_client cli ON unl.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | </if> |
| | | |
| | | <if test = "unlocklTimeStart != null and unlockTimeStop != null"> |
| | | AND card.unlockDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop} |
| | | AND unl.operateDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.*; |
| | | import com.dy.pipIrrSell.activeCardHistory.ActiveCardHistorySv; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrSell.clientCard.CardStateENUM; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | public class ActiveCardCtrl { |
| | | private final ActiveCardSv activeCardSv; |
| | | private final ClientCardSv clientCardSv; |
| | | private final ActiveCardHistorySv activeCardHistorySv; |
| | | |
| | | @Operation(summary = "获得一页开卡记录", description = "返回一页开卡数据") |
| | | @ApiResponses(value = { |
| | |
| | | @PostMapping(path = "add_active", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add_active(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid PO_ActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> add_active(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | |
| | | * cardCost 卡片费用 |
| | | * reissueAmount 补卡金额,补卡时使用 |
| | | * paymentId 支付方式编号 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * activeTime 开卡时间 |
| | | */ |
| | |
| | | Long clientId = po.getClientId(); |
| | | Integer cardCost = po.getCardCost(); |
| | | Long paymentId = po.getPaymentId(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date activeTime = new Date(); |
| | | //LocalDateTime activeTime = LocalDateTime.parse(dtf.format(LocalDateTime.now()), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | |
| | | clientCard.setCardaddr(cardAddr); |
| | | clientCard.setClientid(clientId); |
| | | clientCard.setMoney(0.0); |
| | | clientCard.setState((byte) 1); |
| | | clientCard.setState(CardStateENUM.NORMAL.getCode()); |
| | | clientCard.setCreatedt(activeTime); |
| | | clientCard.setLastoper((byte) 1); |
| | | clientCard.setLastoper(LastOperateENUM.ACTIVE.getCode()); |
| | | |
| | | cardId = Optional.ofNullable(clientCardSv.add(clientCard)).orElse(0L) ; |
| | | if(cardId == 0) { |
| | |
| | | */ |
| | | SeActiveCard activeCard = new SeActiveCard(); |
| | | activeCard.setCardid(cardId); |
| | | activeCard.setClientid(clientId); |
| | | activeCard.setCardcost(cardCost); |
| | | activeCard.setPaymentid(paymentId); |
| | | activeCard.setOperatetype((byte)1); |
| | | activeCard.setOperatetype(OperateTypeENUM.ACTIVE.getCode()); |
| | | activeCard.setRemarks(remarks); |
| | | activeCard.setOperator(operator); |
| | | activeCard.setOperatedt(activeTime); |
| | | Long rec = Optional.ofNullable(activeCardSv.add(activeCard)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("开卡失败-开卡记录写入异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加开卡历史记录 |
| | | */ |
| | | SeActiveCardHistory activeCardHistory = new SeActiveCardHistory(); |
| | | activeCardHistory.setCardid(cardId); |
| | | activeCardHistory.setCardcost(cardCost); |
| | | activeCardHistory.setPaymentid(paymentId); |
| | | activeCardHistory.setOperatetype((byte)1); |
| | | activeCardHistory.setOperator(operator); |
| | | activeCardHistory.setOperatedt(activeTime); |
| | | Long rec_history = Optional.ofNullable(activeCardHistorySv.add(activeCardHistory)).orElse(0L); |
| | | if(rec_history == 0) { |
| | | return BaseResponseUtils.buildFail("开卡失败-开卡历史记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | @PostMapping(path = "add_reissue", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add_reissue(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid PO_ActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> add_reissue(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * cardCost 卡片费用 |
| | | * reissueAmount 补卡金额,补卡时使用 |
| | | * paymentId 支付方式编号 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * activeTime 补卡时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | Integer cardCost = po.getCardCost(); |
| | | Double reissueAmount = po.getReissueAmount(); |
| | | Long paymentId = po.getPaymentId(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date activeTime = new Date(); |
| | | |
| | |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setId(cardId); |
| | | seClientCard.setReplacedt(activeTime); |
| | | seClientCard.setLastoper((byte)2); |
| | | seClientCard.setLastoper(LastOperateENUM.REPLACE.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("补卡失败-农户卡修改异常"); |
| | | } |
| | | |
| | | /** |
| | | * 删除开卡/补卡表该卡的补卡记录 |
| | | */ |
| | | Integer rec_deleteActiveCard = Optional.ofNullable(activeCardSv.deleteByIdAndOperateType(cardId, (byte)2)).orElse(0); |
| | | /** |
| | | * 添加补卡记录 |
| | | */ |
| | | SeActiveCard activeCard = new SeActiveCard(); |
| | | activeCard.setCardid(cardId); |
| | | activeCard.setClientid(clientId); |
| | | activeCard.setCardcost(cardCost); |
| | | activeCard.setPaymentid(paymentId); |
| | | activeCard.setReissueamount(reissueAmount); |
| | | activeCard.setOperatetype((byte)2); |
| | | activeCard.setOperatetype(OperateTypeENUM.REPLACE.getCode()); |
| | | activeCard.setRemarks(remarks); |
| | | activeCard.setOperator(operator); |
| | | activeCard.setOperatedt(activeTime); |
| | | Long rec = Optional.ofNullable(activeCardSv.add(activeCard)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("补卡失败-补卡记录写入异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加补卡历史记录 |
| | | */ |
| | | SeActiveCardHistory activeCardHistory = new SeActiveCardHistory(); |
| | | activeCardHistory.setCardid(cardId); |
| | | activeCardHistory.setCardcost(cardCost); |
| | | activeCardHistory.setPaymentid(paymentId); |
| | | activeCard.setReissueamount(reissueAmount); |
| | | activeCardHistory.setOperatetype((byte)2); |
| | | activeCardHistory.setOperator(operator); |
| | | activeCardHistory.setOperatedt(activeTime); |
| | | Long rec_history = Optional.ofNullable(activeCardHistorySv.add(activeCardHistory)).orElse(0L); |
| | | if(rec_history == 0) { |
| | | return BaseResponseUtils.buildFail("补卡失败-补卡历史记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeActiveCardMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeActiveCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoActiveCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public Long add(SeActiveCard po) { |
| | | seActiveCardMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡编号和操作类型删除某卡补卡记录 |
| | | * @param cardId |
| | | * @param operateType |
| | | * @return |
| | | */ |
| | | public Integer deleteByIdAndOperateType(Long cardId, Byte operateType) { |
| | | return seActiveCardMapper.deleteByIdAndOperateType(cardId, operateType); |
| | | } |
| | | } |
File was renamed from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/PO_ActiveCard.java |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | package com.dy.pipIrrSell.activeCard; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.*; |
| | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "开卡/补卡传入对象") |
| | | public class PO_ActiveCard { |
| | | public class DtoActiveCard { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | |
| | | /** |
| | |
| | | private Long paymentId; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
New file |
| | |
| | | package com.dy.pipIrrSell.activeCard; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/8 10:56 |
| | | * @LastEditTime 2023/12/8 10:56 |
| | | * @Description 开卡/补卡类型枚举 |
| | | */ |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum OperateTypeENUM { |
| | | ACTIVE((byte)1, "开卡"), |
| | | REPLACE((byte)2, "补卡"); |
| | | |
| | | private final Byte code; |
| | | private final String message; |
| | | } |
| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoCancel; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCancel; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoCancel; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @RequiredArgsConstructor |
| | | public class CancelCtrl { |
| | | private final CancelSv cancelSv; |
| | | private final ClientCardSv clientCardSv; |
| | | |
| | | @Operation(summary = "获得一页注销记录", description = "返回一页注销数据") |
| | | @ApiResponses(value = { |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "添加注销记录", description = "添加注销记录") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoCancel po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * refund 退款金额 |
| | | * refundType 退款方式 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * cancelTime 挂失时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | Float refund = po.getRefund(); |
| | | Byte refundType = po.getRefundType(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date cancelTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | } |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | | * 挂失时间 |
| | | * 最后操作类型-4 |
| | | */ |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setId(cardId); |
| | | seClientCard.setCanceldt(cancelTime); |
| | | seClientCard.setLastoper(LastOperateENUM.CANCEL.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("注销失败-农户卡注销异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加挂失记录 |
| | | */ |
| | | SeCancel seCancel = new SeCancel(); |
| | | seCancel.setCardid(cardId); |
| | | seCancel.setClientid(clientId); |
| | | seCancel.setRefund(refund); |
| | | seCancel.setRefundtype(refundType); |
| | | seCancel.setRemarks(remarks); |
| | | seCancel.setOperator(operator); |
| | | seCancel.setOperatedt(cancelTime); |
| | | Long rec = Optional.ofNullable(cancelSv.add(seCancel)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("注销失败-注销记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeCancelMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoCancel; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCancel; |
| | | import com.dy.pipIrrGlobal.voSe.VoCancel; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | rsVo.obj = seCancelMapper.getCancels(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 添加注销记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long add(SeCancel po) { |
| | | seCancelMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.cancel; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 10:28 |
| | | * @LastEditTime 2023/12/9 10:28 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "注销传入对象") |
| | | public class DtoCancel { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 退款金额 |
| | | */ |
| | | @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="退款金额不能小于0") |
| | | private Float refund; |
| | | |
| | | /** |
| | | * 退款方式;1-现金 |
| | | */ |
| | | @Schema(description = "退款方式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "退款方式必须为大于0的整数") |
| | | private Byte refundType; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.clientCard; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/8 10:50 |
| | | * @LastEditTime 2023/12/8 10:50 |
| | | * @Description 农户水卡状态枚举 |
| | | */ |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum CardStateENUM { |
| | | NORMAL((byte)1, "正常"), |
| | | CANCELLED((byte)2, "已注销"), |
| | | LOSS((byte)3, "已挂失"); |
| | | |
| | | private final Byte code; |
| | | private final String message; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.clientCard; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/8 9:30 |
| | | * @LastEditTime 2023/12/8 9:30 |
| | | * @Description 农户水卡最后操作方式枚举 |
| | | */ |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum LastOperateENUM { |
| | | ACTIVE((byte)1, "开卡"), |
| | | REPLACE((byte)2, "补卡"), |
| | | RECHARGE((byte)3, "充值"), |
| | | LOSS((byte)4, "挂失"), |
| | | CANCEL((byte)5, "注销"), |
| | | UNLOCK((byte)6, "解锁"), |
| | | REVERSAL((byte)7, "冲正"), |
| | | CONSUME((byte)8, "消费"); |
| | | |
| | | private final Byte code; |
| | | private final String message; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.loss; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 9:03 |
| | | * @LastEditTime 2023/12/9 9:03 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "挂失传入对象") |
| | | public class DtoLoss { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 余额 |
| | | */ |
| | | @Schema(description = "余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="余额不能小于0") |
| | | private Float money; |
| | | |
| | | /** |
| | | * 退款金额 |
| | | */ |
| | | @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="退款金额不能小于0") |
| | | private Float refund; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | } |
| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoLoss; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeLoss; |
| | | import com.dy.pipIrrGlobal.voSe.VoLoss; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @RequiredArgsConstructor |
| | | public class LossCtrl { |
| | | private final LossSv lossSv; |
| | | private final ClientCardSv clientCardSv; |
| | | |
| | | @Operation(summary = "获得一页挂失记录", description = "返回一页挂失数据") |
| | | @ApiResponses(value = { |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "添加挂失记录", description = "添加挂失记录") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoLoss po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * money 余额 |
| | | * refund 退款金额 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * lossTime 挂失时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | Float money = po.getMoney(); |
| | | Float refund = po.getRefund(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date lossTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | } |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | | * 挂失时间 |
| | | * 最后操作类型-4 |
| | | */ |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setId(cardId); |
| | | seClientCard.setLossdtdt(lossTime); |
| | | seClientCard.setLastoper(LastOperateENUM.LOSS.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("挂失失败-农户卡挂失异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加挂失记录 |
| | | */ |
| | | SeLoss seLoss = new SeLoss(); |
| | | seLoss.setCardid(cardId); |
| | | seLoss.setClientid(clientId); |
| | | seLoss.setMoney(money); |
| | | seLoss.setRefund(refund); |
| | | seLoss.setRemarks(remarks); |
| | | seLoss.setOperator(operator); |
| | | seLoss.setOperatedt(lossTime); |
| | | Long rec = Optional.ofNullable(lossSv.add(seLoss)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("挂失失败-挂失记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeLossMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoLoss; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeLoss; |
| | | import com.dy.pipIrrGlobal.voSe.VoLoss; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | rsVo.obj = seLossMapper.getLosses(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 添加挂失记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long add(SeLoss po) { |
| | | seLossMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.recharge; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/8 8:57 |
| | | * @LastEditTime 2023/12/8 8:57 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "充值传入对象") |
| | | public class DtoRecharge { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | | */ |
| | | @Schema(description = "卡片余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="卡片余额不能小于0") |
| | | private Float money; |
| | | |
| | | /** |
| | | * 充值金额 |
| | | */ |
| | | @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="充值金额不能小于0") |
| | | private Float amount; |
| | | |
| | | /** |
| | | * 赠送金额 |
| | | */ |
| | | @Schema(description = "赠送金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="赠送金额不能小于0") |
| | | private Float gift; |
| | | |
| | | /** |
| | | * 充值后余额 |
| | | */ |
| | | @Schema(description = "充值后余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="充值后余额不能小于0") |
| | | private Float afterRecharge; |
| | | |
| | | /** |
| | | * 付款方式编号 |
| | | */ |
| | | @Schema(description = "付款方式编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long paymentId; |
| | | |
| | | /** |
| | | * 水价 |
| | | */ |
| | | @Schema(description = "水价", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="水价不能小于0") |
| | | private Float price; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | } |
| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoRecharge; |
| | | import com.dy.pipIrrGlobal.pojoSe.*; |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | @Slf4j |
| | | @Tag(name = "充值管理", description = "充值操作") |
| | |
| | | @RequiredArgsConstructor |
| | | public class RechargeCtrl { |
| | | private final RechargeSv rechargeSv; |
| | | private final ClientCardSv clientCardSv; |
| | | |
| | | @Operation(summary = "获得一页充值记录", description = "返回一页充值数据") |
| | | @ApiResponses(value = { |
| | |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "充值", description = "充值") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoRecharge po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * money 卡片余额 |
| | | * amount 充值金额 |
| | | * gift 赠送金额 |
| | | * afterRecharge 充值后余额 |
| | | * paymentId 支付方式编号 |
| | | * price 水价 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * rechargeTime 充值时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | Float money = po.getMoney(); |
| | | Float amount = po.getAmount(); |
| | | Float gift = po.getGift(); |
| | | Float afterRecharge = po.getAfterRecharge(); |
| | | Long paymentId = po.getPaymentId(); |
| | | Float price = po.getPrice(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date rechargeTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | } |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | | * 补卡时间 |
| | | * 最后操作类型-2 |
| | | */ |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setId(cardId); |
| | | seClientCard.setRechargedt(rechargeTime); |
| | | seClientCard.setLastoper(LastOperateENUM.RECHARGE.getCode ()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("充值失败-农户卡修改异常"); |
| | | } |
| | | |
| | | /** |
| | | * 删除充值表该卡的充值记录 |
| | | */ |
| | | Integer rec_deleteRecharge = Optional.ofNullable(rechargeSv.deleteByCardId(cardId)).orElse(0); |
| | | /** |
| | | * 添加充值记录 |
| | | */ |
| | | SeRecharge seRecharge = new SeRecharge(); |
| | | seRecharge.setCardid(cardId); |
| | | seRecharge.setClientid(clientId); |
| | | seRecharge.setMoney(money); |
| | | seRecharge.setAmount(amount); |
| | | seRecharge.setGift(gift); |
| | | seRecharge.setAfterrecharge(afterRecharge); |
| | | seRecharge.setPaymentid(paymentId); |
| | | seRecharge.setPrice(price); |
| | | seRecharge.setRemarks(remarks); |
| | | seRecharge.setOperator(operator); |
| | | seRecharge.setOperatedt(rechargeTime); |
| | | Long rec = Optional.ofNullable(rechargeSv.add(seRecharge)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("充值失败-充值记录写入异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加补卡历史记录 |
| | | */ |
| | | SeRechargeHistory seRechargeHistory = new SeRechargeHistory(); |
| | | seRechargeHistory.setCardid(cardId); |
| | | seRechargeHistory.setClientid(clientId); |
| | | seRechargeHistory.setMoney(money); |
| | | seRechargeHistory.setAmount(amount); |
| | | seRechargeHistory.setGift(gift); |
| | | seRechargeHistory.setAfterrecharge(afterRecharge); |
| | | seRechargeHistory.setPaymentid(paymentId); |
| | | seRechargeHistory.setPrice(price); |
| | | seRechargeHistory.setRemarks(remarks); |
| | | seRechargeHistory.setOperator(operator); |
| | | seRechargeHistory.setOperatedt(rechargeTime); |
| | | |
| | | Long rec_history = Optional.ofNullable(rechargeSv.addHistory(seRechargeHistory)).orElse(0L); |
| | | if(rec_history == 0) { |
| | | return BaseResponseUtils.buildFail("充值失败-充值历史记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
| | |
| | | package com.dy.pipIrrSell.recharge; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeRechargeHistoryMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.SeRechargeMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoRecharge; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRecharge; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory; |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class RechargeSv { |
| | | @Autowired |
| | | private SeRechargeMapper seRechargeMapper; |
| | | |
| | | @Autowired |
| | | private SeRechargeHistoryMapper seRechargeHistoryMapper; |
| | | |
| | | public QueryResultVo<List<VoRecharge>> getRecharges(QueryVo queryVo) { |
| | | //完善查询充值记录的起止时间 |
| | |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡编号(主键)删除充值记录 |
| | | * @param cardId |
| | | * @return |
| | | */ |
| | | public Integer deleteByPrimaryKey(Long cardId) { |
| | | return seRechargeMapper.deleteByPrimaryKey(cardId); |
| | | } |
| | | |
| | | /** |
| | | * 添加充值记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long add(SeRecharge po) { |
| | | seRechargeMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡编号删除充值记录 |
| | | * @param cardId |
| | | * @return |
| | | */ |
| | | public Integer deleteByCardId(Long cardId) { |
| | | return seRechargeMapper.deleteByCardId(cardId); |
| | | } |
| | | |
| | | /** |
| | | * 添加充值历史表 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long addHistory(SeRechargeHistory po){ |
| | | seRechargeHistoryMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.reversal; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/11 9:36 |
| | | * @LastEditTime 2023/12/11 9:36 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "冲正传入对象") |
| | | public class DtoReversal { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | | */ |
| | | @Schema(description = "卡片余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="卡片余额不能小于0") |
| | | private Float cardBalance; |
| | | |
| | | /** |
| | | * 系统余额 |
| | | */ |
| | | @Schema(description = "系统余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="系统余额不能小于0") |
| | | private Float systemBalance; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | } |
| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoReversal; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeReversal; |
| | | import com.dy.pipIrrGlobal.voSe.VoReversal; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @RequiredArgsConstructor |
| | | public class ReversalCtrl { |
| | | private final ReversalSv reversalSv; |
| | | private final ClientCardSv clientCardSv; |
| | | |
| | | @Operation(summary = "获得一页冲正记录", description = "返回一页冲正数据") |
| | | @ApiResponses(value = { |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "添加冲正记录", description = "添加冲正记录") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoReversal po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * cardBalance 卡片余额 |
| | | * systemBalance 系统余额 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * reversalTime 冲正 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | Float cardBalance = po.getCardBalance(); |
| | | Float systemBalance = po.getSystemBalance(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date reversalTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | } |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | | * 挂失时间 |
| | | * 最后操作类型-4 |
| | | */ |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setId(cardId); |
| | | seClientCard.setReversaldt(reversalTime); |
| | | seClientCard.setLastoper(LastOperateENUM.REVERSAL.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("冲正失败-农户卡冲正异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加解锁记录 |
| | | */ |
| | | SeReversal reversal = new SeReversal(); |
| | | reversal.setCardid(cardId); |
| | | reversal.setClientid(clientId); |
| | | reversal.setCardbalance(cardBalance); |
| | | reversal.setSystembalance(systemBalance); |
| | | reversal.setRemarks(remarks); |
| | | reversal.setOperator(operator); |
| | | reversal.setOperatedt(reversalTime); |
| | | Long rec = Optional.ofNullable(reversalSv.add(reversal)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("解锁失败-解锁记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeReversalMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoReversal; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeReversal; |
| | | import com.dy.pipIrrGlobal.voSe.VoReversal; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | rsVo.obj = seReversalMapper.getReversals(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 添加冲正记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long add(SeReversal po) { |
| | | seReversalMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.unlock; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/11 9:34 |
| | | * @LastEditTime 2023/12/11 9:34 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "解锁传入对象") |
| | | public class DtoUnlock { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 余额 |
| | | */ |
| | | @Schema(description = "余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="余额不能小于0") |
| | | private Float money; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "操作人编号必须为大于0的整数") |
| | | private Long operator; |
| | | } |
| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoUnlock; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeUnlock; |
| | | import com.dy.pipIrrGlobal.voSe.VoUnlock; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @RequiredArgsConstructor |
| | | public class UnlockCtrl { |
| | | private final UnlockSv unlockSv; |
| | | private final ClientCardSv clientCardSv; |
| | | |
| | | @Operation(summary = "获得一页解锁记录", description = "返回一页解锁数据") |
| | | @ApiResponses(value = { |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "添加解锁记录", description = "添加解锁记录") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid DtoUnlock po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * money 余额 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * unlockTime 解锁时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | Float money = po.getMoney(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | Date unlockTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | } |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | | * 挂失时间 |
| | | * 最后操作类型-4 |
| | | */ |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setId(cardId); |
| | | seClientCard.setUnlockdt(unlockTime); |
| | | seClientCard.setLastoper(LastOperateENUM.UNLOCK.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("解锁失败-农户卡解锁异常"); |
| | | } |
| | | |
| | | /** |
| | | * 添加解锁记录 |
| | | */ |
| | | SeUnlock seUnlock = new SeUnlock(); |
| | | seUnlock.setCardid(cardId); |
| | | seUnlock.setClientid(clientId); |
| | | seUnlock.setMoney(money); |
| | | seUnlock.setRemarks(remarks); |
| | | seUnlock.setOperator(operator); |
| | | seUnlock.setOperatedt(unlockTime); |
| | | Long rec = Optional.ofNullable(unlockSv.add(seUnlock)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("解锁失败-解锁记录写入异常"); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeUnlockMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoUnlock; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeUnlock; |
| | | import com.dy.pipIrrGlobal.voSe.VoUnlock; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | rsVo.obj = seUnlockMapper.getUnlocks(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 添加解锁记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long add(SeUnlock po) { |
| | | seUnlockMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | } |