accomplish offline part of card list
This commit is contained in:
parent
04fafe47e2
commit
89674608c4
148
sql/v2.1.sql
148
sql/v2.1.sql
@ -443,35 +443,123 @@ ALTER TABLE `xhpc_setting_config`
|
||||
CHANGE COLUMN `zhb_server_url` `zhb_server_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝网管' COLLATE 'utf8mb4_general_ci' AFTER `zfb_alipay_root_cert`;
|
||||
|
||||
CREATE TABLE `xhpc_setting_config` (
|
||||
`setting_config_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`wx_app_id` VARCHAR(50) NULL DEFAULT NULL COMMENT '微信小程序id' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_app_secret` VARCHAR(50) NULL DEFAULT NULL COMMENT '微信小程序密钥' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_mch_id` VARCHAR(20) NULL DEFAULT NULL COMMENT '微信商户id' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_mch_key` VARCHAR(50) NULL DEFAULT NULL COMMENT '微信商户平台Key' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_payment_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信小程序支付地址' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_callback_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信回调地址' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_transfers_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '向微信用户个人付款地址' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_apiclient_cert_pem` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信证书' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_apiclient_key_pem` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信证书' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_app_cert_public_key` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信证书' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_app_id` VARCHAR(50) NULL DEFAULT NULL COMMENT '支付宝appid' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_private_key` VARCHAR(500) NULL DEFAULT NULL COMMENT '支付宝应用私钥' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_callback_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝回调地址' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_app_cert_public_key` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝应用公钥证书路径' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_alipay_cert_public_key_rsa` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝公钥证书路径' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_alipay_root_cert` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝根证书路径' COLLATE 'utf8mb4_general_ci',
|
||||
`zhb_server_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝网管' COLLATE 'utf8mb4_general_ci',
|
||||
`status` INT(4) NULL DEFAULT '0' COMMENT '1微信 2支付宝',
|
||||
`del_flag` INT(1) NULL DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)',
|
||||
`create_by` VARCHAR(64) NULL DEFAULT '' COMMENT '创建者' COLLATE 'utf8mb4_general_ci',
|
||||
`create_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` VARCHAR(64) NULL DEFAULT '' COMMENT '更新者' COLLATE 'utf8mb4_general_ci',
|
||||
`update_time` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`remark` VARCHAR(500) NULL DEFAULT NULL COMMENT '备注' COLLATE 'utf8mb4_general_ci',
|
||||
`tenant_id` VARCHAR(12) NULL DEFAULT '000000' COMMENT '租户id' COLLATE 'utf8mb4_general_ci',
|
||||
PRIMARY KEY (`setting_config_id`) USING BTREE
|
||||
`setting_config_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`wx_app_id` VARCHAR(50) NULL DEFAULT NULL COMMENT '微信小程序id' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_app_secret` VARCHAR(50) NULL DEFAULT NULL COMMENT '微信小程序密钥' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_mch_id` VARCHAR(20) NULL DEFAULT NULL COMMENT '微信商户id' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_mch_key` VARCHAR(50) NULL DEFAULT NULL COMMENT '微信商户平台Key' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_payment_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信小程序支付地址' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_callback_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信回调地址' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_transfers_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '向微信用户个人付款地址' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_apiclient_cert_pem` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信证书' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_apiclient_key_pem` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信证书' COLLATE 'utf8mb4_general_ci',
|
||||
`wx_app_cert_public_key` VARCHAR(255) NULL DEFAULT NULL COMMENT '微信证书' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_app_id` VARCHAR(50) NULL DEFAULT NULL COMMENT '支付宝appid' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_private_key` VARCHAR(500) NULL DEFAULT NULL COMMENT '支付宝应用私钥' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_callback_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝回调地址' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_app_cert_public_key` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝应用公钥证书路径' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_alipay_cert_public_key_rsa` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝公钥证书路径' COLLATE 'utf8mb4_general_ci',
|
||||
`zfb_alipay_root_cert` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝根证书路径' COLLATE 'utf8mb4_general_ci',
|
||||
`zhb_server_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '支付宝网管' COLLATE 'utf8mb4_general_ci',
|
||||
`status` INT(4) NULL DEFAULT '0' COMMENT '1微信 2支付宝',
|
||||
`del_flag` INT(1) NULL DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)',
|
||||
`create_by` VARCHAR(64) NULL DEFAULT '' COMMENT '创建者' COLLATE 'utf8mb4_general_ci',
|
||||
`create_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` VARCHAR(64) NULL DEFAULT '' COMMENT '更新者' COLLATE 'utf8mb4_general_ci',
|
||||
`update_time` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`remark` VARCHAR(500) NULL DEFAULT NULL COMMENT '备注' COLLATE 'utf8mb4_general_ci',
|
||||
`tenant_id` VARCHAR(12) NULL DEFAULT '000000' COMMENT '租户id' COLLATE 'utf8mb4_general_ci',
|
||||
PRIMARY KEY (`setting_config_id`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=3
|
||||
COLLATE = 'utf8mb4_general_ci'
|
||||
ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 3
|
||||
;
|
||||
|
||||
CREATE TABLE `xhpc_invoice`
|
||||
(
|
||||
`invoice_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '发票id',
|
||||
`invoice_type` int(1) DEFAULT '0' COMMENT '发票类型(0,票普,1,专票,默认开的都是普票)',
|
||||
`receive_email` varchar(30) NOT NULL DEFAULT '' COMMENT '接收邮箱',
|
||||
`title_type` int(1) NOT NULL COMMENT '0为企业抬头 1为非企业抬头',
|
||||
`title_content` varchar(40) NOT NULL COMMENT '发票抬头内容',
|
||||
`duty_number` varchar(30) NOT NULL COMMENT '税号',
|
||||
`invoice_content` varchar(40) NOT NULL DEFAULT '' COMMENT '发票内容',
|
||||
`invoice_money` decimal(20, 2) NOT NULL COMMENT '发票金额',
|
||||
`invoice_order_eletric_total_money` decimal(20, 2) DEFAULT NULL COMMENT '发票包含的订单的总电费金额',
|
||||
`invoice_order_service_total_money` decimal(20, 2) DEFAULT NULL COMMENT '发票包含的订单的总服务费金额',
|
||||
`firm_address` varchar(100) DEFAULT NULL COMMENT '公司地址',
|
||||
`firm_phone` varchar(40) DEFAULT NULL COMMENT '公司电话',
|
||||
`firm_bank` varchar(40) DEFAULT NULL COMMENT '公司开户行',
|
||||
`firm_bank_account` varchar(40) DEFAULT NULL COMMENT '公司开户行账号',
|
||||
`is_show_date` int(2) NOT NULL COMMENT '所开发票是否展示交易记录(0为不展示,1为展示)',
|
||||
`user_notes` text COMMENT '用户备注',
|
||||
`creator_id` bigint(20) NOT NULL COMMENT '创建者id',
|
||||
`creator_type` int(1) NOT NULL COMMENT '创建者类型0 C端用户 1 流量方用户 2社区用户 3B端用户)',
|
||||
`creator` varchar(20) NOT NULL COMMENT '创建人(用户账号)',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`status` int(2) DEFAULT NULL COMMENT '开票状态(0表示未开票,1表示已经开票,2表示开票失败)',
|
||||
`invoicing_time` datetime DEFAULT NULL COMMENT '财务输入的开票时间',
|
||||
`drawer` varchar(20) DEFAULT NULL COMMENT '开票人',
|
||||
`finance_notes` text COMMENT '开票人(财务备注)',
|
||||
`electric_invoice_url` text COMMENT '开票的电子发票pdf保存地址',
|
||||
`updator` bigint(20) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` date DEFAULT NULL COMMENT '更新时间',
|
||||
`is_read` tinyint(1) DEFAULT NULL COMMENT '该发票是否被用户阅读(默认为null),0,表示未阅读,1表示已经阅读',
|
||||
`del_flag` int(2) DEFAULT NULL COMMENT '逻辑删除字段',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户id',
|
||||
PRIMARY KEY (`invoice_id`) USING BTREE
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 12
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='发票表';
|
||||
|
||||
CREATE TABLE `xhpc_invoice_map_history_order`
|
||||
(
|
||||
`invoice_id` bigint(20) NOT NULL COMMENT '发票id',
|
||||
`history_order_id` bigint(20) NOT NULL COMMENT '该发票所选中的历史订单id',
|
||||
`history_user_id` bigint(20) DEFAULT NULL COMMENT '该发票所选中的历史订单的用户id',
|
||||
`history_user_type` bigint(5) DEFAULT NULL COMMENT '该发票所选中的历史订单的用户类型(0 C端用户 1 流量方用户 2社区用户 3B端用户)',
|
||||
`history_serial_number` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '该发票所选中的历史订单订单编号',
|
||||
`power_price_total` decimal(10, 2) DEFAULT NULL COMMENT '该发票所选中的历史订单电费',
|
||||
`service_price_total` decimal(10, 2) DEFAULT NULL COMMENT '该发票所选中的历史订单服务费',
|
||||
`promotion_discount` decimal(10, 2) DEFAULT '0.00' COMMENT '该发票所选中的历史订单电站活动抵扣',
|
||||
`history_act_price` decimal(10, 2) DEFAULT '0.00' COMMENT '该发票所选中的历史订单实际价格(用户支付的钱)',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '该发票所选中的历史订单创建时间',
|
||||
`charging_mode` varchar(50) DEFAULT NULL COMMENT '充电方式(订单来源)',
|
||||
`charging_station_id` bigint(20) DEFAULT NULL COMMENT '电站id(通过它查询运营商)',
|
||||
`terminal_id` bigint(20) DEFAULT NULL COMMENT '该发票所选中的历史订单充电的终端id',
|
||||
`lock_flag` tinyint(1) DEFAULT NULL COMMENT '小程序是否能查询到该订单,0表示锁定,空表示未锁定',
|
||||
`del_flag` int(2) DEFAULT NULL COMMENT '逻辑删除字段',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户id'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `xhpc_message_board`
|
||||
(
|
||||
`message_id` bigint(30) NOT NULL AUTO_INCREMENT COMMENT '消息id',
|
||||
`sender_type` tinyint(2) DEFAULT NULL COMMENT '用户类型用户类型(0 C端用户 1 流量方用户 2社区用户 3B端用户)',
|
||||
`sender_account` varchar(30) DEFAULT NULL COMMENT '用户账号',
|
||||
`send_message_time` datetime DEFAULT NULL COMMENT '发送消息的时间',
|
||||
`message_content` text COMMENT '消息内容',
|
||||
`tenant_type` tinyint(2) DEFAULT NULL COMMENT '租户类型',
|
||||
`tenant_id` varchar(30) DEFAULT NULL COMMENT '租户id(平台id)',
|
||||
`have_new_info` tinyint(1) DEFAULT NULL COMMENT '租户发送的消息,用户是否已读,默认为null,0表示未读,1表示已读',
|
||||
`del_flag` tinyint(1) DEFAULT NULL COMMENT '逻辑删除字段',
|
||||
`sender` tinyint(1) DEFAULT NULL COMMENT '发送者(0,用户,1,时间,2,平台(租户))',
|
||||
PRIMARY KEY (`message_id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 2920
|
||||
DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `xhpc_message_board_receive_user`
|
||||
(
|
||||
`tenant_id` varchar(50) DEFAULT NULL COMMENT '接收者id(租户id)',
|
||||
`tenant_type` int(2) DEFAULT NULL COMMENT '接收者类型(租户类型 0,为默认类型)',
|
||||
`sender_account` varchar(50) DEFAULT NULL COMMENT '发送者账号',
|
||||
`sender_type` int(11) DEFAULT NULL COMMENT '发送者类型(0 C端用户 1 流量方用户 2社区用户 3B端用户)',
|
||||
`user_icon` text COMMENT '用户头像地址',
|
||||
`have_new_info` tinyint(1) DEFAULT NULL COMMENT '是否有新消息(0表示有新消息,null表示没有)',
|
||||
`new_info_time` datetime DEFAULT NULL COMMENT '新消息发送时间',
|
||||
`del_flag` tinyint(1) DEFAULT NULL COMMENT '逻辑删除(0为删除)'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='用来保存每个租户后台显示的用户的信息列表';
|
||||
@ -1,11 +1,14 @@
|
||||
package com.xhpc.card.controller;
|
||||
|
||||
import com.xhpc.card.domain.CardList;
|
||||
import com.xhpc.card.domain.ListOfAuthorizedDevices;
|
||||
import com.xhpc.card.domain.QueryConditions;
|
||||
import com.xhpc.card.service.IXhpcCardService;
|
||||
import com.xhpc.common.core.domain.R;
|
||||
import com.xhpc.common.core.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
@ -53,5 +56,18 @@ public class XhpcCardController extends BaseController {
|
||||
return xhpcCardService.deleteDevice(deviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过查询条件来查询卡列表
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/1/26 10:37
|
||||
* @since version-1.0
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R<CardList> queryCardListBy(@Validated QueryConditions queryConditions) {
|
||||
|
||||
return xhpcCardService.queryCardListBy(queryConditions);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
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/26 13:58
|
||||
* @since version-1.0
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class CardList {
|
||||
|
||||
|
||||
/**
|
||||
* totalItems
|
||||
*/
|
||||
@JsonProperty("totalItems")
|
||||
private Integer totalItems;
|
||||
/**
|
||||
* data
|
||||
*/
|
||||
@JsonProperty("data")
|
||||
private List<DataDTO> data;
|
||||
|
||||
/**
|
||||
* DataDTO
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DataDTO {
|
||||
|
||||
/**
|
||||
* cardSerialNumber
|
||||
*/
|
||||
@JsonProperty("cardSerialNumber")
|
||||
private String cardSerialNumber;
|
||||
/**
|
||||
* cardPhysicalNumber
|
||||
*/
|
||||
@JsonProperty("cardPhysicalNumber")
|
||||
private String cardPhysicalNumber;
|
||||
/**
|
||||
* grantOperatorName
|
||||
*/
|
||||
@JsonProperty("grantOperator")
|
||||
private String grantOperator;
|
||||
/**
|
||||
* classification
|
||||
* 0 means offline,1 means online
|
||||
*/
|
||||
@JsonProperty("classification")
|
||||
private Integer classification;
|
||||
/**
|
||||
* cardStatus
|
||||
* 0 means bound,1 means no bind
|
||||
*/
|
||||
@JsonProperty("cardStatus")
|
||||
private Integer cardStatus;
|
||||
/**
|
||||
* cardType
|
||||
* 0 means platform,1 means operator
|
||||
*/
|
||||
@JsonProperty("cardType")
|
||||
private Integer cardType;
|
||||
/**
|
||||
* userType
|
||||
* 0 C端用户 1 流量方用户 2社区用户 3B端用户)
|
||||
* 10 means offline user
|
||||
*/
|
||||
@JsonProperty("userType")
|
||||
private Integer userType;
|
||||
/**
|
||||
* userAccount
|
||||
*/
|
||||
@JsonProperty("userAccount")
|
||||
private String userAccount;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.xhpc.card.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* 查询卡列表的条件实体类
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/1/26 14:25
|
||||
* @since version-1.0
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class QueryConditions {
|
||||
|
||||
/**
|
||||
* currentPage
|
||||
*/
|
||||
@Min(value = 1, message = "currentPage最小值必须为1")
|
||||
@JsonProperty("currentPage")
|
||||
private Long currentPage;
|
||||
/**
|
||||
* items
|
||||
*/
|
||||
@Min(value = 1, message = "items最小值必须为1")
|
||||
@JsonProperty("items")
|
||||
private Long items;
|
||||
/**
|
||||
* cardSerialNumber
|
||||
*/
|
||||
@JsonProperty("cardSerialNumber")
|
||||
private Integer cardSerialNumber;
|
||||
/**
|
||||
* cardPhysicalNumber
|
||||
*/
|
||||
@JsonProperty("cardPhysicalNumber")
|
||||
private String cardPhysicalNumber;
|
||||
/**
|
||||
* grantOperator
|
||||
*/
|
||||
@JsonProperty("grantOperator")
|
||||
private String grantOperator;
|
||||
/**
|
||||
* classification
|
||||
*/
|
||||
@JsonProperty("classification")
|
||||
private Integer classification;
|
||||
/**
|
||||
* cardStatus
|
||||
*/
|
||||
@JsonProperty("cardStatus")
|
||||
private Integer cardStatus;
|
||||
/**
|
||||
* cardType
|
||||
*/
|
||||
@JsonProperty("cardType")
|
||||
private Integer cardType;
|
||||
/**
|
||||
* userType
|
||||
*/
|
||||
@JsonProperty("userType")
|
||||
private Integer userType;
|
||||
/**
|
||||
* userAccount
|
||||
*/
|
||||
@JsonProperty("userAccount")
|
||||
private String userAccount;
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.card.mapper;
|
||||
|
||||
import com.xhpc.card.pojo.TIccardInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TIccardInfoMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TIccardInfo record);
|
||||
|
||||
int insertSelective(TIccardInfo record);
|
||||
|
||||
TIccardInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TIccardInfo record);
|
||||
|
||||
int updateByPrimaryKey(TIccardInfo record);
|
||||
|
||||
/**
|
||||
* 查询所有卡记录信息
|
||||
*
|
||||
* @return 所有卡记录信息集合
|
||||
* @author WH
|
||||
* @date 2022/1/26 15:53
|
||||
* @since version-1.0
|
||||
*/
|
||||
List<TIccardInfo> selectAll();
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xhpc.card.mapper;
|
||||
|
||||
import com.xhpc.card.pojo.XhpcOperator;
|
||||
|
||||
public interface XhpcOperatorMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long operatorId);
|
||||
|
||||
int insert(XhpcOperator record);
|
||||
|
||||
int insertSelective(XhpcOperator record);
|
||||
|
||||
XhpcOperator selectByPrimaryKey(Long operatorId);
|
||||
|
||||
int updateByPrimaryKeySelective(XhpcOperator record);
|
||||
|
||||
int updateByPrimaryKey(XhpcOperator record);
|
||||
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.xhpc.card.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* t_iccard_info
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class TIccardInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* 记录id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 卡序列号
|
||||
*/
|
||||
private String cardid;
|
||||
|
||||
/**
|
||||
* 卡编号
|
||||
*/
|
||||
private String cardno;
|
||||
|
||||
/**
|
||||
* 0表示平台,1表示运营商
|
||||
*/
|
||||
private Byte isPlatform;
|
||||
|
||||
/**
|
||||
* 卡类型。0.离线卡; 1.联网卡
|
||||
*/
|
||||
private Byte cardtype;
|
||||
|
||||
/**
|
||||
* 卡用户索引 (t_iccard_users 找用户的,没有表示没绑)
|
||||
*/
|
||||
private Integer userindex;
|
||||
|
||||
/**
|
||||
* password
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 授权运营商id(xhpc_operator)
|
||||
*/
|
||||
private String corpno;
|
||||
|
||||
/**
|
||||
* 押金
|
||||
*/
|
||||
private Integer cashpledge;
|
||||
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
private Integer balance;
|
||||
|
||||
/**
|
||||
* 0.初始化, 1.正常, 2.锁卡, 3.挂失, 4.作废
|
||||
*/
|
||||
private Byte status;
|
||||
|
||||
/**
|
||||
* 添加日期
|
||||
*/
|
||||
private Date createtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@ -0,0 +1,165 @@
|
||||
package com.xhpc.card.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* xhpc_operator
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class XhpcOperator implements Serializable {
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contactName;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 手机号(账号)
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
private String openBank;
|
||||
|
||||
/**
|
||||
* 卡号
|
||||
*/
|
||||
private String cardNumber;
|
||||
|
||||
/**
|
||||
* 税号
|
||||
*/
|
||||
private String dutyParagraph;
|
||||
|
||||
/**
|
||||
* 运营商属性
|
||||
*/
|
||||
private Integer attribute;
|
||||
|
||||
/**
|
||||
* 地址code
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String detailedAddress;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 提成类型(0总金额提成 1服务费提成)
|
||||
*/
|
||||
private Integer commissionType;
|
||||
|
||||
/**
|
||||
* 平台提成
|
||||
*/
|
||||
private Double platformCommissionRate;
|
||||
|
||||
/**
|
||||
* 运维提成
|
||||
*/
|
||||
private Double maintenanceCommissionRate;
|
||||
|
||||
/**
|
||||
* 营业执照id
|
||||
*/
|
||||
private String businessLicenseId;
|
||||
|
||||
/**
|
||||
* 提现时间(T+N)
|
||||
*/
|
||||
private Integer withdrawalTime;
|
||||
|
||||
/**
|
||||
* 设置充电终止的soc
|
||||
*/
|
||||
private String soc;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 对接第三方平台及监管平台的operatorId
|
||||
*/
|
||||
private String operatorIdEvcs;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
package com.xhpc.card.service;
|
||||
|
||||
import com.xhpc.card.domain.CardList;
|
||||
import com.xhpc.card.domain.ListOfAuthorizedDevices;
|
||||
import com.xhpc.card.domain.QueryConditions;
|
||||
import com.xhpc.common.core.domain.R;
|
||||
|
||||
/**
|
||||
@ -39,4 +41,15 @@ public interface IXhpcCardService {
|
||||
*/
|
||||
R<Object> deleteDevice(Integer deviceId);
|
||||
|
||||
/**
|
||||
* 通过查询条件来查询卡列表
|
||||
*
|
||||
* @param queryConditions 查询条件
|
||||
* @return 装有卡列表数据的结果集
|
||||
* @author WH
|
||||
* @date 2022/1/26 13:56
|
||||
* @since version-1.0
|
||||
*/
|
||||
R<CardList> queryCardListBy(QueryConditions queryConditions);
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
package com.xhpc.card.service.impl;
|
||||
|
||||
import com.xhpc.card.domain.CardList;
|
||||
import com.xhpc.card.domain.ListOfAuthorizedDevices;
|
||||
import com.xhpc.card.mapper.TIccardDeviceMapper;
|
||||
import com.xhpc.card.mapper.TIccardUsersMapper;
|
||||
import com.xhpc.card.mapper.XhpcCardMapper;
|
||||
import com.xhpc.card.domain.QueryConditions;
|
||||
import com.xhpc.card.mapper.*;
|
||||
import com.xhpc.card.pojo.TIccardDevice;
|
||||
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.common.api.CardHistoryOrderService;
|
||||
import com.xhpc.common.core.constant.Constants;
|
||||
@ -35,6 +37,10 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
||||
private TIccardDeviceMapper tIccardDeviceMapper;
|
||||
@Resource
|
||||
private TIccardUsersMapper tIccardUsersMapper;
|
||||
@Resource
|
||||
private TIccardInfoMapper tIccardInfoMapper;
|
||||
@Resource
|
||||
private XhpcOperatorMapper xhpcOperatorMapper;
|
||||
|
||||
|
||||
/**
|
||||
@ -122,4 +128,48 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<CardList> queryCardListBy(QueryConditions queryConditions) {
|
||||
|
||||
CardList cardList = new CardList();
|
||||
cardList.setTotalItems(0);
|
||||
cardList.setData(new ArrayList<>());
|
||||
List<TIccardInfo> tIccardInfoList = tIccardInfoMapper.selectAll();
|
||||
if (tIccardInfoList.isEmpty()) {
|
||||
return R.ok(cardList);
|
||||
}
|
||||
for (TIccardInfo tIccardInfo : tIccardInfoList) {
|
||||
//封装通用数据
|
||||
CardList.DataDTO dataDTO = new CardList.DataDTO();
|
||||
dataDTO.setCardSerialNumber(tIccardInfo.getCardid());
|
||||
dataDTO.setCardPhysicalNumber(tIccardInfo.getCardno());
|
||||
//获取授权商id
|
||||
String corpno = tIccardInfo.getCorpno();
|
||||
XhpcOperator xhpcOperator = xhpcOperatorMapper.selectByPrimaryKey(Long.valueOf(corpno));
|
||||
dataDTO.setGrantOperator(xhpcOperator.getName());
|
||||
dataDTO.setClassification(Integer.valueOf(tIccardInfo.getCardtype()));
|
||||
//判断是否是离线卡,离线卡处理逻辑
|
||||
if (dataDTO.getClassification() == 0) {
|
||||
dataDTO.setCardType(1);
|
||||
//获取卡用户索引,为null表示没有该卡没有绑用户
|
||||
Integer userIndex = tIccardInfo.getUserindex();
|
||||
if (userIndex == null) {
|
||||
dataDTO.setCardStatus(1);
|
||||
continue;
|
||||
} else {
|
||||
dataDTO.setCardStatus(0);
|
||||
dataDTO.setUserType(10);
|
||||
TIccardUsers tIccardUsers = tIccardUsersMapper.selectByPrimaryKey(userIndex);
|
||||
dataDTO.setUserAccount(tIccardUsers.getPhone());
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
//联网卡处理逻辑
|
||||
|
||||
}
|
||||
cardList.getData().add(dataDTO);
|
||||
}
|
||||
return R.ok(cardList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,179 @@
|
||||
<?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.TIccardInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.TIccardInfo">
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="cardID" jdbcType="VARCHAR" property="cardid"/>
|
||||
<result column="cardNo" jdbcType="VARCHAR" property="cardno"/>
|
||||
<result column="is_platform" jdbcType="TINYINT" property="isPlatform"/>
|
||||
<result column="cardType" jdbcType="TINYINT" property="cardtype"/>
|
||||
<result column="userIndex" jdbcType="INTEGER" property="userindex"/>
|
||||
<result column="password" jdbcType="VARCHAR" property="password"/>
|
||||
<result column="corpNo" jdbcType="VARCHAR" property="corpno"/>
|
||||
<result column="cashPledge" jdbcType="INTEGER" property="cashpledge"/>
|
||||
<result column="balance" jdbcType="INTEGER" property="balance"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, cardID, cardNo, is_platform, cardType, userIndex, `password`, corpNo, cashPledge,
|
||||
balance, `status`, createTime
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_iccard_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAll" resultType="com.xhpc.card.pojo.TIccardInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_iccard_info
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete
|
||||
from t_iccard_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.xhpc.card.pojo.TIccardInfo"
|
||||
useGeneratedKeys="true">
|
||||
insert into t_iccard_info (cardID, cardNo, is_platform,
|
||||
cardType, userIndex, `password`,
|
||||
corpNo, cashPledge, balance,
|
||||
`status`, createTime)
|
||||
values (#{cardid,jdbcType=VARCHAR}, #{cardno,jdbcType=VARCHAR}, #{isPlatform,jdbcType=TINYINT},
|
||||
#{cardtype,jdbcType=TINYINT}, #{userindex,jdbcType=INTEGER}, #{password,jdbcType=VARCHAR},
|
||||
#{corpno,jdbcType=VARCHAR}, #{cashpledge,jdbcType=INTEGER}, #{balance,jdbcType=INTEGER},
|
||||
#{status,jdbcType=TINYINT}, #{createtime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xhpc.card.pojo.TIccardInfo"
|
||||
useGeneratedKeys="true">
|
||||
insert into t_iccard_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cardid != null">
|
||||
cardID,
|
||||
</if>
|
||||
<if test="cardno != null">
|
||||
cardNo,
|
||||
</if>
|
||||
<if test="isPlatform != null">
|
||||
is_platform,
|
||||
</if>
|
||||
<if test="cardtype != null">
|
||||
cardType,
|
||||
</if>
|
||||
<if test="userindex != null">
|
||||
userIndex,
|
||||
</if>
|
||||
<if test="password != null">
|
||||
`password`,
|
||||
</if>
|
||||
<if test="corpno != null">
|
||||
corpNo,
|
||||
</if>
|
||||
<if test="cashpledge != null">
|
||||
cashPledge,
|
||||
</if>
|
||||
<if test="balance != null">
|
||||
balance,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cardid != null">
|
||||
#{cardid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cardno != null">
|
||||
#{cardno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPlatform != null">
|
||||
#{isPlatform,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="cardtype != null">
|
||||
#{cardtype,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="userindex != null">
|
||||
#{userindex,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
#{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="corpno != null">
|
||||
#{corpno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cashpledge != null">
|
||||
#{cashpledge,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="balance != null">
|
||||
#{balance,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.TIccardInfo">
|
||||
update t_iccard_info
|
||||
<set>
|
||||
<if test="cardid != null">
|
||||
cardID = #{cardid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cardno != null">
|
||||
cardNo = #{cardno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPlatform != null">
|
||||
is_platform = #{isPlatform,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="cardtype != null">
|
||||
cardType = #{cardtype,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="userindex != null">
|
||||
userIndex = #{userindex,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
`password` = #{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="corpno != null">
|
||||
corpNo = #{corpno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cashpledge != null">
|
||||
cashPledge = #{cashpledge,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="balance != null">
|
||||
balance = #{balance,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.TIccardInfo">
|
||||
update t_iccard_info
|
||||
set cardID = #{cardid,jdbcType=VARCHAR},
|
||||
cardNo = #{cardno,jdbcType=VARCHAR},
|
||||
is_platform = #{isPlatform,jdbcType=TINYINT},
|
||||
cardType = #{cardtype,jdbcType=TINYINT},
|
||||
userIndex = #{userindex,jdbcType=INTEGER},
|
||||
`password` = #{password,jdbcType=VARCHAR},
|
||||
corpNo = #{corpno,jdbcType=VARCHAR},
|
||||
cashPledge = #{cashpledge,jdbcType=INTEGER},
|
||||
balance = #{balance,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=TINYINT},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,386 @@
|
||||
<?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.xhpc.card.mapper.XhpcOperatorMapper">
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.XhpcOperator">
|
||||
<id column="operator_id" jdbcType="BIGINT" property="operatorId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="contact_name" jdbcType="VARCHAR" property="contactName"/>
|
||||
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone"/>
|
||||
<result column="phone" jdbcType="VARCHAR" property="phone"/>
|
||||
<result column="open_bank" jdbcType="VARCHAR" property="openBank"/>
|
||||
<result column="card_number" jdbcType="VARCHAR" property="cardNumber"/>
|
||||
<result column="duty_paragraph" jdbcType="VARCHAR" property="dutyParagraph"/>
|
||||
<result column="attribute" jdbcType="INTEGER" property="attribute"/>
|
||||
<result column="area_code" jdbcType="VARCHAR" property="areaCode"/>
|
||||
<result column="address" jdbcType="VARCHAR" property="address"/>
|
||||
<result column="detailed_address" jdbcType="VARCHAR" property="detailedAddress"/>
|
||||
<result column="longitude" jdbcType="VARCHAR" property="longitude"/>
|
||||
<result column="latitude" jdbcType="VARCHAR" property="latitude"/>
|
||||
<result column="email" jdbcType="VARCHAR" property="email"/>
|
||||
<result column="commission_type" jdbcType="INTEGER" property="commissionType"/>
|
||||
<result column="platform_commission_rate" jdbcType="DOUBLE" property="platformCommissionRate"/>
|
||||
<result column="maintenance_commission_rate" jdbcType="DOUBLE" property="maintenanceCommissionRate"/>
|
||||
<result column="business_license_id" jdbcType="VARCHAR" property="businessLicenseId"/>
|
||||
<result column="withdrawal_time" jdbcType="INTEGER" property="withdrawalTime"/>
|
||||
<result column="soc" jdbcType="VARCHAR" property="soc"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="operator_id_evcs" jdbcType="VARCHAR" property="operatorIdEvcs"/>
|
||||
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
operator_id
|
||||
, `name`, contact_name, contact_phone, phone, open_bank, card_number,
|
||||
duty_paragraph, `attribute`, area_code, address, detailed_address, longitude, latitude,
|
||||
email, commission_type, platform_commission_rate, maintenance_commission_rate, business_license_id,
|
||||
withdrawal_time, soc, `status`, del_flag, create_time, create_by, update_time, update_by,
|
||||
remark, operator_id_evcs, tenant_id
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from xhpc_operator
|
||||
where operator_id = #{operatorId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from xhpc_operator
|
||||
where operator_id = #{operatorId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="operator_id" keyProperty="operatorId" parameterType="com.xhpc.card.pojo.XhpcOperator"
|
||||
useGeneratedKeys="true">
|
||||
insert into xhpc_operator (`name`, contact_name, contact_phone,
|
||||
phone, open_bank, card_number,
|
||||
duty_paragraph, `attribute`, area_code,
|
||||
address, detailed_address, longitude,
|
||||
latitude, email, commission_type,
|
||||
platform_commission_rate, maintenance_commission_rate,
|
||||
business_license_id, withdrawal_time, soc,
|
||||
`status`, del_flag, create_time,
|
||||
create_by, update_time, update_by,
|
||||
remark, operator_id_evcs, tenant_id)
|
||||
values (#{name,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR},
|
||||
#{phone,jdbcType=VARCHAR}, #{openBank,jdbcType=VARCHAR}, #{cardNumber,jdbcType=VARCHAR},
|
||||
#{dutyParagraph,jdbcType=VARCHAR}, #{attribute,jdbcType=INTEGER}, #{areaCode,jdbcType=VARCHAR},
|
||||
#{address,jdbcType=VARCHAR}, #{detailedAddress,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
|
||||
#{latitude,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{commissionType,jdbcType=INTEGER},
|
||||
#{platformCommissionRate,jdbcType=DOUBLE}, #{maintenanceCommissionRate,jdbcType=DOUBLE},
|
||||
#{businessLicenseId,jdbcType=VARCHAR}, #{withdrawalTime,jdbcType=INTEGER}, #{soc,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
||||
#{remark,jdbcType=VARCHAR}, #{operatorIdEvcs,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="operator_id" keyProperty="operatorId"
|
||||
parameterType="com.xhpc.card.pojo.XhpcOperator" useGeneratedKeys="true">
|
||||
insert into xhpc_operator
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="contactName != null">
|
||||
contact_name,
|
||||
</if>
|
||||
<if test="contactPhone != null">
|
||||
contact_phone,
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone,
|
||||
</if>
|
||||
<if test="openBank != null">
|
||||
open_bank,
|
||||
</if>
|
||||
<if test="cardNumber != null">
|
||||
card_number,
|
||||
</if>
|
||||
<if test="dutyParagraph != null">
|
||||
duty_paragraph,
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
`attribute`,
|
||||
</if>
|
||||
<if test="areaCode != null">
|
||||
area_code,
|
||||
</if>
|
||||
<if test="address != null">
|
||||
address,
|
||||
</if>
|
||||
<if test="detailedAddress != null">
|
||||
detailed_address,
|
||||
</if>
|
||||
<if test="longitude != null">
|
||||
longitude,
|
||||
</if>
|
||||
<if test="latitude != null">
|
||||
latitude,
|
||||
</if>
|
||||
<if test="email != null">
|
||||
email,
|
||||
</if>
|
||||
<if test="commissionType != null">
|
||||
commission_type,
|
||||
</if>
|
||||
<if test="platformCommissionRate != null">
|
||||
platform_commission_rate,
|
||||
</if>
|
||||
<if test="maintenanceCommissionRate != null">
|
||||
maintenance_commission_rate,
|
||||
</if>
|
||||
<if test="businessLicenseId != null">
|
||||
business_license_id,
|
||||
</if>
|
||||
<if test="withdrawalTime != null">
|
||||
withdrawal_time,
|
||||
</if>
|
||||
<if test="soc != null">
|
||||
soc,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="operatorIdEvcs != null">
|
||||
operator_id_evcs,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contactName != null">
|
||||
#{contactName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contactPhone != null">
|
||||
#{contactPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
#{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="openBank != null">
|
||||
#{openBank,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cardNumber != null">
|
||||
#{cardNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dutyParagraph != null">
|
||||
#{dutyParagraph,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
#{attribute,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaCode != null">
|
||||
#{areaCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="address != null">
|
||||
#{address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="detailedAddress != null">
|
||||
#{detailedAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="longitude != null">
|
||||
#{longitude,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="latitude != null">
|
||||
#{latitude,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="email != null">
|
||||
#{email,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="commissionType != null">
|
||||
#{commissionType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="platformCommissionRate != null">
|
||||
#{platformCommissionRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="maintenanceCommissionRate != null">
|
||||
#{maintenanceCommissionRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="businessLicenseId != null">
|
||||
#{businessLicenseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="withdrawalTime != null">
|
||||
#{withdrawalTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="soc != null">
|
||||
#{soc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operatorIdEvcs != null">
|
||||
#{operatorIdEvcs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.XhpcOperator">
|
||||
update xhpc_operator
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contactName != null">
|
||||
contact_name = #{contactName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contactPhone != null">
|
||||
contact_phone = #{contactPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="openBank != null">
|
||||
open_bank = #{openBank,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cardNumber != null">
|
||||
card_number = #{cardNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dutyParagraph != null">
|
||||
duty_paragraph = #{dutyParagraph,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
`attribute` = #{attribute,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaCode != null">
|
||||
area_code = #{areaCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="address != null">
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="detailedAddress != null">
|
||||
detailed_address = #{detailedAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="longitude != null">
|
||||
longitude = #{longitude,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="latitude != null">
|
||||
latitude = #{latitude,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="email != null">
|
||||
email = #{email,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="commissionType != null">
|
||||
commission_type = #{commissionType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="platformCommissionRate != null">
|
||||
platform_commission_rate = #{platformCommissionRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="maintenanceCommissionRate != null">
|
||||
maintenance_commission_rate = #{maintenanceCommissionRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="businessLicenseId != null">
|
||||
business_license_id = #{businessLicenseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="withdrawalTime != null">
|
||||
withdrawal_time = #{withdrawalTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="soc != null">
|
||||
soc = #{soc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operatorIdEvcs != null">
|
||||
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where operator_id = #{operatorId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.XhpcOperator">
|
||||
update xhpc_operator
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
contact_name = #{contactName,jdbcType=VARCHAR},
|
||||
contact_phone = #{contactPhone,jdbcType=VARCHAR},
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
open_bank = #{openBank,jdbcType=VARCHAR},
|
||||
card_number = #{cardNumber,jdbcType=VARCHAR},
|
||||
duty_paragraph = #{dutyParagraph,jdbcType=VARCHAR},
|
||||
`attribute` = #{attribute,jdbcType=INTEGER},
|
||||
area_code = #{areaCode,jdbcType=VARCHAR},
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
detailed_address = #{detailedAddress,jdbcType=VARCHAR},
|
||||
longitude = #{longitude,jdbcType=VARCHAR},
|
||||
latitude = #{latitude,jdbcType=VARCHAR},
|
||||
email = #{email,jdbcType=VARCHAR},
|
||||
commission_type = #{commissionType,jdbcType=INTEGER},
|
||||
platform_commission_rate = #{platformCommissionRate,jdbcType=DOUBLE},
|
||||
maintenance_commission_rate = #{maintenanceCommissionRate,jdbcType=DOUBLE},
|
||||
business_license_id = #{businessLicenseId,jdbcType=VARCHAR},
|
||||
withdrawal_time = #{withdrawalTime,jdbcType=INTEGER},
|
||||
soc = #{soc,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=INTEGER},
|
||||
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=VARCHAR}
|
||||
where operator_id = #{operatorId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user