Bladeren bron

功能提交:阻止客户账户撤销最近的撤销记录

杨六六 4 jaren geleden
bovenliggende
commit
7003bb0791

+ 4 - 0
common/fire-dto/src/main/java/com/fire/dto/FlowAppInfo.java

@@ -69,6 +69,10 @@ public class FlowAppInfo {
     private Integer secondCallback;
 
 
+    @ApiModelProperty(value = "充值类型。默认为快充 快充:1  慢充:2")
+    private Integer rechargeType;
+
+
     /********************************扩展字段***********************************/
     @ApiModelProperty(value = "客户基本信息")
     @TableField(exist = false)

+ 2 - 0
common/fire-dto/src/main/java/com/fire/dto/OperatorMaintenance.java

@@ -55,6 +55,8 @@ public class OperatorMaintenance {
     @ApiModelProperty(value = "创建者时间")
     private String createTime;
 
+    @ApiModelProperty(value = "充值类型。默认为快充 快充:1  慢充:2")
+    private Integer rechargeType;
 
 
 }

+ 16 - 0
modules/admin/src/main/java/com/fire/admin/config/MybatisPlusConfig.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
+
 /**
  * @author liuliu
  * @version V1.0
@@ -49,4 +50,19 @@ public class MybatisPlusConfig {
     public OptimisticLockerInterceptor optimisticLockerInterceptor() {
         return new OptimisticLockerInterceptor();
     }
+
+    
+    /**
+     * @descible: TODO 数据权限
+     * @param:	dataSource
+     * @return: com.fire.admin.util.DataScopeInterceptor
+     * @author: liuliu
+     * @date: 2021-06-29 11:50
+     */
+/*    @Bean
+    @ConditionalOnMissingBean
+    public DataScopeInterceptor dataScopeInterceptor(DataSource dataSource) {
+        return new DataScopeInterceptor(dataSource);
+    }*/
+
 }

+ 5 - 0
modules/admin/src/main/java/com/fire/admin/dto/FlowAppInfoDto.java

@@ -54,4 +54,9 @@ public class FlowAppInfoDto {
     @ApiModelProperty(value = "是否支持二次回调,默认是不支持,0,支持的话修改编号为1")
     private Integer secondCallback;
 
+    @ApiModelProperty(value = "充值类型。默认为快充 快充:1  慢充:2")
+    private Integer rechargeType;
+
+
+
 }

+ 5 - 0
modules/admin/src/main/java/com/fire/admin/dto/OperatorMaintenanceDto.java

@@ -39,6 +39,9 @@ public class OperatorMaintenanceDto {
     @ApiModelProperty(value = "维护类型:0.自动 1.手动")
     private Integer orderType;
 
+    @ApiModelProperty(value = "充值类型。默认为快充 快充:1  慢充:2")
+    private Integer rechargeType;
+
     /**
      * 每页记录条数
      */
@@ -51,4 +54,6 @@ public class OperatorMaintenanceDto {
     @ApiModelProperty(value = "当前页码")
     private Integer current;
 
+
+
 }

+ 1 - 1
modules/admin/src/main/java/com/fire/admin/mapper/OperatorMaintenanceMapper.java

@@ -46,7 +46,7 @@ public interface OperatorMaintenanceMapper extends BaseMapper<OperatorMaintenanc
      * @author: liuliu
      * @date: 2021-06-25 14:48
      */
-    @Delete("delete from operator_maintenance where face_price=#{param.facePrice} and operator=#{param.operator} and province=#{param.province} and oder_type=1")
+    @Delete("delete from operator_maintenance where face_price=#{param.facePrice} and operator=#{param.operator} and province=#{param.province} and recharge_type=#{param.rechargeType} and oder_type=1")
     int deleteOperatorMaintenance(@Param("param") OperatorMaintenanceDto operatorMaintenanceDto);
 
 }

+ 5 - 0
modules/admin/src/main/java/com/fire/admin/mapper/SysUserMapper.java

@@ -11,6 +11,8 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.springframework.stereotype.Repository;
 
+import java.util.List;
+
 /**
  * @author: liuliu
  * @ClassName: SysUserRoleMapper
@@ -37,4 +39,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
     @Select("select username from sys_user where user_id=#{userId}")
     String getCustomerUserName(Long userId);
 
+    @Select("select * from sys_user where del_flag = '0'")
+    List<SysUser> queryUsersAuthority();
+
 }

+ 83 - 83
modules/admin/src/main/java/com/fire/admin/service/ISysUserService.java

@@ -9,6 +9,7 @@ import com.fire.dto.system.SysUser;
 
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 
 /**
@@ -20,126 +21,125 @@ import java.util.Set;
 public interface ISysUserService extends IService<SysUser> {
 
     /**
-      *@Description: TODO 分页查询用户信息(含有角色信息)
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:51
-    */
+     * @Description: TODO 分页查询用户信息(含有角色信息)
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:51
+     */
     IPage<SysUser> getUsersWithRolePage(Page page, UserDTO userDTO);
 
     /**
-      *@Description: TODO 保存用户以及角色部门等信息
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:51
-    */
+     * @Description: TODO 保存用户以及角色部门等信息
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:51
+     */
     boolean insertUser(UserDTO userDto);
 
     /**
-      *@Description: TODO 更新用户以及角色部门等信息
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:51
-    */
+     * @Description: TODO 更新用户以及角色部门等信息
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:51
+     */
     boolean updateUser(UserDTO userDto);
 
-   /**
-     *@Description: TODO 删除用户信息
-     *@Param:
-     *@return:
-     *@Author: liu liu
-     *@date: 2020/8/31 15:51
-   */
+    /**
+     * @Description: TODO 删除用户信息
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:51
+     */
     boolean removeUser(Long userId);
 
-   /**
-     *@Description: TODO  重置密码
-     *@Param:
-     *@return:
-     *@Author: liu liu
-     *@date: 2020/8/31 15:51
-   */
+    /**
+     * @Description: TODO  重置密码
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:51
+     */
     boolean restPass(Long userId);
 
     /**
-      *@Description: TODO 通过用户名查找用户个人信息
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:51
-    */
+     * @Description: TODO 通过用户名查找用户个人信息
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:51
+     */
     SysUser findByUserInfoName(String username);
 
-   /**
-     *@Description: TODO 根据用户id查询权限
-     *@Param:
-     *@return:
-     *@Author: liu liu
-     *@date: 2020/8/31 15:52
-   */
+    /**
+     * @Description: TODO 根据用户id查询权限
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:52
+     */
     Set<String> findPermsByUserId(Long userId);
 
     /**
-      *@Description: TODO 通过用户id查询角色集合
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:52
-    */
+     * @Description: TODO 通过用户id查询角色集合
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:52
+     */
     Set<String> findRoleIdByUserId(Long userId);
 
     /**
-      *@Description: TODO 账户密码登录
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:52
-    */
+     * @Description: TODO 账户密码登录
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:52
+     */
     String login(String username, String password);
 
     /**
-      *@Description: TODO 注册用户
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:52
-    */
+     * @Description: TODO 注册用户
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:52
+     */
     boolean register(UserDTO userDTO);
 
     /**
-      *@Description: TODO 修改用户信息
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:52
-    */
+     * @Description: TODO 修改用户信息
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:52
+     */
     boolean updateUserInfo(SysUser sysUser);
 
     /**
-      *@Description: TODO 通过用户去查找用户(id/用户名/手机号)
-      *@Param:
-      *@return:
-      *@Author: liu liu
-      *@date: 2020/8/31 15:52
-    */
+     * @Description: TODO 通过用户去查找用户(id/用户名/手机号)
+     * @Param:
+     * @return:
+     * @Author: liu liu
+     * @date: 2020/8/31 15:52
+     */
     SysUser findSecurityUserByUser(SysUser sysUser);
 
 
-
-    
     /**
-    * @Description:  TODO 获取属性为中间人跟客户的用户,中间人跟用户是一对多
-    * @Param: [type]
-    * @return: java.util.List<com.fire.dto.system.SysUser>
-    * @Author: liuliu
-    * @Date: 2021/6/16 17:46
-    */
+     * @Description: TODO 获取属性为中间人跟客户的用户,中间人跟用户是一对多
+     * @Param: [type]
+     * @return: java.util.List<com.fire.dto.system.SysUser>
+     * @Author: liuliu
+     * @Date: 2021/6/16 17:46
+     */
     List queryUserByType(Integer type);
 
 
 
 
+
 }

+ 32 - 13
modules/admin/src/main/java/com/fire/admin/service/impl/AdditionalPaymentServiceImpl.java

@@ -1,6 +1,7 @@
 package com.fire.admin.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -162,7 +163,7 @@ public class AdditionalPaymentServiceImpl extends ServiceImpl<AdditionalPaymentM
         Page page = new Page();
         //  对前端页码及每页显示的数量进行处理
         if (ObjectUtil.isNotEmpty(additionalPaymentDto.getCurrent()) || ObjectUtil.isNotEmpty(additionalPaymentDto.getSize())) {
-            if(ObjectUtil.isEmpty(additionalPaymentDto.getSize())){
+            if (ObjectUtil.isEmpty(additionalPaymentDto.getSize())) {
                 additionalPaymentDto.setSize(10);
             }
             page.setSize(additionalPaymentDto.getSize());
@@ -205,20 +206,28 @@ public class AdditionalPaymentServiceImpl extends ServiceImpl<AdditionalPaymentM
         if (ObjectUtil.isNotEmpty(additionalPaymentDto.getRelationId()) && additionalPaymentDto.getType().equals("customer")) {
             payment.setUndo(1);
 
-            // TODO 获取客户授信金额
-            CustomerInfo customerInfo = customerService.getcustomerOne(Long.parseLong(payment.getRelationId()));
-            // TODO 进行账户撤销
-            Long amount = redisAmountScript.changeAmount(CUSTOMER_AMOUNT.key(), Long.parseLong(payment.getRelationId()), "sub", payment.getAmount(), customerInfo.getCreditAmount());
-            if (ObjectUtil.isNotEmpty(amount)) {
-                // TODO 修改记录的撤销状态
-                baseMapper.updateById(payment);
-                log.info("客户款项撤销。 客户编号为:【{}】 撤销金额为:【{}】 ,授信额度为:【{}】 剩余额度为:【{}】", payment.getRelationId(), additionalPaymentDto.getAmount(), new BigDecimal(customerInfo.getCreditAmount()).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_DOWN), new BigDecimal(amount).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_DOWN));
-                return payment.getRelationId().concat("_").concat(amount.toString());
+            AdditionalPayment additionalPayment = getAdditionalPaymentOne(additionalPaymentDto.getDistinguish(), additionalPaymentDto.getRelationId());
+            if (!additionalPayment.getId().equals(payment.getId())) {
+                // TODO 获取客户授信金额
+                CustomerInfo customerInfo = customerService.getcustomerOne(Long.parseLong(payment.getRelationId()));
+
+                // TODO 进行账户撤销
+                Long amount = redisAmountScript.changeAmount(CUSTOMER_AMOUNT.key(), Long.parseLong(payment.getRelationId()), "sub", payment.getAmount(), customerInfo.getCreditAmount());
+                if (ObjectUtil.isNotEmpty(amount)) {
+                    // TODO 修改记录的撤销状态
+                    baseMapper.updateById(payment);
+                    log.info("客户款项撤销。 客户编号为:【{}】 撤销金额为:【{}】 ,授信额度为:【{}】 剩余额度为:【{}】", payment.getRelationId(), additionalPaymentDto.getAmount(), new BigDecimal(customerInfo.getCreditAmount()).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_DOWN), new BigDecimal(amount).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_DOWN));
+                    return payment.getRelationId().concat("_").concat(amount.toString());
+                } else {
+                    // TODO 撤销失败的处理
+                    log.info("客户编号为“【{}】 款项撤销失败,撤销金额为:【{}】", additionalPaymentDto.getRelationId(), additionalPaymentDto.getAmount().divide(new BigDecimal(10000), 2, BigDecimal.ROUND_DOWN));
+                    throw new BaseException(Status.ACCOUNT_CANCEL_FAIL.status(), Status.ACCOUNT_CANCEL_FAIL.message());
+                }
             } else {
-                // TODO 撤销失败的处理
-                log.info("客户编号为“【{}】 款项撤销失败,撤销金额为:【{}】", additionalPaymentDto.getRelationId(), additionalPaymentDto.getAmount().divide(new BigDecimal(10000), 2, BigDecimal.ROUND_DOWN));
-                throw new BaseException(Status.ACCOUNT_CANCEL_FAIL.status(), Status.ACCOUNT_CANCEL_FAIL.message());
+                log.info("撤销失败,撤销不能撤销当前客户最近一次的加款记录。如果非要撤销请先加款一次再撤销本次记录");
+                throw new BaseException("577", "客户账户撤销失败,不能撤销最近一次的记录");
             }
+
         } else if (ObjectUtil.isNotEmpty(additionalPaymentDto.getRelationId()) && additionalPaymentDto.getType().equals("supplier")) {
             payment.setUndo(1);
             // TODO 进行账户撤销
@@ -250,4 +259,14 @@ public class AdditionalPaymentServiceImpl extends ServiceImpl<AdditionalPaymentM
                 .build();
     }
 
+
+    private AdditionalPayment getAdditionalPaymentOne(Integer distinguish, String relationId) {
+        LambdaQueryWrapper<AdditionalPayment> wrapper = new LambdaQueryWrapper<>();
+        wrapper.select(AdditionalPayment::getId, AdditionalPayment::getAmount)
+                .eq(AdditionalPayment::getDistinguish, distinguish)
+                .eq(AdditionalPayment::getRelationId, relationId)
+                .orderByDesc(AdditionalPayment::getTime);
+        return baseMapper.selectList(wrapper).get(0);
+    }
+
 }

+ 2 - 1
modules/admin/src/main/java/com/fire/admin/service/impl/FlowAppInfoServiceImpl.java

@@ -119,7 +119,8 @@ public class FlowAppInfoServiceImpl extends ServiceImpl<FlowAppMapper, FlowAppIn
                 .totalCount(flowAppInfoDto.getTotalCount())
                 .time(flowAppInfoDto.getTime())
                 .channelId(flowAppInfoDto.getChannelId())
-                .secondCallback(flowAppInfoDto.getSecondCallback()).build();
+                .secondCallback(flowAppInfoDto.getSecondCallback())
+                .rechargeType(flowAppInfoDto.getRechargeType()).build();
         int count = baseMapper.updateById(appInfo);
         if(!flowAppInfoDto.getIpWhiteListList().isEmpty()){
             List<IpWhiteList> list = Lists.newArrayList();

+ 20 - 35
modules/admin/src/main/java/com/fire/admin/service/impl/SysUserServiceImpl.java

@@ -38,9 +38,9 @@ import org.springframework.transaction.annotation.Transactional;
 import redis.clients.jedis.JedisCluster;
 
 import javax.annotation.Resource;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
 import static com.fire.dto.enums.RedisKey.GLOBAL_ID_INCR;
@@ -72,6 +72,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Autowired
     private CustomerService customerService;
 
+    private static ConcurrentHashMap<String, SysUser> authorityUserMap = new ConcurrentHashMap();
+
     /**
      * @Description: TODO 分页查询用户信息(含有角色信息)
      * @Param:
@@ -288,10 +290,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         } else if (ObjectUtil.isNotNull(sysUser.getUserId()) && sysUser.getUserId() != 0) {
             select.eq(SysUser::getUserId, sysUser.getUserId());
         }
-        log.info("user 对象为:【{}】", "---------------------");
         SysUser user = baseMapper.selectOne(select);
-        log.info("user 对象为:【{}】", user.toString());
-
         return user;
     }
 
@@ -326,44 +325,13 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
                     });
                     return customerParentUserDtoList;
                 }
-
             default:
                 log.info("获取中间人或者客户用户失败,前端未传入用户属性 type  ,中间人用户属性为: 3,客户用户属性为: 2");
                 throw new BaseException(Status.REQUEST_PARAM_ERROR.status(), Status.REQUEST_PARAM_ERROR.message());
         }
 
-      /*  // TODO 获取用户属性为中间人的用户
-        if (type.equals(3)) {
-            List<SysUser> sysUsers = queryUserByPartner(type);
-            if (!sysUsers.isEmpty()) {
-                List<CustomerParentUserDto> customerParentUserDtoList = Lists.newLinkedList();
-                sysUsers.forEach(user -> {
-                    CustomerParentUserDto parent = CustomerParentUserDto.builder().partnerId(user.getUserId())
-                            .partnerName(user.getUsername())
-                            .type(user.getType()).build();
-                    customerParentUserDtoList.add(parent);
-                });
-                return JSONUtil.parseObj(customerParentUserDtoList);
-            }
-        } else if (type.equals(2)) {
-            // TODO 获取属性为客户的用户,该用户只能绑定一个客户
-            List<SysUser> sysUsers = queryUserByPartner(type);
-            // TODO 获取客户已经绑定的所有用户
-            List<Long> collect = customerService.queryCustomerInfo(null).stream().map(CustomerInfo::getUserId).collect(Collectors.toList());
-            if (!collect.isEmpty()) {
-                return JSONUtil.parseObj(sysUsers.stream().filter((SysUser user) -> !collect.contains(user.getUserId())).collect(Collectors.toList()));
-            } else {
-                return JSONUtil.parseObj(sysUsers);
-            }
-
-        } else {
-            log.info("获取中间人或者客户用户失败,前端未传入用户属性 type  ,中间人用户属性为: 3,客户用户属性为: 2");
-            throw new BaseException(Status.REQUEST_PARAM_ERROR.status(), Status.REQUEST_PARAM_ERROR.message());
-        }
-        return null;*/
     }
 
-
     /**
      * @Description: TODO 获取中间人的用户,中间人跟用户是一对多,对中间人用书是否绑定客户并不做限制
      * @Param: [type]
@@ -385,4 +353,21 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         LambdaQueryWrapper<SysUser> select = Wrappers.<SysUser>lambdaQuery().select(SysUser::getUserId, SysUser::getUsername, SysUser::getPassword).eq(SysUser::getUsername, userIdOrUserNameOrPhone).or().eq(SysUser::getPhone, userIdOrUserNameOrPhone).or().eq(SysUser::getUserId, userIdOrUserNameOrPhone);
         return baseMapper.selectOne(select);
     }
+
+
+    /**
+     * @descible: TODO 获取所有未删除的用户信息,用于缓存实现mybatis 拦截器
+     * @param:
+     * @return: java.util.List<com.fire.dto.system.SysUser>
+     * @author: liuliu
+     * @date: 2021-06-29 11:21
+     */
+    public ConcurrentHashMap<String, SysUser> getUsersAuthorityAll() {
+        List<SysUser> sysUsers = baseMapper.queryUsersAuthority();
+        sysUsers.forEach(user -> {
+            authorityUserMap.put(user.getUserId().toString().concat(user.getUsername()), user);
+        });
+        return authorityUserMap;
+    }
+
 }

+ 4 - 0
modules/admin/src/main/java/com/fire/admin/vo/FlowAppInfoVo.java

@@ -74,6 +74,10 @@ public class FlowAppInfoVo {
     @ApiModelProperty(value = "是否支持二次回调,默认是不支持,0,支持的话修改编号为1")
     private Integer secondCallback;
 
+    @ApiModelProperty(value = "充值类型。默认为快充 快充:1  慢充:2")
+    private Integer rechargeType;
+
+
     @ApiModelProperty(value = "客户ip地址以及描述")
     private List<IpWhiteList> ipWhiteListList;
 

+ 3 - 0
modules/admin/src/main/resources/mapper/FlowAppInfoMapper.xml

@@ -19,6 +19,7 @@
         <result column="time" property="time"/>
         <result column="channel_id" property="channelId"/>
         <result column="second_callback" property="secondCallback"/>
+        <result column="recharge_type" property="rechargeType"/>
     </resultMap>
 
 
@@ -38,6 +39,7 @@
         <result column="time" property="time"/>
         <result column="channel_id" property="channelId"/>
         <result column="second_callback" property="secondCallback"/>
+        <result column="recharge_type" property="rechargeType"/>
         <collection property="ipWhiteListList" ofType="com.fire.dto.IpWhiteList"
                     select="com.fire.admin.mapper.IpWhiteListMapper.getIpWhiteByCustomerId"
                     column="customer_id"/>
@@ -78,6 +80,7 @@
         f.total_count,
         f.time,
         f.second_callback,
+        f.recharge_type,
         f.channel_id
         FROM flow_app_info AS f
         LEFT JOIN customer_info AS cu ON f.customer_id=cu.customer_id

+ 10 - 2
modules/admin/src/main/resources/mapper/OperatorMaintennaceMapper.xml

@@ -14,6 +14,7 @@
         <result column="update_time" property="updateTime"/>
         <result column="create_user" property="createUser"/>
         <result column="create_time" property="createTime"/>
+        <result column="recharge_type" property="rechargeType"/>
     </resultMap>
 
 
@@ -27,6 +28,7 @@
          end_time,
          `status`,
          modify_user,
+         recharge_type,
          create_user)
         VALUES (#{param.facePrice},
                 #{param.orderType},
@@ -36,6 +38,7 @@
                 #{param.endTime},
                 #{param.status},
                 #{param.modifyUser},
+                #{param.rechargeType},
                 #{param.createUser}) ON DUPLICATE KEY
         UPDATE
             face_price = #{param.facePrice},
@@ -45,6 +48,7 @@
             start_time=#{param.startTime},
             end_time=#{param.endTime},
             `status`=#{param.status},
+            recharge_type=#{param.rechargeType},
             modify_user=#{param.modifyUser}
     </insert>
 
@@ -60,6 +64,7 @@
         modify_user,
         update_time,
         create_user,
+        recharge_type,
         create_time
     </sql>
     <select id="selectOperatorMaintenancPage" resultMap="BaseResultMap">
@@ -77,10 +82,10 @@
             <if test="select.status !=null">
                 AND `status`= #{select.status}
             </if>
-            <if test="select.startTime !=null and select.startTime !='' ">
+            <if test="select.startTime != 'null' and select.startTime !=null  and select.startTime !='' ">
                 AND start_time &gt;= #{select.startTime}
             </if>
-            <if  test="select.endTime !=null and select.endTime !=''">
+            <if  test="select.endTime != null and select.endTime != 'null'  and select.endTime !=''">
                 AND end_time &lt;= #{select.endTime}
             </if>
             <if test="select.orderType !=null ">
@@ -89,6 +94,9 @@
             <if test="select.facePrice !=null ">
                 AND face_price=#{select.facePrice}
             </if>
+            <if test="select.rechargeType !=null and  select.rechargeType !='' ">
+                AND recharge_type=#{select.rechargeType}
+            </if>
         </where>
         ORDER BY  start_time, oder_type,`status` DESC
     </select>