完成刷卡服务,查询平台或运营商各种类型用户接口

This commit is contained in:
wen 2022-02-09 10:24:59 +08:00
parent 707b3a8c54
commit 43c2b6aa18
20 changed files with 2108 additions and 22 deletions

View File

@ -0,0 +1,54 @@
package com.xhpc.card.constant;
/**
* 刷卡系统的中常量类
*
* @author WH
* @date 2022/1/28 15:44
* @since version-1.0
*/
public class Constant {
/**
* 用户账户
*/
public static final String USER_ACCOUNT = "userAccount";
/**
* 用户类型
*/
public static final String USER_TYPE = "userType";
/**
* string form of c client user
*/
public static final String STR_C_USER = "0";
/**
* string form of s client user
*/
public static final String STR_S_USER = "2";
/**
* string form of b client user
*/
public static final String STR_B_USER = "3";
/**
* c client user
*/
public static final Integer C_USER = 0;
/**
* s client user
*/
public static final Integer S_USER = 2;
/**
* b client user
*/
public static final Integer B_USER = 3;
/**
* string form of total items of list
*/
public static final String TOTAL_ITEMS = "totalItems";
private Constant() {
throw new IllegalArgumentException("This is a const class!");
}
}

View File

@ -1,8 +1,6 @@
package com.xhpc.card.controller; package com.xhpc.card.controller;
import com.xhpc.card.domain.CardList; import com.xhpc.card.domain.*;
import com.xhpc.card.domain.ListOfAuthorizedDevices;
import com.xhpc.card.domain.QueryConditions;
import com.xhpc.card.service.IXhpcCardService; import com.xhpc.card.service.IXhpcCardService;
import com.xhpc.common.core.domain.R; import com.xhpc.common.core.domain.R;
import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.controller.BaseController;
@ -25,8 +23,9 @@ public class XhpcCardController extends BaseController {
/** /**
* 卡启动前判断 * 卡启动前判断
* @param cardno 卡物理卡号 *
* @param serialNumber 终端编号 * @param cardno 卡物理卡号
* @param serialNumber 终端编号
* @return * @return
*/ */
@GetMapping("/cardStartup") @GetMapping("/cardStartup")
@ -38,9 +37,12 @@ public class XhpcCardController extends BaseController {
} }
@GetMapping("/devices") @GetMapping("/devices")
public R<ListOfAuthorizedDevices> queryDeviceList() { public R<ListOfAuthorizedDevices> queryDeviceList(@RequestParam Long currentPage, @RequestParam Long items) {
return xhpcCardService.queryDeviceList(); if (currentPage == null || items == null) {
return R.fail("分页参数不能为null");
}
return xhpcCardService.queryDeviceList(currentPage, items);
} }
/** /**
@ -69,5 +71,34 @@ public class XhpcCardController extends BaseController {
return xhpcCardService.queryCardListBy(queryConditions); return xhpcCardService.queryCardListBy(queryConditions);
} }
/**
* 绑定联网卡回显信息接口
*
* @author WH
* @date 2022/1/26 10:37
* @since version-1.0
*/
@GetMapping("/non-bind/{cardId}")
public R<BindCardEcho> bindCard(@PathVariable("cardId") Long cardId) {
if (cardId == null) {
return R.fail("cardId不能为null");
}
return xhpcCardService.bindCard(cardId);
}
/**
* 查询平台或运营商端各种类型用户的接口
*
* @author WH
* @date 2022/2/8 10:33
* @since version-1.0
*/
@GetMapping("/user/all")
public R<SearchCardResponse> searchCardUser(SearchCardUserQueryCondition queryCondition) {
return xhpcCardService.searchCardUser(queryCondition);
}
} }

View File

@ -0,0 +1,57 @@
package com.xhpc.card.domain;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 用于封装绑定卡时要回显的数据的封装类
*
* @author WH
* @date 2022/1/28 11:04
* @since version-1.0
*/
@NoArgsConstructor
@Data
public class BindCardEcho {
/**
* 用户类型
* 0 C端用户 1 流量方用户 2社区用户 3 B端用户
*/
@JsonProperty("userType")
private List<Integer> userType;
/**
* 用户账号
*/
@JsonProperty("userAccount")
private Object userAccount;
/**
* 卡序列号
*/
@JsonProperty("cardId")
private String cardId;
/**
* 卡编号
*/
@JsonProperty("cardNo")
private String cardNo;
/**
* 卡类型(离线还是联网 0离线1联网)
*/
@JsonProperty("cardType")
private Integer cardType;
/**
* 卡分类 0表示平台1表示运营商
*/
@JsonProperty("cardClassification")
private Integer cardClassification;
/**
* 押金金额
*/
@JsonProperty("cashPledge")
private Long cashPledge;
}

View File

@ -0,0 +1,52 @@
package com.xhpc.card.domain;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* SearchCard接口的响应实体类
*
* @author WH
* @date 2022/1/28 16:38
* @since version-1.0
*/
@NoArgsConstructor
@Data
public class SearchCardResponse {
/**
* totalItems
*/
@JsonProperty("totalItems")
private Long totalItems;
/**
* data
*/
@JsonProperty("data")
private List<DataDTO> data;
/**
* DataDTO
*/
@NoArgsConstructor
@Data
public static class DataDTO {
/**
* userAccount
*/
@JsonProperty("userAccount")
private String userAccount;
/**
* userType
* 0 C端用户 1 流量方用户 2社区用户 3B端用户
*/
@JsonProperty("userType")
private Integer userType;
}
}

View File

@ -0,0 +1,58 @@
package com.xhpc.card.domain;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* 查询卡用户条件实体类
*
* @author WH
* @date 2022/1/28 16:18
* @since version-1.0
*/
@NoArgsConstructor
@Data
public class SearchCardUserQueryCondition {
/**
* userType
*/
@JsonProperty("userType")
@NotNull(message = "userType的参数名不正确或者userType的值为空请检查传入参数")
private Integer userType;
/**
* cardClassification
*/
@JsonProperty("cardClassification")
@NotNull(message = "cardClassification的参数名不正确或者cardClassification的值为空请检查传入参数")
private Integer cardClassification;
/**
* userAccount
*/
@JsonProperty("userAccount")
private String userAccount;
/**
* currentPage
*/
@JsonProperty("currentPage")
@Min(value = 1, message = "currentPage必须大于等于1")
@NotNull(message = "currentPage的参数名不正确或者currentPage的值为空请检查传入参数")
private Long currentPage;
/**
* items
*/
@JsonProperty("items")
@Min(value = 1, message = "items必须大于等于1")
@NotNull(message = "items的参数名不正确或者items的值为空请检查传入参数")
private Long items;
/**
* 授权运营商名称
*/
private String grantOperatorName;
}

View File

@ -1,6 +1,7 @@
package com.xhpc.card.mapper; package com.xhpc.card.mapper;
import com.xhpc.card.pojo.TIccardDevice; import com.xhpc.card.pojo.TIccardDevice;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -49,4 +50,16 @@ public interface TIccardDeviceMapper {
*/ */
TIccardDevice selectDeletedStatusByDeviceId(Integer deviceId); TIccardDevice selectDeletedStatusByDeviceId(Integer deviceId);
/**
* 分页查询所有记录
*
* @param currentPage 当前页数
* @param items 每页的条数
* @return 返回一个装着所有记录的集合
* @author WH
* @date 2022/1/25 17:07
* @since version-1.0
*/
List<TIccardDevice> selectAllByPage(@Param("currentPage") Long currentPage, @Param("items") Long items);
} }

View File

@ -0,0 +1,40 @@
package com.xhpc.card.mapper;
import com.xhpc.card.domain.SearchCardUserQueryCondition;
import com.xhpc.card.pojo.XhpcAppUser;
import java.util.List;
public interface XhpcAppUserMapper {
int deleteByPrimaryKey(Long appUserId);
int insert(XhpcAppUser record);
int insertSelective(XhpcAppUser record);
XhpcAppUser selectByPrimaryKey(Long appUserId);
int updateByPrimaryKeySelective(XhpcAppUser record);
int updateByPrimaryKey(XhpcAppUser record);
/**
* 查询记录总数
*
* @author WH
* @date 2022/1/28 16:30
* @since version-1.0
*/
Long selectCount(SearchCardUserQueryCondition queryCondition);
/**
* 根据条件查询记录
*
* @author WH
* @date 2022/1/28 16:29
* @since version-1.0
*/
List<XhpcAppUser> selectByCondition(SearchCardUserQueryCondition queryCondition);
}

View File

@ -0,0 +1,66 @@
package com.xhpc.card.mapper;
import com.xhpc.card.domain.SearchCardUserQueryCondition;
import com.xhpc.card.pojo.XhpcCommunityPersonnel;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface XhpcCommunityPersonnelMapper {
int deleteByPrimaryKey(Long communityPersonnelId);
int insert(XhpcCommunityPersonnel record);
int insertSelective(XhpcCommunityPersonnel record);
XhpcCommunityPersonnel selectByPrimaryKey(Long communityPersonnelId);
int updateByPrimaryKeySelective(XhpcCommunityPersonnel record);
int updateByPrimaryKey(XhpcCommunityPersonnel record);
/**
* 查询所有记录
*
* @author WH
* @date 2022/1/28 15:38
* @since version-1.0
*/
List<XhpcCommunityPersonnel> selectAll();
/**
* 根据分页条件查询该表记录
*
* @author WH
* @date 2022/2/8 10:44
* @since version-1.0
*/
List<XhpcCommunityPersonnel> selectByCondition(SearchCardUserQueryCondition queryCondition);
/**
* 根据分页条件查询出符合条件记录的总条数
*
* @author WH
* @date 2022/2/8 10:51
* @since version-1.0
*/
Long selectCount(SearchCardUserQueryCondition queryCondition);
/**
* 根据运营商id分页条件查询符合的记录
*
* @param operatorId 运营商id
* @return 符合条件的所有记录
*/
List<XhpcCommunityPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items);
/**
* 根据运营商id分页条件查询符合的记录的个数
*
* @param operatorId 运营商id
* @return 符合条件个数
*/
Long selectCountByOperatorId(@Param("operatorId") Long operatorId);
}

View File

@ -0,0 +1,68 @@
package com.xhpc.card.mapper;
import com.xhpc.card.domain.SearchCardUserQueryCondition;
import com.xhpc.card.pojo.XhpcCustomersPersonnel;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface XhpcCustomersPersonnelMapper {
int deleteByPrimaryKey(Long customersPersonnelId);
int insert(XhpcCustomersPersonnel record);
int insertSelective(XhpcCustomersPersonnel record);
XhpcCustomersPersonnel selectByPrimaryKey(Long customersPersonnelId);
int updateByPrimaryKeySelective(XhpcCustomersPersonnel record);
int updateByPrimaryKey(XhpcCustomersPersonnel record);
/**
* 查询所有记录
*
* @author WH
* @date 2022/1/28 15:42
* @since version-1.0
*/
List<XhpcCustomersPersonnel> selectAll();
/**
* 根据条件查询所有记录
*
* @author WH
* @date 2022/2/8 14:39
* @since version-1.0
*/
List<XhpcCustomersPersonnel> selectByCondition(SearchCardUserQueryCondition queryCondition);
/**
* 根据条件查询所有记录个数
*
* @author WH
* @date 2022/2/8 14:43
* @since version-1.0
*/
Long selectCount(SearchCardUserQueryCondition queryCondition);
/**
* 根据运营商id分页条件查询对应的记录
*
* @param operatorId 运营商id
* @param currentPage 当前页码
* @param items 当前要显示的条数
* @return 对应的记录
*/
List<XhpcCustomersPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items);
/**
* 根据运营商id查询符合条件的总条数
*
* @param operatorId
* @return
*/
Long selectCountByOperatorId(Long operatorId);
}

View File

@ -16,4 +16,13 @@ public interface XhpcOperatorMapper {
int updateByPrimaryKey(XhpcOperator record); int updateByPrimaryKey(XhpcOperator record);
/**
* 根据运营商名称查询出对应的运营商实体类
*
* @author WH
* @date 2022/2/8 15:15
* @since version-1.0
*/
XhpcOperator selectByName(String grantOperatorName);
} }

View File

@ -0,0 +1,118 @@
package com.xhpc.card.pojo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* xhpc_app_user
*
* @author
*/
@Data
public class XhpcAppUser implements Serializable {
/**
* 用户ID
*/
private Long appUserId;
/**
* 手机号码
*/
private String phone;
private String weixinOpenId;
private String alipayOpenId;
/**
* 微信是否登录0未登录 1已登录
*/
private Integer weixinLogin;
/**
* 支付宝是否登录0未登录 1已登录
*/
private Integer alipayLogin;
/**
* 头像地址
*/
private String avatar;
/**
* 余额
*/
private BigDecimal balance;
/**
* 密码(加密)
*/
private String password;
/**
* 帐号状态
*/
private Integer status;
/**
* 是否有退款订单审核0无 1有
*/
private Integer isRefundApplication;
/**
* 删除标志0代表存在 2代表删除
*/
private String delFlag;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 备注
*/
private String remark;
/**
* 用户设置的SOC
*/
private Integer soc;
/**
* 是否退款 0 不退款 1 退款
*/
private Integer isRefund;
/**
* 租户id
*/
private String tenantId;
/**
* 是否开启电池保护 0 未开启 1开启
*/
private Integer socProtect;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,142 @@
package com.xhpc.card.pojo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* xhpc_community_personnel
*
* @author
*/
@Data
public class XhpcCommunityPersonnel implements Serializable {
private Long communityPersonnelId;
private Long communityId;
/**
* 社区人员名称
*/
private String name;
/**
* 社区人员账号
*/
private String account;
/**
* 充值金额
*/
private BigDecimal rechargeMoney;
/**
* 消费金额
*/
private BigDecimal consumeMoney;
/**
* 红包金额
*/
private BigDecimal redPacket;
/**
* 剩余金额
*/
private BigDecimal surplusMoney;
/**
* 绑定手机号
*/
private String phone;
/**
* 是否是负责0 1不是
*/
private Integer type;
/**
* 状态0 可用 1不可用
*/
private Integer status;
/**
* 删除标志0代表存在 2代表删除
*/
private Integer delFlag;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 备注
*/
private String remark;
/**
* 是否退款 0 不退款 1 退款
*/
private Integer isRefund;
/**
* 是否有退款订单审核0无 1有
*/
private Integer isRefundApplication;
/**
* 用户设置的SOC
*/
private Integer soc;
/**
* 头像地址
*/
private String avatar;
private String weixinOpenId;
private String alipayOpenId;
/**
* 微信是否登录0未登录 1已登录
*/
private Integer weixinLogin;
/**
* 支付宝是否登录0未登录 1已登录
*/
private Integer alipayLogin;
/**
* 租户id
*/
private String tenantId;
/**
* 是否开启电池保护 0 未开启 1开启
*/
private Integer socProtect;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,142 @@
package com.xhpc.card.pojo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* xhpc_customers_personnel
*
* @author
*/
@Data
public class XhpcCustomersPersonnel implements Serializable {
private Long customersPersonnelId;
private Long customersId;
/**
* 大客户人员名称
*/
private String name;
/**
* 大客户人员账号
*/
private String account;
/**
* 充值金额
*/
private BigDecimal rechargeMoney;
/**
* 消费金额
*/
private BigDecimal consumeMoney;
/**
* 红包金额
*/
private BigDecimal redPacket;
/**
* 剩余金额
*/
private BigDecimal surplusMoney;
/**
* 绑定手机号
*/
private String phone;
/**
* 是否是负责0 1不是
*/
private Integer type;
/**
* 状态0 可用 1不可用
*/
private Integer status;
/**
* 删除标志0代表存在 1代表删除
*/
private Integer delFlag;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 备注
*/
private String remark;
/**
* 是否有退款订单审核0无 1有
*/
private Integer isRefundApplication;
/**
* 用户设置的SOC
*/
private Integer soc;
/**
* 头像地址
*/
private String avatar;
private String weixinOpenId;
private String alipayOpenId;
/**
* 微信是否登录0未登录 1已登录
*/
private Integer weixinLogin;
/**
* 支付宝是否登录0未登录 1已登录
*/
private Integer alipayLogin;
/**
* 是否退款 0 不退款 1 退款
*/
private Integer isRefund;
/**
* 租户id
*/
private String tenantId;
/**
* 是否开启电池保护 0 未开启 1开启
*/
private Integer socProtect;
private static final long serialVersionUID = 1L;
}

View File

@ -1,8 +1,6 @@
package com.xhpc.card.service; package com.xhpc.card.service;
import com.xhpc.card.domain.CardList; import com.xhpc.card.domain.*;
import com.xhpc.card.domain.ListOfAuthorizedDevices;
import com.xhpc.card.domain.QueryConditions;
import com.xhpc.common.core.domain.R; import com.xhpc.common.core.domain.R;
/** /**
@ -23,12 +21,14 @@ public interface IXhpcCardService {
/** /**
* 查询卡授权设备列表 * 查询卡授权设备列表
* *
* @param currentPage 当前页码
* @param items 当前显示条数
* @return 返回卡授权列表 * @return 返回卡授权列表
* @author WH * @author WH
* @date 2022/1/25 16:18 * @date 2022/1/25 16:18
* @since version-1.0 * @since version-1.0
*/ */
R<ListOfAuthorizedDevices> queryDeviceList(); R<ListOfAuthorizedDevices> queryDeviceList(Long currentPage, Long items);
/** /**
* 逻辑删除指定卡授权设备 * 逻辑删除指定卡授权设备
@ -52,4 +52,26 @@ public interface IXhpcCardService {
*/ */
R<CardList> queryCardListBy(QueryConditions queryConditions); R<CardList> queryCardListBy(QueryConditions queryConditions);
/**
* 绑定卡回显信息
*
* @param cardId 卡记录id
* @return 返回需要回显的卡数据
* @author WH
* @date 2022/1/28 10:44
* @since version-1.0
*/
R<BindCardEcho> bindCard(Long cardId);
/**
* 平台运营商选择用户时查询指定类型下的所有用户数据
*
* @param queryCondition 查询条件
* @return 平台运营商选择用户时查询指定类型下的所有用户数据
* @author WH
* @date 2022/1/28 15:31
* @since version-1.0
*/
R<SearchCardResponse> searchCardUser(SearchCardUserQueryCondition queryCondition);
} }

View File

@ -1,13 +1,8 @@
package com.xhpc.card.service.impl; package com.xhpc.card.service.impl;
import com.xhpc.card.domain.CardList; import com.xhpc.card.domain.*;
import com.xhpc.card.domain.ListOfAuthorizedDevices;
import com.xhpc.card.domain.QueryConditions;
import com.xhpc.card.mapper.*; import com.xhpc.card.mapper.*;
import com.xhpc.card.pojo.TIccardDevice; import com.xhpc.card.pojo.*;
import com.xhpc.card.pojo.TIccardInfo;
import com.xhpc.card.pojo.TIccardUsers;
import com.xhpc.card.pojo.XhpcOperator;
import com.xhpc.card.service.IXhpcCardService; import com.xhpc.card.service.IXhpcCardService;
import com.xhpc.card.utils.MyPagingUtil; import com.xhpc.card.utils.MyPagingUtil;
import com.xhpc.common.api.CardHistoryOrderService; import com.xhpc.common.api.CardHistoryOrderService;
@ -19,7 +14,9 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @author yuyang * @author yuyang
@ -41,6 +38,12 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
private TIccardInfoMapper tIccardInfoMapper; private TIccardInfoMapper tIccardInfoMapper;
@Resource @Resource
private XhpcOperatorMapper xhpcOperatorMapper; private XhpcOperatorMapper xhpcOperatorMapper;
@Resource
private XhpcAppUserMapper xhpcAppUserMapper;
@Resource
private XhpcCommunityPersonnelMapper xhpcCommunityPersonnelMapper;
@Resource
private XhpcCustomersPersonnelMapper xhpcCustomersPersonnelMapper;
/** /**
@ -87,12 +90,13 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
} }
@Override @Override
public R<ListOfAuthorizedDevices> queryDeviceList() { public R<ListOfAuthorizedDevices> queryDeviceList(Long currentPage, Long items) {
//计算分页索引
currentPage = MyPagingUtil.calculateStartIndex(currentPage, items);
ListOfAuthorizedDevices listOfAuthorizedDevices = new ListOfAuthorizedDevices(); ListOfAuthorizedDevices listOfAuthorizedDevices = new ListOfAuthorizedDevices();
listOfAuthorizedDevices.setData(new ArrayList<>()); listOfAuthorizedDevices.setData(new ArrayList<>());
listOfAuthorizedDevices.setTotalItems(0); listOfAuthorizedDevices.setTotalItems(0);
List<TIccardDevice> tIccardDeviceList = tIccardDeviceMapper.selectAll(); List<TIccardDevice> tIccardDeviceList = tIccardDeviceMapper.selectAllByPage(currentPage, items);
if (tIccardDeviceList.isEmpty()) { if (tIccardDeviceList.isEmpty()) {
return R.ok(listOfAuthorizedDevices); return R.ok(listOfAuthorizedDevices);
} }
@ -110,7 +114,8 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
dataDTO.setType(tIccardDevice.getType()); dataDTO.setType(tIccardDevice.getType());
listOfAuthorizedDevices.getData().add(dataDTO); listOfAuthorizedDevices.getData().add(dataDTO);
} }
listOfAuthorizedDevices.setTotalItems(tIccardDeviceList.size()); List<TIccardDevice> tIccardDeviceList1 = tIccardDeviceMapper.selectAll();
listOfAuthorizedDevices.setTotalItems(tIccardDeviceList1.size());
return R.ok(listOfAuthorizedDevices); return R.ok(listOfAuthorizedDevices);
} }
@ -177,4 +182,121 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
return R.ok(cardList); return R.ok(cardList);
} }
@Override
public R<BindCardEcho> bindCard(Long cardId) {
BindCardEcho bindCardEcho = new BindCardEcho();
TIccardInfo tIccardInfo = tIccardInfoMapper.selectByPrimaryKey(Math.toIntExact(cardId));
bindCardEcho.setCardId(tIccardInfo.getCardid());
bindCardEcho.setCardNo(tIccardInfo.getCardno());
bindCardEcho.setCardType(tIccardInfo.getCardtype());
//如果该卡不是联网卡
if (tIccardInfo.getCardtype() == 0) {
return R.fail("该卡不是联网卡");
}
bindCardEcho.setCardClassification(tIccardInfo.getIsPlatform());
//如果该卡的分类是平台卡的话
if (bindCardEcho.getCardClassification() == 0) {
//0 C端用户 2社区用户 3 B端用户
int[] userTypeArray = {0, 2, 3};
List<Integer> userType = Arrays.stream(userTypeArray).boxed().collect(Collectors.toList());
bindCardEcho.setUserType(userType);
} else {
//如果是运营商的话
//2社区用户 3 B端用户
int[] userTypeArray = {2, 3};
List<Integer> userType = Arrays.stream(userTypeArray).boxed().collect(Collectors.toList());
bindCardEcho.setUserType(userType);
}
return R.ok(bindCardEcho);
}
@Override
public R<SearchCardResponse> searchCardUser(SearchCardUserQueryCondition queryCondition) {
//计算分页索引
long startIndex = MyPagingUtil.calculateStartIndex(queryCondition.getCurrentPage(), queryCondition.getItems());
queryCondition.setCurrentPage(startIndex);
SearchCardResponse searchCardResponse = new SearchCardResponse();
searchCardResponse.setData(new ArrayList<>());
searchCardResponse.setTotalItems(0L);
//判断是平台还是运营商
if (queryCondition.getCardClassification() == 0) {
//(0 C端用户 2社区用户 3 B端用户)
switch (queryCondition.getUserType()) {
case 0:
List<XhpcAppUser> appUserList = xhpcAppUserMapper.selectByCondition(queryCondition);
Long allCount = xhpcAppUserMapper.selectCount(queryCondition);
searchCardResponse.setTotalItems(allCount);
for (XhpcAppUser xhpcAppUser : appUserList) {
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
dataDTO.setUserAccount(xhpcAppUser.getPhone());
dataDTO.setUserType(0);
searchCardResponse.getData().add(dataDTO);
}
break;
case 2:
List<XhpcCommunityPersonnel> xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByCondition(queryCondition);
Long allCount1 = xhpcCommunityPersonnelMapper.selectCount(queryCondition);
searchCardResponse.setTotalItems(allCount1);
for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) {
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
dataDTO.setUserAccount(xhpcCommunityPersonnel.getAccount());
dataDTO.setUserType(2);
searchCardResponse.getData().add(dataDTO);
}
break;
case 3:
List<XhpcCustomersPersonnel> xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByCondition(queryCondition);
Long allCount2 = xhpcCustomersPersonnelMapper.selectCount(queryCondition);
searchCardResponse.setTotalItems(allCount2);
for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) {
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
dataDTO.setUserAccount(xhpcCustomersPersonnel.getAccount());
dataDTO.setUserType(3);
searchCardResponse.getData().add(dataDTO);
}
break;
default:
break;
}
return R.ok(searchCardResponse);
} else if (queryCondition.getCardClassification() == 1) {
XhpcOperator operator = xhpcOperatorMapper.selectByName(queryCondition.getGrantOperatorName());
if (operator == null) {
return R.fail("没有此运营商,或未填入授权运营商参数");
}
Long operatorId = operator.getOperatorId();
//2社区用户 3 B端用户)
switch (queryCondition.getUserType()) {
case 2:
List<XhpcCommunityPersonnel> xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems());
Long allCount1 = xhpcCommunityPersonnelMapper.selectCountByOperatorId(operatorId);
searchCardResponse.setTotalItems(allCount1);
for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) {
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
dataDTO.setUserAccount(xhpcCommunityPersonnel.getAccount());
dataDTO.setUserType(2);
searchCardResponse.getData().add(dataDTO);
}
break;
case 3:
List<XhpcCustomersPersonnel> xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems());
Long allCount2 = xhpcCustomersPersonnelMapper.selectCountByOperatorId(operatorId);
searchCardResponse.setTotalItems(allCount2);
for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) {
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
dataDTO.setUserAccount(xhpcCustomersPersonnel.getAccount());
dataDTO.setUserType(3);
searchCardResponse.getData().add(dataDTO);
}
break;
default:
break;
}
return R.ok(searchCardResponse);
}
return R.fail("没有此卡类型");
}
} }

View File

@ -34,6 +34,13 @@
from t_iccard_device from t_iccard_device
where del_flag = 1 and id = #{deviceId} where del_flag = 1 and id = #{deviceId}
</select> </select>
<select id="selectAllByPage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_iccard_device
where del_flag = 0
limit #{currentPage},#{items}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete delete
from t_iccard_device from t_iccard_device

View File

@ -0,0 +1,300 @@
<?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">
<!--suppress ALL -->
<mapper namespace="com.xhpc.card.mapper.XhpcAppUserMapper">
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcAppUser">
<id column="app_user_id" jdbcType="BIGINT" property="appUserId"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="weixin_open_id" jdbcType="VARCHAR" property="weixinOpenId"/>
<result column="alipay_open_id" jdbcType="VARCHAR" property="alipayOpenId"/>
<result column="weixin_login" jdbcType="INTEGER" property="weixinLogin"/>
<result column="alipay_login" jdbcType="INTEGER" property="alipayLogin"/>
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
<result column="balance" jdbcType="DECIMAL" property="balance"/>
<result column="password" jdbcType="VARCHAR" property="password"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="is_refund_application" jdbcType="INTEGER" property="isRefundApplication"/>
<result column="del_flag" jdbcType="CHAR" property="delFlag"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="soc" jdbcType="INTEGER" property="soc"/>
<result column="is_refund" jdbcType="INTEGER" property="isRefund"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="soc_protect" jdbcType="INTEGER" property="socProtect"/>
</resultMap>
<sql id="Base_Column_List">
app_user_id
, phone, weixin_open_id, alipay_open_id, weixin_login, alipay_login, avatar,
balance, `password`, `status`, is_refund_application, del_flag, create_by, create_time,
update_by, update_time, remark, soc, is_refund, tenant_id, soc_protect
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_app_user
where app_user_id = #{appUserId,jdbcType=BIGINT}
</select>
<select id="selectCount" resultType="java.lang.Long">
select count(app_user_id)
from xhpc_app_user
<where>
<if test="userAccount!=null and userAccount!='' ">
and phone = #{userAccount}
</if>
</where>
</select>
<select id="selectByCondition" resultType="com.xhpc.card.pojo.XhpcAppUser">
select
<include refid="Base_Column_List"/>
from xhpc_app_user
<where>
<if test="userAccount!=null and userAccount!='' ">
and phone = #{userAccount}
</if>
</where>
limit #{currentPage},#{items}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
from xhpc_app_user
where app_user_id = #{appUserId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="app_user_id" keyProperty="appUserId" parameterType="com.xhpc.card.pojo.XhpcAppUser"
useGeneratedKeys="true">
insert into xhpc_app_user (phone, weixin_open_id, alipay_open_id,
weixin_login, alipay_login, avatar,
balance, `password`, `status`,
is_refund_application, del_flag, create_by,
create_time, update_by, update_time,
remark, soc, is_refund,
tenant_id, soc_protect)
values (#{phone,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR}, #{alipayOpenId,jdbcType=VARCHAR},
#{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR},
#{balance,jdbcType=DECIMAL}, #{password,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{isRefundApplication,jdbcType=INTEGER}, #{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR}, #{soc,jdbcType=INTEGER}, #{isRefund,jdbcType=INTEGER},
#{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="app_user_id" keyProperty="appUserId"
parameterType="com.xhpc.card.pojo.XhpcAppUser" useGeneratedKeys="true">
insert into xhpc_app_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="phone != null">
phone,
</if>
<if test="weixinOpenId != null">
weixin_open_id,
</if>
<if test="alipayOpenId != null">
alipay_open_id,
</if>
<if test="weixinLogin != null">
weixin_login,
</if>
<if test="alipayLogin != null">
alipay_login,
</if>
<if test="avatar != null">
avatar,
</if>
<if test="balance != null">
balance,
</if>
<if test="password != null">
`password`,
</if>
<if test="status != null">
`status`,
</if>
<if test="isRefundApplication != null">
is_refund_application,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
<if test="soc != null">
soc,
</if>
<if test="isRefund != null">
is_refund,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="socProtect != null">
soc_protect,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="weixinOpenId != null">
#{weixinOpenId,jdbcType=VARCHAR},
</if>
<if test="alipayOpenId != null">
#{alipayOpenId,jdbcType=VARCHAR},
</if>
<if test="weixinLogin != null">
#{weixinLogin,jdbcType=INTEGER},
</if>
<if test="alipayLogin != null">
#{alipayLogin,jdbcType=INTEGER},
</if>
<if test="avatar != null">
#{avatar,jdbcType=VARCHAR},
</if>
<if test="balance != null">
#{balance,jdbcType=DECIMAL},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="isRefundApplication != null">
#{isRefundApplication,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="soc != null">
#{soc,jdbcType=INTEGER},
</if>
<if test="isRefund != null">
#{isRefund,jdbcType=INTEGER},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=VARCHAR},
</if>
<if test="socProtect != null">
#{socProtect,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.XhpcAppUser">
update xhpc_app_user
<set>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="weixinOpenId != null">
weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR},
</if>
<if test="alipayOpenId != null">
alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR},
</if>
<if test="weixinLogin != null">
weixin_login = #{weixinLogin,jdbcType=INTEGER},
</if>
<if test="alipayLogin != null">
alipay_login = #{alipayLogin,jdbcType=INTEGER},
</if>
<if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR},
</if>
<if test="balance != null">
balance = #{balance,jdbcType=DECIMAL},
</if>
<if test="password != null">
`password` = #{password,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="isRefundApplication != null">
is_refund_application = #{isRefundApplication,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="soc != null">
soc = #{soc,jdbcType=INTEGER},
</if>
<if test="isRefund != null">
is_refund = #{isRefund,jdbcType=INTEGER},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=VARCHAR},
</if>
<if test="socProtect != null">
soc_protect = #{socProtect,jdbcType=INTEGER},
</if>
</set>
where app_user_id = #{appUserId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.XhpcAppUser">
update xhpc_app_user
set phone = #{phone,jdbcType=VARCHAR},
weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR},
alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR},
weixin_login = #{weixinLogin,jdbcType=INTEGER},
alipay_login = #{alipayLogin,jdbcType=INTEGER},
avatar = #{avatar,jdbcType=VARCHAR},
balance = #{balance,jdbcType=DECIMAL},
`password` = #{password,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
is_refund_application = #{isRefundApplication,jdbcType=INTEGER},
del_flag = #{delFlag,jdbcType=CHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
soc = #{soc,jdbcType=INTEGER},
is_refund = #{isRefund,jdbcType=INTEGER},
tenant_id = #{tenantId,jdbcType=VARCHAR},
soc_protect = #{socProtect,jdbcType=INTEGER}
where app_user_id = #{appUserId,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,389 @@
<?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">
<!--suppress ALL -->
<mapper namespace="com.xhpc.card.mapper.XhpcCommunityPersonnelMapper">
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcCommunityPersonnel">
<id column="community_personnel_id" jdbcType="BIGINT" property="communityPersonnelId"/>
<result column="community_id" jdbcType="BIGINT" property="communityId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="account" jdbcType="VARCHAR" property="account"/>
<result column="recharge_money" jdbcType="DECIMAL" property="rechargeMoney"/>
<result column="consume_money" jdbcType="DECIMAL" property="consumeMoney"/>
<result column="red_packet" jdbcType="DECIMAL" property="redPacket"/>
<result column="surplus_money" jdbcType="DECIMAL" property="surplusMoney"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="is_refund" jdbcType="INTEGER" property="isRefund"/>
<result column="is_refund_application" jdbcType="INTEGER" property="isRefundApplication"/>
<result column="soc" jdbcType="INTEGER" property="soc"/>
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
<result column="weixin_open_id" jdbcType="VARCHAR" property="weixinOpenId"/>
<result column="alipay_open_id" jdbcType="VARCHAR" property="alipayOpenId"/>
<result column="weixin_login" jdbcType="INTEGER" property="weixinLogin"/>
<result column="alipay_login" jdbcType="INTEGER" property="alipayLogin"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="soc_protect" jdbcType="INTEGER" property="socProtect"/>
</resultMap>
<sql id="Base_Column_List">
community_personnel_id
, community_id, `name`, account, recharge_money, consume_money,
red_packet, surplus_money, phone, `type`, `status`, del_flag, create_by, create_time,
update_by, update_time, remark, is_refund, is_refund_application, soc, avatar, weixin_open_id,
alipay_open_id, weixin_login, alipay_login, tenant_id, soc_protect
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_community_personnel
where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_community_personnel
</select>
<select id="selectByCondition" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_community_personnel
<where>
<if test="userAccount!=null and userAccount!='' ">
and account = #{userAccount}
</if>
</where>
limit #{currentPage},#{items}
</select>
<select id="selectCount" resultType="java.lang.Long">
select count(community_personnel_id)
from xhpc_community_personnel
<where>
<if test="userAccount!=null and userAccount!='' ">
and account = #{userAccount}
</if>
</where>
</select>
<select id="selectByOperatorId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_community_personnel
where create_type = 2 and create_id = #{operatorId}
limit #{currentPage},#{items}
</select>
<select id="selectCountByOperatorId" resultType="java.lang.Long">
select count(community_personnel_id)
from xhpc_community_personnel
where create_type = 2
and create_id = #{operatorId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
from xhpc_community_personnel
where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="community_personnel_id" keyProperty="communityPersonnelId"
parameterType="com.xhpc.card.pojo.XhpcCommunityPersonnel" useGeneratedKeys="true">
insert into xhpc_community_personnel (community_id, `name`, account,
recharge_money, consume_money, red_packet,
surplus_money, phone, `type`,
`status`, del_flag, create_by,
create_time, update_by, update_time,
remark, is_refund, is_refund_application,
soc, avatar, weixin_open_id,
alipay_open_id, weixin_login, alipay_login,
tenant_id, soc_protect)
values (#{communityId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR},
#{rechargeMoney,jdbcType=DECIMAL}, #{consumeMoney,jdbcType=DECIMAL}, #{redPacket,jdbcType=DECIMAL},
#{surplusMoney,jdbcType=DECIMAL}, #{phone,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR}, #{isRefund,jdbcType=INTEGER}, #{isRefundApplication,jdbcType=INTEGER},
#{soc,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR},
#{alipayOpenId,jdbcType=VARCHAR}, #{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER},
#{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="community_personnel_id" keyProperty="communityPersonnelId"
parameterType="com.xhpc.card.pojo.XhpcCommunityPersonnel" useGeneratedKeys="true">
insert into xhpc_community_personnel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="communityId != null">
community_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="account != null">
account,
</if>
<if test="rechargeMoney != null">
recharge_money,
</if>
<if test="consumeMoney != null">
consume_money,
</if>
<if test="redPacket != null">
red_packet,
</if>
<if test="surplusMoney != null">
surplus_money,
</if>
<if test="phone != null">
phone,
</if>
<if test="type != null">
`type`,
</if>
<if test="status != null">
`status`,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
<if test="isRefund != null">
is_refund,
</if>
<if test="isRefundApplication != null">
is_refund_application,
</if>
<if test="soc != null">
soc,
</if>
<if test="avatar != null">
avatar,
</if>
<if test="weixinOpenId != null">
weixin_open_id,
</if>
<if test="alipayOpenId != null">
alipay_open_id,
</if>
<if test="weixinLogin != null">
weixin_login,
</if>
<if test="alipayLogin != null">
alipay_login,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="socProtect != null">
soc_protect,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="communityId != null">
#{communityId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="rechargeMoney != null">
#{rechargeMoney,jdbcType=DECIMAL},
</if>
<if test="consumeMoney != null">
#{consumeMoney,jdbcType=DECIMAL},
</if>
<if test="redPacket != null">
#{redPacket,jdbcType=DECIMAL},
</if>
<if test="surplusMoney != null">
#{surplusMoney,jdbcType=DECIMAL},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isRefund != null">
#{isRefund,jdbcType=INTEGER},
</if>
<if test="isRefundApplication != null">
#{isRefundApplication,jdbcType=INTEGER},
</if>
<if test="soc != null">
#{soc,jdbcType=INTEGER},
</if>
<if test="avatar != null">
#{avatar,jdbcType=VARCHAR},
</if>
<if test="weixinOpenId != null">
#{weixinOpenId,jdbcType=VARCHAR},
</if>
<if test="alipayOpenId != null">
#{alipayOpenId,jdbcType=VARCHAR},
</if>
<if test="weixinLogin != null">
#{weixinLogin,jdbcType=INTEGER},
</if>
<if test="alipayLogin != null">
#{alipayLogin,jdbcType=INTEGER},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=VARCHAR},
</if>
<if test="socProtect != null">
#{socProtect,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.XhpcCommunityPersonnel">
update xhpc_community_personnel
<set>
<if test="communityId != null">
community_id = #{communityId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="rechargeMoney != null">
recharge_money = #{rechargeMoney,jdbcType=DECIMAL},
</if>
<if test="consumeMoney != null">
consume_money = #{consumeMoney,jdbcType=DECIMAL},
</if>
<if test="redPacket != null">
red_packet = #{redPacket,jdbcType=DECIMAL},
</if>
<if test="surplusMoney != null">
surplus_money = #{surplusMoney,jdbcType=DECIMAL},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isRefund != null">
is_refund = #{isRefund,jdbcType=INTEGER},
</if>
<if test="isRefundApplication != null">
is_refund_application = #{isRefundApplication,jdbcType=INTEGER},
</if>
<if test="soc != null">
soc = #{soc,jdbcType=INTEGER},
</if>
<if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR},
</if>
<if test="weixinOpenId != null">
weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR},
</if>
<if test="alipayOpenId != null">
alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR},
</if>
<if test="weixinLogin != null">
weixin_login = #{weixinLogin,jdbcType=INTEGER},
</if>
<if test="alipayLogin != null">
alipay_login = #{alipayLogin,jdbcType=INTEGER},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=VARCHAR},
</if>
<if test="socProtect != null">
soc_protect = #{socProtect,jdbcType=INTEGER},
</if>
</set>
where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.XhpcCommunityPersonnel">
update xhpc_community_personnel
set community_id = #{communityId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR},
recharge_money = #{rechargeMoney,jdbcType=DECIMAL},
consume_money = #{consumeMoney,jdbcType=DECIMAL},
red_packet = #{redPacket,jdbcType=DECIMAL},
surplus_money = #{surplusMoney,jdbcType=DECIMAL},
phone = #{phone,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`status` = #{status,jdbcType=INTEGER},
del_flag = #{delFlag,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
is_refund = #{isRefund,jdbcType=INTEGER},
is_refund_application = #{isRefundApplication,jdbcType=INTEGER},
soc = #{soc,jdbcType=INTEGER},
avatar = #{avatar,jdbcType=VARCHAR},
weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR},
alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR},
weixin_login = #{weixinLogin,jdbcType=INTEGER},
alipay_login = #{alipayLogin,jdbcType=INTEGER},
tenant_id = #{tenantId,jdbcType=VARCHAR},
soc_protect = #{socProtect,jdbcType=INTEGER}
where community_personnel_id = #{communityPersonnelId,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -0,0 +1,389 @@
<?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">
<!--suppress ALL -->
<mapper namespace="com.xhpc.card.mapper.XhpcCustomersPersonnelMapper">
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcCustomersPersonnel">
<id column="customers_personnel_id" jdbcType="BIGINT" property="customersPersonnelId"/>
<result column="customers_id" jdbcType="BIGINT" property="customersId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="account" jdbcType="VARCHAR" property="account"/>
<result column="recharge_money" jdbcType="DECIMAL" property="rechargeMoney"/>
<result column="consume_money" jdbcType="DECIMAL" property="consumeMoney"/>
<result column="red_packet" jdbcType="DECIMAL" property="redPacket"/>
<result column="surplus_money" jdbcType="DECIMAL" property="surplusMoney"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="is_refund_application" jdbcType="INTEGER" property="isRefundApplication"/>
<result column="soc" jdbcType="INTEGER" property="soc"/>
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
<result column="weixin_open_id" jdbcType="VARCHAR" property="weixinOpenId"/>
<result column="alipay_open_id" jdbcType="VARCHAR" property="alipayOpenId"/>
<result column="weixin_login" jdbcType="INTEGER" property="weixinLogin"/>
<result column="alipay_login" jdbcType="INTEGER" property="alipayLogin"/>
<result column="is_refund" jdbcType="INTEGER" property="isRefund"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="soc_protect" jdbcType="INTEGER" property="socProtect"/>
</resultMap>
<sql id="Base_Column_List">
customers_personnel_id
, customers_id, `name`, account, recharge_money, consume_money,
red_packet, surplus_money, phone, `type`, `status`, del_flag, create_by, create_time,
update_by, update_time, remark, is_refund_application, soc, avatar, weixin_open_id,
alipay_open_id, weixin_login, alipay_login, is_refund, tenant_id, soc_protect
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_customers_personnel
where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT}
</select>
<select id="selectAll" resultType="com.xhpc.card.pojo.XhpcCustomersPersonnel">
select
<include refid="Base_Column_List"/>
from xhpc_customers_personnel
</select>
<select id="selectByCondition" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_customers_personnel
<where>
<if test="userAccount!=null and userAccount!='' ">
and account = #{userAccount}
</if>
</where>
limit #{currentPage},#{items}
</select>
<select id="selectCount" resultType="java.lang.Long">
select count(customers_personnel_id)
from xhpc_customers_personnel
<where>
<if test="userAccount!=null and userAccount!='' ">
and account = #{userAccount}
</if>
</where>
</select>
<select id="selectByOperatorId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_customers_personnel
where create_type = 2 and create_id = #{operatorId}
limit #{currentPage},#{items}
</select>
<select id="selectCountByOperatorId" resultType="java.lang.Long">
select count(customers_personnel_id)
from xhpc_customers_personnel
where create_type = 2
and create_id = #{operatorId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
from xhpc_customers_personnel
where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="customers_personnel_id" keyProperty="customersPersonnelId"
parameterType="com.xhpc.card.pojo.XhpcCustomersPersonnel" useGeneratedKeys="true">
insert into xhpc_customers_personnel (customers_id, `name`, account,
recharge_money, consume_money, red_packet,
surplus_money, phone, `type`,
`status`, del_flag, create_by,
create_time, update_by, update_time,
remark, is_refund_application, soc,
avatar, weixin_open_id, alipay_open_id,
weixin_login, alipay_login, is_refund,
tenant_id, soc_protect)
values (#{customersId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR},
#{rechargeMoney,jdbcType=DECIMAL}, #{consumeMoney,jdbcType=DECIMAL}, #{redPacket,jdbcType=DECIMAL},
#{surplusMoney,jdbcType=DECIMAL}, #{phone,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR}, #{isRefundApplication,jdbcType=INTEGER}, #{soc,jdbcType=INTEGER},
#{avatar,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR}, #{alipayOpenId,jdbcType=VARCHAR},
#{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER}, #{isRefund,jdbcType=INTEGER},
#{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="customers_personnel_id" keyProperty="customersPersonnelId"
parameterType="com.xhpc.card.pojo.XhpcCustomersPersonnel" useGeneratedKeys="true">
insert into xhpc_customers_personnel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="customersId != null">
customers_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="account != null">
account,
</if>
<if test="rechargeMoney != null">
recharge_money,
</if>
<if test="consumeMoney != null">
consume_money,
</if>
<if test="redPacket != null">
red_packet,
</if>
<if test="surplusMoney != null">
surplus_money,
</if>
<if test="phone != null">
phone,
</if>
<if test="type != null">
`type`,
</if>
<if test="status != null">
`status`,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
<if test="isRefundApplication != null">
is_refund_application,
</if>
<if test="soc != null">
soc,
</if>
<if test="avatar != null">
avatar,
</if>
<if test="weixinOpenId != null">
weixin_open_id,
</if>
<if test="alipayOpenId != null">
alipay_open_id,
</if>
<if test="weixinLogin != null">
weixin_login,
</if>
<if test="alipayLogin != null">
alipay_login,
</if>
<if test="isRefund != null">
is_refund,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="socProtect != null">
soc_protect,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customersId != null">
#{customersId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="rechargeMoney != null">
#{rechargeMoney,jdbcType=DECIMAL},
</if>
<if test="consumeMoney != null">
#{consumeMoney,jdbcType=DECIMAL},
</if>
<if test="redPacket != null">
#{redPacket,jdbcType=DECIMAL},
</if>
<if test="surplusMoney != null">
#{surplusMoney,jdbcType=DECIMAL},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isRefundApplication != null">
#{isRefundApplication,jdbcType=INTEGER},
</if>
<if test="soc != null">
#{soc,jdbcType=INTEGER},
</if>
<if test="avatar != null">
#{avatar,jdbcType=VARCHAR},
</if>
<if test="weixinOpenId != null">
#{weixinOpenId,jdbcType=VARCHAR},
</if>
<if test="alipayOpenId != null">
#{alipayOpenId,jdbcType=VARCHAR},
</if>
<if test="weixinLogin != null">
#{weixinLogin,jdbcType=INTEGER},
</if>
<if test="alipayLogin != null">
#{alipayLogin,jdbcType=INTEGER},
</if>
<if test="isRefund != null">
#{isRefund,jdbcType=INTEGER},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=VARCHAR},
</if>
<if test="socProtect != null">
#{socProtect,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.XhpcCustomersPersonnel">
update xhpc_customers_personnel
<set>
<if test="customersId != null">
customers_id = #{customersId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="rechargeMoney != null">
recharge_money = #{rechargeMoney,jdbcType=DECIMAL},
</if>
<if test="consumeMoney != null">
consume_money = #{consumeMoney,jdbcType=DECIMAL},
</if>
<if test="redPacket != null">
red_packet = #{redPacket,jdbcType=DECIMAL},
</if>
<if test="surplusMoney != null">
surplus_money = #{surplusMoney,jdbcType=DECIMAL},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isRefundApplication != null">
is_refund_application = #{isRefundApplication,jdbcType=INTEGER},
</if>
<if test="soc != null">
soc = #{soc,jdbcType=INTEGER},
</if>
<if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR},
</if>
<if test="weixinOpenId != null">
weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR},
</if>
<if test="alipayOpenId != null">
alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR},
</if>
<if test="weixinLogin != null">
weixin_login = #{weixinLogin,jdbcType=INTEGER},
</if>
<if test="alipayLogin != null">
alipay_login = #{alipayLogin,jdbcType=INTEGER},
</if>
<if test="isRefund != null">
is_refund = #{isRefund,jdbcType=INTEGER},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=VARCHAR},
</if>
<if test="socProtect != null">
soc_protect = #{socProtect,jdbcType=INTEGER},
</if>
</set>
where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.XhpcCustomersPersonnel">
update xhpc_customers_personnel
set customers_id = #{customersId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR},
recharge_money = #{rechargeMoney,jdbcType=DECIMAL},
consume_money = #{consumeMoney,jdbcType=DECIMAL},
red_packet = #{redPacket,jdbcType=DECIMAL},
surplus_money = #{surplusMoney,jdbcType=DECIMAL},
phone = #{phone,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`status` = #{status,jdbcType=INTEGER},
del_flag = #{delFlag,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
is_refund_application = #{isRefundApplication,jdbcType=INTEGER},
soc = #{soc,jdbcType=INTEGER},
avatar = #{avatar,jdbcType=VARCHAR},
weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR},
alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR},
weixin_login = #{weixinLogin,jdbcType=INTEGER},
alipay_login = #{alipayLogin,jdbcType=INTEGER},
is_refund = #{isRefund,jdbcType=INTEGER},
tenant_id = #{tenantId,jdbcType=VARCHAR},
soc_protect = #{socProtect,jdbcType=INTEGER}
where customers_personnel_id = #{customersPersonnelId,jdbcType=BIGINT}
</update>
</mapper>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--suppress ALL -->
<mapper namespace="com.xhpc.card.mapper.XhpcOperatorMapper"> <mapper namespace="com.xhpc.card.mapper.XhpcOperatorMapper">
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcOperator"> <resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcOperator">
<id column="operator_id" jdbcType="BIGINT" property="operatorId"/> <id column="operator_id" jdbcType="BIGINT" property="operatorId"/>
@ -47,6 +48,12 @@
from xhpc_operator from xhpc_operator
where operator_id = #{operatorId,jdbcType=BIGINT} where operator_id = #{operatorId,jdbcType=BIGINT}
</select> </select>
<select id="selectByName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xhpc_operator
where name = #{grantOperatorName}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete delete
from xhpc_operator from xhpc_operator