Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoBa; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/19 16:48 |
| | | * @LastEditTime 2023/12/19 16:48 |
| | | * @Description |
| | | */ |
| | | public interface BaRolePermissionsMapper { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(BaRolePermissions record); |
| | | |
| | | int insertSelective(BaRolePermissions record); |
| | | |
| | | BaRolePermissions selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(BaRolePermissions record); |
| | | |
| | | int updateByPrimaryKey(BaRolePermissions record); |
| | | |
| | | /** |
| | | * 依据角色编号删除角色授权 |
| | | * @return |
| | | */ |
| | | int delPermissionsByRoleId(@Param("roleId") Long roleId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUser; |
| | | import com.dy.pipIrrGlobal.voBa.VoUserInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @return update count |
| | | */ |
| | | int deleteLogicById(Long id); |
| | | |
| | | /** |
| | | * 根据用户编号获取用户信息 |
| | | * @param userId 用户编号 |
| | | * @return 用户信息列表 |
| | | */ |
| | | List<VoUserInfo> getUserInfos(@Param("userId") Long userId); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoPr; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/21 9:16 |
| | | * @LastEditTime 2023/12/21 9:16 |
| | | * @Description |
| | | */ |
| | | public interface PrDivideMapper { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(PrDivide record); |
| | | |
| | | int insertSelective(PrDivide record); |
| | | |
| | | PrDivide selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(PrDivide record); |
| | | |
| | | int updateByPrimaryKey(PrDivide record); |
| | | |
| | | /** |
| | | * 根据指定条件获取分水房记录数 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Long getRecordCount(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据指定条件获取分水房记录 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoDivide> getDivides(Map<?, ?> params); |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeActiveCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @LastEditTime 2023/12/18 16:58 |
| | | * @Description |
| | | */ |
| | | public interface SeActiveCardMapper { |
| | | |
| | | @Mapper |
| | | public interface SeActiveCardMapper extends BaseMapper<SeActiveCard> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeActiveCard record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCancel; |
| | | import com.dy.pipIrrGlobal.voSe.VoCancel; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 10:14 |
| | | * @LastEditTime 2023/12/9 10:14 |
| | | * @date 2023/12/20 14:48 |
| | | * @LastEditTime 2023/12/20 14:48 |
| | | * @Description |
| | | */ |
| | | public interface SeCancelMapper { |
| | | |
| | | @Mapper |
| | | public interface SeCancelMapper extends BaseMapper<SeCancel> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeCancel record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Map; |
| | |
| | | * @LastEditTime 2023/12/18 16:26 |
| | | * @Description |
| | | */ |
| | | public interface SeClientCardMapper { |
| | | |
| | | @Mapper |
| | | public interface SeClientCardMapper extends BaseMapper<SeClientCard> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeClientCard record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeLoss; |
| | | import com.dy.pipIrrGlobal.voSe.VoLoss; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 8:55 |
| | | * @LastEditTime 2023/12/9 8:55 |
| | | * @date 2023/12/19 15:08 |
| | | * @LastEditTime 2023/12/19 15:08 |
| | | * @Description |
| | | */ |
| | | public interface SeLossMapper { |
| | | |
| | | @Mapper |
| | | public interface SeLossMapper extends BaseMapper<SeLoss> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeLoss record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SePaymentMethodMapper { |
| | | public interface SePaymentMethodMapper extends BaseMapper<SePaymentMethod> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SePaymentMethod record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @LastEditTime 2023/12/19 10:35 |
| | | * @Description |
| | | */ |
| | | public interface SeRechargeHistoryMapper { |
| | | |
| | | @Mapper |
| | | public interface SeRechargeHistoryMapper extends BaseMapper<SeRechargeHistory> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeRechargeHistory record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRecharge; |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @LastEditTime 2023/12/19 10:18 |
| | | * @Description |
| | | */ |
| | | public interface SeRechargeMapper { |
| | | |
| | | @Mapper |
| | | public interface SeRechargeMapper extends BaseMapper<SeRecharge> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeRecharge record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeReversal; |
| | | import com.dy.pipIrrGlobal.voSe.VoReversal; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/11 9:17 |
| | | * @LastEditTime 2023/12/11 9:17 |
| | | * @date 2023/12/20 16:52 |
| | | * @LastEditTime 2023/12/20 16:52 |
| | | * @Description |
| | | */ |
| | | public interface SeReversalMapper { |
| | | |
| | | @Mapper |
| | | public interface SeReversalMapper extends BaseMapper<SeReversal> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeReversal record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeUnlock; |
| | | import com.dy.pipIrrGlobal.voSe.VoUnlock; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/11 9:11 |
| | | * @LastEditTime 2023/12/11 9:11 |
| | | * @date 2023/12/20 16:05 |
| | | * @LastEditTime 2023/12/20 16:05 |
| | | * @Description |
| | | */ |
| | | public interface SeUnlockMapper { |
| | | |
| | | @Mapper |
| | | public interface SeUnlockMapper extends BaseMapper<SeUnlock> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeUnlock record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeWallet; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @LastEditTime 2023/12/11 16:29 |
| | | * @Description |
| | | */ |
| | | public interface SeWalletMapper { |
| | | |
| | | @Mapper |
| | | public interface SeWalletMapper extends BaseMapper<SeWallet> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeWallet record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeWalletRechargeHistory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @LastEditTime 2023/12/12 9:06 |
| | | * @Description |
| | | */ |
| | | public interface SeWalletRechargeHistoryMapper { |
| | | |
| | | @Mapper |
| | | public interface SeWalletRechargeHistoryMapper extends BaseMapper<SeWalletRechargeHistory> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeWalletRechargeHistory record); |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeWalletRecharge; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @LastEditTime 2023/12/12 9:06 |
| | | * @Description |
| | | */ |
| | | public interface SeWalletRechargeMapper { |
| | | |
| | | @Mapper |
| | | public interface SeWalletRechargeMapper extends BaseMapper<SeWalletRecharge> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(SeWalletRecharge record); |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoBa; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/19 16:48 |
| | | * @LastEditTime 2023/12/19 16:48 |
| | | * @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.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import jakarta.validation.constraints.Size; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * 角色权限关联表 |
| | | */ |
| | | |
| | | @TableName(value="ba_role_permissions", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "角色权限实体") |
| | | public class BaRolePermissions 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 roleid; |
| | | |
| | | /** |
| | | * 角色名称 |
| | | */ |
| | | @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Size(max = 20) |
| | | private String roleName; |
| | | |
| | | /** |
| | | * 权限列表 |
| | | */ |
| | | @Schema(description = "权限列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "权限列表不能为空") |
| | | private String permissions; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoPr; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 20:17 |
| | | * @LastEditTime 2023/12/20 20:17 |
| | | * @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.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分水房表 |
| | | */ |
| | | |
| | | @TableName(value="pr_divide", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "分水房实体") |
| | | public class PrDivide 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; |
| | | |
| | | /** |
| | | * 所在县 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @Schema(description = "所在县ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | //@NotEmpty(message = "所在县不能为空") |
| | | private Long countyid; |
| | | |
| | | /** |
| | | * 所在镇 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @Schema(description = "所在镇ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | //@NotEmpty(message = "所在镇不能为空") |
| | | private Long townid; |
| | | |
| | | /** |
| | | * 所在村 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | //@NotEmpty(message = "所在村不能为空") |
| | | private Long villageid; |
| | | |
| | | /** |
| | | * 所在片区 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "所在片区不能为空") |
| | | private Long blockid; |
| | | |
| | | /** |
| | | * 分水口名称或编号 |
| | | */ |
| | | @Schema(description = "分水房名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "分水房名称不能为空") |
| | | @Length(message = "分水房名称不大于{max}字,不小于{min}字", min = 1, max = 25) |
| | | private String name; |
| | | |
| | | /** |
| | | * 覆盖村 |
| | | */ |
| | | @Schema(description = "覆盖村", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "覆盖村不大于{max}字,不小于{min}字", min = 1, max = 100) |
| | | private String villages; |
| | | |
| | | /** |
| | | * 覆盖面积(平方公里) |
| | | */ |
| | | @Schema(description = "覆盖面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | private Double area; |
| | | |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | @Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | private String header; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | //@NotBlank(message = "联系电话不能为空") |
| | | @Length(message = "农联系电话必须{max}位数据", min = 11, max = 11) |
| | | private String phone; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "经度不能为空") |
| | | private Double lng; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "经度不能为空") |
| | | private Double lat; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 200) |
| | | private String remarks; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "操作人编号不能为空") |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | |
| | | /** |
| | | * 逻辑删除标识;0-未删除,1-删除 |
| | | */ |
| | | @Schema(description = "删除标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Byte deleted; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "水卡编号必须为大于0的整数") |
| | | private Long cardid; |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | |
| | | /** |
| | | * 退款金额 |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 8:55 |
| | | * @LastEditTime 2023/12/9 8:55 |
| | | * @LastEditTime 2023/12/19 15:14 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "水卡编号不小于{min}", min = 1) |
| | | private Long cardid; |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | |
| | | /** |
| | | * 余额 |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "水卡编号必须为大于0的整数") |
| | | private Long cardid; |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "水卡编号必须为大于0的整数") |
| | | private Long cardid; |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "农户编号不小于{min}", min = 1) |
| | | private Long clientid; |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | |
| | | /** |
| | | * 剩余金额 |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voBa; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 10:19 |
| | | * @LastEditTime 2023/12/20 10:19 |
| | | * @Description 用户信息视图对象 |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(title = "用户信息视图对象") |
| | | public class VoUserInfo implements BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(title = "用户ID") |
| | | private Long userId; |
| | | |
| | | @Schema(title = "用户姓名") |
| | | private String userName; |
| | | |
| | | @Schema(title = "角色ID") |
| | | private Long roleId; |
| | | |
| | | @Schema(title = "角色名称") |
| | | private String roleName; |
| | | |
| | | @Schema(title = "授权列表") |
| | | private String permissions; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voPr; |
| | | |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/21 9:28 |
| | | * @LastEditTime 2023/12/21 9:28 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(title = "分水房视图对象") |
| | | public class VoDivide implements BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(title = "ID") |
| | | private Long id; |
| | | |
| | | @Schema(title = "分水房名称") |
| | | private String divideName; |
| | | |
| | | @Schema(title = "所属片区") |
| | | private String blockName; |
| | | |
| | | @Schema(title = "负责人") |
| | | private String header; |
| | | |
| | | @Schema(title = "联系电话") |
| | | private String phone; |
| | | |
| | | @Schema(title = "归属地") |
| | | private String address; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "操作时间") |
| | | private Date operateDt; |
| | | } |
| | |
| | | private String clientName; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | @Schema(title = "水卡地址") |
| | | private String cardAddr; |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | | |
| | | @Schema(title = "水卡状态") |
| | | private Byte state; |
| | |
| | | private String clientName; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | @Schema(title = "水卡地址") |
| | | private String cardAddr; |
| | | private String cardNum; |
| | | |
| | | @Schema(title = "退回金额") |
| | | private Float refund; |
| | |
| | | private String clientName; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | @Schema(title = "水卡地址") |
| | | private String cardAddr; |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | | |
| | | @Schema(title = "卡片余额") |
| | | @JsonSerialize(using = Double2Serializer.class) |
| | |
| | | private String clientName; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | @Schema(title = "水卡地址") |
| | | private String cardAddr; |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | | |
| | | @Schema(title = "充值金额") |
| | | private Float amount; |
| | |
| | | private String clientName; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | @Schema(title = "水卡地址") |
| | | private String cardAddr; |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | | |
| | | @Schema(title = "剩余金额") |
| | | private Float cardBalance; |
| | |
| | | private String clientName; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | @Schema(title = "水卡地址") |
| | | private String cardAddr; |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | | |
| | | @Schema(title = "剩余金额") |
| | | private Float money; |
| | |
| | | sell: |
| | | webPort: 8084 |
| | | actutorPort: 9084 |
| | | idSuffix: 6 |
| | | idSuffix: 6 |
| | | project: |
| | | webPort: 8085 |
| | | actutorPort: 9085 |
| | | idSuffix: 7 |
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.daoBa.BaRolePermissionsMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaRolePermissions"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ba_role_permissions--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="roleId" jdbcType="BIGINT" property="roleid" /> |
| | | <result column="permissions" jdbcType="VARCHAR" property="permissions" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, roleId, permissions |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ba_role_permissions |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ba_role_permissions |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--依据角色编号删除角色授权--> |
| | | <delete id="delPermissionsByRoleId" parameterType="java.lang.Long"> |
| | | delete from ba_role_permissions where roleId = ${roleId} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaRolePermissions"> |
| | | <!--@mbg.generated--> |
| | | insert into ba_role_permissions (id, roleId, permissions |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{roleid,jdbcType=BIGINT}, #{permissions,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaRolePermissions"> |
| | | <!--@mbg.generated--> |
| | | insert into ba_role_permissions |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="roleid != null"> |
| | | roleId, |
| | | </if> |
| | | <if test="permissions != null"> |
| | | permissions, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="roleid != null"> |
| | | #{roleid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="permissions != null"> |
| | | #{permissions,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaRolePermissions"> |
| | | <!--@mbg.generated--> |
| | | update ba_role_permissions |
| | | <set> |
| | | <if test="roleid != null"> |
| | | roleId = #{roleid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="permissions != null"> |
| | | permissions = #{permissions,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaRolePermissions"> |
| | | <!--@mbg.generated--> |
| | | update ba_role_permissions |
| | | set roleId = #{roleid,jdbcType=BIGINT}, |
| | | permissions = #{permissions,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | update ba_user set deleted = 1 |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <!--根据用户编号获取用户信息--> |
| | | <select id="getUserInfos" resultType="com.dy.pipIrrGlobal.voBa.VoUserInfo"> |
| | | SELECT |
| | | user.id AS userId, |
| | | user.`name` AS userName, |
| | | rol.id AS roleId, |
| | | rol.`name` AS roleName, |
| | | per.permissions |
| | | FROM ba_user user |
| | | INNER JOIN ba_user_role use_rol ON user.id = use_rol.userId |
| | | INNER JOIN ba_role rol ON rol.id = use_rol.roleId |
| | | INNER JOIN ba_role_permissions per ON per.roleId = rol.id |
| | | <where> |
| | | <if test = "userId != null and userId > 0"> |
| | | AND user.id = ${userId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
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.daoPr.PrDivideMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrDivide"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table pr_divide--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="countyId" jdbcType="BIGINT" property="countyid" /> |
| | | <result column="townId" jdbcType="BIGINT" property="townid" /> |
| | | <result column="villageId" jdbcType="BIGINT" property="villageid" /> |
| | | <result column="blockId" jdbcType="BIGINT" property="blockid" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="villages" jdbcType="VARCHAR" property="villages" /> |
| | | <result column="area" jdbcType="FLOAT" property="area" /> |
| | | <result column="header" jdbcType="VARCHAR" property="header" /> |
| | | <result column="phone" jdbcType="VARCHAR" property="phone" /> |
| | | <result column="lng" jdbcType="DOUBLE" property="lng" /> |
| | | <result column="lat" jdbcType="DOUBLE" property="lat" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" /> |
| | | <result column="deleted" jdbcType="TINYINT" property="deleted" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, countyId, townId, villageId, blockId, `name`, villages, area, `header`, phone, |
| | | lng, lat, remarks, `operator`, operateDt, deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pr_divide |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from pr_divide |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrDivide"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_divide (id, countyId, townId, |
| | | villageId, blockId, `name`, |
| | | villages, area, `header`, |
| | | phone, lng, lat, remarks, |
| | | `operator`, operateDt, deleted |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{countyid,jdbcType=BIGINT}, #{townid,jdbcType=BIGINT}, |
| | | #{villageid,jdbcType=BIGINT}, #{blockid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, |
| | | #{villages,jdbcType=VARCHAR}, #{area,jdbcType=FLOAT}, #{header,jdbcType=VARCHAR}, |
| | | #{phone,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{remarks,jdbcType=VARCHAR}, |
| | | #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrDivide"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_divide |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="countyid != null"> |
| | | countyId, |
| | | </if> |
| | | <if test="townid != null"> |
| | | townId, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | villageId, |
| | | </if> |
| | | <if test="blockid != null"> |
| | | blockId, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name`, |
| | | </if> |
| | | <if test="villages != null"> |
| | | villages, |
| | | </if> |
| | | <if test="area != null"> |
| | | area, |
| | | </if> |
| | | <if test="header != null"> |
| | | `header`, |
| | | </if> |
| | | <if test="phone != null"> |
| | | phone, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="remarks != null"> |
| | | remarks, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator`, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="countyid != null"> |
| | | #{countyid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="townid != null"> |
| | | #{townid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | #{villageid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="blockid != null"> |
| | | #{blockid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="villages != null"> |
| | | #{villages,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="area != null"> |
| | | #{area,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="header != null"> |
| | | #{header,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="phone != null"> |
| | | #{phone,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | #{lat,jdbcType=DOUBLE}, |
| | | </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> |
| | | <if test="deleted != null"> |
| | | #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrDivide"> |
| | | <!--@mbg.generated--> |
| | | update pr_divide |
| | | <set> |
| | | <if test="countyid != null"> |
| | | countyId = #{countyid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="townid != null"> |
| | | townId = #{townid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="villageid != null"> |
| | | villageId = #{villageid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="blockid != null"> |
| | | blockId = #{blockid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="villages != null"> |
| | | villages = #{villages,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="area != null"> |
| | | area = #{area,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="header != null"> |
| | | `header` = #{header,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="phone != null"> |
| | | phone = #{phone,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | </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> |
| | | <if test="deleted != null"> |
| | | deleted = #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrDivide"> |
| | | <!--@mbg.generated--> |
| | | update pr_divide |
| | | set countyId = #{countyid,jdbcType=BIGINT}, |
| | | townId = #{townid,jdbcType=BIGINT}, |
| | | villageId = #{villageid,jdbcType=BIGINT}, |
| | | blockId = #{blockid,jdbcType=BIGINT}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | villages = #{villages,jdbcType=VARCHAR}, |
| | | area = #{area,jdbcType=FLOAT}, |
| | | `header` = #{header,jdbcType=VARCHAR}, |
| | | phone = #{phone,jdbcType=VARCHAR}, |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据指定条件获取分水房记录数--> |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM pr_divide divi |
| | | INNER JOIN ba_block blo ON divi.blockId = blo.id |
| | | INNER JOIN ba_district country ON divi.countyId = country.id |
| | | INNER JOIN ba_district town ON divi.townId = town.id |
| | | INNER JOIN ba_district village ON divi.villageid = village.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "divideName != null and divideName !=''"> |
| | | AND divi.name LIKE CONCAT('%',#{divideName},'%') |
| | | </if> |
| | | |
| | | <if test = "blockName != null and blockName !=''"> |
| | | AND blo.name = #{blockName} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取分水房记录--> |
| | | <select id="getDivides" resultType="com.dy.pipIrrGlobal.voPr.VoDivide"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | divi.name AS divideName, |
| | | blo.`name` AS blockName, |
| | | divi.header, |
| | | divi.phone, |
| | | CONCAT(country.`name`, town.`name`, village.`name`) AS address, |
| | | divi.operateDt |
| | | FROM pr_divide divi |
| | | INNER JOIN ba_block blo ON divi.blockId = blo.id |
| | | INNER JOIN ba_district country ON divi.countyId = country.id |
| | | INNER JOIN ba_district town ON divi.townId = town.id |
| | | INNER JOIN ba_district village ON divi.villageid = village.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "divideName != null and divideName !=''"> |
| | | AND divi.name LIKE CONCAT('%',#{divideName},'%') |
| | | </if> |
| | | |
| | | <if test = "blockName != null and blockName !=''"> |
| | | AND blo.name = #{blockName} |
| | | </if> |
| | | </where> |
| | | ORDER BY divi.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_active_card act |
| | | INNER JOIN ba_client cli ON act.clientNum = cli.num |
| | | INNER JOIN se_client_card card ON act.cardNum = card.cardNum |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN ba_client cli ON act.clientNum = cli.num |
| | | INNER JOIN se_client_card card ON act.cardNum = card.cardNum |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "operateType != null and operateType > 0"> |
| | | AND act.operateType = ${operateType} |
| | |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "cardAddr != null and cardAddr !=''">--> |
| | | <!-- AND card.cardAddr like CONCAT('%',#{cardAddr},'%')--> |
| | | <!-- </if>--> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | cli.num AS clientNum, |
| | | card.cardNum, |
| | | card.state, |
| | | (CASE |
| | | WHEN card.state = 1 THEN "正常" |
| | | WHEN card.state = 2 THEN "已注销" |
| | | ELSE "已挂失" |
| | | WHEN card.state = 1 THEN "正常" |
| | | WHEN card.state = 2 THEN "已注销" |
| | | ELSE "已挂失" |
| | | END) AS stateName, |
| | | act.reissueAmount, |
| | | act.cardCost, |
| | |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "cardAddr != null and cardAddr !=''">--> |
| | | <!-- AND card.cardAddr like CONCAT('%',#{cardAddr},'%')--> |
| | | <!-- </if>--> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@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="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <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, clientId, refund, refundType, remarks, `operator`, operateDt |
| | | id, cardNum, clientNum, refund, refundType, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel"> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel"> |
| | | <!--@mbg.generated--> |
| | | 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 into se_cancel (id, cardNum, clientNum, refund, |
| | | refundType, remarks, `operator`, |
| | | operateDt) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{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 test="cardnum != null"> |
| | | cardNum, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | </if> |
| | | <if test="refund != null"> |
| | | refund, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="refund != null"> |
| | | #{refund,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_cancel |
| | | <set> |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="refund != null"> |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel"> |
| | | <!--@mbg.generated--> |
| | | update se_cancel |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | refundType = #{refundtype,jdbcType=TINYINT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | 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 |
| | | INNER JOIN se_client_card card ON can.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON can.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cancelTimeStart != null and cancelTimeStop != null"> |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | cli.num AS clientNum, |
| | | card.cardNum, |
| | | can.refund, |
| | | (CASE |
| | | WHEN can.refundType = 1 THEN "现金" |
| | | 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 |
| | | INNER JOIN se_client_card card ON can.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON can.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cancelTimeStart != null and cancelTimeStop != null"> |
| | | AND can.operateDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | | ORDER BY can.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@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="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <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, clientId, money, refund, remarks, `operator`, operateDt |
| | | id, cardNum, clientNum, money, refund, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss"> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss"> |
| | | <!--@mbg.generated--> |
| | | 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 into se_loss (id, cardNum, clientNum, money, |
| | | refund, remarks, `operator`, |
| | | operateDt) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{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 test="cardnum != null"> |
| | | cardNum, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_loss |
| | | <set> |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss"> |
| | | <!--@mbg.generated--> |
| | | update se_loss |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | 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 |
| | | INNER JOIN se_client_card card ON loss.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON loss.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "lossTimeStart != null and lossTimeStop != null"> |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | cli.num AS clientNum, |
| | | card.cardNum, |
| | | 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 |
| | | INNER JOIN se_client_card card ON loss.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON loss.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "lossTimeStart != null and lossTimeStop != null"> |
| | | AND loss.operateDt BETWEEN #{lossTimeStart} AND #{lossTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | | ORDER BY loss.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | |
| | | select |
| | | COUNT(*) AS recordCount |
| | | FROM se_recharge_history rec |
| | | INNER JOIN se_client_card card ON rec.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON rec.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN se_client_card card ON rec.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON rec.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "clientId != null and clientId > 0">--> |
| | | <!-- AND rec.clientId like CONCAT('%',#{clientId},'%')--> |
| | | <!-- </if>--> |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND rec.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "cardAddr != null and cardAddr !=''">--> |
| | | <!-- AND card.cardAddr like CONCAT('%',#{cardAddr},'%')--> |
| | | <!-- </if>--> |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "clientId != null and clientId > 0">--> |
| | | <!-- AND rec.clientId like CONCAT('%',#{clientId},'%')--> |
| | | <!-- </if>--> |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND rec.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "cardAddr != null and cardAddr !=''">--> |
| | | <!-- AND card.cardAddr like CONCAT('%',#{cardAddr},'%')--> |
| | | <!-- </if>--> |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@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="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <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, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt |
| | | id, cardNum, clientNum, cardBalance, systemBalance, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> |
| | | <!--@mbg.generated--> |
| | | 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 into se_reversal (id, cardNum, clientNum, cardBalance, |
| | | systemBalance, remarks, `operator`, |
| | | operateDt) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{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 test="cardnum != null"> |
| | | cardNum, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | cardBalance, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | #{cardbalance,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_reversal |
| | | <set> |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | cardBalance = #{cardbalance,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> |
| | | <!--@mbg.generated--> |
| | | update se_reversal |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | 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 |
| | | 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 |
| | | COUNT(*) AS recordCount |
| | | FROM se_reversal rev |
| | | INNER JOIN se_client_card card ON rev.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON rev.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "reversallTimeStart != null and reversalTimeStop != null"> |
| | | AND card.unlockDt BETWEEN #{reversallTimeStart} AND #{reversalTimeStop} |
| | | <if test = "reversalTimeStart != null and reversalTimeStop != null"> |
| | | AND rev.operateDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | cli.num AS clientNum, |
| | | card.cardNum, |
| | | 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 |
| | | INNER JOIN se_client_card card ON rev.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON rev.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "reversalTimeStart != null and reversalTimeStop != null"> |
| | | AND rev.operateDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | | ORDER BY rev.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@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="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <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, clientId, money, remarks, `operator`, operateDt |
| | | id, cardNum, clientNum, money, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock"> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock"> |
| | | <!--@mbg.generated--> |
| | | 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 into se_unlock (id, cardNum, clientNum, money, |
| | | remarks, `operator`, operateDt |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{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 test="cardnum != null"> |
| | | cardNum, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_unlock |
| | | <set> |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock"> |
| | | <!--@mbg.generated--> |
| | | update se_unlock |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | 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 |
| | | INNER JOIN se_client_card card ON unl.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON unl.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "unlocklTimeStart != null and unlockTimeStop != null"> |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.id AS clientId, |
| | | card.cardAddr, |
| | | cli.num AS clientNum, |
| | | card.cardNum, |
| | | 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 |
| | | INNER JOIN se_client_card card ON unl.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON unl.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardAddr != null and cardAddr !=''"> |
| | | AND card.cardAddr like CONCAT('%',#{cardAddr},'%') |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "unlocklTimeStart != null and unlockTimeStop != null"> |
| | | AND unl.operateDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop} |
| | | </if> |
| | | </where> |
| | | |
| | | ORDER BY unl.operateDt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
New file |
| | |
| | | package com.dy.pipIrrBase.result; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 13:46 |
| | | * @LastEditTime 2023/12/20 13:46 |
| | | * @Description |
| | | */ |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum SystemResultCode { |
| | | /** |
| | | * 角色 |
| | | */ |
| | | PERMISSION_ERROR(10001, "授权错误"); |
| | | |
| | | private final Integer 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.pipIrrBase.result.SystemResultCode; |
| | | import com.dy.pipIrrBase.user.QueryVo; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRole; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions; |
| | | 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.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @Tag(name = "角色管理", description = "角色增删改查等操作") |
| | | @RestController |
| | | @RequestMapping(path="role") |
| | | @RequiredArgsConstructor |
| | | @SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked") |
| | | public class RoleCtrl { |
| | | |
| | | private RoleSv sv ; |
| | | private final RoleSv roleSv; |
| | | |
| | | @Autowired |
| | | private void setSv(RoleSv sv){ |
| | |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | po.id = null ; |
| | | int count; |
| | | Long count; |
| | | try { |
| | | po.deleted = Deleted.NO ;//默认不删除 |
| | | count = this.sv.save(po); |
| | |
| | | } |
| | | } |
| | | |
| | | @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 = "addPermissions", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> permission(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid BaRolePermissions po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 如果roleid和roleName都空:提示错误信息 |
| | | * 如果roleid为空:新建角色且授权 |
| | | * 1. 添加角色记录 |
| | | * 2. 添加角色、权限关联记录 |
| | | * 如果roleid不为空:修改角色授权 |
| | | * 1. 删除角色、权限记录 |
| | | * 2. 添加角色、权限记录 |
| | | */ |
| | | |
| | | Long roleid = Optional.ofNullable(po.getRoleid()).orElse(0L); |
| | | String roleName = Optional.ofNullable(po.getRoleName()).orElse(""); |
| | | String permissions = Optional.ofNullable(po.getPermissions()).orElse(""); |
| | | |
| | | if(roleid == 0 && roleName.length() == 0) { |
| | | return BaseResponseUtils.buildFail(SystemResultCode.PERMISSION_ERROR.getMessage()); |
| | | } |
| | | |
| | | // 新建角色且授权 |
| | | if(roleid == 0) { |
| | | BaRole baRole = new BaRole(); |
| | | baRole.setName(roleName); |
| | | roleid = Optional.ofNullable(roleSv.save(baRole)).orElse(0L); |
| | | po.setRoleid(roleid); |
| | | roleSv.addPermissions(po); |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | // 修改角色授权 |
| | | roleSv.delPermissionsByRoleId(roleid); |
| | | roleSv.addPermissions(po); |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrBase.user.QueryVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRoleMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRolePermissionsMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaRolePrivilegeMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRole; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePrivilege; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | |
| | | this.rolePrivDao = dao; |
| | | } |
| | | |
| | | @Autowired |
| | | private BaRolePermissionsMapper baRolePermissionsMapper; |
| | | |
| | | /** |
| | | * 得到所有角色 |
| | |
| | | * @param po 实体 |
| | | * @return 影响记录数量 |
| | | */ |
| | | |
| | | /** |
| | | * 12月20日 朱宝民修改返回值,添加角色后返回主键 |
| | | */ |
| | | @Transactional |
| | | public int save(BaRole po){ |
| | | return this.dao.putin(po) ; |
| | | public Long save(BaRole po){ |
| | | //return this.dao.putin(po) ; |
| | | this.dao.putin(po) ; |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | |
| | | return this.dao.deleteLogicById(id) ; |
| | | } |
| | | |
| | | /** |
| | | * 添加授权记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Integer addPermissions(BaRolePermissions po) { |
| | | return baRolePermissionsMapper.insert(po); |
| | | } |
| | | |
| | | /** |
| | | * 依据角色编号删除授权记录 |
| | | * @param roleid |
| | | * @return |
| | | */ |
| | | public Integer delPermissionsByRoleId(Long roleid) { |
| | | return baRolePermissionsMapper.delPermissionsByRoleId(roleid); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUser; |
| | | import com.dy.pipIrrGlobal.util.Constant; |
| | | import com.dy.pipIrrGlobal.voBa.VoUserInfo; |
| | | import com.mysql.cj.util.StringUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | |
| | | private void setSv(UserSv sv) { |
| | | this.sv = sv; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 客户端请求得到默认密码 |
| | |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据用户编号获取用户信息 |
| | | * @param userId 用户编号 |
| | | * @return 用户信息列表 |
| | | */ |
| | | @Operation(summary = "获得全部用户信息", description = "返回全部用户信息数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回全部用户数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = BaUser.class))} |
| | | ) |
| | | }) |
| | | @GetMapping("/getUserInfos/{userId}") |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<VoUserInfo>>> getUserInfos(@PathVariable("userId") Long userId) { |
| | | try { |
| | | List<VoUserInfo> res = this.sv.getUserInfos(userId); |
| | | System.out.println(" :" + res); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("查询用户信息异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.dy.pipIrrGlobal.daoBa.BaUserRoleMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUser; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUserRole; |
| | | import com.dy.pipIrrGlobal.voBa.VoUserInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return val; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据用户编号获取用户信息 |
| | | * @param userId 用户编号 |
| | | * @return 用户信息列表 |
| | | */ |
| | | public List<VoUserInfo> getUserInfos(Long userId) { |
| | | return dao.getUserInfos(userId); |
| | | } |
| | | } |
New file |
| | |
| | | HELP.md |
| | | target/ |
| | | /pipIrr-web-sell.iml |
| | | !.mvn/wrapper/maven-wrapper.jar |
| | | !**/src/main/**/target/ |
| | | !**/src/test/**/target/ |
| | | |
| | | ### STS ### |
| | | .apt_generated |
| | | .classpath |
| | | .factorypath |
| | | .project |
| | | .settings |
| | | .springBeans |
| | | .sts4-cache |
| | | |
| | | ### IntelliJ IDEA ### |
| | | .idea |
| | | *.iws |
| | | *.iml |
| | | *.ipr |
| | | |
| | | ### NetBeans ### |
| | | /nbproject/private/ |
| | | /nbbuild/ |
| | | /dist/ |
| | | /nbdist/ |
| | | /.nb-gradle/ |
| | | build/ |
| | | !**/src/main/**/build/ |
| | | !**/src/test/**/build/ |
| | | |
| | | ### VS Code ### |
| | | .vscode/ |
New file |
| | |
| | | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip |
| | | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar |
New file |
| | |
| | | #!/bin/sh |
| | | # ---------------------------------------------------------------------------- |
| | | # Licensed to the Apache Software Foundation (ASF) under one |
| | | # or more contributor license agreements. See the NOTICE file |
| | | # distributed with this work for additional information |
| | | # regarding copyright ownership. The ASF licenses this file |
| | | # to you under the Apache License, Version 2.0 (the |
| | | # "License"); you may not use this file except in compliance |
| | | # with the License. You may obtain a copy of the License at |
| | | # |
| | | # https://www.apache.org/licenses/LICENSE-2.0 |
| | | # |
| | | # Unless required by applicable law or agreed to in writing, |
| | | # software distributed under the License is distributed on an |
| | | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | # KIND, either express or implied. See the License for the |
| | | # specific language governing permissions and limitations |
| | | # under the License. |
| | | # ---------------------------------------------------------------------------- |
| | | |
| | | # ---------------------------------------------------------------------------- |
| | | # Apache Maven Wrapper startup batch script, version 3.2.0 |
| | | # |
| | | # Required ENV vars: |
| | | # ------------------ |
| | | # JAVA_HOME - location of a JDK home dir |
| | | # |
| | | # Optional ENV vars |
| | | # ----------------- |
| | | # MAVEN_OPTS - parameters passed to the Java VM when running Maven |
| | | # e.g. to debug Maven itself, use |
| | | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
| | | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
| | | # ---------------------------------------------------------------------------- |
| | | |
| | | if [ -z "$MAVEN_SKIP_RC" ] ; then |
| | | |
| | | if [ -f /usr/local/etc/mavenrc ] ; then |
| | | . /usr/local/etc/mavenrc |
| | | fi |
| | | |
| | | if [ -f /etc/mavenrc ] ; then |
| | | . /etc/mavenrc |
| | | fi |
| | | |
| | | if [ -f "$HOME/.mavenrc" ] ; then |
| | | . "$HOME/.mavenrc" |
| | | fi |
| | | |
| | | fi |
| | | |
| | | # OS specific support. $var _must_ be set to either true or false. |
| | | cygwin=false; |
| | | darwin=false; |
| | | mingw=false |
| | | case "$(uname)" in |
| | | CYGWIN*) cygwin=true ;; |
| | | MINGW*) mingw=true;; |
| | | Darwin*) darwin=true |
| | | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home |
| | | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html |
| | | if [ -z "$JAVA_HOME" ]; then |
| | | if [ -x "/usr/libexec/java_home" ]; then |
| | | JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME |
| | | else |
| | | JAVA_HOME="/Library/Java/Home"; export JAVA_HOME |
| | | fi |
| | | fi |
| | | ;; |
| | | esac |
| | | |
| | | if [ -z "$JAVA_HOME" ] ; then |
| | | if [ -r /etc/gentoo-release ] ; then |
| | | JAVA_HOME=$(java-config --jre-home) |
| | | fi |
| | | fi |
| | | |
| | | # For Cygwin, ensure paths are in UNIX format before anything is touched |
| | | if $cygwin ; then |
| | | [ -n "$JAVA_HOME" ] && |
| | | JAVA_HOME=$(cygpath --unix "$JAVA_HOME") |
| | | [ -n "$CLASSPATH" ] && |
| | | CLASSPATH=$(cygpath --path --unix "$CLASSPATH") |
| | | fi |
| | | |
| | | # For Mingw, ensure paths are in UNIX format before anything is touched |
| | | if $mingw ; then |
| | | [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && |
| | | JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" |
| | | fi |
| | | |
| | | if [ -z "$JAVA_HOME" ]; then |
| | | javaExecutable="$(which javac)" |
| | | if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then |
| | | # readlink(1) is not available as standard on Solaris 10. |
| | | readLink=$(which readlink) |
| | | if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then |
| | | if $darwin ; then |
| | | javaHome="$(dirname "\"$javaExecutable\"")" |
| | | javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" |
| | | else |
| | | javaExecutable="$(readlink -f "\"$javaExecutable\"")" |
| | | fi |
| | | javaHome="$(dirname "\"$javaExecutable\"")" |
| | | javaHome=$(expr "$javaHome" : '\(.*\)/bin') |
| | | JAVA_HOME="$javaHome" |
| | | export JAVA_HOME |
| | | fi |
| | | fi |
| | | fi |
| | | |
| | | if [ -z "$JAVACMD" ] ; then |
| | | if [ -n "$JAVA_HOME" ] ; then |
| | | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then |
| | | # IBM's JDK on AIX uses strange locations for the executables |
| | | JAVACMD="$JAVA_HOME/jre/sh/java" |
| | | else |
| | | JAVACMD="$JAVA_HOME/bin/java" |
| | | fi |
| | | else |
| | | JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" |
| | | fi |
| | | fi |
| | | |
| | | if [ ! -x "$JAVACMD" ] ; then |
| | | echo "Error: JAVA_HOME is not defined correctly." >&2 |
| | | echo " We cannot execute $JAVACMD" >&2 |
| | | exit 1 |
| | | fi |
| | | |
| | | if [ -z "$JAVA_HOME" ] ; then |
| | | echo "Warning: JAVA_HOME environment variable is not set." |
| | | fi |
| | | |
| | | # traverses directory structure from process work directory to filesystem root |
| | | # first directory with .mvn subdirectory is considered project base directory |
| | | find_maven_basedir() { |
| | | if [ -z "$1" ] |
| | | then |
| | | echo "Path not specified to find_maven_basedir" |
| | | return 1 |
| | | fi |
| | | |
| | | basedir="$1" |
| | | wdir="$1" |
| | | while [ "$wdir" != '/' ] ; do |
| | | if [ -d "$wdir"/.mvn ] ; then |
| | | basedir=$wdir |
| | | break |
| | | fi |
| | | # workaround for JBEAP-8937 (on Solaris 10/Sparc) |
| | | if [ -d "${wdir}" ]; then |
| | | wdir=$(cd "$wdir/.." || exit 1; pwd) |
| | | fi |
| | | # end of workaround |
| | | done |
| | | printf '%s' "$(cd "$basedir" || exit 1; pwd)" |
| | | } |
| | | |
| | | # concatenates all lines of a file |
| | | concat_lines() { |
| | | if [ -f "$1" ]; then |
| | | # Remove \r in case we run on Windows within Git Bash |
| | | # and check out the repository with auto CRLF management |
| | | # enabled. Otherwise, we may read lines that are delimited with |
| | | # \r\n and produce $'-Xarg\r' rather than -Xarg due to word |
| | | # splitting rules. |
| | | tr -s '\r\n' ' ' < "$1" |
| | | fi |
| | | } |
| | | |
| | | log() { |
| | | if [ "$MVNW_VERBOSE" = true ]; then |
| | | printf '%s\n' "$1" |
| | | fi |
| | | } |
| | | |
| | | BASE_DIR=$(find_maven_basedir "$(dirname "$0")") |
| | | if [ -z "$BASE_DIR" ]; then |
| | | exit 1; |
| | | fi |
| | | |
| | | MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR |
| | | log "$MAVEN_PROJECTBASEDIR" |
| | | |
| | | ########################################################################################## |
| | | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
| | | # This allows using the maven wrapper in projects that prohibit checking in binary data. |
| | | ########################################################################################## |
| | | wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" |
| | | if [ -r "$wrapperJarPath" ]; then |
| | | log "Found $wrapperJarPath" |
| | | else |
| | | log "Couldn't find $wrapperJarPath, downloading it ..." |
| | | |
| | | if [ -n "$MVNW_REPOURL" ]; then |
| | | wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" |
| | | else |
| | | wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" |
| | | fi |
| | | while IFS="=" read -r key value; do |
| | | # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) |
| | | safeValue=$(echo "$value" | tr -d '\r') |
| | | case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; |
| | | esac |
| | | done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" |
| | | log "Downloading from: $wrapperUrl" |
| | | |
| | | if $cygwin; then |
| | | wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") |
| | | fi |
| | | |
| | | if command -v wget > /dev/null; then |
| | | log "Found wget ... using wget" |
| | | [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" |
| | | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
| | | wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" |
| | | else |
| | | wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" |
| | | fi |
| | | elif command -v curl > /dev/null; then |
| | | log "Found curl ... using curl" |
| | | [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" |
| | | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
| | | curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" |
| | | else |
| | | curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" |
| | | fi |
| | | else |
| | | log "Falling back to using Java to download" |
| | | javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" |
| | | javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" |
| | | # For Cygwin, switch paths to Windows format before running javac |
| | | if $cygwin; then |
| | | javaSource=$(cygpath --path --windows "$javaSource") |
| | | javaClass=$(cygpath --path --windows "$javaClass") |
| | | fi |
| | | if [ -e "$javaSource" ]; then |
| | | if [ ! -e "$javaClass" ]; then |
| | | log " - Compiling MavenWrapperDownloader.java ..." |
| | | ("$JAVA_HOME/bin/javac" "$javaSource") |
| | | fi |
| | | if [ -e "$javaClass" ]; then |
| | | log " - Running MavenWrapperDownloader.java ..." |
| | | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" |
| | | fi |
| | | fi |
| | | fi |
| | | fi |
| | | ########################################################################################## |
| | | # End of extension |
| | | ########################################################################################## |
| | | |
| | | # If specified, validate the SHA-256 sum of the Maven wrapper jar file |
| | | wrapperSha256Sum="" |
| | | while IFS="=" read -r key value; do |
| | | case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; |
| | | esac |
| | | done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" |
| | | if [ -n "$wrapperSha256Sum" ]; then |
| | | wrapperSha256Result=false |
| | | if command -v sha256sum > /dev/null; then |
| | | if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then |
| | | wrapperSha256Result=true |
| | | fi |
| | | elif command -v shasum > /dev/null; then |
| | | if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then |
| | | wrapperSha256Result=true |
| | | fi |
| | | else |
| | | echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." |
| | | echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." |
| | | exit 1 |
| | | fi |
| | | if [ $wrapperSha256Result = false ]; then |
| | | echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 |
| | | echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 |
| | | echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 |
| | | exit 1 |
| | | fi |
| | | fi |
| | | |
| | | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
| | | |
| | | # For Cygwin, switch paths to Windows format before running java |
| | | if $cygwin; then |
| | | [ -n "$JAVA_HOME" ] && |
| | | JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") |
| | | [ -n "$CLASSPATH" ] && |
| | | CLASSPATH=$(cygpath --path --windows "$CLASSPATH") |
| | | [ -n "$MAVEN_PROJECTBASEDIR" ] && |
| | | MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") |
| | | fi |
| | | |
| | | # Provide a "standardized" way to retrieve the CLI args that will |
| | | # work with both Windows and non-Windows executions. |
| | | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" |
| | | export MAVEN_CMD_LINE_ARGS |
| | | |
| | | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
| | | |
| | | # shellcheck disable=SC2086 # safe args |
| | | exec "$JAVACMD" \ |
| | | $MAVEN_OPTS \ |
| | | $MAVEN_DEBUG_OPTS \ |
| | | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
| | | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
| | | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
New file |
| | |
| | | @REM ---------------------------------------------------------------------------- |
| | | @REM Licensed to the Apache Software Foundation (ASF) under one |
| | | @REM or more contributor license agreements. See the NOTICE file |
| | | @REM distributed with this work for additional information |
| | | @REM regarding copyright ownership. The ASF licenses this file |
| | | @REM to you under the Apache License, Version 2.0 (the |
| | | @REM "License"); you may not use this file except in compliance |
| | | @REM with the License. You may obtain a copy of the License at |
| | | @REM |
| | | @REM https://www.apache.org/licenses/LICENSE-2.0 |
| | | @REM |
| | | @REM Unless required by applicable law or agreed to in writing, |
| | | @REM software distributed under the License is distributed on an |
| | | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | @REM KIND, either express or implied. See the License for the |
| | | @REM specific language governing permissions and limitations |
| | | @REM under the License. |
| | | @REM ---------------------------------------------------------------------------- |
| | | |
| | | @REM ---------------------------------------------------------------------------- |
| | | @REM Apache Maven Wrapper startup batch script, version 3.2.0 |
| | | @REM |
| | | @REM Required ENV vars: |
| | | @REM JAVA_HOME - location of a JDK home dir |
| | | @REM |
| | | @REM Optional ENV vars |
| | | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands |
| | | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending |
| | | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven |
| | | @REM e.g. to debug Maven itself, use |
| | | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
| | | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
| | | @REM ---------------------------------------------------------------------------- |
| | | |
| | | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
| | | @echo off |
| | | @REM set title of command window |
| | | title %0 |
| | | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' |
| | | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% |
| | | |
| | | @REM set %HOME% to equivalent of $HOME |
| | | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") |
| | | |
| | | @REM Execute a user defined script before this one |
| | | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre |
| | | @REM check for pre script, once with legacy .bat ending and once with .cmd ending |
| | | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* |
| | | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* |
| | | :skipRcPre |
| | | |
| | | @setlocal |
| | | |
| | | set ERROR_CODE=0 |
| | | |
| | | @REM To isolate internal variables from possible post scripts, we use another setlocal |
| | | @setlocal |
| | | |
| | | @REM ==== START VALIDATION ==== |
| | | if not "%JAVA_HOME%" == "" goto OkJHome |
| | | |
| | | echo. |
| | | echo Error: JAVA_HOME not found in your environment. >&2 |
| | | echo Please set the JAVA_HOME variable in your environment to match the >&2 |
| | | echo location of your Java installation. >&2 |
| | | echo. |
| | | goto error |
| | | |
| | | :OkJHome |
| | | if exist "%JAVA_HOME%\bin\java.exe" goto init |
| | | |
| | | echo. |
| | | echo Error: JAVA_HOME is set to an invalid directory. >&2 |
| | | echo JAVA_HOME = "%JAVA_HOME%" >&2 |
| | | echo Please set the JAVA_HOME variable in your environment to match the >&2 |
| | | echo location of your Java installation. >&2 |
| | | echo. |
| | | goto error |
| | | |
| | | @REM ==== END VALIDATION ==== |
| | | |
| | | :init |
| | | |
| | | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
| | | @REM Fallback to current working directory if not found. |
| | | |
| | | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
| | | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
| | | |
| | | set EXEC_DIR=%CD% |
| | | set WDIR=%EXEC_DIR% |
| | | :findBaseDir |
| | | IF EXIST "%WDIR%"\.mvn goto baseDirFound |
| | | cd .. |
| | | IF "%WDIR%"=="%CD%" goto baseDirNotFound |
| | | set WDIR=%CD% |
| | | goto findBaseDir |
| | | |
| | | :baseDirFound |
| | | set MAVEN_PROJECTBASEDIR=%WDIR% |
| | | cd "%EXEC_DIR%" |
| | | goto endDetectBaseDir |
| | | |
| | | :baseDirNotFound |
| | | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
| | | cd "%EXEC_DIR%" |
| | | |
| | | :endDetectBaseDir |
| | | |
| | | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
| | | |
| | | @setlocal EnableExtensions EnableDelayedExpansion |
| | | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
| | | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
| | | |
| | | :endReadAdditionalConfig |
| | | |
| | | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
| | | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
| | | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
| | | |
| | | set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" |
| | | |
| | | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
| | | IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B |
| | | ) |
| | | |
| | | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
| | | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
| | | if exist %WRAPPER_JAR% ( |
| | | if "%MVNW_VERBOSE%" == "true" ( |
| | | echo Found %WRAPPER_JAR% |
| | | ) |
| | | ) else ( |
| | | if not "%MVNW_REPOURL%" == "" ( |
| | | SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" |
| | | ) |
| | | if "%MVNW_VERBOSE%" == "true" ( |
| | | echo Couldn't find %WRAPPER_JAR%, downloading it ... |
| | | echo Downloading from: %WRAPPER_URL% |
| | | ) |
| | | |
| | | powershell -Command "&{"^ |
| | | "$webclient = new-object System.Net.WebClient;"^ |
| | | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ |
| | | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ |
| | | "}"^ |
| | | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ |
| | | "}" |
| | | if "%MVNW_VERBOSE%" == "true" ( |
| | | echo Finished downloading %WRAPPER_JAR% |
| | | ) |
| | | ) |
| | | @REM End of extension |
| | | |
| | | @REM If specified, validate the SHA-256 sum of the Maven wrapper jar file |
| | | SET WRAPPER_SHA_256_SUM="" |
| | | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
| | | IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B |
| | | ) |
| | | IF NOT %WRAPPER_SHA_256_SUM%=="" ( |
| | | powershell -Command "&{"^ |
| | | "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ |
| | | "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ |
| | | " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ |
| | | " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ |
| | | " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ |
| | | " exit 1;"^ |
| | | "}"^ |
| | | "}" |
| | | if ERRORLEVEL 1 goto error |
| | | ) |
| | | |
| | | @REM Provide a "standardized" way to retrieve the CLI args that will |
| | | @REM work with both Windows and non-Windows executions. |
| | | set MAVEN_CMD_LINE_ARGS=%* |
| | | |
| | | %MAVEN_JAVA_EXE% ^ |
| | | %JVM_CONFIG_MAVEN_PROPS% ^ |
| | | %MAVEN_OPTS% ^ |
| | | %MAVEN_DEBUG_OPTS% ^ |
| | | -classpath %WRAPPER_JAR% ^ |
| | | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ |
| | | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* |
| | | if ERRORLEVEL 1 goto error |
| | | goto end |
| | | |
| | | :error |
| | | set ERROR_CODE=1 |
| | | |
| | | :end |
| | | @endlocal & set ERROR_CODE=%ERROR_CODE% |
| | | |
| | | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost |
| | | @REM check for post script, once with legacy .bat ending and once with .cmd ending |
| | | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" |
| | | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" |
| | | :skipRcPost |
| | | |
| | | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
| | | if "%MAVEN_BATCH_PAUSE%"=="on" pause |
| | | |
| | | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% |
| | | |
| | | cmd /C exit /B %ERROR_CODE% |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <parent> |
| | | <artifactId>pipIrr-web</artifactId> |
| | | <groupId>com.dy</groupId> |
| | | <version>1.0.0</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | |
| | | <packaging>jar</packaging> |
| | | <artifactId>pipIrr-web-project</artifactId> |
| | | <name>pipIrr-web-project</name> |
| | | <description>web项目配置系统</description> |
| | | |
| | | |
| | | <build> |
| | | <plugins> |
| | | <!-- 生成不包含依赖jar的可执行jar包 |
| | | <plugin> |
| | | !- spring boot提供的maven打包插件 - |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | !- |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | - |
| | | <configuration> |
| | | !- 不加的话最终包名为: ${artifactId}-${version}.jar, 加了的话最终包名: ${artifactId}-${version}-${classifier}.jar - |
| | | <classifier>execute</classifier> |
| | | !- 不指定生成路径的话, 默认保存在 ${build.directory} 下 - |
| | | <outputDirectory>${project.build.directory}/execute</outputDirectory> |
| | | <finalName>${artifactId}-${version}</finalName> |
| | | <layout>ZIP</layout> |
| | | <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass> |
| | | <includes> |
| | | <include> |
| | | <groupId>com.dy</groupId> |
| | | <artifactId>pipIrr-common</artifactId> |
| | | </include> |
| | | <include> |
| | | <groupId>com.dy</groupId> |
| | | <artifactId>pipIrr-global</artifactId> |
| | | </include> |
| | | </includes> |
| | | <excludes> |
| | | <exclude> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | </exclude> |
| | | </excludes> |
| | | </configuration> |
| | | </execution> |
| | | </executions> |
| | | |
| | | </plugin> |
| | | --> |
| | | <!-- 拷贝依赖的jar包到lib目录--> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <configuration> |
| | | <!-- 不加的话最终包名为: ${artifactId}-${version}.jar, 加了的话最终包名: ${artifactId}-${version}-${classifier}.jar |
| | | <classifier>execute</classifier> |
| | | --> |
| | | <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib --> |
| | | <outputDirectory>${project.build.directory}/lib</outputDirectory> |
| | | <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 默认不打--> |
| | | <excludeTransitive>false</excludeTransitive> |
| | | <!-- 复制的jar文件去掉版本信息 --> |
| | | <stripVersion>false</stripVersion> |
| | | <finalName>${project.artifactId}-${project.version}</finalName> |
| | | <layout>ZIP</layout> |
| | | <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass> |
| | | <includes> |
| | | <include> |
| | | <groupId>com.dy</groupId> |
| | | <artifactId>pipIrr-common</artifactId> |
| | | </include> |
| | | <include> |
| | | <groupId>com.dy</groupId> |
| | | <artifactId>pipIrr-global</artifactId> |
| | | </include> |
| | | </includes> |
| | | <excludes> |
| | | <exclude> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | </exclude> |
| | | </excludes> |
| | | </configuration> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | |
| | | <plugin> |
| | | <!-- 设置java编译版本,运行环境版本 --> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <!-- source: 源代码编译版本;target: 目标平台编译版本;encoding: 字符集编码。 --> |
| | | <configuration> |
| | | <source>${java.version}</source> |
| | | <target>${java.version}</target> |
| | | <encoding>${encoding}</encoding> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <!-- 解决资源文件的编码问题 --> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-resources-plugin</artifactId> |
| | | <configuration> |
| | | <encoding>${encoding}</encoding> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <!-- maven里执行测试用例的插件 --> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-surefire-plugin</artifactId> |
| | | <configuration> |
| | | <skipTests>true</skipTests> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <!-- 下面解决:当进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)--> |
| | | <groupId>org.apache.felix</groupId> |
| | | <artifactId>maven-bundle-plugin</artifactId> |
| | | <extensions>true</extensions> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
New file |
| | |
| | | package com.dy.pipIrrProject; |
| | | |
| | | import com.dy.common.multiDataSource.EnableMultiDataSource; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 19:43 |
| | | * @LastEditTime 2023/12/20 19:43 |
| | | * @Description |
| | | */ |
| | | |
| | | @SpringBootApplication |
| | | @EnableAspectJAutoProxy |
| | | @EnableMultiDataSource |
| | | @ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrProject"}) |
| | | @MapperScan({"com.dy.pipIrrGlobal.daoPr"}) |
| | | public class PipIrrProjectApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(PipIrrProjectApplication.class, args); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.config; |
| | | |
| | | import com.dy.common.webFilter.DevOfDataSourceNameSetFilter; |
| | | import com.dy.common.webFilter.UserTokenFilter; |
| | | import jakarta.servlet.Filter; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 21:17 |
| | | * @LastEditTime 2023/12/20 21:17 |
| | | * @Description |
| | | */ |
| | | |
| | | @Configuration |
| | | public class WebFilterConfiguration { |
| | | |
| | | @Value("${pipIrr.global.dev}") |
| | | public String isDevStage ;//是否为开发阶段 |
| | | @Value("${pipIrr.global.dsName}") |
| | | public String dsName ;//开发阶段的数据源名称 |
| | | |
| | | /** |
| | | * DevOfDataSourceNameSetFilter与UserTokenFilter只能一个被配置上, |
| | | * 所以他们的order都是1 |
| | | */ |
| | | private static final int order_UserTokenFilter = 1 ;//与下面 |
| | | private static final int order_DevOfDataSourceNameSetFilter = 1 ; |
| | | |
| | | |
| | | @Bean |
| | | public FilterRegistrationBean<? extends Filter> RegFilter() { |
| | | FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>(); |
| | | if(this.isDevStage != null && !this.isDevStage.trim().equals("") && this.isDevStage.trim().equalsIgnoreCase("true")){ |
| | | filterRegistrationBean.setFilter(new DevOfDataSourceNameSetFilter()); |
| | | filterRegistrationBean.addUrlPatterns("/*");//配置过滤规则 |
| | | filterRegistrationBean.addInitParameter("dataSourceName",dsName);//设置init参数 |
| | | filterRegistrationBean.setName("DevOfDataSourceNameSetFilter");//设置过滤器名称 |
| | | filterRegistrationBean.setOrder(order_DevOfDataSourceNameSetFilter);//执行次序 |
| | | }else{ |
| | | filterRegistrationBean.setFilter(new UserTokenFilter()); |
| | | filterRegistrationBean.addUrlPatterns("/*");//配置过滤规则 |
| | | filterRegistrationBean.setName("UserTokenFilter");//设置过滤器名称 |
| | | filterRegistrationBean.setOrder(order_UserTokenFilter);//执行次序 |
| | | } |
| | | return filterRegistrationBean; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.config; |
| | | |
| | | import com.dy.common.webListener.GenerateIdSetSuffixListener; |
| | | import jakarta.servlet.ServletContextListener; |
| | | import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/5 10:33 |
| | | * @LastEditTime 2023/12/5 10:33 |
| | | * @Description |
| | | */ |
| | | @Configuration |
| | | public class WebListenerConfiguration { |
| | | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | | * @return 注册Bean |
| | | */ |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regSsoListener() { |
| | | ServletListenerRegistrationBean<GenerateIdSetSuffixListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(new GenerateIdSetSuffixListener()); |
| | | listenerRegistrationBean.setOrder(order_idSetSuffix); |
| | | return listenerRegistrationBean; |
| | | } |
| | | |
| | | // /** |
| | | // * 内部提供listener,该listener在系统启动时,初始化数据库数据 |
| | | // * @return 注册Bean |
| | | // */ |
| | | // @Bean |
| | | // public ServletListenerRegistrationBean<? extends ServletContextListener> regInitListener() { |
| | | // ServletListenerRegistrationBean<InitListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | // listenerRegistrationBean.setListener(new InitListener()); |
| | | // listenerRegistrationBean.setOrder(order_init); |
| | | // return listenerRegistrationBean; |
| | | // } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.divide; |
| | | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | 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.media.Schema; |
| | | 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.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 |
| | | * @date 2023/12/20 20:11 |
| | | * @LastEditTime 2023/12/20 20:11 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Tag(name = "分水房管理", description = "分水房操作") |
| | | @RestController |
| | | @RequestMapping(path="divide") |
| | | @RequiredArgsConstructor |
| | | public class DivideCtrl { |
| | | private final DivideSv divideSv; |
| | | |
| | | @Operation(summary = "获得一页分水房记录", description = "返回一页分水房数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一页开卡数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoActiveCard.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/getDivides", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<VoDivide>>> getDivides(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<VoDivide>> res = divideSv.getDivides(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取开卡记录异常", e); |
| | | 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 PrDivide 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()); |
| | | } |
| | | |
| | | Date operateTime = new Date(); |
| | | po.setOperatedt(operateTime); |
| | | Integer rec = Optional.ofNullable(divideSv.addDivide(po)).orElse(0); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.DIVIDE_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.divide; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoPr.PrDivideMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 20:12 |
| | | * @LastEditTime 2023/12/20 20:12 |
| | | * @Description 分水房服务类 |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DivideSv { |
| | | @Autowired |
| | | private PrDivideMapper prDivideMapper; |
| | | |
| | | /** |
| | | * 添加分水房 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | Integer addDivide(PrDivide po) { |
| | | return prDivideMapper.insert(po); |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件获取分水房记录 |
| | | * @param queryVo 查询视图 |
| | | * @return 分水房记录列表 |
| | | */ |
| | | public QueryResultVo<List<VoDivide>> getDivides(QueryVo queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = prDivideMapper.getRecordCount(params); |
| | | |
| | | QueryResultVo<List<VoDivide>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr ; |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = prDivideMapper.getDivides(params); |
| | | return rsVo ; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.divide; |
| | | |
| | | import com.dy.common.webUtil.QueryConditionVo; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/21 9:50 |
| | | * @LastEditTime 2023/12/21 9:50 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ToString(callSuper = true) |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Builder |
| | | @Schema(name = "分水房查询条件") |
| | | public class QueryVo extends QueryConditionVo { |
| | | @Schema(description = "农户姓名") |
| | | public String divideName; |
| | | |
| | | @Schema(description = "IC卡号") |
| | | public String blockName; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.result; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/21 10:09 |
| | | * @LastEditTime 2023/12/21 10:09 |
| | | * @Description |
| | | */ |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum ProjectResultCode { |
| | | /** |
| | | * 分水房 |
| | | */ |
| | | DIVIDE_FAIL(10001, "分水房添加失败"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |
| | | } |
New file |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | | server: |
| | | port: ${pipIrr.project.actutorPort} |
| | | #web服务端口,8085 |
| | | server: |
| | | port: ${pipIrr.project.webPort} |
| | | servlet: |
| | | context-path: /project #web访问上下文路径 |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.project.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
New file |
| | |
| | | Configuration: |
| | | #status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出;可以设置成Off(关闭)或Error(只输出错误信息) |
| | | status: Error |
| | | |
| | | Properties: # 定义全局变量 |
| | | Property: |
| | | #日志文件存储的目录 |
| | | - name: log.path |
| | | value: ./logs |
| | | #日志文件存储名称 |
| | | - name: project.name |
| | | value: pipIrrBase |
| | | |
| | | #定义输出器,可以输出到控制台和文件. |
| | | Appenders: |
| | | #输出到控制台 |
| | | Console: |
| | | #Appender命名 |
| | | name: CONSOLE |
| | | target: SYSTEM_OUT |
| | | ThresholdFilter: |
| | | level: debug #输出日志级别,输出日志时,首先由Loggers.Root.level或Loggers.Logger.level判断是否输出,然后再由本level判断是否输出 |
| | | onMatch: ACCEPT #onMatch=ACCEPT 大于等于 "level" 配置的等级地日志输出 |
| | | onMismatch: DENY #onMismatch=DENY 小于 "level" 配置的等级地日志不输出 |
| | | #日志内容样式 |
| | | PatternLayout: |
| | | #%n-换行 |
| | | #%m-日志内容,输出代码中指定的日志信息 |
| | | #%p-输出优先级,即DEBUG,INFO,WARN,ERROR,FATAL |
| | | #%r-程序启动到现在的毫秒数 |
| | | #%%- 输出一个"%" 字符 |
| | | #%t-当前线程名 |
| | | #%d-日期和时间, 常用的格式有%d{DATE},%d{ABSOLUTE},%d{HH:mm:ss,SSS},%d{ddMMyyyyHH:mm:ss,SSS} |
| | | #%l-同%F%L%C%M |
| | | #%F-java源文件名 |
| | | #%L-java源码行数 |
| | | #%C-java类名,%C{1}输出最后一个元素 |
| | | #%M-java方法名 |
| | | pattern: "%d{yyyy-MM-dd HH:mm:ss,SSS}:%4p %t (%C.%M:%L) - %m%n" |
| | | # 输出到文件,超过10MB归档 |
| | | RollingFile: |
| | | - name: ROLLING_FILE |
| | | ignoreExceptions: false |
| | | fileName: ${log.path}/${project.name}.log |
| | | filePattern: "${log.path}/$${date:yyyy-MM}/${project.name}-%d{yyyy-MM-dd}-%i.log.gz" |
| | | ThresholdFilter: |
| | | level: error #输出日志级别,输出日志时,首先由Loggers.Root.level或Loggers.Logger.level判断是否输出,然后再由本level判断是否输出 |
| | | onMatch: ACCEPT #onMatch=ACCEPT 大于等于 "level" 配置的等级地日志输出 |
| | | onMismatch: DENY #onMismatch=DENY 小于 "level" 配置的等级地日志不输出 |
| | | #日志内容样式 |
| | | PatternLayout: |
| | | pattern: "%d{yyyy-MM-dd HH:mm:ss,SSS}:%4p %t (%C.%M:%L) - %m%n" |
| | | Policies: |
| | | SizeBasedTriggeringPolicy: |
| | | size: "10 MB" |
| | | DefaultRolloverStrategy: |
| | | max: 1000 |
| | | |
| | | Loggers: |
| | | Root: |
| | | level: info #日志输出级别,共有8个级别,按照从低到高为:all < trace < debug < info < warn < error < fatal < off |
| | | AppenderRef: #Root的子节点,用来指定该日志输出到哪个Appender. |
| | | - ref: CONSOLE #输出日志时,首先由本level判断是否输出,然后再由上面的Appenders.Console.ThresholdFilter.level判断是否输出 |
| | | - ref: ROLLING_FILE #输出日志时,首先由本level判断是否输出,然后再由上面的Appenders.RollingFile.ThresholdFilter.level判断是否输出 |
| | | # 为包配置特殊的Log级别,方便调试, |
| | | # 不受Loggers.Root.level限制 |
| | | Logger: |
| | | - name: com.dy.pipIrrGlobal.daoSe |
| | | additivity: false #去除重复的log |
| | | level: debug #输出日志级别 |
| | | AppenderRef: |
| | | - ref: CONSOLE #输出日志时,首先由本.level判断是否输出,然后再由上面的Appenders.Console.ThresholdFilter.level判断是否输出 |
| | | - ref: ROLLING_FILE #输出日志时,首先由本level判断是否输出,然后再由上面的Appenders.RollingFile.ThresholdFilter.level判断是否输出 |
New file |
| | |
| | | package com.dy.pipIrrProject; |
| | | |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | @SpringBootTest |
| | | class PipIrrWebProjectApplicationTests { |
| | | |
| | | @Test |
| | | void contextLoads() { |
| | | } |
| | | |
| | | } |
| | |
| | | * @LastEditTime 2023/12/7 15:07 |
| | | * @Description |
| | | */ |
| | | |
| | | @SpringBootApplication |
| | | @EnableAspectJAutoProxy |
| | | @EnableMultiDataSource |
| | |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.recharge.DtoRecharge; |
| | | import com.dy.pipIrrSell.recharge.RechargeCtrl; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | 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 RechargeCtrl rechargeCtrl; |
| | | |
| | | @Operation(summary = "获得一页开卡记录", description = "返回一页开卡数据") |
| | |
| | | */ |
| | | VoAreaCode voAreaCode = activeCardSv.getAreaCodeByNum(po.getClientNum()); |
| | | if(voAreaCode == null) { |
| | | return BaseResponseUtils.buildFail("该农户行政区划异常,请联系系统管理员"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.AREA_CODE_MISTAKE.getMessage()); |
| | | } |
| | | String provinceId = voAreaCode.getProvinceId(); |
| | | String cityId = voAreaCode.getCityId(); |
| | |
| | | Integer number = Integer.parseInt(cardNum.substring(12)); |
| | | number = number + 1; |
| | | if(number > 9999) { |
| | | return BaseResponseUtils.buildFail("水卡编号已满,请联系系统管理员"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_OVERRUN.getMessage()); |
| | | } |
| | | cardNum = cardNum.substring(0, 12) + String.format("%04d", number); |
| | | } else { |
| | |
| | | |
| | | |
| | | /** |
| | | * cardId 水卡编号(插入记录后生成) |
| | | * cardAddr 水卡地址(仅仅写入,无业务) |
| | | * clientNum 农户编号 |
| | | * cardCost 卡片费用 |
| | |
| | | * operator 操作人编号 |
| | | * activeTime 开卡时间 |
| | | */ |
| | | //Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | //Long clientId = po.getClientId(); |
| | | String clientNum = po.getClientNum(); |
| | | Integer cardCost = po.getCardCost(); |
| | | Float amount = po.getAmount(); |
| | |
| | | */ |
| | | SeClientCard seClientCard = new SeClientCard(); |
| | | seClientCard.setCardaddr(cardAddr); |
| | | //seClientCard.setClientid(clientId); |
| | | seClientCard.setCardnum(cardNum); |
| | | seClientCard.setClientnum(clientNum); |
| | | seClientCard.setMoney(0.0); |
| | |
| | | |
| | | Long cardId = Optional.ofNullable(clientCardSv.add(seClientCard)).orElse(0L) ; |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("开卡失败-农户卡写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.ACTIVE_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | |
| | | SeActiveCard activeCard = new SeActiveCard(); |
| | | activeCard.setCardnum(cardNum); |
| | | activeCard.setClientnum(clientNum); |
| | | //activeCard.setCardid(cardId); |
| | | //activeCard.setClientid(clientId); |
| | | activeCard.setCardcost(cardCost); |
| | | activeCard.setPaymentid(paymentId); |
| | | activeCard.setOperatetype(OperateTypeENUM.ACTIVE.getCode()); |
| | |
| | | activeCard.setOperatedt(createTime); |
| | | Long rec = Optional.ofNullable(activeCardSv.add(activeCard)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("开卡失败-开卡记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.ACTIVE_FAIL_WRITE_ACTIVE_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | |
| | | dtoRecharge.setPrice(0f); |
| | | BaseResponse<Boolean> job = rechargeCtrl.addRecharge(dtoRecharge); |
| | | if(!job.getCode().equals("0001")) { |
| | | return BaseResponseUtils.buildFail("开卡成功,但充值失败"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.ACTIVE_FAIL_RECHARGE_EXCEPTION.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardNum = po.getCardNum(); |
| | | //String clientNum = po.getClientNum(); |
| | | String clientNum = ""; |
| | | Integer cardCost = po.getCardCost(); |
| | | Double reissueAmount = po.getReissueAmount(); |
| | |
| | | */ |
| | | Map map = Optional.ofNullable(clientCardSv.getCardIdAndClientNum(cardNum)).orElse(new HashMap()); |
| | | if(map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_ERROR.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | |
| | | seClientCard.setLastoper(LastOperateENUM.REPLACE.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("补卡失败-农户卡修改异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.REPLACE_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | |
| | | SeActiveCard activeCard = new SeActiveCard(); |
| | | activeCard.setCardnum(cardNum); |
| | | activeCard.setClientnum(clientNum); |
| | | //activeCard.setCardid(cardId); |
| | | //activeCard.setClientid(clientId); |
| | | activeCard.setCardcost(cardCost); |
| | | activeCard.setPaymentid(paymentId); |
| | | activeCard.setReissueamount(reissueAmount); |
| | |
| | | activeCard.setOperatedt(replaceTime); |
| | | Long rec = Optional.ofNullable(activeCardSv.add(activeCard)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("补卡失败-补卡记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.REPLACE_FAIL_WRITE_RECHARGE_ERROR.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | import com.dy.pipIrrGlobal.voSe.VoCancel; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | 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; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查,修改农户卡使用) |
| | | * cardNum 水卡编号 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加注销使用) |
| | | * refund 退款金额 |
| | | * refundType 退款方式 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * cancelTime 挂失时间 |
| | | * cancelTime 挂失时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Float refund = po.getRefund(); |
| | | Byte refundType = po.getRefundType(); |
| | | String remarks = po.getRemarks(); |
| | |
| | | Date cancelTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | * 依据水卡编号获取水卡表主键及农户编号 |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | Map map = Optional.ofNullable(clientCardSv.getCardIdAndClientNum(cardNum)).orElse(new HashMap()); |
| | | if(map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | seClientCard.setLastoper(LastOperateENUM.CANCEL.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("注销失败-农户卡注销异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.CANCEL_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 添加挂失记录 |
| | | */ |
| | | SeCancel seCancel = new SeCancel(); |
| | | seCancel.setCardid(cardId); |
| | | seCancel.setClientid(clientId); |
| | | seCancel.setCardnum(cardNum); |
| | | seCancel.setClientnum(clientNum); |
| | | seCancel.setRefund(refund); |
| | | seCancel.setRefundtype(refundType); |
| | | seCancel.setRemarks(remarks); |
| | |
| | | seCancel.setOperatedt(cancelTime); |
| | | Long rec = Optional.ofNullable(cancelSv.add(seCancel)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("注销失败-注销记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.CANCEL_FAIL_WRITE_CANCELL_ERROR.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | private String cardNum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | //@Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | //private Long clientId; |
| | | |
| | | /** |
| | | * 退款金额 |
| | |
| | | @Schema(description = "农户姓名") |
| | | public String clientName; |
| | | |
| | | @Schema(description = "IC卡号") |
| | | public String cardAddr; |
| | | @Schema(description = "水卡编号") |
| | | public String cardNum; |
| | | |
| | | |
| | | @Schema(description = "注销时间_开始") |
| | |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | private String cardNum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | //@Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | //private Long clientId; |
| | | |
| | | /** |
| | | * 余额 |
| | |
| | | import com.dy.pipIrrGlobal.voSe.VoLoss; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | 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; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | 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 农户编号 |
| | | * cardId 水卡编号(非传入参数,由cardNum反查) |
| | | * cardNum 水卡编号 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加挂失使用) |
| | | * money 余额 |
| | | * refund 退款金额 |
| | | * remarks 备注 |
| | |
| | | * lossTime 挂失时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Float money = po.getMoney(); |
| | | Float refund = po.getRefund(); |
| | | String remarks = po.getRemarks(); |
| | |
| | | Date lossTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | * 依据水卡编号获取水卡表主键及农户编号 |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | Map map = Optional.ofNullable(clientCardSv.getCardIdAndClientNum(cardNum)).orElse(new HashMap()); |
| | | if(map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | seClientCard.setLastoper(LastOperateENUM.LOSS.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("挂失失败-农户卡挂失异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.LOSS_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 添加挂失记录 |
| | | */ |
| | | SeLoss seLoss = new SeLoss(); |
| | | seLoss.setCardid(cardId); |
| | | seLoss.setClientid(clientId); |
| | | seLoss.setCardnum(cardNum); |
| | | seLoss.setClientnum(clientNum); |
| | | seLoss.setMoney(money); |
| | | seLoss.setRefund(refund); |
| | | seLoss.setRemarks(remarks); |
| | |
| | | seLoss.setOperatedt(lossTime); |
| | | Long rec = Optional.ofNullable(lossSv.add(seLoss)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("挂失失败-挂失记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.LOSS_FAIL_WRITE_LOSS_ERROR.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | * rechargeTime 充值时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | //String cardAddr = po.getCardAddr(); |
| | | //Long clientId = po.getClientId(); |
| | | String cardNum = po.getCardNum(); |
| | | //String clientNum = po.getClientNum(); |
| | | String clientNum = ""; |
| | | Float money = po.getMoney(); |
| | | Float amount = po.getAmount(); |
| | |
| | | */ |
| | | Map map = Optional.ofNullable(clientCardSv.getCardIdAndClientNum(cardNum)).orElse(new HashMap()); |
| | | if(map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | |
| | | seClientCard.setLastoper(LastOperateENUM.RECHARGE.getCode ()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("充值失败-农户卡修改异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 添加充值记录 |
| | | */ |
| | | SeRecharge seRecharge = new SeRecharge(); |
| | | //seRecharge.setCardid(cardId); |
| | | //seRecharge.setClientid(clientId); |
| | | seRecharge.setCardnum(cardNum); |
| | | seRecharge.setClientnum(clientNum); |
| | | seRecharge.setMoney(money); |
| | |
| | | seRecharge.setOperatedt(rechargeTime); |
| | | Long rec = Optional.ofNullable(rechargeSv.add(seRecharge)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("充值失败-充值记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.REPLACE_FAIL_WRITE_RECHARGE_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 添加补卡历史记录 |
| | | */ |
| | | SeRechargeHistory seRechargeHistory = new SeRechargeHistory(); |
| | | //seRechargeHistory.setCardid(cardId); |
| | | //seRechargeHistory.setClientid(clientId); |
| | | seRechargeHistory.setCardnum(cardNum); |
| | | seRechargeHistory.setClientnum(clientNum); |
| | | seRechargeHistory.setMoney(money); |
| | |
| | | |
| | | Long rec_history = Optional.ofNullable(rechargeSv.addHistory(seRechargeHistory)).orElse(0L); |
| | | if(rec_history == 0) { |
| | | return BaseResponseUtils.buildFail("充值失败-充值历史记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL_WRITE_RECHARGE_HISTORY_ERROR.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
New file |
| | |
| | | package com.dy.pipIrrSell.result; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 13:53 |
| | | * @LastEditTime 2023/12/20 13:53 |
| | | * @Description |
| | | */ |
| | | |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum SellResultCode { |
| | | /** |
| | | * 开卡/补卡 |
| | | */ |
| | | AREA_CODE_MISTAKE(10001, "该农户行政区划异常"), |
| | | CARD_NUMBER_OVERRUN(10002, "水卡编号已满"), |
| | | ACTIVE_FAIL_WRITE_CLIENT_CARD_ERROR(10003, "开卡失败-农户卡写入异常"), |
| | | ACTIVE_FAIL_WRITE_ACTIVE_CARD_ERROR(10004, "开卡失败-开卡记录写入异常"), |
| | | ACTIVE_FAIL_RECHARGE_EXCEPTION(10005, "开卡失败-充值异常"), |
| | | CARD_NUMBER_ERROR(10006, "卡号错误,该卡不存在"), |
| | | REPLACE_FAIL_WRITE_CLIENT_CARD_ERROR(10007, "补卡失败-农户卡修改异常"), |
| | | REPLACE_FAIL_WRITE_RECHARGE_ERROR(10008, "补卡失败-补卡记录写入异常"), |
| | | |
| | | /** |
| | | * 充值 |
| | | */ |
| | | CARD_NUMBER_MISTAKE(20001, "卡号错误,该卡不存在"), |
| | | RECHARGE_FAIL_WRITE_CLIENT_CARD_ERROR(20002, "充值失败-农户卡修改异常"), |
| | | RECHARGE_FAIL_WRITE_RECHARGE_ERROR(20003, "充值失败-充值记录写入异常"), |
| | | RECHARGE_FAIL_WRITE_RECHARGE_HISTORY_ERROR(20004, "充值失败-充值历史记录写入异常"), |
| | | |
| | | /** |
| | | * 挂失 |
| | | */ |
| | | LOSS_FAIL_WRITE_CLIENT_CARD_ERROR(30001, "挂失失败-农户卡修改异常"), |
| | | LOSS_FAIL_WRITE_LOSS_ERROR(30002, "挂失失败-挂失记录写入异常"), |
| | | |
| | | /** |
| | | * 注销 |
| | | */ |
| | | CANCEL_FAIL_WRITE_CLIENT_CARD_ERROR(40001, "注销失败-农户卡修改异常"), |
| | | CANCEL_FAIL_WRITE_CANCELL_ERROR(40002, "注销失败-注销记录写入异常"), |
| | | |
| | | /** |
| | | * 解锁 |
| | | */ |
| | | UNLOCK_FAIL_WRITE_CLIENT_CARD_ERROR(50001, "解锁失败-农户卡修改异常"), |
| | | UNLOCK_FAIL_WRITE_UNLOCK_ERROR(50002, "解锁失败-解锁记录写入异常"), |
| | | |
| | | /** |
| | | * 冲正 |
| | | */ |
| | | REVERSAL_FAIL_WRITE_CLIENT_CARD_ERROR(60001, "冲正失败-农户卡修改异常"), |
| | | REVERSAL_FAIL_WRITE_REVERSAL_ERROR(60002, "冲正失败-冲正记录写入异常"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |
| | | } |
| | |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | private String cardNum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | |
| | | @Schema(description = "农户姓名") |
| | | public String clientName; |
| | | |
| | | @Schema(description = "IC卡号") |
| | | public String cardAddr; |
| | | @Schema(description = "水卡编号") |
| | | public String cardNum; |
| | | |
| | | |
| | | @Schema(description = "冲正时间_开始") |
| | |
| | | import com.dy.pipIrrGlobal.voSe.VoReversal; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | 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; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | 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 农户编号 |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查,修改农户卡使用) |
| | | * cardNum 水卡地址 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加冲正使用) |
| | | * cardBalance 卡片余额 |
| | | * systemBalance 系统余额 |
| | | * remarks 备注 |
| | |
| | | * reversalTime 冲正 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Float cardBalance = po.getCardBalance(); |
| | | Float systemBalance = po.getSystemBalance(); |
| | | String remarks = po.getRemarks(); |
| | |
| | | Date reversalTime = new Date(); |
| | | |
| | | /** |
| | | * 依据水卡地址获取水卡编号(主键) |
| | | * 依据水卡编号获取水卡表主键及农户编号 |
| | | */ |
| | | cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L); |
| | | if(cardId == 0) { |
| | | return BaseResponseUtils.buildFail("卡号错误,该卡不存在"); |
| | | Map map = Optional.ofNullable(clientCardSv.getCardIdAndClientNum(cardNum)).orElse(new HashMap()); |
| | | if(map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | seClientCard.setLastoper(LastOperateENUM.REVERSAL.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("冲正失败-农户卡冲正异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 添加解锁记录 |
| | | * 添加冲正记录 |
| | | */ |
| | | SeReversal reversal = new SeReversal(); |
| | | reversal.setCardid(cardId); |
| | | reversal.setClientid(clientId); |
| | | reversal.setCardnum(cardNum); |
| | | reversal.setClientnum(clientNum); |
| | | reversal.setCardbalance(cardBalance); |
| | | reversal.setSystembalance(systemBalance); |
| | | reversal.setRemarks(remarks); |
| | |
| | | reversal.setOperatedt(reversalTime); |
| | | Long rec = Optional.ofNullable(reversalSv.add(reversal)).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail("解锁失败-解锁记录写入异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.REVERSAL_FAIL_WRITE_REVERSAL_ERROR.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank |
| | | private String cardAddr; |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardNum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 余额 |
| | |
| | | import com.dy.pipIrrGlobal.voSe.VoUnlock; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | 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; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | } |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查) |
| | | * cardAddr 水卡地址 |
| | | * clientId 农户编号 |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查,修改农户卡使用) |
| | | * cardNum 水卡地址 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加解锁使用) |
| | | * money 余额 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | | * unlockTime 解锁时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardAddr = po.getCardAddr(); |
| | | Long clientId = po.getClientId(); |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | 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("卡号错误,该卡不存在"); |
| | | Map map = Optional.ofNullable(clientCardSv.getCardIdAndClientNum(cardNum)).orElse(new HashMap()); |
| | | if(map == null || map.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | seClientCard.setLastoper(LastOperateENUM.UNLOCK.getCode()); |
| | | Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); |
| | | if(rec_updateClientCard == 0) { |
| | | return BaseResponseUtils.buildFail("解锁失败-农户卡解锁异常"); |
| | | return BaseResponseUtils.buildFail(SellResultCode.UNLOCK_FAIL_WRITE_CLIENT_CARD_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 添加解锁记录 |
| | | */ |
| | | SeUnlock seUnlock = new SeUnlock(); |
| | | seUnlock.setCardid(cardId); |
| | | seUnlock.setClientid(clientId); |
| | | seUnlock.setCardnum(cardNum); |
| | | seUnlock.setClientnum(clientNum); |
| | | 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.buildFail(SellResultCode.UNLOCK_FAIL_WRITE_UNLOCK_ERROR.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | |
| | | <module>pipIrr-web-statistics</module> |
| | | <module>pipIrr-web-gis</module> |
| | | <module>pipIrr-web-sell</module> |
| | | <module>pipIrr-web-project</module> |
| | | </modules> |
| | | |
| | | <dependencies> |