@@ -0,0 +1,87 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project xmlns="http://maven.apache.org/POM/4.0.0" | |||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||||
<modelVersion>4.0.0</modelVersion> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>service-fumao</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
<properties> | |||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |||||
<java.version>1.8</java.version> | |||||
<spring-cloud.version>Edgware.RELEASE</spring-cloud.version> | |||||
</properties> | |||||
<parent> | |||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-starter-parent</artifactId> | |||||
<version>1.5.9.RELEASE</version> | |||||
<relativePath/> <!-- lookup parent from repository --> | |||||
</parent> | |||||
<dependencies> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-config</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-zuul</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-feign</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>fastjson</artifactId> | |||||
<version>1.2.36</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>framework</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>common</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>net.sf.json-lib</groupId> | |||||
<artifactId>json-lib</artifactId> | |||||
<version>2.4</version> | |||||
<classifier>jdk15</classifier> | |||||
</dependency> | |||||
</dependencies> | |||||
<dependencyManagement> | |||||
<dependencies> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-dependencies</artifactId> | |||||
<version>${spring-cloud.version}</version> | |||||
<type>pom</type> | |||||
<scope>import</scope> | |||||
</dependency> | |||||
</dependencies> | |||||
</dependencyManagement> | |||||
<build> | |||||
<plugins> | |||||
<plugin> | |||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-maven-plugin</artifactId> | |||||
</plugin> | |||||
</plugins> | |||||
</build> | |||||
</project> |
@@ -0,0 +1,20 @@ | |||||
package com.neusoft.smart.pos.fumao; | |||||
import org.mybatis.spring.annotation.MapperScan; | |||||
import org.springframework.boot.SpringApplication; | |||||
import org.springframework.cloud.client.SpringCloudApplication; | |||||
import org.springframework.cloud.netflix.feign.EnableFeignClients; | |||||
import org.springframework.cloud.netflix.zuul.EnableZuulProxy; | |||||
import org.springframework.context.annotation.ComponentScan; | |||||
@EnableZuulProxy | |||||
@SpringCloudApplication | |||||
@EnableFeignClients | |||||
@MapperScan("com.neusoft.smart.pos.*.persistent.mapper") | |||||
@ComponentScan("com.neusoft.smart.pos") | |||||
public class ServiceFumaoApplication { | |||||
public static void main(String[] args) { | |||||
SpringApplication.run(ServiceFumaoApplication.class, args); | |||||
} | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.fumao.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class FumaoConstants { | |||||
public static final String ACTION_NAME_CONSUME_GENERATE = "Consume_generate"; // 支付订单生成 | |||||
public static final String ACTION_NAME_CONSUME_QUERY = "Consume_query"; // 支付查询 | |||||
public static final String ACTION_NAME_CONSUME_SUCCESS = "Consume_success"; // 支付成功 | |||||
public static final String ACTION_NAME_REFUND = "Refund"; // 退款 | |||||
public static final String STEP_NAME_KEEP = "Keep"; //继续当前步骤,例如上一个步骤为支付,如果返回keep,继续进入支付环节 | |||||
public static final String STEP_NAME_NEXT = "Next"; //下一个步骤,例如支付完成进入Complete步骤 | |||||
public static final String STEP_NAME_EXIT = "Exit"; //退出整个流程,例如订单完成退出一个业务流程 | |||||
} | |||||
@@ -0,0 +1,38 @@ | |||||
package com.neusoft.smart.pos.fumao.constants; | |||||
import com.neusoft.smart.pos.framework.constants.CommonCode; | |||||
public enum FumaoErrorCode implements CommonCode { | |||||
MEMBER_CARD_NOT_EXIST("20001", "会员卡不存在"), | |||||
PAYMENT_PROMOTION_DUPLICATION ("20002", "支付营销优惠重复"), | |||||
PAY_TYPE_EMPTY ("20003", "支付方式为空"), | |||||
CARD_PAY_CARD_ID_EMPTY ("20004", "消费卡号为空"); | |||||
private String code; | |||||
private String message; | |||||
private FumaoErrorCode(String code, String message) { | |||||
this.code = code; | |||||
this.message = message; | |||||
} | |||||
public String getCode() { | |||||
return code; | |||||
} | |||||
public void setCode(String code) { | |||||
this.code = code; | |||||
} | |||||
public String getMessage() { | |||||
return message; | |||||
} | |||||
public void setMessage(String message) { | |||||
this.message = message; | |||||
} | |||||
} |
@@ -0,0 +1,71 @@ | |||||
package com.neusoft.smart.pos.fumao.controller; | |||||
import com.neusoft.smart.pos.dto.fumao.request.PostFumaoTradeOrderRequest; | |||||
import com.neusoft.smart.pos.dto.payment.response.FumaoMemberInfoRes; | |||||
import com.neusoft.smart.pos.dto.payment.response.FumaoParameterforNextStep; | |||||
import com.neusoft.smart.pos.dto.promotion.request.GetPreferentialPriceRequest; | |||||
import com.neusoft.smart.pos.dto.promotion.request.PromotionPayChannelQueryRequest; | |||||
import com.neusoft.smart.pos.dto.promotion.request.PromotionPayChannelRequest; | |||||
import com.neusoft.smart.pos.dto.promotion.response.GetPreferentialPriceResponse; | |||||
import com.neusoft.smart.pos.dto.promotion.response.PromotionPayChannelResponse; | |||||
import com.neusoft.smart.pos.framework.bean.PaginationExtendBean; | |||||
import com.neusoft.smart.pos.framework.dto.ResponseData; | |||||
import com.neusoft.smart.pos.framework.utils.SpringUtils; | |||||
import com.neusoft.smart.pos.fumao.service.FumaoBusinessService; | |||||
import com.neusoft.smart.pos.fumao.service.IBusinessService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.val; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import javax.validation.Valid; | |||||
@CrossOrigin(origins = "*", maxAge = 3600)// TODO | |||||
@RestController("/fumao") | |||||
@Slf4j | |||||
@Api(value = "服务交易类接口", description = "服务交易类接口") | |||||
@RequestMapping(path = "/fumao") | |||||
public class FumaoController { | |||||
@ApiOperation(value = "环境准备/登录") | |||||
@PostMapping("/environmentPrepare/login") | |||||
public FumaoParameterforNextStep environmentPrepare() { | |||||
val fumaoService = SpringUtils.getBean("FumaoBusinessService",IBusinessService.class); | |||||
return (FumaoParameterforNextStep)fumaoService.environmentPrepare(); | |||||
//return new ResponseData<>(fumaoService.getPreferentialPriceNew(getPreferentialPriceRequest)); | |||||
} | |||||
@ApiOperation(value = "支付准备/会员及优惠券获取及试算") | |||||
@PostMapping("/executePrepare/checkMem") | |||||
public FumaoParameterforNextStep executePrepare(@RequestBody PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
val fumaoService = SpringUtils.getBean("FumaoBusinessService",IBusinessService.class); | |||||
return (FumaoParameterforNextStep)fumaoService.executePrepare(postFumaoTradeOrderRequest); | |||||
} | |||||
@ApiOperation(value = "支付交易") | |||||
// @PutMapping("/execute/payment") | |||||
@PostMapping("/execute/payment") | |||||
public FumaoParameterforNextStep execute(@RequestBody PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
val fumaoService = SpringUtils.getBean("FumaoBusinessService",IBusinessService.class); | |||||
return (FumaoParameterforNextStep)fumaoService.execute(postFumaoTradeOrderRequest); | |||||
} | |||||
@ApiOperation(value = "完成/订单同步") | |||||
// @DeleteMapping("/complete/syncOrder/{id}") | |||||
@PutMapping("/complete/syncOrder") | |||||
public FumaoParameterforNextStep complete(@RequestBody PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
val fumaoService = SpringUtils.getBean("FumaoBusinessService",IBusinessService.class); | |||||
return (FumaoParameterforNextStep)fumaoService.complete(postFumaoTradeOrderRequest); | |||||
} | |||||
// @ApiOperation(value = "完成/订单同步") | |||||
// @PutMapping("/complete/syncOrder") | |||||
// public FumaoParameterforNextStep complete(@RequestBody PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
// val fumaoService = SpringUtils.getBean("FumaoBusinessService",IBusinessService.class); | |||||
// return (FumaoParameterforNextStep)fumaoService.complete(postFumaoTradeOrderRequest); | |||||
// } | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.neusoft.smart.pos.fumao.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
import lombok.Data; | |||||
@Data | |||||
public class FumaoTenantInfo implements Serializable { | |||||
private Integer id; | |||||
private String tenantId; | |||||
private String tenantName; | |||||
private String merchantId; | |||||
private Integer shopId; | |||||
private Date createdDate; | |||||
} |
@@ -0,0 +1,591 @@ | |||||
package com.neusoft.smart.pos.fumao.persistent.domain; | |||||
import java.math.BigDecimal; | |||||
import java.util.ArrayList; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
public class FumaoTenantInfoExample { | |||||
protected String orderByClause; | |||||
protected boolean distinct; | |||||
protected List<Criteria> oredCriteria; | |||||
private Integer offset; | |||||
private Integer limit; | |||||
public FumaoTenantInfoExample() { | |||||
oredCriteria = new ArrayList<Criteria>(); | |||||
} | |||||
public void setOrderByClause(String orderByClause) { | |||||
this.orderByClause = orderByClause; | |||||
} | |||||
public String getOrderByClause() { | |||||
return orderByClause; | |||||
} | |||||
public void setDistinct(boolean distinct) { | |||||
this.distinct = distinct; | |||||
} | |||||
public boolean isDistinct() { | |||||
return distinct; | |||||
} | |||||
public List<Criteria> getOredCriteria() { | |||||
return oredCriteria; | |||||
} | |||||
public void or(Criteria criteria) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
public Criteria or() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
oredCriteria.add(criteria); | |||||
return criteria; | |||||
} | |||||
public Criteria createCriteria() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
if (oredCriteria.size() == 0) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
return criteria; | |||||
} | |||||
protected Criteria createCriteriaInternal() { | |||||
Criteria criteria = new Criteria(); | |||||
return criteria; | |||||
} | |||||
public void clear() { | |||||
oredCriteria.clear(); | |||||
orderByClause = null; | |||||
distinct = false; | |||||
this.offset = null; | |||||
this.limit = null; | |||||
} | |||||
public Integer getOffset() { | |||||
return this.offset; | |||||
} | |||||
public void setOffset(Integer offset) { | |||||
this.offset = offset; | |||||
} | |||||
public Integer getLimit() { | |||||
return this.limit; | |||||
} | |||||
public void setLimit(Integer limit) { | |||||
this.limit = limit; | |||||
} | |||||
public FumaoTenantInfoExample page(int offset, int limit) { | |||||
this.offset = offset; | |||||
this.limit = limit; | |||||
return this; | |||||
} | |||||
protected abstract static class GeneratedCriteria { | |||||
protected List<Criterion> criteria; | |||||
protected GeneratedCriteria() { | |||||
super(); | |||||
criteria = new ArrayList<Criterion>(); | |||||
} | |||||
public boolean isValid() { | |||||
return criteria.size() > 0; | |||||
} | |||||
public List<Criterion> getAllCriteria() { | |||||
return criteria; | |||||
} | |||||
public List<Criterion> getCriteria() { | |||||
return criteria; | |||||
} | |||||
protected void addCriterion(String condition) { | |||||
if (condition == null) { | |||||
throw new RuntimeException("Value for condition cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition)); | |||||
} | |||||
protected void addCriterion(String condition, Object value, String property) { | |||||
if (value == null) { | |||||
throw new RuntimeException("Value for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value)); | |||||
} | |||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { | |||||
if (value1 == null || value2 == null) { | |||||
throw new RuntimeException("Between values for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value1, value2)); | |||||
} | |||||
public Criteria andIdIsNull() { | |||||
addCriterion("id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIsNotNull() { | |||||
addCriterion("id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdEqualTo(Integer value) { | |||||
addCriterion("id =", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotEqualTo(Integer value) { | |||||
addCriterion("id <>", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThan(Integer value) { | |||||
addCriterion("id >", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) { | |||||
addCriterion("id >=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThan(Integer value) { | |||||
addCriterion("id <", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThanOrEqualTo(Integer value) { | |||||
addCriterion("id <=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIn(List<Integer> values) { | |||||
addCriterion("id in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotIn(List<Integer> values) { | |||||
addCriterion("id not in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdBetween(Integer value1, Integer value2) { | |||||
addCriterion("id between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotBetween(Integer value1, Integer value2) { | |||||
addCriterion("id not between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdIsNull() { | |||||
addCriterion("tenant_id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdIsNotNull() { | |||||
addCriterion("tenant_id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdEqualTo(String value) { | |||||
addCriterion("tenant_id =", value, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdNotEqualTo(String value) { | |||||
addCriterion("tenant_id <>", value, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdGreaterThan(String value) { | |||||
addCriterion("tenant_id >", value, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdGreaterThanOrEqualTo(String value) { | |||||
addCriterion("tenant_id >=", value, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdLessThan(String value) { | |||||
addCriterion("tenant_id <", value, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdLessThanOrEqualTo(String value) { | |||||
addCriterion("tenant_id <=", value, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdIn(List<String> values) { | |||||
addCriterion("tenant_id in", values, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdNotIn(List<String> values) { | |||||
addCriterion("tenant_id not in", values, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdBetween(String value1, String value2) { | |||||
addCriterion("tenant_id between", value1, value2, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantIdNotBetween(String value1, String value2) { | |||||
addCriterion("tenant_id not between", value1, value2, "TenantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameIsNull() { | |||||
addCriterion("tenant_name is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameIsNotNull() { | |||||
addCriterion("tenant_name is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameEqualTo(String value) { | |||||
addCriterion("tenant_name =", value, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameNotEqualTo(String value) { | |||||
addCriterion("tenant_name <>", value, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameGreaterThan(String value) { | |||||
addCriterion("tenant_name >", value, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameGreaterThanOrEqualTo(String value) { | |||||
addCriterion("tenant_name >=", value, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameLessThan(String value) { | |||||
addCriterion("tenant_name <", value, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameLessThanOrEqualTo(String value) { | |||||
addCriterion("tenant_name <=", value, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameIn(List<String> values) { | |||||
addCriterion("tenant_name in", values, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameNotIn(List<String> values) { | |||||
addCriterion("tenant_name not in", values, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameBetween(String value1, String value2) { | |||||
addCriterion("tenant_name between", value1, value2, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andTenantNameNotBetween(String value1, String value2) { | |||||
addCriterion("tenant_name not between", value1, value2, "tenantName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdIsNull() { | |||||
addCriterion("merchant_id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdIsNotNull() { | |||||
addCriterion("merchant_id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdEqualTo(String value) { | |||||
addCriterion("merchant_id =", value, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdNotEqualTo(String value) { | |||||
addCriterion("merchant_id <>", value, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdGreaterThan(String value) { | |||||
addCriterion("merchant_id >", value, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdGreaterThanOrEqualTo(String value) { | |||||
addCriterion("merchant_id >=", value, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdLessThan(String value) { | |||||
addCriterion("merchant_id <", value, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdLessThanOrEqualTo(String value) { | |||||
addCriterion("merchant_id <=", value, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdIn(List<String> values) { | |||||
addCriterion("merchant_id in", values, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdNotIn(List<String> values) { | |||||
addCriterion("merchant_id not in", values, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdBetween(String value1, String value2) { | |||||
addCriterion("merchant_id between", value1, value2, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMerchantIdNotBetween(String value1, String value2) { | |||||
addCriterion("merchant_id not between", value1, value2, "MerchantId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdIsNull() { | |||||
addCriterion("shop_id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdIsNotNull() { | |||||
addCriterion("shop_id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdEqualTo(Integer value) { | |||||
addCriterion("shop_id =", value, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdNotEqualTo(Integer value) { | |||||
addCriterion("shop_id <>", value, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdGreaterThan(Integer value) { | |||||
addCriterion("shop_id >", value, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdGreaterThanOrEqualTo(Integer value) { | |||||
addCriterion("shop_id >=", value, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdLessThan(Integer value) { | |||||
addCriterion("shop_id <", value, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdLessThanOrEqualTo(Integer value) { | |||||
addCriterion("shop_id <=", value, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdIn(List<Integer> values) { | |||||
addCriterion("shop_id in", values, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdNotIn(List<Integer> values) { | |||||
addCriterion("shop_id not in", values, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdBetween(Integer value1, Integer value2) { | |||||
addCriterion("shop_id between", value1, value2, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andShopIdNotBetween(Integer value1, Integer value2) { | |||||
addCriterion("shop_id not between", value1, value2, "ShopId"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateIsNull() { | |||||
addCriterion("created_date is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateIsNotNull() { | |||||
addCriterion("created_date is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateEqualTo(Date value) { | |||||
addCriterion("created_date =", value, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateNotEqualTo(Date value) { | |||||
addCriterion("created_date <>", value, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateGreaterThan(Date value) { | |||||
addCriterion("created_date >", value, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("created_date >=", value, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateLessThan(Date value) { | |||||
addCriterion("created_date <", value, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateLessThanOrEqualTo(Date value) { | |||||
addCriterion("created_date <=", value, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateIn(List<Date> values) { | |||||
addCriterion("created_date in", values, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateNotIn(List<Date> values) { | |||||
addCriterion("created_date not in", values, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateBetween(Date value1, Date value2) { | |||||
addCriterion("created_date between", value1, value2, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedDateNotBetween(Date value1, Date value2) { | |||||
addCriterion("created_date not between", value1, value2, "createdDate"); | |||||
return (Criteria) this; | |||||
} | |||||
} | |||||
public static class Criteria extends GeneratedCriteria { | |||||
protected Criteria() { | |||||
super(); | |||||
} | |||||
} | |||||
public static class Criterion { | |||||
private String condition; | |||||
private Object value; | |||||
private Object secondValue; | |||||
private boolean noValue; | |||||
private boolean singleValue; | |||||
private boolean betweenValue; | |||||
private boolean listValue; | |||||
private String typeHandler; | |||||
public String getCondition() { | |||||
return condition; | |||||
} | |||||
public Object getValue() { | |||||
return value; | |||||
} | |||||
public Object getSecondValue() { | |||||
return secondValue; | |||||
} | |||||
public boolean isNoValue() { | |||||
return noValue; | |||||
} | |||||
public boolean isSingleValue() { | |||||
return singleValue; | |||||
} | |||||
public boolean isBetweenValue() { | |||||
return betweenValue; | |||||
} | |||||
public boolean isListValue() { | |||||
return listValue; | |||||
} | |||||
public String getTypeHandler() { | |||||
return typeHandler; | |||||
} | |||||
protected Criterion(String condition) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.typeHandler = null; | |||||
this.noValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.typeHandler = typeHandler; | |||||
if (value instanceof List<?>) { | |||||
this.listValue = true; | |||||
} else { | |||||
this.singleValue = true; | |||||
} | |||||
} | |||||
protected Criterion(String condition, Object value) { | |||||
this(condition, value, null); | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.secondValue = secondValue; | |||||
this.typeHandler = typeHandler; | |||||
this.betweenValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue) { | |||||
this(condition, value, secondValue, null); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,23 @@ | |||||
package com.neusoft.smart.pos.fumao.persistent.ext.domain; | |||||
import java.util.Date; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import lombok.Data; | |||||
@Data | |||||
public class FumaoMerchantQueryRequest extends AbstractQuery { | |||||
private Integer id; | |||||
private String tenant_id; | |||||
private String tenant_name; | |||||
private String merchant_id; | |||||
private Integer shop_id; | |||||
private Date created_date; | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package com.neusoft.smart.pos.fumao.persistent.mapper; | |||||
import com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfo; | |||||
import com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfoExample; | |||||
import org.apache.ibatis.annotations.Param; | |||||
import org.springframework.stereotype.Component; | |||||
import java.util.List; | |||||
@Component | |||||
public interface FumaoPayChannelMapper { | |||||
List<FumaoTenantInfo> selectByExample(FumaoTenantInfoExample example); | |||||
} |
@@ -0,0 +1,350 @@ | |||||
package com.neusoft.smart.pos.fumao.persistent.repository; | |||||
import java.math.BigDecimal; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import javax.validation.constraints.NotNull; | |||||
import com.neusoft.smart.pos.constants.DictionaryConstant; | |||||
import com.neusoft.smart.pos.dto.payment.response.*; | |||||
import com.neusoft.smart.pos.dto.trade.request.PostPayOrderRequest; | |||||
import com.neusoft.smart.pos.dto.trade.request.PostRefundRequest; | |||||
import com.neusoft.smart.pos.dto.trade.request.PostTradeOrderRequest; | |||||
import com.neusoft.smart.pos.dto.trade.response.PostOrderResponse; | |||||
import com.neusoft.smart.pos.dto.trade.response.PostPayOrderResponse; | |||||
import com.neusoft.smart.pos.dto.trade.response.PostRefundResponse; | |||||
import com.neusoft.smart.pos.fumao.constants.FumaoConstants; | |||||
import com.neusoft.smart.pos.fumao.constants.FumaoErrorCode; | |||||
import com.neusoft.smart.pos.fumao.utils.AmountUtils; | |||||
import net.sf.json.JSONObject; | |||||
import org.slf4j.Logger; | |||||
import org.slf4j.LoggerFactory; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.stereotype.Component; | |||||
import com.alibaba.fastjson.JSON; | |||||
import com.neusoft.smart.pos.dto.fumao.request.PostFumaoTradeOrderRequest; | |||||
import com.neusoft.smart.pos.dto.payment.request.FumaoPayRequest; | |||||
import com.neusoft.smart.pos.framework.exception.BusinessCommonException; | |||||
import com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfo; | |||||
import com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfoExample; | |||||
import com.neusoft.smart.pos.fumao.persistent.ext.domain.FumaoMerchantQueryRequest; | |||||
import com.neusoft.smart.pos.fumao.persistent.mapper.FumaoPayChannelMapper; | |||||
import com.neusoft.smart.pos.fumao.utils.HttpClientUtils; | |||||
import lombok.val; | |||||
@Component | |||||
public class FumaoBusinessActionRepository { | |||||
private final static Logger logger = LoggerFactory.getLogger(FumaoBusinessActionRepository.class); | |||||
//会员查询 | |||||
//试算 | |||||
//支付核销 | |||||
//支付完成状态同步 | |||||
//退款 | |||||
@Autowired | |||||
private FumaoPayChannelMapper fumaoPayChannelMapper; | |||||
//试算 | |||||
public FumaoMemberInfoRes queryAndCalc(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest){ | |||||
val fumaoPayRequest = new FumaoPayRequest(); | |||||
fumaoPayRequest.setDeviceSN(postFumaoTradeOrderRequest.getNeuInfo().getSn()); | |||||
fumaoPayRequest.setMemPhone(postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberPhoneNumber()); | |||||
fumaoPayRequest.setOrderNumber(postFumaoTradeOrderRequest.getParameterforNextStep().getOrderNumber()); | |||||
fumaoPayRequest.setOrderAmount(AmountUtils.changeY2F(postFumaoTradeOrderRequest.getParameterforNextStep().getTotalAmount())); | |||||
if(postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentPredictionofTotal() != null | |||||
&& postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentPredictionofTotal().getOrder_amount_left() != null) { | |||||
fumaoPayRequest.setOrderAmountLeft(AmountUtils.changeY2F(postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentPredictionofTotal().getAmount_left_after_pay())); | |||||
} else { | |||||
fumaoPayRequest.setOrderAmountLeft(AmountUtils.changeY2F(postFumaoTradeOrderRequest.getParameterforNextStep().getTotalAmount())); | |||||
} | |||||
fumaoPayRequest.setMerchantId(postFumaoTradeOrderRequest.getThirdPartyInfo().getMerchantID()); | |||||
fumaoPayRequest.setTenantId(postFumaoTradeOrderRequest.getThirdPartyInfo().getTenantID()); | |||||
fumaoPayRequest.setOrderOperatorId(postFumaoTradeOrderRequest.getThirdPartyInfo().getOperatorID()); | |||||
if(postFumaoTradeOrderRequest.getThirdPartyInfo().getBusinessType() != null) { | |||||
fumaoPayRequest.setBusinessType(postFumaoTradeOrderRequest.getThirdPartyInfo().getBusinessType()); | |||||
} else { | |||||
fumaoPayRequest.setBusinessType("1"); | |||||
} | |||||
List<String> couponList = new ArrayList<>(); | |||||
if(postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentTypeList() != null | |||||
&& postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentTypeList().size() > 0) { | |||||
for(int i = 0; i < postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentTypeList().size(); i++) { | |||||
FumaoPaymentType paymentType = postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentTypeList().get(i); | |||||
if(paymentType.getPaymentTypeId().equals(DictionaryConstant.PAY_TYPE_DISCOUNT.getCode())) { | |||||
for(int j = 0; j < paymentType.getPaymentData().size(); j++) { | |||||
FumaoPaymentData paymentData = paymentType.getPaymentData().get(j); | |||||
if(paymentData.getIsSelected().equals("1") && paymentData.getCuponID() != null) { | |||||
couponList.add(paymentData.getCuponID()); | |||||
} | |||||
} | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
fumaoPayRequest.setCouponOrderIdList(couponList); | |||||
val resultData = HttpClientUtils.postData("http://localhost:2018/fumaoPay/" + "queryAndCalc", JSON.toJSONString(fumaoPayRequest));//TODO | |||||
logger.info("queryAndCalc response:" + resultData); | |||||
Map resultMap = (Map)JSON.parse(resultData); | |||||
FumaoMemberInfoRes result; | |||||
if(("200").equals(resultMap.get("code").toString())){ | |||||
JSONObject jsonObject = JSONObject.fromObject(resultMap.get("result")); | |||||
result = (FumaoMemberInfoRes) JSONObject.toBean(jsonObject, FumaoMemberInfoRes.class); | |||||
}else{ | |||||
logger.error( "queryAndCalc error:" + resultData); | |||||
// result.setReturn_code(resultMap.get("code").toString()); | |||||
// result.setReturn_msg(resultMap.get("message").toString()); | |||||
throw new BusinessCommonException(resultMap.get("code").toString(),resultMap.get("message").toString()); | |||||
} | |||||
return result; | |||||
} | |||||
public List<FumaoTenantInfo> getList(FumaoMerchantQueryRequest req) { | |||||
FumaoTenantInfoExample fumaoTenantInfoExample = this.FumaoTenantInfoExampleProvider(req); | |||||
return fumaoPayChannelMapper.selectByExample(fumaoTenantInfoExample); | |||||
} | |||||
private FumaoTenantInfoExample FumaoTenantInfoExampleProvider(@NotNull FumaoMerchantQueryRequest req) { | |||||
FumaoTenantInfoExample fumaoExample = new FumaoTenantInfoExample(); | |||||
FumaoTenantInfoExample.Criteria criteria = fumaoExample.createCriteria(); | |||||
if (null != req.getShop_id()) { | |||||
criteria.andShopIdEqualTo(req.getShop_id()); | |||||
} | |||||
return fumaoExample; | |||||
} | |||||
//支付核销 | |||||
public FumaoParameterforNextStep consume(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
FumaoParameterforNextStep parameterforNextStepBean = postFumaoTradeOrderRequest.getParameterforNextStep(); | |||||
String orderNumber = parameterforNextStepBean.getOrderNumber(); | |||||
// 生成订单 | |||||
if(null == orderNumber) { | |||||
PostTradeOrderRequest postTradeOrderRequest = new PostTradeOrderRequest(); | |||||
postTradeOrderRequest.setSerialNo(postFumaoTradeOrderRequest.getNeuInfo().getSn()); | |||||
postTradeOrderRequest.setOrderAmount(new BigDecimal(parameterforNextStepBean.getTotalAmount())); | |||||
List<FumaoPaymentType> paymentTypeList = postFumaoTradeOrderRequest.getParameterforNextStep().getPaymentTypeList(); | |||||
if(paymentTypeList != null) { | |||||
if(paymentTypeList.size() > 1) { | |||||
postTradeOrderRequest.setPayType(DictionaryConstant.PAY_TYPE_MULTY_COMBINED.getCode()); // 组合支付 | |||||
} else { | |||||
postTradeOrderRequest.setPayType(paymentTypeList.get(0).getPaymentTypeId()); | |||||
} | |||||
} else { | |||||
throw new BusinessCommonException(FumaoErrorCode.PAY_TYPE_EMPTY); | |||||
} | |||||
val resultData = HttpClientUtils.postData("http://localhost:2008/order/" + "order", JSON.toJSONString(postTradeOrderRequest));//TODO | |||||
logger.info("orderResultData:"+resultData); | |||||
Map resultMap = (Map)JSON.parse(resultData); | |||||
PostOrderResponse orderResponse; | |||||
if(("200").equals(resultMap.get("code").toString())){ | |||||
JSONObject jsonObject = JSONObject.fromObject(resultMap.get("result")); | |||||
orderResponse = (PostOrderResponse) JSONObject.toBean(jsonObject, PostOrderResponse.class); | |||||
}else{ | |||||
logger.error( "postOrder error:" + resultData); | |||||
throw new BusinessCommonException(resultMap.get("code").toString(),resultMap.get("message").toString()); | |||||
} | |||||
orderNumber = orderResponse.getOrderNumber(); | |||||
parameterforNextStepBean.setOrderNumber(orderNumber); | |||||
logger.info("orderNum:"+parameterforNextStepBean.getOrderNumber()); | |||||
} | |||||
// 生成预付单 | |||||
List<FumaoPaymentType> paymentTypeList = parameterforNextStepBean.getPaymentTypeList(); | |||||
Long totalPayAmount = 0L; | |||||
for (int i = 0; i < paymentTypeList.size(); i++) { | |||||
PostPayOrderRequest postPayOrderRequest = new PostPayOrderRequest(); | |||||
postPayOrderRequest.setSerialNo(postFumaoTradeOrderRequest.getNeuInfo().getSn()); | |||||
postPayOrderRequest.setOrderNumber(orderNumber); | |||||
postPayOrderRequest.setPayType(paymentTypeList.get(i).getPaymentTypeId()); | |||||
List<FumaoPaymentData> paymentDataList = paymentTypeList.get(i).getPaymentData(); | |||||
if (paymentDataList != null && paymentDataList.size() > 0) { | |||||
postPayOrderRequest.setScanCode(paymentDataList.get(0).getScanCode()); | |||||
} | |||||
FumaoPaymentPrediction paymentPredictionbyType = paymentTypeList.get(i).getPaymentPredictionbyType(); | |||||
if (paymentPredictionbyType != null && paymentPredictionbyType.getPromotion_amount() != null) { // 若请求中没有支付金额,参数不填 | |||||
postPayOrderRequest.setPayAmount(AmountUtils.changeF2YDouble(paymentPredictionbyType.getPromotion_amount()));//单位:元 | |||||
} | |||||
JSONObject payInfoJsonObject = new JSONObject(); | |||||
if(paymentTypeList.get(i).getPaymentTypeId().equals(DictionaryConstant.PAY_TYPE_DISCOUNT.getCode()) | |||||
|| paymentTypeList.get(i).getPaymentTypeId().equals(DictionaryConstant.PAY_TYPE_FM_COUPON.getCode())) { | |||||
payInfoJsonObject.put("merchant_id",postFumaoTradeOrderRequest.getThirdPartyInfo().getMerchantID()); | |||||
payInfoJsonObject.put("tenant_id",postFumaoTradeOrderRequest.getThirdPartyInfo().getTenantID()); | |||||
payInfoJsonObject.put("order_amount",AmountUtils.changeY2F(parameterforNextStepBean.getTotalAmount()));// 单位:分 | |||||
payInfoJsonObject.put("order_operator_id", postFumaoTradeOrderRequest.getThirdPartyInfo().getOperatorID()); | |||||
String memPhoneNum = postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberPhoneNumber()==null ? "" : postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberPhoneNumber(); | |||||
payInfoJsonObject.put("mem_phone_number", memPhoneNum); | |||||
String memId = postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberID()==null ? "" : postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberID(); | |||||
payInfoJsonObject.put("mem_id", memId); | |||||
if (postFumaoTradeOrderRequest.getThirdPartyInfo().getBusinessType() != null) { | |||||
payInfoJsonObject.put("business_type", postFumaoTradeOrderRequest.getThirdPartyInfo().getBusinessType()); | |||||
} else { | |||||
payInfoJsonObject.put("business_type", "1"); | |||||
} | |||||
List<String> couponList = new ArrayList<>(); | |||||
if (paymentTypeList.get(i).getPaymentTypeId().equals(DictionaryConstant.PAY_TYPE_DISCOUNT.getCode())) { // 优惠券参数 | |||||
for (int j = 0; j < paymentTypeList.get(i).getPaymentData().size(); j++) { | |||||
FumaoPaymentData paymentData = paymentTypeList.get(i).getPaymentData().get(j); | |||||
if (paymentData.getIsSelected().equals("1") && paymentData.getCuponID() != null) { | |||||
couponList.add(paymentData.getCuponID()); | |||||
} | |||||
} | |||||
payInfoJsonObject.put("coupon_list",couponList); | |||||
} else { // 消费卡参数 | |||||
List<FumaoPaymentData> paymentDataListC = paymentTypeList.get(i).getPaymentData(); | |||||
if(paymentDataListC == null || paymentDataListC.size() < 1 || paymentDataListC.get(0).getScanCode() == null) { | |||||
throw new BusinessCommonException(FumaoErrorCode.CARD_PAY_CARD_ID_EMPTY); | |||||
} | |||||
payInfoJsonObject.put("card_id",paymentDataListC.get(0).getScanCode()); | |||||
} | |||||
} | |||||
postPayOrderRequest.setPayInfoJsonString(payInfoJsonObject.toString()); | |||||
val payResultData = HttpClientUtils.postData("http://localhost:2008/order/" + "payOrder", JSON.toJSONString(postPayOrderRequest));//TODO | |||||
logger.info("payResultData:" + payResultData); | |||||
Map resultMap = (Map) JSON.parse(payResultData); | |||||
PostPayOrderResponse postPayOrderResponse; | |||||
if (("200").equals(resultMap.get("code").toString())) { | |||||
JSONObject jsonObject = JSONObject.fromObject(resultMap.get("result")); | |||||
postPayOrderResponse = (PostPayOrderResponse) JSONObject.toBean(jsonObject, PostPayOrderResponse.class); | |||||
} else { | |||||
logger.error("postPayOrder error:" + payResultData); | |||||
throw new BusinessCommonException(resultMap.get("code").toString(), resultMap.get("message").toString()); | |||||
} | |||||
logger.info("PayCode:" + postPayOrderResponse.getPayCode()); | |||||
logger.info("orderNumber" + postPayOrderResponse.getOrderNumber()); | |||||
logger.info("PayStatus" + postPayOrderResponse.getPayStatus()); | |||||
logger.info("OrderAmount" + postPayOrderResponse.getOrderAmount()); | |||||
logger.info("RealPayAmount" + postPayOrderResponse.getRealPayAmount()); | |||||
logger.info("PaidTime" + postPayOrderResponse.getPaidTime()); | |||||
// .....赋值 | |||||
parameterforNextStepBean.getPaymentTypeList().get(i).setPaymentStatus(postPayOrderResponse.getPayStatus()); | |||||
parameterforNextStepBean.getPaymentTypeList().get(i).setTradeId(postPayOrderResponse.getTradeId()); | |||||
totalPayAmount += postPayOrderResponse.getOrderAmount().longValue(); | |||||
} | |||||
FumaoPaymentPrediction predictionTotal = new FumaoPaymentPrediction(); | |||||
predictionTotal.setOrder_amount(Long.parseLong(AmountUtils.changeY2F(parameterforNextStepBean.getTotalAmount()))); | |||||
predictionTotal.setOrder_amount_left(parameterforNextStepBean.getPaymentTypeList().get(0).getPaymentPredictionbyType().getOrder_amount_left()); | |||||
predictionTotal.setPromotion_amount(totalPayAmount);//TODO 填支付成功的金额,还是该请求所带的所有金额?? | |||||
long leftAmount = parameterforNextStepBean.getPaymentTypeList().get(0).getPaymentPredictionbyType().getOrder_amount_left() - totalPayAmount; | |||||
predictionTotal.setAmount_left_after_pay(leftAmount); | |||||
if(leftAmount == 0) { | |||||
parameterforNextStepBean.setNextStep(FumaoConstants.STEP_NAME_NEXT); | |||||
} else { | |||||
parameterforNextStepBean.setNextStep(FumaoConstants.STEP_NAME_KEEP); | |||||
} | |||||
return parameterforNextStepBean; | |||||
} | |||||
//支付完成 | |||||
public FumaoParameterforNextStep paySuccess(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
FumaoParameterforNextStep parameterforNextStepBean = postFumaoTradeOrderRequest.getParameterforNextStep(); | |||||
String orderNumber = parameterforNextStepBean.getOrderNumber(); | |||||
// TODO | |||||
return parameterforNextStepBean; | |||||
} | |||||
//支付状态查询 | |||||
public FumaoParameterforNextStep queryPayStatus(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
FumaoParameterforNextStep parameterforNextStepBean = postFumaoTradeOrderRequest.getParameterforNextStep(); | |||||
String orderNumber = parameterforNextStepBean.getOrderNumber(); | |||||
// TODO | |||||
return parameterforNextStepBean; | |||||
} | |||||
//退款 | |||||
public FumaoParameterforNextStep refund(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
FumaoParameterforNextStep parameterforNextStepBean = postFumaoTradeOrderRequest.getParameterforNextStep(); | |||||
PostRefundRequest postRefundRequest = new PostRefundRequest(); | |||||
postRefundRequest.setOrderNumber(parameterforNextStepBean.getOrderNumber()); | |||||
postRefundRequest.setSerialNo(postFumaoTradeOrderRequest.getNeuInfo().getSn()); | |||||
JSONObject payInfoJsonObject = new JSONObject(); | |||||
payInfoJsonObject.put("merchant_id",postFumaoTradeOrderRequest.getThirdPartyInfo().getMerchantID()); | |||||
payInfoJsonObject.put("tenant_id",postFumaoTradeOrderRequest.getThirdPartyInfo().getTenantID()); | |||||
// payInfoJsonObject.put("order_amount",AmountUtils.changeY2F(parameterforNextStepBean.getTotalAmount()));// 单位:分 | |||||
payInfoJsonObject.put("order_operator_id", postFumaoTradeOrderRequest.getThirdPartyInfo().getOperatorID()); | |||||
String memPhoneNum = postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberPhoneNumber()==null ? "" : postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberPhoneNumber(); | |||||
payInfoJsonObject.put("mem_phone_number", memPhoneNum); | |||||
String memId = postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberID()==null ? "" : postFumaoTradeOrderRequest.getThirdPartyInfo().getMemberID(); | |||||
payInfoJsonObject.put("mem_id", memId); | |||||
if (postFumaoTradeOrderRequest.getThirdPartyInfo().getBusinessType() != null) { | |||||
payInfoJsonObject.put("business_type", postFumaoTradeOrderRequest.getThirdPartyInfo().getBusinessType()); | |||||
} else { | |||||
payInfoJsonObject.put("business_type", "1"); | |||||
} | |||||
if (parameterforNextStepBean.getPaymentTypeList().get(0).getPaymentTypeId().equals(DictionaryConstant.PAY_TYPE_FM_COUPON.getCode())) { // 优惠券参数 | |||||
payInfoJsonObject.put("coupon_id", parameterforNextStepBean.getPaymentTypeList().get(0).getPaymentData().get(0).getCuponID()); //TODO for循环遍历PaymentData?? | |||||
} | |||||
postRefundRequest.setThirdPartyInfoJsonString(payInfoJsonObject.toString()); | |||||
val resultData = HttpClientUtils.postData("http://localhost:2008/orderRefund/" + "refund", JSON.toJSONString(postRefundRequest)); //TODO | |||||
logger.info("orderRefundResultData:"+resultData); | |||||
Map resultMap = (Map)JSON.parse(resultData); | |||||
PostRefundResponse orderRefundResponse; | |||||
if(("200").equals(resultMap.get("code").toString())){ | |||||
JSONObject jsonObject = JSONObject.fromObject(resultMap.get("result")); | |||||
orderRefundResponse = (PostRefundResponse) JSONObject.toBean(jsonObject, PostRefundResponse.class); | |||||
}else{ | |||||
logger.error( "postOrderRefund error:" + resultData); | |||||
throw new BusinessCommonException(resultMap.get("code").toString(),resultMap.get("message").toString()); | |||||
} | |||||
// TODO 返回值?? | |||||
return parameterforNextStepBean; | |||||
} | |||||
//订单同步 | |||||
public FumaoParameterforNextStep complete(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
FumaoParameterforNextStep parameterforNextStepBean = postFumaoTradeOrderRequest.getParameterforNextStep(); | |||||
// TODO | |||||
return parameterforNextStepBean; | |||||
} | |||||
// /** | |||||
// * 富茂POS订单同步数据整理方法 | |||||
// * @param payOrder 订单同步请求 | |||||
// * @return String | |||||
// */ | |||||
// private String fumaoCouponOrderRequestDataHandle(PayOrder payOrder){ | |||||
// Map<String, String> reqObj = new HashMap<>(); | |||||
// reqObj.put("dev_id", FumaoPayConstants.BUSINESS_ID); | |||||
// reqObj.put("nonce_str", WXPayUtils.generateNonceStr());//"123456789"); | |||||
// String payInfoString = payOrder.getPayInfoJsonString(); | |||||
// logger.info("fumaoCouponOrderRequestDataHandle::payInfoString="+payInfoString); | |||||
// JSONObject payInfoJsonObject = JSONObject.fromObject(payInfoString); | |||||
// try { | |||||
// reqObj.put("merchant_id", payInfoJsonObject.getString("merchant_id")); | |||||
// reqObj.put("tenant_id", payInfoJsonObject.getString("tenant_id")); | |||||
// reqObj.put("order_amount", payInfoJsonObject.getString("order_amount")); | |||||
// reqObj.put("order_operation_id", payInfoJsonObject.getString("order_operator_id")); | |||||
// if(!payInfoJsonObject.getString("mem_phone_number").equals("")) { | |||||
// reqObj.put("mem_phone_number", payInfoJsonObject.getString("mem_phone_number")); | |||||
// } | |||||
// if(!payInfoJsonObject.getString("mem_id").equals("")) { | |||||
// reqObj.put("mem_id", payInfoJsonObject.getString("mem_id")); | |||||
// } | |||||
// reqObj.put("business_type", payInfoJsonObject.getString("business_type")); | |||||
// List<String> couponList = (List<String>)payInfoJsonObject.get("coupon_list"); | |||||
// if(couponList != null) { | |||||
// reqObj.put("coupon_list", "[".concat(String.join(",", couponList)).concat("]")); | |||||
// } else { | |||||
// reqObj.put("coupon_list", "[]"); | |||||
// } | |||||
// } catch (Exception e) { | |||||
// throw new BusinessCommonException(PaymentErrorCode.PAY_TYPE_INFO_NOT_EMPTY); | |||||
// } | |||||
// reqObj.put("order_amount_left", payOrder.getLeftAmount().toString()); | |||||
// reqObj.put("order_number_of_platform", payOrder.getmOrderNumber()); | |||||
// reqObj.put("order_create_sn", payOrder.getDeviceId()); | |||||
// reqObj.put("sign", WXPayUtils.generateSignature(reqObj, FumaoPayConstants.DEV_REQ_KEY, SignType.HMACSHA256)); | |||||
// JSONObject jsonObject = JSONObject.fromObject(reqObj); | |||||
// return jsonObject.toString(); | |||||
// } | |||||
} |
@@ -0,0 +1,182 @@ | |||||
package com.neusoft.smart.pos.fumao.service; | |||||
import java.util.*; | |||||
import com.alibaba.fastjson.JSON; | |||||
import com.neusoft.smart.pos.dto.fumao.bean.MemberDiscount; | |||||
import com.neusoft.smart.pos.dto.payment.response.*; | |||||
import com.neusoft.smart.pos.dto.trade.request.GetPosPayChannelsRequest; | |||||
import com.neusoft.smart.pos.dto.trade.response.GetPayChannelsResponse; | |||||
import com.neusoft.smart.pos.framework.exception.BusinessCommonException; | |||||
import com.neusoft.smart.pos.fumao.utils.HttpClientUtils; | |||||
import lombok.val; | |||||
import net.sf.json.JSONObject; | |||||
import org.slf4j.Logger; | |||||
import org.slf4j.LoggerFactory; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.stereotype.Service; | |||||
import com.neusoft.smart.pos.constants.DictionaryConstant; | |||||
import com.neusoft.smart.pos.dto.fumao.request.PostFumaoTradeOrderRequest; | |||||
import com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfo; | |||||
import com.neusoft.smart.pos.fumao.persistent.ext.domain.FumaoMerchantQueryRequest; | |||||
import com.neusoft.smart.pos.fumao.persistent.repository.FumaoBusinessActionRepository; | |||||
import com.neusoft.smart.pos.fumao.constants.FumaoConstants; | |||||
@Service("FumaoBusinessService") | |||||
public class FumaoBusinessService implements IBusinessService<PostFumaoTradeOrderRequest, FumaoParameterforNextStep>{ | |||||
private final static Logger logger = LoggerFactory.getLogger(FumaoBusinessService.class); | |||||
@Autowired | |||||
private FumaoBusinessActionRepository fumaoBusinessActionRepository; | |||||
@Override | |||||
public FumaoParameterforNextStep environmentPrepare() { | |||||
return new FumaoParameterforNextStep(); | |||||
} | |||||
@Override | |||||
public FumaoParameterforNextStep executePrepare(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
FumaoMemberInfoRes memberInfo = fumaoBusinessActionRepository.queryAndCalc(postFumaoTradeOrderRequest); | |||||
if(!memberInfo.getReturn_code().equals("0")) { | |||||
throw new BusinessCommonException(memberInfo.getReturn_code(),memberInfo.getReturn_msg()); | |||||
} | |||||
FumaoParameterforNextStep result = new FumaoParameterforNextStep(); | |||||
result.setActionName(FumaoConstants.ACTION_NAME_CONSUME_GENERATE); | |||||
result.setTotalAmount(postFumaoTradeOrderRequest.getParameterforNextStep().getTotalAmount()); | |||||
// 构建predictionTotal | |||||
FumaoPaymentPrediction predictionTotal = new FumaoPaymentPrediction(); | |||||
predictionTotal.setOrder_amount(Long.parseLong(memberInfo.getOrder_amount())); | |||||
predictionTotal.setOrder_amount_left(Long.parseLong(memberInfo.getOrder_amount_left())); | |||||
//解析第三方试算返回的结果 | |||||
FumaoPromotionData promotionData = memberInfo.getPromotionData(); | |||||
FumaoPromotionInfo promotionInfo = promotionData.getPromotion_info(); | |||||
FumaoPaymentPrediction paymentPrediction = promotionData.getPayment_prediction(); | |||||
MemberDiscount memberDiscount = promotionInfo.getMember_discount(); | |||||
FumaoCouponData coupon = promotionInfo.getCoupon() ; | |||||
List<FumaoCouponInfo> couponList = coupon.getCoupon_list(); | |||||
//构建PaymentTypeList | |||||
int sequence = 1;//TODO sequence 怎么赋值?? | |||||
List<FumaoPaymentType> paymentTypeList = new ArrayList<FumaoPaymentType>(); | |||||
if(memberDiscount != null || (couponList != null && couponList.size() > 0)) { //富茂优惠 | |||||
FumaoPaymentType paymentType = new FumaoPaymentType(); | |||||
paymentType.setSequence(sequence++); | |||||
paymentType.setPaymentTypeId(DictionaryConstant.PAY_TYPE_DISCOUNT.getCode()); | |||||
paymentType.setPaymentTypeName(DictionaryConstant.PAY_TYPE_DISCOUNT.getValue()); | |||||
paymentType.setSelectType("1"); | |||||
paymentType.setIsPaymentTypeSelected("1"); | |||||
paymentType.setActionName(FumaoConstants.ACTION_NAME_CONSUME_GENERATE); | |||||
FumaoPaymentPrediction predictionType = new FumaoPaymentPrediction(); | |||||
predictionType.setOrder_amount(paymentPrediction.getOrder_amount()); | |||||
predictionType.setOrder_amount_left(paymentPrediction.getOrder_amount_left()); | |||||
predictionType.setPromotion_amount(paymentPrediction.getPromotion_amount()); | |||||
predictionType.setAmount_left_after_pay(paymentPrediction.getAmount_left_after_pay()); | |||||
paymentType.setPaymentPredictionbyType(predictionType); | |||||
List<FumaoPaymentData> paymentDataList = new ArrayList<FumaoPaymentData>(); | |||||
//富茂会员折扣 | |||||
if (memberDiscount != null) { | |||||
FumaoPaymentData paymentData = new FumaoPaymentData(); | |||||
paymentData.setMerchantID(memberInfo.getMerchant_id()); | |||||
paymentData.setMemberID(memberInfo.getMem_id()); | |||||
paymentData.setL1Title(memberDiscount.getDiscount_description()); | |||||
paymentData.setIsSelected("1"); | |||||
FumaoPaymentPrediction prediction = new FumaoPaymentPrediction(); | |||||
prediction.setOrder_amount(memberDiscount.getOrder_amount()); | |||||
prediction.setOrder_amount_left(memberDiscount.getOrder_amount_left()); | |||||
prediction.setPromotion_amount(memberDiscount.getDiscount_amount()); | |||||
prediction.setAmount_left_after_pay(Long.parseLong(memberDiscount.getRemain_amount())); | |||||
paymentData.setPaymentPrediction(prediction); | |||||
paymentDataList.add(paymentData); | |||||
} | |||||
//富茂优惠券 | |||||
if (couponList != null && couponList.size() > 0) { | |||||
for (int i = 0; i < couponList.size(); i++) { | |||||
FumaoCouponInfo couponInfo = couponList.get(i); | |||||
FumaoPaymentData paymentData = new FumaoPaymentData(); | |||||
paymentData.setCuponID(couponInfo.getCoupon_id()); | |||||
paymentData.setCuponDescription(couponInfo.getCoupon_description()); | |||||
paymentData.setIsSelected(couponInfo.getIs_selected()+""); | |||||
// FumaoPaymentPrediction prediction = new FumaoPaymentPrediction(); | |||||
// prediction.setOrder_amount(orderAmount); | |||||
// prediction.setOrder_amount_left(orderAmount - memberDiscount.getRemain_amount()); | |||||
// prediction.setPayment_amount(couponInfo.get); | |||||
// prediction.setAmount_left_after_pay(couponInfo.get); | |||||
// paymentData.setPaymentPrediction(prediction); | |||||
paymentDataList.add(paymentData); | |||||
} | |||||
} | |||||
paymentType.setPaymentData(paymentDataList); | |||||
paymentTypeList.add(paymentType); | |||||
} | |||||
predictionTotal.setPromotion_amount(paymentPrediction.getPromotion_amount()); | |||||
predictionTotal.setAmount_left_after_pay(Long.parseLong(coupon.getRemain_amount())); | |||||
result.setPaymentPredictionofTotal(predictionTotal); | |||||
//获取支付渠道 | |||||
GetPosPayChannelsRequest payChannelsRequest = new GetPosPayChannelsRequest(); | |||||
payChannelsRequest.setSerialNo(postFumaoTradeOrderRequest.getNeuInfo().getSn()); | |||||
val resultData = HttpClientUtils.getData("http://localhost:2008/payChannel/posPayChannels?serialNo=" + postFumaoTradeOrderRequest.getNeuInfo().getSn());//TODO url??? | |||||
logger.info("payChannel resultData:"+resultData); | |||||
Map resultMap = (Map)JSON.parse(resultData); | |||||
GetPayChannelsResponse payChannelsResponseResponse = null; | |||||
if(("200").equals(resultMap.get("code").toString())){ | |||||
JSONObject jsonObject = JSONObject.fromObject(resultMap.get("result")); | |||||
Map<String, Class> classMap = new HashMap<String, Class>(); | |||||
classMap.put("payChannels", GetPayChannelsResponse.PayChannel.class); | |||||
payChannelsResponseResponse = (GetPayChannelsResponse) JSONObject.toBean(jsonObject, GetPayChannelsResponse.class, classMap); | |||||
}else{ | |||||
logger.error( "payChannels error:" + resultData); | |||||
throw new BusinessCommonException(resultMap.get("code").toString(),resultMap.get("message").toString()); | |||||
} | |||||
List<GetPayChannelsResponse.PayChannel> payChannelList = payChannelsResponseResponse.getPayChannels(); | |||||
for(int i = 0; i < payChannelList.size(); i++) { | |||||
if(payChannelList.get(i).getPayType().equals(DictionaryConstant.PAY_TYPE_DISCOUNT.getCode())) { | |||||
continue; | |||||
} | |||||
FumaoPaymentType paymentType = new FumaoPaymentType(); | |||||
paymentType.setSequence(sequence); | |||||
paymentType.setPaymentTypeId(payChannelList.get(i).getPayType()); | |||||
paymentType.setPaymentTypeName(payChannelList.get(i).getName()); | |||||
paymentType.setSelectType("0"); | |||||
paymentType.setIsPaymentTypeSelected("0"); | |||||
paymentTypeList.add(paymentType); | |||||
} | |||||
result.setPaymentTypeList(paymentTypeList); | |||||
result.setNextStep("Next"); | |||||
return result; | |||||
} | |||||
@Override | |||||
public FumaoParameterforNextStep execute(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
String actionName = postFumaoTradeOrderRequest.getParameterforNextStep().getActionName(); | |||||
FumaoParameterforNextStep result = new FumaoParameterforNextStep(); | |||||
switch(actionName) { | |||||
case FumaoConstants.ACTION_NAME_CONSUME_GENERATE: | |||||
return fumaoBusinessActionRepository.consume(postFumaoTradeOrderRequest); | |||||
case FumaoConstants.ACTION_NAME_CONSUME_SUCCESS: | |||||
return fumaoBusinessActionRepository.paySuccess(postFumaoTradeOrderRequest); | |||||
case FumaoConstants.ACTION_NAME_CONSUME_QUERY: | |||||
return fumaoBusinessActionRepository.queryPayStatus(postFumaoTradeOrderRequest); | |||||
case FumaoConstants.ACTION_NAME_REFUND: | |||||
return fumaoBusinessActionRepository.refund(postFumaoTradeOrderRequest); | |||||
} | |||||
return result; | |||||
} | |||||
@Override | |||||
public FumaoParameterforNextStep complete(PostFumaoTradeOrderRequest postFumaoTradeOrderRequest) { | |||||
return fumaoBusinessActionRepository.complete(postFumaoTradeOrderRequest); | |||||
} | |||||
private List<FumaoTenantInfo> getFumaoTenantInfo() { | |||||
FumaoMerchantQueryRequest req = new FumaoMerchantQueryRequest(); | |||||
req.setShop_id(1); | |||||
List<FumaoTenantInfo> result = fumaoBusinessActionRepository.getList(req); | |||||
return result; | |||||
} | |||||
} |
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.fumao.service; | |||||
public interface IBusinessService<T, E> { | |||||
E environmentPrepare(); | |||||
E executePrepare(T postPara); | |||||
E execute(T postPara); | |||||
E complete(T postPara); | |||||
} |
@@ -0,0 +1,103 @@ | |||||
package com.neusoft.smart.pos.fumao.utils; | |||||
import java.math.BigDecimal; | |||||
public class AmountUtils { | |||||
/**金额为分的格式 */ | |||||
public static final String CURRENCY_FEN_REGEX = "\\-?[0-9]+"; | |||||
/** | |||||
* 将分为单位的转换为元并返回金额格式的字符串 (除100) | |||||
* | |||||
* @param amount | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
public static String changeF2Y(Long amount) throws Exception{ | |||||
if(!amount.toString().matches(CURRENCY_FEN_REGEX)) { | |||||
throw new Exception("金额格式有误"); | |||||
} | |||||
int flag = 0; | |||||
String amString = amount.toString(); | |||||
if(amString.charAt(0)=='-'){ | |||||
flag = 1; | |||||
amString = amString.substring(1); | |||||
} | |||||
StringBuffer result = new StringBuffer(); | |||||
if(amString.length()==1){ | |||||
result.append("0.0").append(amString); | |||||
}else if(amString.length() == 2){ | |||||
result.append("0.").append(amString); | |||||
}else{ | |||||
String intString = amString.substring(0,amString.length()-2); | |||||
for(int i=1; i<=intString.length();i++){ | |||||
if( (i-1)%3 == 0 && i !=1){ | |||||
result.append(","); | |||||
} | |||||
result.append(intString.substring(intString.length()-i,intString.length()-i+1)); | |||||
} | |||||
result.reverse().append(".").append(amString.substring(amString.length()-2)); | |||||
} | |||||
if(flag == 1){ | |||||
return "-"+result.toString(); | |||||
}else{ | |||||
return result.toString(); | |||||
} | |||||
} | |||||
public static double changeF2YDouble(double amount) { | |||||
double a = amount/100; | |||||
BigDecimal b = new BigDecimal(a); | |||||
a = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | |||||
return a; | |||||
} | |||||
/** | |||||
* 将分为单位的转换为元 (除100) | |||||
* | |||||
* @param amount | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
public static String changeF2Y(String amount) throws Exception{ | |||||
if(!amount.matches(CURRENCY_FEN_REGEX)) { | |||||
throw new Exception("金额格式有误"); | |||||
} | |||||
return BigDecimal.valueOf(Long.valueOf(amount)).divide(new BigDecimal(100)).toString(); | |||||
} | |||||
/** | |||||
* 将元为单位的转换为分 (乘100) | |||||
* | |||||
* @param amount | |||||
* @return | |||||
*/ | |||||
public static String changeY2F(Long amount){ | |||||
return BigDecimal.valueOf(amount).multiply(new BigDecimal(100)).toString(); | |||||
} | |||||
/** | |||||
* 将元为单位的转换为分 替换小数点,支持以逗号区分的金额 | |||||
* | |||||
* @param amount | |||||
* @return | |||||
*/ | |||||
public static String changeY2F(String amount){ | |||||
String currency = amount.replaceAll("\\$|\\¥|\\,", ""); //处理包含, ¥ 或者$的金额 | |||||
int index = currency.indexOf("."); | |||||
int length = currency.length(); | |||||
Long amLong = 0l; | |||||
if(index == -1){ | |||||
amLong = Long.valueOf(currency+"00"); | |||||
}else if(length - index >= 3){ | |||||
amLong = Long.valueOf((currency.substring(0, index+3)).replace(".", "")); | |||||
}else if(length - index == 2){ | |||||
amLong = Long.valueOf((currency.substring(0, index+2)).replace(".", "")+0); | |||||
}else{ | |||||
amLong = Long.valueOf((currency.substring(0, index+1)).replace(".", "")+"00"); | |||||
} | |||||
return amLong.toString(); | |||||
} | |||||
} |
@@ -0,0 +1,175 @@ | |||||
package com.neusoft.smart.pos.fumao.utils; | |||||
import org.apache.http.HttpEntity; | |||||
import org.apache.http.HttpResponse; | |||||
import org.apache.http.NameValuePair; | |||||
import org.apache.http.client.HttpClient; | |||||
import org.apache.http.client.methods.HttpDelete; | |||||
import org.apache.http.client.methods.HttpGet; | |||||
import org.apache.http.client.methods.HttpPost; | |||||
import org.apache.http.client.methods.HttpPut; | |||||
import org.apache.http.client.utils.URLEncodedUtils; | |||||
import org.apache.http.entity.StringEntity; | |||||
import org.apache.http.impl.client.HttpClients; | |||||
import org.apache.http.message.BasicNameValuePair; | |||||
import org.apache.http.util.EntityUtils; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
import java.io.BufferedReader; | |||||
import java.io.IOException; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
public class HttpClientUtils { | |||||
public static final String CONTENT_TYPE_XML = "application/xml"; | |||||
public static final String DEFAULT_CONTENT_TYPE = "application/json"; | |||||
public static final String DEFAULT_CHARSET = "UTF-8"; | |||||
public static String postXMLData(String url, String data){ | |||||
return postData(url,data,CONTENT_TYPE_XML); | |||||
} | |||||
public static String postData(String url, String data){ | |||||
return postData(url,data,DEFAULT_CONTENT_TYPE); | |||||
} | |||||
/** | |||||
* 发送xml格式数据请求方法 | |||||
* @param url | |||||
* @param data | |||||
* @return | |||||
*/ | |||||
public static String postData(String url, String data,String contentType){ | |||||
HttpClient httpclient = HttpClients.createDefault(); | |||||
HttpPost httpPost = new HttpPost(url); | |||||
StringEntity requestEntity = new StringEntity(data, DEFAULT_CHARSET); | |||||
httpPost.addHeader("Content-Type", contentType); | |||||
httpPost.setEntity(requestEntity); | |||||
String result = null; | |||||
try { | |||||
HttpResponse response = httpclient.execute(httpPost); | |||||
HttpEntity responseEntity = response.getEntity(); | |||||
result = EntityUtils.toString(responseEntity, DEFAULT_CHARSET); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
return result; | |||||
} | |||||
/** | |||||
* 根据request对象获取数据信息 | |||||
* @param request | |||||
* @return | |||||
*/ | |||||
public static String getStringDataFromRequest(HttpServletRequest request){ | |||||
String dataString = null; | |||||
try { | |||||
BufferedReader reader = request.getReader(); | |||||
String line; | |||||
StringBuffer inputString = new StringBuffer(); | |||||
while ((line = reader.readLine()) != null) { | |||||
inputString.append(line); | |||||
} | |||||
dataString = inputString.toString(); | |||||
request.getReader().close(); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
return dataString; | |||||
} | |||||
return dataString; | |||||
} | |||||
public static String putData(String url, String data){ | |||||
return putData(url,data,DEFAULT_CONTENT_TYPE); | |||||
} | |||||
/** | |||||
* 发送xml格式数据请求方法 | |||||
* @param url | |||||
* @param data | |||||
* @return | |||||
*/ | |||||
public static String putData(String url, String data,String contentType){ | |||||
HttpClient httpclient = HttpClients.createDefault(); | |||||
HttpPut httpPut = new HttpPut(url); | |||||
StringEntity requestEntity = new StringEntity(data, DEFAULT_CHARSET); | |||||
httpPut.addHeader("Content-Type", contentType); | |||||
httpPut.setEntity(requestEntity); | |||||
String result = null; | |||||
try { | |||||
HttpResponse response = httpclient.execute(httpPut); | |||||
HttpEntity responseEntity = response.getEntity(); | |||||
result = EntityUtils.toString(responseEntity, DEFAULT_CHARSET); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
return result; | |||||
} | |||||
public static String deleteData(String url, Map<String, String> params){ | |||||
return deleteData(url,params,DEFAULT_CONTENT_TYPE); | |||||
} | |||||
/** | |||||
* 发送xml格式数据请求方法 | |||||
* @param url | |||||
* @return | |||||
*/ | |||||
public static String deleteData(String url, Map<String, String> params,String contentType){ | |||||
HttpClient httpclient = HttpClients.createDefault(); | |||||
List<NameValuePair> qparams = getParamsList(params); | |||||
if (qparams != null && qparams.size() > 0) { | |||||
String formatParams = URLEncodedUtils.format(qparams, DEFAULT_CHARSET); | |||||
url = (url.indexOf("?")) < 0 ? (url + "?" + formatParams) | |||||
: (url.substring(0, url.indexOf("?") + 1) + formatParams); | |||||
} | |||||
HttpDelete httpDelete = new HttpDelete(url); | |||||
httpDelete.addHeader("Content-Type", contentType); | |||||
String result = null; | |||||
try { | |||||
HttpResponse response = httpclient.execute(httpDelete); | |||||
HttpEntity responseEntity = response.getEntity(); | |||||
result = EntityUtils.toString(responseEntity, DEFAULT_CHARSET); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
return result; | |||||
} | |||||
public static String getData(String url){ | |||||
return getData(url,DEFAULT_CONTENT_TYPE); | |||||
} | |||||
/** | |||||
* 发送xml格式数据请求方法 | |||||
* @param url | |||||
* @return | |||||
*/ | |||||
public static String getData(String url,String contentType){ | |||||
HttpClient httpclient = HttpClients.createDefault(); | |||||
HttpGet httpGet = new HttpGet(url); | |||||
httpGet.addHeader("Content-Type", contentType); | |||||
String result = null; | |||||
try { | |||||
HttpResponse response = httpclient.execute(httpGet); | |||||
HttpEntity responseEntity = response.getEntity(); | |||||
result = EntityUtils.toString(responseEntity, DEFAULT_CHARSET); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
return result; | |||||
} | |||||
private static List<NameValuePair> getParamsList(Map<String, String> paramsMap) { | |||||
if (paramsMap == null || paramsMap.size() == 0) { | |||||
return null; | |||||
} | |||||
List<NameValuePair> params = new ArrayList<NameValuePair>(); | |||||
for (Map.Entry<String, String> map : paramsMap.entrySet()) { | |||||
params.add(new BasicNameValuePair(map.getKey(), map.getValue())); | |||||
} | |||||
return params; | |||||
} | |||||
} |
@@ -0,0 +1,10 @@ | |||||
spring: | |||||
application: | |||||
name: service-fumao | |||||
cloud: | |||||
config: | |||||
uri: http://config:1001/ | |||||
profile: dev | |||||
name: service-fumao | |||||
server: | |||||
port: 2210 |
@@ -0,0 +1,91 @@ | |||||
<?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.neusoft.smart.pos.fumao.persistent.mapper.FumaoPayChannelMapper"> | |||||
<resultMap id="BaseResultMap" type="com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfo"> | |||||
<id column="id" jdbcType="INTEGER" property="id" /> | |||||
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||||
<result column="tenant_name" jdbcType="VARCHAR" property="tenantName" /> | |||||
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" /> | |||||
<result column="shop_id" jdbcType="INTEGER" property="shopId" /> | |||||
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" /> | |||||
</resultMap> | |||||
<sql id="Example_Where_Clause"> | |||||
<where> | |||||
<foreach collection="oredCriteria" item="criteria" separator="or"> | |||||
<if test="criteria.valid"> | |||||
<trim prefix="(" prefixOverrides="and" suffix=")"> | |||||
<foreach collection="criteria.criteria" item="criterion"> | |||||
<choose> | |||||
<when test="criterion.noValue"> | |||||
and ${criterion.condition} | |||||
</when> | |||||
<when test="criterion.singleValue"> | |||||
and ${criterion.condition} #{criterion.value} | |||||
</when> | |||||
<when test="criterion.betweenValue"> | |||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} | |||||
</when> | |||||
<when test="criterion.listValue"> | |||||
and ${criterion.condition} | |||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> | |||||
#{listItem} | |||||
</foreach> | |||||
</when> | |||||
</choose> | |||||
</foreach> | |||||
</trim> | |||||
</if> | |||||
</foreach> | |||||
</where> | |||||
</sql> | |||||
<sql id="Update_By_Example_Where_Clause"> | |||||
<where> | |||||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> | |||||
<if test="criteria.valid"> | |||||
<trim prefix="(" prefixOverrides="and" suffix=")"> | |||||
<foreach collection="criteria.criteria" item="criterion"> | |||||
<choose> | |||||
<when test="criterion.noValue"> | |||||
and ${criterion.condition} | |||||
</when> | |||||
<when test="criterion.singleValue"> | |||||
and ${criterion.condition} #{criterion.value} | |||||
</when> | |||||
<when test="criterion.betweenValue"> | |||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} | |||||
</when> | |||||
<when test="criterion.listValue"> | |||||
and ${criterion.condition} | |||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> | |||||
#{listItem} | |||||
</foreach> | |||||
</when> | |||||
</choose> | |||||
</foreach> | |||||
</trim> | |||||
</if> | |||||
</foreach> | |||||
</where> | |||||
</sql> | |||||
<sql id="Base_Column_List"> | |||||
id, tenant_id, tenant_name, merchant_id, shop_id, created_date | |||||
</sql> | |||||
<select id="selectByExample" parameterType="com.neusoft.smart.pos.fumao.persistent.domain.FumaoTenantInfo" resultMap="BaseResultMap"> | |||||
select | |||||
<if test="distinct"> | |||||
distinct | |||||
</if> | |||||
<include refid="Base_Column_List" /> | |||||
from fumao_tenant_info | |||||
<if test="_parameter != null"> | |||||
<include refid="Example_Where_Clause" /> | |||||
</if> | |||||
<if test="orderByClause != null"> | |||||
order by ${orderByClause} | |||||
</if> | |||||
<if test="offset != null and limit != null"> | |||||
limit ${offset}, ${limit} | |||||
</if> | |||||
</select> | |||||
</mapper> |
@@ -0,0 +1,6 @@ | |||||
FROM openjdk:8-jdk-alpine | |||||
VOLUME /tmp | |||||
ARG JAR_FILE | |||||
ADD ${JAR_FILE} app.jar | |||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |||||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.cloud.config.profile=prod","-jar","-Xms200M","-Xmx512M","/app.jar"] |
@@ -0,0 +1,100 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project xmlns="http://maven.apache.org/POM/4.0.0" | |||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||||
<modelVersion>4.0.0</modelVersion> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>service-payment</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
<properties> | |||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |||||
<java.version>1.8</java.version> | |||||
<spring-cloud.version>Edgware.RELEASE</spring-cloud.version> | |||||
</properties> | |||||
<parent> | |||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-starter-parent</artifactId> | |||||
<version>1.5.9.RELEASE</version> | |||||
<relativePath/> <!-- lookup parent from repository --> | |||||
</parent> | |||||
<dependencies> | |||||
<dependency> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>framework</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>common</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-eureka</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-config</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-ribbon</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-starter-hystrix</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-starter-web</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.alipay.sdk</groupId> | |||||
<artifactId>alipay-sdk-java</artifactId> | |||||
<version>3.4.49.ALL</version> | |||||
</dependency> | |||||
<!--<dependency>--> | |||||
<!--<groupId>com.github.1991wangliang</groupId>--> | |||||
<!--<artifactId>alipay-sdk</artifactId>--> | |||||
<!--<version>1.0.0</version>--> | |||||
<!--</dependency>--> | |||||
<dependency> | |||||
<groupId>net.sf.json-lib</groupId> | |||||
<artifactId>json-lib</artifactId> | |||||
<version>2.4</version> | |||||
<classifier>jdk15</classifier> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.json</groupId> | |||||
<artifactId>json</artifactId> | |||||
<version>20180813</version> | |||||
</dependency> | |||||
</dependencies> | |||||
<dependencyManagement> | |||||
<dependencies> | |||||
<dependency> | |||||
<groupId>org.springframework.cloud</groupId> | |||||
<artifactId>spring-cloud-dependencies</artifactId> | |||||
<version>${spring-cloud.version}</version> | |||||
<type>pom</type> | |||||
<scope>import</scope> | |||||
</dependency> | |||||
</dependencies> | |||||
</dependencyManagement> | |||||
<build> | |||||
<plugins> | |||||
<plugin> | |||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-maven-plugin</artifactId> | |||||
</plugin> | |||||
</plugins> | |||||
</build> | |||||
</project> |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos; | |||||
import org.mybatis.spring.annotation.MapperScan; | |||||
import org.springframework.boot.SpringApplication; | |||||
import org.springframework.cloud.client.SpringCloudApplication; | |||||
@SpringCloudApplication | |||||
@MapperScan("com.neusoft.smart.pos.payment.persistent.mapper") | |||||
public class ServicePaymentApplication { | |||||
public static void main(String[] args) { | |||||
SpringApplication.run(ServicePaymentApplication.class, args); | |||||
} | |||||
} |
@@ -0,0 +1,17 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class AliPayConstants { | |||||
public static final String URL = "https://openapi.alipay.com/gateway.do"; //支付宝网关 | |||||
// public static final String URL = "https://openapi.alipaydev.com/gateway.do"; //支付宝沙箱网关 | |||||
public static final String FORMAT = "json"; //参数格式 | |||||
public static final String CHARSET = "UTF-8"; //字符集 | |||||
public static final String SIGN_TYPE = "RSA2"; //加密方式 | |||||
} | |||||
@@ -0,0 +1,68 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class ChinaumsPayConstants { | |||||
/** | |||||
* 微信及支付宝内支付 | |||||
*/ | |||||
//测试地址 | |||||
public static final String DOMAIN_API = "https://qr-test2.chinaums.com/netpay-route-server/api/"; | |||||
//生产地址 | |||||
// public static final String DOMAIN_API = "https://qr.chinaums.com/netpay-route-server/api/"; | |||||
public static final String FIELD_SIGN = "sign"; | |||||
public static final String ORDER_NUMBER_PREFIX = "3194"; | |||||
/** | |||||
* 公众号支付 | |||||
*/ | |||||
//测试地址 | |||||
//下单接口 | |||||
public static final String DOMAIN_API_PAY = "https://qr-test2.chinaums.com/netpay-portal/webpay/pay.do"; | |||||
//生产地址 | |||||
//下单接口 | |||||
// public static final String DOMAIN_API_PAY = "https://qr.chinaums.com/netpay-portal/webpay/pay.do"; | |||||
/** | |||||
* 银商B扫C支付 | |||||
*/ | |||||
//B扫C支付地址 | |||||
public static final String DOMAIN_BSC_PAY = "http://58.247.0.18:29015/v2/poslink/transaction/pay"; //测试地址 | |||||
//public static final String DOMAIN_BSC_PAY = "https://api-mop.chinaums.com/v2/poslink/transaction/pay"; //生产地址 | |||||
//B扫C冲正地址 | |||||
public static final String DOMAIN_BSC_REVERSE = "http://58.247.0.18:29015/v2/poslink/transaction/reversepayment"; //测试地址 | |||||
//public static final String DOMAIN_BSC_REVERSE = "https://api-mop.chinaums.com/v2/poslink/transaction/reversepayment"; //生产地址 | |||||
//B扫C支付撤消地址 | |||||
public static final String DOMAIN_BSC_VOID = "http://58.247.0.18:29015/v2/poslink/transaction/voidpayment"; //测试地址 | |||||
//public static final String DOMAIN_BSC_VOID = "https://api-mop.chinaums.com/v2/poslink/transaction/voidpayment"; //生产地址 | |||||
//B扫C交易退款 | |||||
public static final String DOMAIN_BSC_REFUND = "http://58.247.0.18:29015/v2/poslink/transaction/refund"; //测试地址 | |||||
//public static final String DOMAIN_BSC_REFUND = "https://api-mop.chinaums.com/v2/poslink/transaction/refund"; //生产地址 | |||||
//B扫C交易状态查询 | |||||
public static final String DOMAIN_BSC_QUERY = "http://58.247.0.18:29015/v2/poslink/transaction/query"; //测试地址 | |||||
//public static final String DOMAIN_BSC_QUERY = "https://api-mop.chinaums.com/v2/poslink/transaction/query"; //生产地址 | |||||
//商户标记 | |||||
public static final String MCH_REMARK = "Neusoft"; | |||||
//B扫C支付方式 | |||||
public static final String PAY_MODE = "CODE_SCAN"; | |||||
//货币代码 | |||||
public static final String CURRENCY_CODE = "156"; | |||||
//返回结果成功标志 | |||||
public static final String BSC_SUCCESS = "00"; | |||||
//返回结果成功标志 | |||||
public static final String QUERY_SUCCESS = "0"; | |||||
} | |||||
@@ -0,0 +1,40 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 富茂常量 | |||||
*/ | |||||
public class FumaoPayConstants { | |||||
public static final String DOMAIN_API = "https://ptest.malls.iformall.com";//"https://ptest.malls.iformall.com/api"; | |||||
public static final String FIELD_SIGN = "sign"; | |||||
public static final String DEV_REQ_KEY = "qVH2YDmXJ$ok4a95"; | |||||
public static final String DEV_RES_KEY = "VE#1fB2PhUe@&3Of"; | |||||
public static final String BUSINESS_ID = "neupos"; | |||||
public static final String TENANT_ID = "789"; | |||||
public static final String MERCHANT_ID = "387135542874869760"; | |||||
public static final String BU_USER_ID = "387136487880921088"; | |||||
/** | |||||
* 富茂接口 | |||||
*/ | |||||
public static final String QUERY_AND_CALC_SUFFIX = "/queryAndCalc"; //查询及试算接口 | |||||
public static final String COUPON_VERIFY_URL_SUFFIX = "/couponOrderVerify"; //优惠券预核销接口 | |||||
public static final String COUPON_VERIFY_CANCEL_URL_SUFFIX = "/couponOrderVerifyCancel"; //优惠券核销取消接口 | |||||
public static final String CARD_PAY_PRE_URL_SUFFIX = "/cardPayPre"; //消费卡支付接口 | |||||
public static final String CARD_PAY_PRE_CANCEL_URL_SUFFIX = "/cardPayPreCancel"; //消费卡支付取消 | |||||
public static final String POS_ORDER_SYNC = "/posOrderSync"; // POS订单同步接口 | |||||
} | |||||
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class PaymentConstants { | |||||
/** | |||||
* 订单默认失效时间,默认为2小时,单位为分 | |||||
*/ | |||||
public static final Long DEFAULT_TIME_EXPIRE = 48*60L; | |||||
} | |||||
@@ -0,0 +1,97 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
import com.neusoft.smart.pos.framework.constants.CommonCode; | |||||
/** | |||||
* @author zcf | |||||
* @date 2017-08-13 10:43 | |||||
* @description 业务错误信息使用枚举类 | |||||
*/ | |||||
public enum PaymentErrorCode implements CommonCode { | |||||
MCH_INFO_NOT_EXIST("08001", "商户信息不存在"), | |||||
SIGN_VALID_ERROR("08002", "签名校验失败"), | |||||
MCH_THIRD_PLATFORM_NOT_CONFIG("08003", "商户未配置第三方支付平台支付信息"), | |||||
MCH_NOTIFY_URL_EMPTY("08004", "商户未配置支付成功回调URL"), | |||||
MCH_ORDER_GENERATE_ERROR("08005", "第三方支付平台预付单生成失败"), | |||||
MCH_ORDER_TIME_EXPIRE_TOO_SHORT("08006", "time_expire时间过短,订单失效时间距当前时间至少5分钟"), | |||||
MCH_ORDER_REPEAT("08007", "业务系统订单号重复,请重新生成"), | |||||
MCH_NAME_NOT_EMPTY("08008", "商户名称不能为空"), | |||||
MCH_APPLY_TYPE_NOT_EMPTY("08009", "商户申请类型不能为空"), | |||||
PAY_TYPE_ERROR("08010", "支付类型错误,请重新输入"), | |||||
PAY_TYPE_NOT_EMPTY("08011", "支付类型不能为空"), | |||||
PAY_TYPE_APPID_NOT_EMPTY("08012", "AppId不能为空"), | |||||
PAY_TYPE_MCHID_NOT_EMPTY("08013", "第三方支付平台商户号不能为空"), | |||||
PAY_TYPE_SECRETKEY_NOT_EMPTY("08014", "第三方支付平台密钥不能为空"), | |||||
PAY_CHANNEL_IS_EXISTS("08015", "该支付渠道信息已经存在,无法重复添加"), | |||||
MCODE_NOT_EMPTY("08016", "商户号不能为空"), | |||||
PAY_CHANNEL_IS_EMPTY("08017", "支付渠道信息不存在"), | |||||
PAY_TYPE_PRIVATE_KEY_NOT_EMPTY("08018", "私钥不能为空"), | |||||
PAY_TYPE_PUBILC_KEY_NOT_EMPTY("08019", "公钥不能为空"), | |||||
MCH_ORDER_NOT_EXIST("08020", "商户订单信息不存在"), | |||||
MCH_ORDER_REFUND_ERROR("08021", "第三方支付平台退款申请失败"), | |||||
WX_AUTH_CODE_INVALID("08022", "微信支付授权码错误或失效"), | |||||
WX_PAY_NOT_ALLOW("08023", "订单撤销只支持商户主扫订单"), | |||||
ALIPAY_INIT_FACE_PAY_ERROR("08024", "支付宝人脸支付初始化失败"), | |||||
WEIXIN_PAY_INIT_FACE_PAY_ERROR("08025", "微信人脸支付初始化失败"), | |||||
ALIPAY_SIGN_ERROR("08201", "支付宝签名错误,私KEY有误"), | |||||
ALIPAY_PRECREATE_ERROR("08202", "请检查支付参数配置信息"), | |||||
ALIPAY_PRECREATE_RESPONSE_ERROR("08203", "请检查支付参数配置信息"), | |||||
ALIPAY_QUERY_ERROR("08204", "支付宝查询错误"), | |||||
ALIPAY_QUERY_RESPONSE_ERROR("08205", "支付宝查询返回错误"), | |||||
ALIPAY_CANCEL_ERROR("08206", "支付宝交易撤销错误"), | |||||
ALIPAY_CANCEL_RESPONSE_ERROR("08207", "支付宝交易撤销返回错误"), | |||||
ALIPAY_CLOSE_ERROR("08213", "支付宝交易关闭错误"), | |||||
ALIPAY_CLOSE_RESPONSE_ERROR("08214", "支付宝交易关闭返回错误"), | |||||
ALIPAY_PAY_ERROR("08215", "支付宝预支付错误"), | |||||
ALIPAY_PAY_RESPONSE_ERROR("08216", "请检查支付参数配置信息"), | |||||
ALIPAY_PAYORDER_IS_NOT_EXIST("08208", "返回的商户订单号不存在"), | |||||
ALIPAY_CHANNEL_IS_NOT_EXIST("08209", "返回的商户订单号对应的商户没有支付宝支付渠道"), | |||||
ALIPAY_CHECK_SIGN_ERROR("08210", "同步订单状态的参数验签错误"), | |||||
ALIPAY_AMOUNT_ERROR("08211", "同步订单状态的金额不一致"), | |||||
ALIPAY_REFUND_ERROR("08212", "支付宝退款返回错误"), | |||||
ALIPAY_FACE_PAY_ERROR("08213", "请检查支付参数配置信息"), | |||||
XYHF_CREATE_ORDER_SUCCESS("08217", "支付成功"), | |||||
XYHF_CREATE_ORDER_ERROR("08218", "错误"), | |||||
XYHF_CREATE_ORDER_AUTH_CODE_INVALID("08219", "二维码已过期,请刷新再试"), | |||||
XYHF_CREATE_ORDER_USERPAYING("08220", "等待客户验证密码"), | |||||
XYHF_CREATE_ORDER_TRADE_ERROR("08221", "暂无可用的支付方式,请绑定其它银行卡完成支付"), | |||||
XYHF_CREATE_ORDER_REFUND("08222", "转入退款"), | |||||
XYHF_CREATE_ORDER_NOTPAY("08223", "未支付"), | |||||
XYHF_CREATE_ORDER_CLOSED("08224", "已关闭"), | |||||
XYHF_CREATE_ORDER_REVOKED("08225", "已撤销"), | |||||
WFT_PAY_TYPE_NOT_SUPPORT("08226", "威富通暂不支持用户扫码支付"), | |||||
FREEZE_AMOUNT_LESS("08227", "剩余授权金额少于解冻金额,无法解冻"), | |||||
PAY_TYPE_INFO_NOT_EMPTY("08228", "第三方支付平台支付参数不能为空"), | |||||
; | |||||
private String code; | |||||
private String message; | |||||
PaymentErrorCode(String code, String message) { | |||||
this.code = code; | |||||
this.message = message; | |||||
} | |||||
public String getCode() { | |||||
return code; | |||||
} | |||||
public void setCode(String code) { | |||||
this.code = code; | |||||
} | |||||
public String getMessage() { | |||||
return message; | |||||
} | |||||
public void setMessage(String message) { | |||||
this.message = message; | |||||
} | |||||
} |
@@ -0,0 +1,43 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class UnionPayConstants { | |||||
//测试环境 | |||||
public static final String DOMAIN_API = "https://gateway.test.95516.com"; | |||||
//正式环境 | |||||
// public static final String DOMAIN_API = "https://gateway.95516.com"; | |||||
public static final String FIELD_SIGN = "sign"; | |||||
/** | |||||
* 银联预付单生成接口 | |||||
*/ | |||||
public static final String UNIFIEDORDER_URL_SUFFIX = "/gateway/api/backTransReq.do"; | |||||
/** | |||||
* 银联预付单信息查询接口 | |||||
*/ | |||||
public static final String ORDER_QUERY_URL_SUFFIX = "/gateway/api/queryTrans.do"; | |||||
/** | |||||
* 银联预付单信息取消接口 | |||||
*/ | |||||
public static final String ORDER_CANNEL_URL_SUFFIX = ""; | |||||
/** | |||||
* 银联预付单退款接口 | |||||
*/ | |||||
public static final String ORDER_REFUND_URL_SUFFIX = "/gateway/api/backTransReq.do"; | |||||
/** | |||||
* 银联预付单信息撤销接口 | |||||
*/ | |||||
public static final String ORDER_REVERSE_URL_SUFFIX = ""; | |||||
/** | |||||
* 商户主动扫码支付接口 | |||||
*/ | |||||
public static final String MICROPAY_URL_SUFFIX = "/gateway/api/backTransReq.do"; | |||||
public static final String secureKey = ""; | |||||
} | |||||
@@ -0,0 +1,12 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 威富通常量 | |||||
*/ | |||||
public class WFTPayConstants { | |||||
public static final String DOMAIN_API = "https://pay.swiftpass.cn/pay/gateway"; | |||||
} | |||||
@@ -0,0 +1,53 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class WXPayConstants { | |||||
public static final String DOMAIN_API = "https://api.mch.weixin.qq.com"; | |||||
public static final String FACE_DOMAIN_API = "https://payapp.weixin.qq.com"; | |||||
public static final String FIELD_SIGN = "sign"; | |||||
/** | |||||
* 微信预付单生成接口 | |||||
*/ | |||||
public static final String UNIFIEDORDER_URL_SUFFIX = "/pay/unifiedorder"; | |||||
/** | |||||
* 微信预付单信息查询接口 | |||||
*/ | |||||
public static final String ORDER_QUERY_URL_SUFFIX = "/pay/orderquery"; | |||||
/** | |||||
* 微信预付单信息取消接口 | |||||
*/ | |||||
public static final String ORDER_CANNEL_URL_SUFFIX = "/pay/closeorder"; | |||||
/** | |||||
* 微信预付单退款接口 | |||||
*/ | |||||
public static final String ORDER_REFUND_URL_SUFFIX = "/secapi/pay/refund"; | |||||
/** | |||||
* 微信预付单信息撤销接口 | |||||
*/ | |||||
public static final String ORDER_REVERSE_URL_SUFFIX = "/secapi/pay/reverse"; | |||||
/** | |||||
* 商户主动扫码支付接口 | |||||
*/ | |||||
public static final String MICROPAY_URL_SUFFIX = "/pay/micropay"; | |||||
/** | |||||
* 人脸支付初始化接口 | |||||
*/ | |||||
public static final String INIT_PAY_FACE_SUFFIX = "/face/get_wxpayface_authinfo"; | |||||
/** | |||||
* 人脸支付付款接口 | |||||
*/ | |||||
public static final String FACE_PAY_SUFFIX = "/pay/facepay"; | |||||
/** | |||||
* 人脸支付付款查询接口 | |||||
*/ | |||||
public static final String FACE_PAY_QUERY_SUFFIX = "/pay/facepayquery"; | |||||
} | |||||
@@ -0,0 +1,37 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 常量 | |||||
*/ | |||||
public class WXUsPayConstants { | |||||
public static final String DOMAIN_API = "https://apius.mch.weixin.qq.com/"; | |||||
public static final String FIELD_SIGN = "sign"; | |||||
/** | |||||
* 微信预付单生成接口 | |||||
*/ | |||||
public static final String UNIFIEDORDER_URL_SUFFIX = "/pay/unifiedorder"; | |||||
/** | |||||
* 微信预付单信息查询接口 | |||||
*/ | |||||
public static final String ORDER_QUERY_URL_SUFFIX = "/pay/orderquery"; | |||||
/** | |||||
* 微信预付单信息取消接口 | |||||
*/ | |||||
public static final String ORDER_CANNEL_URL_SUFFIX = "/pay/closeorder"; | |||||
/** | |||||
* 微信预付单退款接口 | |||||
*/ | |||||
public static final String ORDER_REFUND_URL_SUFFIX = "/secapi/pay/refund"; | |||||
/** | |||||
* 微信预付单信息撤销接口 | |||||
*/ | |||||
public static final String ORDER_REVERSE_URL_SUFFIX = "/secapi/pay/reverse"; | |||||
/** | |||||
* 商户主动扫码支付接口 | |||||
*/ | |||||
public static final String MICROPAY_URL_SUFFIX = "/pay/micropay"; | |||||
} | |||||
@@ -0,0 +1,25 @@ | |||||
package com.neusoft.smart.pos.payment.constants; | |||||
/** | |||||
* 西银惠付常量 | |||||
*/ | |||||
public class XYHFPayConstants { | |||||
//生产环境 | |||||
// public static final String DOMAIN_API = "https://c.xacbank.com:8000"; | |||||
//测试环境 | |||||
public static final String DOMAIN_API = "http://weixintest.xacbank.com.cn:9998"; | |||||
/** | |||||
* 商户主动扫码支付接口 | |||||
*/ | |||||
public static final String MCH_SCAN_URL_SUFFIX = "/api/OpenPlatForm/isScaned"; | |||||
//订单查询 | |||||
public static final String QUERY_ORDER_URL_SUFFIX = "/api/OpenPlatForm/getDealInfo"; | |||||
//订单关闭 | |||||
public static final String REVERSE_ORDER_URL_SUFFIX = "/api/OpenPlatForm/businessOrderClosed"; | |||||
//订单退款 | |||||
public static final String REFUND_ORDER_URL_SUFFIX = "/api/OpenPlatForm/tradeRefund"; | |||||
} | |||||
@@ -0,0 +1,30 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.payment.service.AliGrantPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.service.AliPayNotifyService; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
@RestController | |||||
@RequestMapping(path = "/aliGrantPayNotify") | |||||
public class AliGrantPayNotifyController { | |||||
@Autowired | |||||
private AliGrantPayNotifyService aliGrantPayNotifyService; | |||||
/** | |||||
* 支付宝支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String aliPayNotify(HttpServletRequest request){ | |||||
return aliGrantPayNotifyService.aliPayNotifyDataHandle(request); | |||||
} | |||||
} | |||||
@@ -0,0 +1,30 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.payment.service.AliPayNotifyService; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
@RestController | |||||
@RequestMapping(path = "/aliPayNotify") | |||||
public class AliPayNotifyController { | |||||
@Autowired | |||||
private AliPayNotifyService aliPayNotifyService; | |||||
/** | |||||
* 支付宝支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String aliPayNotify(HttpServletRequest request){ | |||||
return aliPayNotifyService.aliPayNotifyDataHandle(request); | |||||
} | |||||
} | |||||
@@ -0,0 +1,46 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.framework.constants.ApplicationConstants; | |||||
import com.neusoft.smart.pos.payment.service.ChinaumsPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.service.WXPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.utils.ChinaumsUtils; | |||||
import com.neusoft.smart.pos.payment.utils.HttpClientUtils; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
import java.util.Map; | |||||
@RestController | |||||
@RequestMapping(path = "/chinaumsPayNotify") | |||||
public class ChinaumsPayNotifyController { | |||||
@Autowired | |||||
private ChinaumsPayNotifyService chinaumsPayNotifyService; | |||||
/** | |||||
* 银联商务支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String chinaumsPayNotify(HttpServletRequest request){ | |||||
Map<String,String> notifyDataMap = ChinaumsUtils.getRequestParams(request); | |||||
return chinaumsPayNotifyService.chinaumsNotifyDataHandle(notifyDataMap); | |||||
} | |||||
/** | |||||
* 银联商务支付退款成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "refundNotify") | |||||
public String weixinRefundNotify(HttpServletRequest request){ | |||||
String notifyXmlData = HttpClientUtils.getStringDataFromRequest(request); | |||||
return chinaumsPayNotifyService.chinaumsRefundNotifyDataHandle(notifyXmlData); | |||||
} | |||||
} | |||||
@@ -0,0 +1,45 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.payment.service.ChinaumsPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.service.ChinaumsPayServiceNotifyService; | |||||
import com.neusoft.smart.pos.payment.utils.ChinaumsUtils; | |||||
import com.neusoft.smart.pos.payment.utils.HttpClientUtils; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
import java.util.Map; | |||||
@RestController | |||||
@RequestMapping(path = "/chinaumsPayServiceNotify") | |||||
public class ChinaumsPayServiceNotifyController { | |||||
@Autowired | |||||
private ChinaumsPayServiceNotifyService chinaumsPayServiceNotifyService; | |||||
/** | |||||
* 银联商务公众号支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String chinaumsPayNotify(HttpServletRequest request){ | |||||
Map<String,String> notifyDataMap = ChinaumsUtils.getRequestParams(request); | |||||
return chinaumsPayServiceNotifyService.chinaumsNotifyDataHandle(notifyDataMap); | |||||
} | |||||
/** | |||||
* 银联商务支付退款成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "refundNotify") | |||||
public String weixinRefundNotify(HttpServletRequest request){ | |||||
String notifyXmlData = HttpClientUtils.getStringDataFromRequest(request); | |||||
return chinaumsPayServiceNotifyService.chinaumsRefundNotifyDataHandle(notifyXmlData); | |||||
} | |||||
} | |||||
@@ -0,0 +1,60 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.dto.payment.request.*; | |||||
import com.neusoft.smart.pos.dto.payment.response.*; | |||||
import com.neusoft.smart.pos.framework.dto.ResponseData; | |||||
import com.neusoft.smart.pos.payment.service.FumaoPayService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.PostMapping; | |||||
import org.springframework.web.bind.annotation.RequestBody; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
@Api(value = "富茂支付管理使用rest接口", description = "富茂支付管理使用rest接口") | |||||
@RestController | |||||
@RequestMapping(path = "/fumaoPay") | |||||
@Validated | |||||
public class FumaoPayController { | |||||
@Autowired | |||||
private FumaoPayService fumaoPayService; | |||||
// @ApiOperation(value = "富茂", notes = "第三方支付单生成接口") | |||||
// @PostMapping("/generateOrder") | |||||
// public ResponseData<PostGenerateOrderResponse> generateOrder(@RequestBody PostGenerateOrderRequest generateOrderRequest) { | |||||
// return new ResponseData<>(fumaoPayService.createPayOrder(generateOrderRequest)); | |||||
// } | |||||
@ApiOperation(value = "富茂查询试算接口", notes = "富茂查询试算接口") | |||||
@PostMapping("/queryAndCalc") | |||||
public ResponseData<FumaoMemberInfoRes> checkMem(@RequestBody FumaoPayRequest fumaoPayRequest) { | |||||
return new ResponseData<>(fumaoPayService.queryAndCalc(fumaoPayRequest)); | |||||
} | |||||
// @ApiOperation(value = "富茂优惠券核销检查接口", notes = "富茂优惠券核销检查接口") | |||||
// @PostMapping("/checkCouponOrderForVerify") | |||||
// public ResponseData<FumaoCheckCouponRes> checkCouponOrderForVerify(@RequestBody FumaoPayRequest fumaoPayRequest) { | |||||
// return new ResponseData<>(fumaoPayService.checkCouponOrderForVerify(fumaoPayRequest)); | |||||
// } | |||||
// @ApiOperation(value = "富茂优惠券核销接口", notes = "富茂优惠券核销接口") | |||||
// @PostMapping("/couponOrderVerify") | |||||
// public ResponseData<FumaoCouponVerifyRes> couponOrderVerify(@RequestBody FumaoPayRequest fumaoPayRequest) { | |||||
// return new ResponseData<>(fumaoPayService.couponOrderVerify(fumaoPayRequest)); | |||||
// } | |||||
// @ApiOperation(value = "富茂消费卡支付接口", notes = "富茂消费卡支付接口") | |||||
// @PostMapping("/cardPayPre") | |||||
// public ResponseData<FumaoCardPayRes> cardPayPre(@RequestBody FumaoPayRequest fumaoPayRequest) { | |||||
// return new ResponseData<>(fumaoPayService.cardPayPre(fumaoPayRequest)); | |||||
// } | |||||
} | |||||
@@ -0,0 +1,69 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.dto.payment.request.*; | |||||
import com.neusoft.smart.pos.dto.payment.response.*; | |||||
import com.neusoft.smart.pos.framework.dto.ResponseData; | |||||
import com.neusoft.smart.pos.payment.service.GrantPayService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.PostMapping; | |||||
import org.springframework.web.bind.annotation.RequestBody; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
@Api(value = "资金授权支付管理使用rest接口", description = "资金授权支付管理使用rest接口") | |||||
@RestController | |||||
@RequestMapping(path = "/grantPay") | |||||
public class GrantPayController { | |||||
@Autowired | |||||
private GrantPayService grantPayService; | |||||
@ApiOperation(value = "资金授权冻结使用方法(含主扫与被扫)", notes = "资金授权冻结使用方法(含主扫与被扫)") | |||||
@PostMapping("/freezePay") | |||||
public ResponseData<PostFreePayResponse> freezePay(@RequestBody PostFreePayRequest freePayRequest) { | |||||
return new ResponseData<>(grantPayService.freezePay(freePayRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付单撤销接口", notes = "根据商户号订单编号撤销预付单信息方法") | |||||
@PostMapping("/reversePayGrant") | |||||
public ResponseData<PostReversePayGrantResponse> reversePayGrant(@RequestBody PostReversePayGrantRequest reversePayGrantRequest) { | |||||
return new ResponseData<>(grantPayService.reversePayGrant(reversePayGrantRequest)); | |||||
} | |||||
@ApiOperation(value = "资金授权解冻使用方法", notes = "资金授权解冻使用方法") | |||||
@PostMapping("/unFreezePay") | |||||
public ResponseData<PostUnFreezePayGrantResponse> unFreezePay(@RequestBody PostUnFreezePayGrantRequest unFreePayRequest) { | |||||
return new ResponseData<>(grantPayService.unFreezePay(unFreePayRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付预授权订单信息查询接口", notes = "第三方支付预授权订单信息查询接口") | |||||
@PostMapping("/queryPayGrant") | |||||
public ResponseData<PostQueryPayGrantResponse> queryPayGrant(@RequestBody PostQueryPayGrantRequest queryPayGrantRequest) { | |||||
return new ResponseData<>(grantPayService.queryPayGrant(queryPayGrantRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付预授权转支付接口", notes = "第三方支付预授权转支付接口") | |||||
@PostMapping("/grantToPay") | |||||
public ResponseData<PostGrantToPayResponse> grantToPay(@RequestBody PostGrantToPayRequest grantToPayRequest) { | |||||
return new ResponseData<>(grantPayService.grantToPay(grantToPayRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付单退款申请接口", notes = "根据商户号订申请退款方法") | |||||
@PostMapping("/grantPayRefund") | |||||
public ResponseData<PostGrantPayRefundResponse> grantPayRefund(@RequestBody PostGrantPayRefundRequest grantPayRefundRequest) { | |||||
return new ResponseData<>(grantPayService.grantPayRefund(grantPayRefundRequest)); | |||||
} | |||||
// @ApiOperation(value = "第三方支付单取消接口", notes = "根据商户号订单编号取消预付单信息方法") | |||||
// @PostMapping("/cancelOrder") | |||||
// public ResponseData<PostCancelOrderResponse> cancelOrder(@RequestBody PostCancelOrderRequest cannelOrderRequest) { | |||||
// return new ResponseData<>(payService.cancelOrder(cannelOrderRequest)); | |||||
// } | |||||
} | |||||
@@ -0,0 +1,32 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.constants.DictionaryConstant; | |||||
import com.neusoft.smart.pos.dto.payment.request.PostMchInfoRequest; | |||||
import com.neusoft.smart.pos.dto.payment.response.PostMchInfoResponse; | |||||
import com.neusoft.smart.pos.framework.dto.ResponseData; | |||||
import com.neusoft.smart.pos.payment.service.MchService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.PostMapping; | |||||
import org.springframework.web.bind.annotation.RequestBody; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
@Api(value = "商户管理使用rest接口", description = "商户管理使用rest接口") | |||||
@RestController | |||||
@RequestMapping(path = "/mch") | |||||
public class MchController { | |||||
@Autowired | |||||
private MchService mchService; | |||||
@ApiOperation(value = "商户号申请内部接口", notes = "商户号申请内部接口") | |||||
@PostMapping("/applyMchByPrivate") | |||||
public ResponseData<PostMchInfoResponse> applyMchByPrivate(@RequestBody PostMchInfoRequest mchInfoRequest) { | |||||
return new ResponseData<>(mchService.createMchInfo(mchInfoRequest.getMchName(), DictionaryConstant.PAYMENT_APPLY_TYPE_NB.getCode())); | |||||
} | |||||
} | |||||
@@ -0,0 +1,51 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.dto.payment.request.DeletePayChannelRequest; | |||||
import com.neusoft.smart.pos.dto.payment.request.GetPayChannelRequest; | |||||
import com.neusoft.smart.pos.dto.payment.request.PostApplyPayChannelRequest; | |||||
import com.neusoft.smart.pos.dto.payment.request.PutPayChannelRequest; | |||||
import com.neusoft.smart.pos.dto.payment.response.DeletePayChannelResponse; | |||||
import com.neusoft.smart.pos.dto.payment.response.GetPayChannelResponse; | |||||
import com.neusoft.smart.pos.dto.payment.response.PostApplyPayChannelResponse; | |||||
import com.neusoft.smart.pos.dto.payment.response.PutPayChannelResponse; | |||||
import com.neusoft.smart.pos.framework.dto.ResponseData; | |||||
import com.neusoft.smart.pos.payment.service.MchPayChannelService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.*; | |||||
@Api(value = "商户支付渠道管理使用rest接口", description = "商户支付渠道管理使用rest接口") | |||||
@RestController | |||||
@RequestMapping(path = "/mchPayChannel") | |||||
public class MchPayChannelController { | |||||
@Autowired | |||||
private MchPayChannelService mchPayChannelService; | |||||
@ApiOperation(value = "商户支付渠道申请接口", notes = "商户支付渠道申请接口") | |||||
@PostMapping("/applyPayChannel") | |||||
public ResponseData<PostApplyPayChannelResponse> applyPayChannel(@RequestBody PostApplyPayChannelRequest applyPayChannelRequest) { | |||||
return new ResponseData<>(mchPayChannelService.applyPayChannel(applyPayChannelRequest)); | |||||
} | |||||
@ApiOperation(value = "商户支付渠道信息查询接口", notes = "商户支付渠道信息查询接口") | |||||
@GetMapping("/payChannel") | |||||
public ResponseData<GetPayChannelResponse> queryPayChannel(GetPayChannelRequest payChannelRequest) { | |||||
return new ResponseData<>(mchPayChannelService.queryPayChannel(payChannelRequest.getMcode(),payChannelRequest.getPayType())); | |||||
} | |||||
@ApiOperation(value = "商户支付渠道信息删除接口", notes = "商户支付渠道信息删除接口") | |||||
@DeleteMapping("/payChannel") | |||||
public ResponseData<DeletePayChannelResponse> deletePayChannel(DeletePayChannelRequest payChannelRequest) { | |||||
return new ResponseData<>(mchPayChannelService.deletePayChannel(payChannelRequest.getMcode(),payChannelRequest.getPayType())); | |||||
} | |||||
@ApiOperation(value = "商户支付渠道信息修改接口", notes = "商户支付渠道信息修改接口") | |||||
@PutMapping("/payChannel") | |||||
public ResponseData<PutPayChannelResponse> updatePayChannel(@RequestBody PutPayChannelRequest payChannelRequest) { | |||||
return new ResponseData<>(mchPayChannelService.updatePayChannel(payChannelRequest)); | |||||
} | |||||
} | |||||
@@ -0,0 +1,63 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.dto.payment.request.*; | |||||
import com.neusoft.smart.pos.dto.payment.response.*; | |||||
import com.neusoft.smart.pos.framework.dto.ResponseData; | |||||
import com.neusoft.smart.pos.payment.service.PayService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.PostMapping; | |||||
import org.springframework.web.bind.annotation.RequestBody; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
@Api(value = "支付管理使用rest接口", description = "支付管理使用rest接口") | |||||
@RestController | |||||
@RequestMapping(path = "/pay") | |||||
public class PayController { | |||||
@Autowired | |||||
private PayService payService; | |||||
@ApiOperation(value = "第三方支付单生成接口(支付二维码生成接口)", notes = "第三方支付单生成接口") | |||||
@PostMapping("/generateOrder") | |||||
public ResponseData<PostGenerateOrderResponse> generateOrder(@RequestBody PostGenerateOrderRequest generateOrderRequest) { | |||||
return new ResponseData<>(payService.createPayOrder(generateOrderRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付单信息查询接口", notes = "根据商户号订单编号查询预付单信息方法") | |||||
@PostMapping("/queryOrder") | |||||
public ResponseData<PostQueryOrderResponse> queryOrder(@RequestBody PostQueryOrderRequest queryOrderRequest) { | |||||
return new ResponseData<>(payService.queryOrder(queryOrderRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付单取消接口", notes = "根据商户号订单编号取消预付单信息方法") | |||||
@PostMapping("/cancelOrder") | |||||
public ResponseData<PostCancelOrderResponse> cancelOrder(@RequestBody PostCancelOrderRequest cannelOrderRequest) { | |||||
return new ResponseData<>(payService.cancelOrder(cannelOrderRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付单退款申请接口", notes = "根据商户号订申请退款方法") | |||||
@PostMapping("/refundOrder") | |||||
public ResponseData<PostRefundOrderResponse> refundOrder(@RequestBody PostRefundOrderRequest refundOrderRequest) { | |||||
return new ResponseData<>(payService.refundOrder(refundOrderRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方支付单撤销接口", notes = "根据商户号订单编号撤销预付单信息方法") | |||||
@PostMapping("/reverseOrder") | |||||
public ResponseData<PostReverseOrderResponse> reverseOrder(@RequestBody PostReverseOrderRequest reverseOrderRequest) { | |||||
return new ResponseData<>(payService.reverseOrder(reverseOrderRequest)); | |||||
} | |||||
@ApiOperation(value = "第三方人脸支付初始化接口", notes = "人脸支付初始化方法") | |||||
@PostMapping("/initFacePay") | |||||
public ResponseData<PostInitFacePayResponse> initFacePay(@RequestBody PostInitFacePayRequest initFacePayRequest){ | |||||
return new ResponseData<>(payService.initFacePay(initFacePayRequest)); | |||||
} | |||||
} | |||||
@@ -0,0 +1,33 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.payment.service.UnionPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.utils.HttpClientUtils; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
import javax.servlet.http.HttpServletResponse; | |||||
import java.util.Map; | |||||
@RestController | |||||
@RequestMapping(path = "/unionPayNotify") | |||||
public class UnionPayNotifyController { | |||||
@Autowired | |||||
private UnionPayNotifyService unionPayNotifyService; | |||||
/** | |||||
* 微信支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String weixinPayNotify(HttpServletRequest request){ | |||||
Map<String,String> notifyMapData = HttpClientUtils.getUnionPayDataFromRequest(request); | |||||
return unionPayNotifyService.unionPayNotifyDataHandle(notifyMapData); | |||||
} | |||||
} | |||||
@@ -0,0 +1,45 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.google.common.collect.Maps; | |||||
import com.neusoft.smart.pos.payment.service.WXPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.utils.HttpClientUtils; | |||||
import com.neusoft.smart.pos.payment.utils.WXPayUtils; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
import java.util.Map; | |||||
@RestController | |||||
@RequestMapping(path = "/wxPayNotify") | |||||
public class WXPayNotifyController { | |||||
@Autowired | |||||
private WXPayNotifyService wxPayNotifyService; | |||||
/** | |||||
* 微信支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String weixinPayNotify(HttpServletRequest request){ | |||||
String notifyXmlData = HttpClientUtils.getStringDataFromRequest(request); | |||||
return wxPayNotifyService.weixinNotifyDataHandle(notifyXmlData); | |||||
} | |||||
/** | |||||
* 微信支付退款成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "refundNotify") | |||||
public String weixinRefundNotify(HttpServletRequest request){ | |||||
String notifyXmlData = HttpClientUtils.getStringDataFromRequest(request); | |||||
return wxPayNotifyService.weixinRefundNotifyDataHandle(notifyXmlData); | |||||
} | |||||
} | |||||
@@ -0,0 +1,43 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.payment.service.WXPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.service.WXUsPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.utils.HttpClientUtils; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
@RestController | |||||
@RequestMapping(path = "/wxUsPayNotify") | |||||
public class WXUsPayNotifyController { | |||||
@Autowired | |||||
private WXUsPayNotifyService wxPayNotifyService; | |||||
/** | |||||
* 微信支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String weixinPayNotify(HttpServletRequest request){ | |||||
String notifyXmlData = HttpClientUtils.getStringDataFromRequest(request); | |||||
return wxPayNotifyService.weixinNotifyDataHandle(notifyXmlData); | |||||
} | |||||
/** | |||||
* 微信支付退款成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "refundNotify") | |||||
public String weixinRefundNotify(HttpServletRequest request){ | |||||
String notifyXmlData = HttpClientUtils.getStringDataFromRequest(request); | |||||
return wxPayNotifyService.weixinRefundNotifyDataHandle(notifyXmlData); | |||||
} | |||||
} | |||||
@@ -0,0 +1,31 @@ | |||||
package com.neusoft.smart.pos.payment.controller; | |||||
import com.neusoft.smart.pos.payment.service.XYHFPayNotifyService; | |||||
import com.neusoft.smart.pos.payment.utils.HttpClientUtils; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import springfox.documentation.annotations.ApiIgnore; | |||||
import javax.servlet.http.HttpServletRequest; | |||||
@RestController | |||||
@RequestMapping(path = "/xyhfPayNotify") | |||||
public class XYHFPayNotifyController { | |||||
@Autowired | |||||
private XYHFPayNotifyService xyhfPayNotifyService; | |||||
/** | |||||
* 银联商务支付成功回调方法 | |||||
* @return | |||||
*/ | |||||
@ApiIgnore | |||||
@RequestMapping(value = "payNotify") | |||||
public String xyhfPayNotify(HttpServletRequest request){ | |||||
String requestStr = HttpClientUtils.getStringDataFromRequest(request); | |||||
return xyhfPayNotifyService.xyhfNotifyDataHandle(requestStr); | |||||
} | |||||
} | |||||
@@ -0,0 +1,308 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class GrantPayOrder implements Serializable { | |||||
private Integer id; | |||||
private String mcode; | |||||
private String mOrderNumber; | |||||
private String mPayOrderNumber; | |||||
private String tradeId; | |||||
private String outerOrderNumber; | |||||
private String outerPayOrderNumber; | |||||
private String authNo; | |||||
private String payerUserId; | |||||
private String description; | |||||
private String payType; | |||||
private Long payAmount; | |||||
private Long grantAmount; | |||||
private Long unfreezeAmount; | |||||
private String notifyUrl; | |||||
private String grantStatus; | |||||
private String timeExpire; | |||||
private Date payTime; | |||||
private String scanCode; | |||||
private String codeUrl; | |||||
private String payIp; | |||||
private String openId; | |||||
private String tradeType; | |||||
private Date grantTime; | |||||
private Date ungrantTime; | |||||
private Date reverseTime; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getmOrderNumber() { | |||||
return mOrderNumber; | |||||
} | |||||
public void setmOrderNumber(String mOrderNumber) { | |||||
this.mOrderNumber = mOrderNumber == null ? null : mOrderNumber.trim(); | |||||
} | |||||
public String getmPayOrderNumber() { | |||||
return mPayOrderNumber; | |||||
} | |||||
public void setmPayOrderNumber(String mPayOrderNumber) { | |||||
this.mPayOrderNumber = mPayOrderNumber == null ? null : mPayOrderNumber.trim(); | |||||
} | |||||
public String getTradeId() { | |||||
return tradeId; | |||||
} | |||||
public void setTradeId(String tradeId) { | |||||
this.tradeId = tradeId == null ? null : tradeId.trim(); | |||||
} | |||||
public String getOuterOrderNumber() { | |||||
return outerOrderNumber; | |||||
} | |||||
public void setOuterOrderNumber(String outerOrderNumber) { | |||||
this.outerOrderNumber = outerOrderNumber == null ? null : outerOrderNumber.trim(); | |||||
} | |||||
public String getOuterPayOrderNumber() { | |||||
return outerPayOrderNumber; | |||||
} | |||||
public void setOuterPayOrderNumber(String outerPayOrderNumber) { | |||||
this.outerPayOrderNumber = outerPayOrderNumber == null ? null : outerPayOrderNumber.trim(); | |||||
} | |||||
public String getAuthNo() { | |||||
return authNo; | |||||
} | |||||
public void setAuthNo(String authNo) { | |||||
this.authNo = authNo == null ? null : authNo.trim(); | |||||
} | |||||
public String getPayerUserId() { | |||||
return payerUserId; | |||||
} | |||||
public void setPayerUserId(String payerUserId) { | |||||
this.payerUserId = payerUserId == null ? null : payerUserId.trim(); | |||||
} | |||||
public String getDescription() { | |||||
return description; | |||||
} | |||||
public void setDescription(String description) { | |||||
this.description = description == null ? null : description.trim(); | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public Long getPayAmount() { | |||||
return payAmount; | |||||
} | |||||
public void setPayAmount(Long payAmount) { | |||||
this.payAmount = payAmount; | |||||
} | |||||
public Long getGrantAmount() { | |||||
return grantAmount; | |||||
} | |||||
public void setGrantAmount(Long grantAmount) { | |||||
this.grantAmount = grantAmount; | |||||
} | |||||
public Long getUnfreezeAmount() { | |||||
return unfreezeAmount; | |||||
} | |||||
public void setUnfreezeAmount(Long unfreezeAmount) { | |||||
this.unfreezeAmount = unfreezeAmount; | |||||
} | |||||
public String getNotifyUrl() { | |||||
return notifyUrl; | |||||
} | |||||
public void setNotifyUrl(String notifyUrl) { | |||||
this.notifyUrl = notifyUrl == null ? null : notifyUrl.trim(); | |||||
} | |||||
public String getGrantStatus() { | |||||
return grantStatus; | |||||
} | |||||
public void setGrantStatus(String grantStatus) { | |||||
this.grantStatus = grantStatus == null ? null : grantStatus.trim(); | |||||
} | |||||
public String getTimeExpire() { | |||||
return timeExpire; | |||||
} | |||||
public void setTimeExpire(String timeExpire) { | |||||
this.timeExpire = timeExpire == null ? null : timeExpire.trim(); | |||||
} | |||||
public Date getPayTime() { | |||||
return payTime; | |||||
} | |||||
public void setPayTime(Date payTime) { | |||||
this.payTime = payTime; | |||||
} | |||||
public String getScanCode() { | |||||
return scanCode; | |||||
} | |||||
public void setScanCode(String scanCode) { | |||||
this.scanCode = scanCode == null ? null : scanCode.trim(); | |||||
} | |||||
public String getCodeUrl() { | |||||
return codeUrl; | |||||
} | |||||
public void setCodeUrl(String codeUrl) { | |||||
this.codeUrl = codeUrl == null ? null : codeUrl.trim(); | |||||
} | |||||
public String getPayIp() { | |||||
return payIp; | |||||
} | |||||
public void setPayIp(String payIp) { | |||||
this.payIp = payIp == null ? null : payIp.trim(); | |||||
} | |||||
public String getOpenId() { | |||||
return openId; | |||||
} | |||||
public void setOpenId(String openId) { | |||||
this.openId = openId == null ? null : openId.trim(); | |||||
} | |||||
public String getTradeType() { | |||||
return tradeType; | |||||
} | |||||
public void setTradeType(String tradeType) { | |||||
this.tradeType = tradeType == null ? null : tradeType.trim(); | |||||
} | |||||
public Date getGrantTime() { | |||||
return grantTime; | |||||
} | |||||
public void setGrantTime(Date grantTime) { | |||||
this.grantTime = grantTime; | |||||
} | |||||
public Date getUngrantTime() { | |||||
return ungrantTime; | |||||
} | |||||
public void setUngrantTime(Date ungrantTime) { | |||||
this.ungrantTime = ungrantTime; | |||||
} | |||||
public Date getReverseTime() { | |||||
return reverseTime; | |||||
} | |||||
public void setReverseTime(Date reverseTime) { | |||||
this.reverseTime = reverseTime; | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,208 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class MchPayChannel implements Serializable { | |||||
private Integer id; | |||||
private Integer userNumber; | |||||
private String mcode; | |||||
private String payType; | |||||
private String appid; | |||||
private String mchId; | |||||
private String subAppid; | |||||
private String subMchId; | |||||
private String secretKey; | |||||
private String appSecretKey; | |||||
private String privateKey; | |||||
private String publicKey; | |||||
private String notifyUrl; | |||||
private String refundNotifyUrl; | |||||
private String isEnable; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private byte[] cert; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public Integer getUserNumber() { | |||||
return userNumber; | |||||
} | |||||
public void setUserNumber(Integer userNumber) { | |||||
this.userNumber = userNumber; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public String getAppid() { | |||||
return appid; | |||||
} | |||||
public void setAppid(String appid) { | |||||
this.appid = appid == null ? null : appid.trim(); | |||||
} | |||||
public String getMchId() { | |||||
return mchId; | |||||
} | |||||
public void setMchId(String mchId) { | |||||
this.mchId = mchId == null ? null : mchId.trim(); | |||||
} | |||||
public String getSubAppid() { | |||||
return subAppid; | |||||
} | |||||
public void setSubAppid(String subAppid) { | |||||
this.subAppid = subAppid == null ? null : subAppid.trim(); | |||||
} | |||||
public String getSubMchId() { | |||||
return subMchId; | |||||
} | |||||
public void setSubMchId(String subMchId) { | |||||
this.subMchId = subMchId == null ? null : subMchId.trim(); | |||||
} | |||||
public String getSecretKey() { | |||||
return secretKey; | |||||
} | |||||
public void setSecretKey(String secretKey) { | |||||
this.secretKey = secretKey == null ? null : secretKey.trim(); | |||||
} | |||||
public String getAppSecretKey() { | |||||
return appSecretKey; | |||||
} | |||||
public void setAppSecretKey(String appSecretKey) { | |||||
this.appSecretKey = appSecretKey == null ? null : appSecretKey.trim(); | |||||
} | |||||
public String getPrivateKey() { | |||||
return privateKey; | |||||
} | |||||
public void setPrivateKey(String privateKey) { | |||||
this.privateKey = privateKey == null ? null : privateKey.trim(); | |||||
} | |||||
public String getPublicKey() { | |||||
return publicKey; | |||||
} | |||||
public void setPublicKey(String publicKey) { | |||||
this.publicKey = publicKey == null ? null : publicKey.trim(); | |||||
} | |||||
public String getNotifyUrl() { | |||||
return notifyUrl; | |||||
} | |||||
public void setNotifyUrl(String notifyUrl) { | |||||
this.notifyUrl = notifyUrl == null ? null : notifyUrl.trim(); | |||||
} | |||||
public String getRefundNotifyUrl() { | |||||
return refundNotifyUrl; | |||||
} | |||||
public void setRefundNotifyUrl(String refundNotifyUrl) { | |||||
this.refundNotifyUrl = refundNotifyUrl == null ? null : refundNotifyUrl.trim(); | |||||
} | |||||
public String getIsEnable() { | |||||
return isEnable; | |||||
} | |||||
public void setIsEnable(String isEnable) { | |||||
this.isEnable = isEnable == null ? null : isEnable.trim(); | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
public byte[] getCert() { | |||||
return cert; | |||||
} | |||||
public void setCert(byte[] cert) { | |||||
this.cert = cert; | |||||
} | |||||
} |
@@ -0,0 +1,118 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class MchPayInfo implements Serializable { | |||||
private Integer id; | |||||
private Integer userNumber; | |||||
private String mcode; | |||||
private String secretKey; | |||||
private String mchName; | |||||
private String applyType; | |||||
private String mchStatus; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public Integer getUserNumber() { | |||||
return userNumber; | |||||
} | |||||
public void setUserNumber(Integer userNumber) { | |||||
this.userNumber = userNumber; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getSecretKey() { | |||||
return secretKey; | |||||
} | |||||
public void setSecretKey(String secretKey) { | |||||
this.secretKey = secretKey == null ? null : secretKey.trim(); | |||||
} | |||||
public String getMchName() { | |||||
return mchName; | |||||
} | |||||
public void setMchName(String mchName) { | |||||
this.mchName = mchName == null ? null : mchName.trim(); | |||||
} | |||||
public String getApplyType() { | |||||
return applyType; | |||||
} | |||||
public void setApplyType(String applyType) { | |||||
this.applyType = applyType == null ? null : applyType.trim(); | |||||
} | |||||
public String getMchStatus() { | |||||
return mchStatus; | |||||
} | |||||
public void setMchStatus(String mchStatus) { | |||||
this.mchStatus = mchStatus == null ? null : mchStatus.trim(); | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,959 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.util.ArrayList; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
public class MchPayInfoExample { | |||||
protected String orderByClause; | |||||
protected boolean distinct; | |||||
protected List<Criteria> oredCriteria; | |||||
private Integer offset; | |||||
private Integer limit; | |||||
public MchPayInfoExample() { | |||||
oredCriteria = new ArrayList<Criteria>(); | |||||
} | |||||
public void setOrderByClause(String orderByClause) { | |||||
this.orderByClause = orderByClause; | |||||
} | |||||
public String getOrderByClause() { | |||||
return orderByClause; | |||||
} | |||||
public void setDistinct(boolean distinct) { | |||||
this.distinct = distinct; | |||||
} | |||||
public boolean isDistinct() { | |||||
return distinct; | |||||
} | |||||
public List<Criteria> getOredCriteria() { | |||||
return oredCriteria; | |||||
} | |||||
public void or(Criteria criteria) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
public Criteria or() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
oredCriteria.add(criteria); | |||||
return criteria; | |||||
} | |||||
public Criteria createCriteria() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
if (oredCriteria.size() == 0) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
return criteria; | |||||
} | |||||
protected Criteria createCriteriaInternal() { | |||||
Criteria criteria = new Criteria(); | |||||
return criteria; | |||||
} | |||||
public void clear() { | |||||
oredCriteria.clear(); | |||||
orderByClause = null; | |||||
distinct = false; | |||||
this.offset = null; | |||||
this.limit = null; | |||||
} | |||||
public Integer getOffset() { | |||||
return this.offset; | |||||
} | |||||
public void setOffset(Integer offset) { | |||||
this.offset = offset; | |||||
} | |||||
public Integer getLimit() { | |||||
return this.limit; | |||||
} | |||||
public void setLimit(Integer limit) { | |||||
this.limit = limit; | |||||
} | |||||
public MchPayInfoExample page(int offset, int limit) { | |||||
this.offset = offset; | |||||
this.limit = limit; | |||||
return this; | |||||
} | |||||
protected abstract static class GeneratedCriteria { | |||||
protected List<Criterion> criteria; | |||||
protected GeneratedCriteria() { | |||||
super(); | |||||
criteria = new ArrayList<Criterion>(); | |||||
} | |||||
public boolean isValid() { | |||||
return criteria.size() > 0; | |||||
} | |||||
public List<Criterion> getAllCriteria() { | |||||
return criteria; | |||||
} | |||||
public List<Criterion> getCriteria() { | |||||
return criteria; | |||||
} | |||||
protected void addCriterion(String condition) { | |||||
if (condition == null) { | |||||
throw new RuntimeException("Value for condition cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition)); | |||||
} | |||||
protected void addCriterion(String condition, Object value, String property) { | |||||
if (value == null) { | |||||
throw new RuntimeException("Value for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value)); | |||||
} | |||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { | |||||
if (value1 == null || value2 == null) { | |||||
throw new RuntimeException("Between values for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value1, value2)); | |||||
} | |||||
public Criteria andIdIsNull() { | |||||
addCriterion("id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIsNotNull() { | |||||
addCriterion("id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdEqualTo(Integer value) { | |||||
addCriterion("id =", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotEqualTo(Integer value) { | |||||
addCriterion("id <>", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThan(Integer value) { | |||||
addCriterion("id >", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) { | |||||
addCriterion("id >=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThan(Integer value) { | |||||
addCriterion("id <", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThanOrEqualTo(Integer value) { | |||||
addCriterion("id <=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIn(List<Integer> values) { | |||||
addCriterion("id in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotIn(List<Integer> values) { | |||||
addCriterion("id not in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdBetween(Integer value1, Integer value2) { | |||||
addCriterion("id between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotBetween(Integer value1, Integer value2) { | |||||
addCriterion("id not between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberIsNull() { | |||||
addCriterion("user_number is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberIsNotNull() { | |||||
addCriterion("user_number is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberEqualTo(Integer value) { | |||||
addCriterion("user_number =", value, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberNotEqualTo(Integer value) { | |||||
addCriterion("user_number <>", value, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberGreaterThan(Integer value) { | |||||
addCriterion("user_number >", value, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberGreaterThanOrEqualTo(Integer value) { | |||||
addCriterion("user_number >=", value, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberLessThan(Integer value) { | |||||
addCriterion("user_number <", value, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberLessThanOrEqualTo(Integer value) { | |||||
addCriterion("user_number <=", value, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberIn(List<Integer> values) { | |||||
addCriterion("user_number in", values, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberNotIn(List<Integer> values) { | |||||
addCriterion("user_number not in", values, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberBetween(Integer value1, Integer value2) { | |||||
addCriterion("user_number between", value1, value2, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUserNumberNotBetween(Integer value1, Integer value2) { | |||||
addCriterion("user_number not between", value1, value2, "userNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIsNull() { | |||||
addCriterion("mcode is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIsNotNull() { | |||||
addCriterion("mcode is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeEqualTo(String value) { | |||||
addCriterion("mcode =", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotEqualTo(String value) { | |||||
addCriterion("mcode <>", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeGreaterThan(String value) { | |||||
addCriterion("mcode >", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("mcode >=", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLessThan(String value) { | |||||
addCriterion("mcode <", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLessThanOrEqualTo(String value) { | |||||
addCriterion("mcode <=", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLike(String value) { | |||||
addCriterion("mcode like", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotLike(String value) { | |||||
addCriterion("mcode not like", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIn(List<String> values) { | |||||
addCriterion("mcode in", values, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotIn(List<String> values) { | |||||
addCriterion("mcode not in", values, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeBetween(String value1, String value2) { | |||||
addCriterion("mcode between", value1, value2, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotBetween(String value1, String value2) { | |||||
addCriterion("mcode not between", value1, value2, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyIsNull() { | |||||
addCriterion("secret_key is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyIsNotNull() { | |||||
addCriterion("secret_key is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyEqualTo(String value) { | |||||
addCriterion("secret_key =", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyNotEqualTo(String value) { | |||||
addCriterion("secret_key <>", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyGreaterThan(String value) { | |||||
addCriterion("secret_key >", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyGreaterThanOrEqualTo(String value) { | |||||
addCriterion("secret_key >=", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyLessThan(String value) { | |||||
addCriterion("secret_key <", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyLessThanOrEqualTo(String value) { | |||||
addCriterion("secret_key <=", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyLike(String value) { | |||||
addCriterion("secret_key like", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyNotLike(String value) { | |||||
addCriterion("secret_key not like", value, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyIn(List<String> values) { | |||||
addCriterion("secret_key in", values, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyNotIn(List<String> values) { | |||||
addCriterion("secret_key not in", values, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyBetween(String value1, String value2) { | |||||
addCriterion("secret_key between", value1, value2, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andSecretKeyNotBetween(String value1, String value2) { | |||||
addCriterion("secret_key not between", value1, value2, "secretKey"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameIsNull() { | |||||
addCriterion("mch_name is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameIsNotNull() { | |||||
addCriterion("mch_name is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameEqualTo(String value) { | |||||
addCriterion("mch_name =", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameNotEqualTo(String value) { | |||||
addCriterion("mch_name <>", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameGreaterThan(String value) { | |||||
addCriterion("mch_name >", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameGreaterThanOrEqualTo(String value) { | |||||
addCriterion("mch_name >=", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameLessThan(String value) { | |||||
addCriterion("mch_name <", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameLessThanOrEqualTo(String value) { | |||||
addCriterion("mch_name <=", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameLike(String value) { | |||||
addCriterion("mch_name like", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameNotLike(String value) { | |||||
addCriterion("mch_name not like", value, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameIn(List<String> values) { | |||||
addCriterion("mch_name in", values, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameNotIn(List<String> values) { | |||||
addCriterion("mch_name not in", values, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameBetween(String value1, String value2) { | |||||
addCriterion("mch_name between", value1, value2, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchNameNotBetween(String value1, String value2) { | |||||
addCriterion("mch_name not between", value1, value2, "mchName"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeIsNull() { | |||||
addCriterion("apply_type is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeIsNotNull() { | |||||
addCriterion("apply_type is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeEqualTo(String value) { | |||||
addCriterion("apply_type =", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeNotEqualTo(String value) { | |||||
addCriterion("apply_type <>", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeGreaterThan(String value) { | |||||
addCriterion("apply_type >", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("apply_type >=", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeLessThan(String value) { | |||||
addCriterion("apply_type <", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeLessThanOrEqualTo(String value) { | |||||
addCriterion("apply_type <=", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeLike(String value) { | |||||
addCriterion("apply_type like", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeNotLike(String value) { | |||||
addCriterion("apply_type not like", value, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeIn(List<String> values) { | |||||
addCriterion("apply_type in", values, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeNotIn(List<String> values) { | |||||
addCriterion("apply_type not in", values, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeBetween(String value1, String value2) { | |||||
addCriterion("apply_type between", value1, value2, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andApplyTypeNotBetween(String value1, String value2) { | |||||
addCriterion("apply_type not between", value1, value2, "applyType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusIsNull() { | |||||
addCriterion("mch_status is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusIsNotNull() { | |||||
addCriterion("mch_status is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusEqualTo(String value) { | |||||
addCriterion("mch_status =", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusNotEqualTo(String value) { | |||||
addCriterion("mch_status <>", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusGreaterThan(String value) { | |||||
addCriterion("mch_status >", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusGreaterThanOrEqualTo(String value) { | |||||
addCriterion("mch_status >=", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusLessThan(String value) { | |||||
addCriterion("mch_status <", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusLessThanOrEqualTo(String value) { | |||||
addCriterion("mch_status <=", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusLike(String value) { | |||||
addCriterion("mch_status like", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusNotLike(String value) { | |||||
addCriterion("mch_status not like", value, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusIn(List<String> values) { | |||||
addCriterion("mch_status in", values, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusNotIn(List<String> values) { | |||||
addCriterion("mch_status not in", values, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusBetween(String value1, String value2) { | |||||
addCriterion("mch_status between", value1, value2, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMchStatusNotBetween(String value1, String value2) { | |||||
addCriterion("mch_status not between", value1, value2, "mchStatus"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIsNull() { | |||||
addCriterion("created_at is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIsNotNull() { | |||||
addCriterion("created_at is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtEqualTo(Date value) { | |||||
addCriterion("created_at =", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotEqualTo(Date value) { | |||||
addCriterion("created_at <>", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtGreaterThan(Date value) { | |||||
addCriterion("created_at >", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("created_at >=", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtLessThan(Date value) { | |||||
addCriterion("created_at <", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { | |||||
addCriterion("created_at <=", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIn(List<Date> values) { | |||||
addCriterion("created_at in", values, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotIn(List<Date> values) { | |||||
addCriterion("created_at not in", values, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtBetween(Date value1, Date value2) { | |||||
addCriterion("created_at between", value1, value2, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { | |||||
addCriterion("created_at not between", value1, value2, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIsNull() { | |||||
addCriterion("created_by is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIsNotNull() { | |||||
addCriterion("created_by is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByEqualTo(String value) { | |||||
addCriterion("created_by =", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotEqualTo(String value) { | |||||
addCriterion("created_by <>", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByGreaterThan(String value) { | |||||
addCriterion("created_by >", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByGreaterThanOrEqualTo(String value) { | |||||
addCriterion("created_by >=", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLessThan(String value) { | |||||
addCriterion("created_by <", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLessThanOrEqualTo(String value) { | |||||
addCriterion("created_by <=", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLike(String value) { | |||||
addCriterion("created_by like", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotLike(String value) { | |||||
addCriterion("created_by not like", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIn(List<String> values) { | |||||
addCriterion("created_by in", values, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotIn(List<String> values) { | |||||
addCriterion("created_by not in", values, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByBetween(String value1, String value2) { | |||||
addCriterion("created_by between", value1, value2, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotBetween(String value1, String value2) { | |||||
addCriterion("created_by not between", value1, value2, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIsNull() { | |||||
addCriterion("updated_by is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIsNotNull() { | |||||
addCriterion("updated_by is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByEqualTo(String value) { | |||||
addCriterion("updated_by =", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotEqualTo(String value) { | |||||
addCriterion("updated_by <>", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByGreaterThan(String value) { | |||||
addCriterion("updated_by >", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByGreaterThanOrEqualTo(String value) { | |||||
addCriterion("updated_by >=", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLessThan(String value) { | |||||
addCriterion("updated_by <", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLessThanOrEqualTo(String value) { | |||||
addCriterion("updated_by <=", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLike(String value) { | |||||
addCriterion("updated_by like", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotLike(String value) { | |||||
addCriterion("updated_by not like", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIn(List<String> values) { | |||||
addCriterion("updated_by in", values, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotIn(List<String> values) { | |||||
addCriterion("updated_by not in", values, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByBetween(String value1, String value2) { | |||||
addCriterion("updated_by between", value1, value2, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotBetween(String value1, String value2) { | |||||
addCriterion("updated_by not between", value1, value2, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIsNull() { | |||||
addCriterion("updated_at is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIsNotNull() { | |||||
addCriterion("updated_at is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtEqualTo(Date value) { | |||||
addCriterion("updated_at =", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotEqualTo(Date value) { | |||||
addCriterion("updated_at <>", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtGreaterThan(Date value) { | |||||
addCriterion("updated_at >", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("updated_at >=", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtLessThan(Date value) { | |||||
addCriterion("updated_at <", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { | |||||
addCriterion("updated_at <=", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIn(List<Date> values) { | |||||
addCriterion("updated_at in", values, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotIn(List<Date> values) { | |||||
addCriterion("updated_at not in", values, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { | |||||
addCriterion("updated_at between", value1, value2, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { | |||||
addCriterion("updated_at not between", value1, value2, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
} | |||||
public static class Criteria extends GeneratedCriteria { | |||||
protected Criteria() { | |||||
super(); | |||||
} | |||||
} | |||||
public static class Criterion { | |||||
private String condition; | |||||
private Object value; | |||||
private Object secondValue; | |||||
private boolean noValue; | |||||
private boolean singleValue; | |||||
private boolean betweenValue; | |||||
private boolean listValue; | |||||
private String typeHandler; | |||||
public String getCondition() { | |||||
return condition; | |||||
} | |||||
public Object getValue() { | |||||
return value; | |||||
} | |||||
public Object getSecondValue() { | |||||
return secondValue; | |||||
} | |||||
public boolean isNoValue() { | |||||
return noValue; | |||||
} | |||||
public boolean isSingleValue() { | |||||
return singleValue; | |||||
} | |||||
public boolean isBetweenValue() { | |||||
return betweenValue; | |||||
} | |||||
public boolean isListValue() { | |||||
return listValue; | |||||
} | |||||
public String getTypeHandler() { | |||||
return typeHandler; | |||||
} | |||||
protected Criterion(String condition) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.typeHandler = null; | |||||
this.noValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.typeHandler = typeHandler; | |||||
if (value instanceof List<?>) { | |||||
this.listValue = true; | |||||
} else { | |||||
this.singleValue = true; | |||||
} | |||||
} | |||||
protected Criterion(String condition, Object value) { | |||||
this(condition, value, null); | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.secondValue = secondValue; | |||||
this.typeHandler = typeHandler; | |||||
this.betweenValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue) { | |||||
this(condition, value, secondValue, null); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,108 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class MchPaymentTradeLog implements Serializable { | |||||
private Integer id; | |||||
private String mcode; | |||||
private String mOrderNumber; | |||||
private String payType; | |||||
private String description; | |||||
private String requestType; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getmOrderNumber() { | |||||
return mOrderNumber; | |||||
} | |||||
public void setmOrderNumber(String mOrderNumber) { | |||||
this.mOrderNumber = mOrderNumber == null ? null : mOrderNumber.trim(); | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public String getDescription() { | |||||
return description; | |||||
} | |||||
public void setDescription(String description) { | |||||
this.description = description == null ? null : description.trim(); | |||||
} | |||||
public String getRequestType() { | |||||
return requestType; | |||||
} | |||||
public void setRequestType(String requestType) { | |||||
this.requestType = requestType == null ? null : requestType.trim(); | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,899 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.util.ArrayList; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
public class MchPaymentTradeLogExample { | |||||
protected String orderByClause; | |||||
protected boolean distinct; | |||||
protected List<Criteria> oredCriteria; | |||||
private Integer offset; | |||||
private Integer limit; | |||||
public MchPaymentTradeLogExample() { | |||||
oredCriteria = new ArrayList<Criteria>(); | |||||
} | |||||
public void setOrderByClause(String orderByClause) { | |||||
this.orderByClause = orderByClause; | |||||
} | |||||
public String getOrderByClause() { | |||||
return orderByClause; | |||||
} | |||||
public void setDistinct(boolean distinct) { | |||||
this.distinct = distinct; | |||||
} | |||||
public boolean isDistinct() { | |||||
return distinct; | |||||
} | |||||
public List<Criteria> getOredCriteria() { | |||||
return oredCriteria; | |||||
} | |||||
public void or(Criteria criteria) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
public Criteria or() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
oredCriteria.add(criteria); | |||||
return criteria; | |||||
} | |||||
public Criteria createCriteria() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
if (oredCriteria.size() == 0) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
return criteria; | |||||
} | |||||
protected Criteria createCriteriaInternal() { | |||||
Criteria criteria = new Criteria(); | |||||
return criteria; | |||||
} | |||||
public void clear() { | |||||
oredCriteria.clear(); | |||||
orderByClause = null; | |||||
distinct = false; | |||||
this.offset = null; | |||||
this.limit = null; | |||||
} | |||||
public Integer getOffset() { | |||||
return this.offset; | |||||
} | |||||
public void setOffset(Integer offset) { | |||||
this.offset = offset; | |||||
} | |||||
public Integer getLimit() { | |||||
return this.limit; | |||||
} | |||||
public void setLimit(Integer limit) { | |||||
this.limit = limit; | |||||
} | |||||
public MchPaymentTradeLogExample page(int offset, int limit) { | |||||
this.offset = offset; | |||||
this.limit = limit; | |||||
return this; | |||||
} | |||||
protected abstract static class GeneratedCriteria { | |||||
protected List<Criterion> criteria; | |||||
protected GeneratedCriteria() { | |||||
super(); | |||||
criteria = new ArrayList<Criterion>(); | |||||
} | |||||
public boolean isValid() { | |||||
return criteria.size() > 0; | |||||
} | |||||
public List<Criterion> getAllCriteria() { | |||||
return criteria; | |||||
} | |||||
public List<Criterion> getCriteria() { | |||||
return criteria; | |||||
} | |||||
protected void addCriterion(String condition) { | |||||
if (condition == null) { | |||||
throw new RuntimeException("Value for condition cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition)); | |||||
} | |||||
protected void addCriterion(String condition, Object value, String property) { | |||||
if (value == null) { | |||||
throw new RuntimeException("Value for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value)); | |||||
} | |||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { | |||||
if (value1 == null || value2 == null) { | |||||
throw new RuntimeException("Between values for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value1, value2)); | |||||
} | |||||
public Criteria andIdIsNull() { | |||||
addCriterion("id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIsNotNull() { | |||||
addCriterion("id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdEqualTo(Integer value) { | |||||
addCriterion("id =", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotEqualTo(Integer value) { | |||||
addCriterion("id <>", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThan(Integer value) { | |||||
addCriterion("id >", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) { | |||||
addCriterion("id >=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThan(Integer value) { | |||||
addCriterion("id <", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThanOrEqualTo(Integer value) { | |||||
addCriterion("id <=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIn(List<Integer> values) { | |||||
addCriterion("id in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotIn(List<Integer> values) { | |||||
addCriterion("id not in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdBetween(Integer value1, Integer value2) { | |||||
addCriterion("id between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotBetween(Integer value1, Integer value2) { | |||||
addCriterion("id not between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIsNull() { | |||||
addCriterion("mcode is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIsNotNull() { | |||||
addCriterion("mcode is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeEqualTo(String value) { | |||||
addCriterion("mcode =", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotEqualTo(String value) { | |||||
addCriterion("mcode <>", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeGreaterThan(String value) { | |||||
addCriterion("mcode >", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("mcode >=", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLessThan(String value) { | |||||
addCriterion("mcode <", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLessThanOrEqualTo(String value) { | |||||
addCriterion("mcode <=", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLike(String value) { | |||||
addCriterion("mcode like", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotLike(String value) { | |||||
addCriterion("mcode not like", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIn(List<String> values) { | |||||
addCriterion("mcode in", values, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotIn(List<String> values) { | |||||
addCriterion("mcode not in", values, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeBetween(String value1, String value2) { | |||||
addCriterion("mcode between", value1, value2, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotBetween(String value1, String value2) { | |||||
addCriterion("mcode not between", value1, value2, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberIsNull() { | |||||
addCriterion("m_order_number is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberIsNotNull() { | |||||
addCriterion("m_order_number is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberEqualTo(String value) { | |||||
addCriterion("m_order_number =", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotEqualTo(String value) { | |||||
addCriterion("m_order_number <>", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberGreaterThan(String value) { | |||||
addCriterion("m_order_number >", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberGreaterThanOrEqualTo(String value) { | |||||
addCriterion("m_order_number >=", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberLessThan(String value) { | |||||
addCriterion("m_order_number <", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberLessThanOrEqualTo(String value) { | |||||
addCriterion("m_order_number <=", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberLike(String value) { | |||||
addCriterion("m_order_number like", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotLike(String value) { | |||||
addCriterion("m_order_number not like", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberIn(List<String> values) { | |||||
addCriterion("m_order_number in", values, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotIn(List<String> values) { | |||||
addCriterion("m_order_number not in", values, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberBetween(String value1, String value2) { | |||||
addCriterion("m_order_number between", value1, value2, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotBetween(String value1, String value2) { | |||||
addCriterion("m_order_number not between", value1, value2, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeIsNull() { | |||||
addCriterion("pay_type is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeIsNotNull() { | |||||
addCriterion("pay_type is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeEqualTo(String value) { | |||||
addCriterion("pay_type =", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotEqualTo(String value) { | |||||
addCriterion("pay_type <>", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeGreaterThan(String value) { | |||||
addCriterion("pay_type >", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("pay_type >=", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeLessThan(String value) { | |||||
addCriterion("pay_type <", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeLessThanOrEqualTo(String value) { | |||||
addCriterion("pay_type <=", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeLike(String value) { | |||||
addCriterion("pay_type like", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotLike(String value) { | |||||
addCriterion("pay_type not like", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeIn(List<String> values) { | |||||
addCriterion("pay_type in", values, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotIn(List<String> values) { | |||||
addCriterion("pay_type not in", values, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeBetween(String value1, String value2) { | |||||
addCriterion("pay_type between", value1, value2, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotBetween(String value1, String value2) { | |||||
addCriterion("pay_type not between", value1, value2, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionIsNull() { | |||||
addCriterion("description is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionIsNotNull() { | |||||
addCriterion("description is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionEqualTo(String value) { | |||||
addCriterion("description =", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotEqualTo(String value) { | |||||
addCriterion("description <>", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionGreaterThan(String value) { | |||||
addCriterion("description >", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) { | |||||
addCriterion("description >=", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionLessThan(String value) { | |||||
addCriterion("description <", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionLessThanOrEqualTo(String value) { | |||||
addCriterion("description <=", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionLike(String value) { | |||||
addCriterion("description like", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotLike(String value) { | |||||
addCriterion("description not like", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionIn(List<String> values) { | |||||
addCriterion("description in", values, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotIn(List<String> values) { | |||||
addCriterion("description not in", values, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionBetween(String value1, String value2) { | |||||
addCriterion("description between", value1, value2, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotBetween(String value1, String value2) { | |||||
addCriterion("description not between", value1, value2, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeIsNull() { | |||||
addCriterion("request_type is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeIsNotNull() { | |||||
addCriterion("request_type is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeEqualTo(String value) { | |||||
addCriterion("request_type =", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotEqualTo(String value) { | |||||
addCriterion("request_type <>", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeGreaterThan(String value) { | |||||
addCriterion("request_type >", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("request_type >=", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeLessThan(String value) { | |||||
addCriterion("request_type <", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeLessThanOrEqualTo(String value) { | |||||
addCriterion("request_type <=", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeLike(String value) { | |||||
addCriterion("request_type like", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotLike(String value) { | |||||
addCriterion("request_type not like", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeIn(List<String> values) { | |||||
addCriterion("request_type in", values, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotIn(List<String> values) { | |||||
addCriterion("request_type not in", values, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeBetween(String value1, String value2) { | |||||
addCriterion("request_type between", value1, value2, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotBetween(String value1, String value2) { | |||||
addCriterion("request_type not between", value1, value2, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIsNull() { | |||||
addCriterion("created_at is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIsNotNull() { | |||||
addCriterion("created_at is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtEqualTo(Date value) { | |||||
addCriterion("created_at =", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotEqualTo(Date value) { | |||||
addCriterion("created_at <>", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtGreaterThan(Date value) { | |||||
addCriterion("created_at >", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("created_at >=", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtLessThan(Date value) { | |||||
addCriterion("created_at <", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { | |||||
addCriterion("created_at <=", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIn(List<Date> values) { | |||||
addCriterion("created_at in", values, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotIn(List<Date> values) { | |||||
addCriterion("created_at not in", values, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtBetween(Date value1, Date value2) { | |||||
addCriterion("created_at between", value1, value2, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { | |||||
addCriterion("created_at not between", value1, value2, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIsNull() { | |||||
addCriterion("created_by is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIsNotNull() { | |||||
addCriterion("created_by is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByEqualTo(String value) { | |||||
addCriterion("created_by =", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotEqualTo(String value) { | |||||
addCriterion("created_by <>", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByGreaterThan(String value) { | |||||
addCriterion("created_by >", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByGreaterThanOrEqualTo(String value) { | |||||
addCriterion("created_by >=", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLessThan(String value) { | |||||
addCriterion("created_by <", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLessThanOrEqualTo(String value) { | |||||
addCriterion("created_by <=", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLike(String value) { | |||||
addCriterion("created_by like", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotLike(String value) { | |||||
addCriterion("created_by not like", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIn(List<String> values) { | |||||
addCriterion("created_by in", values, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotIn(List<String> values) { | |||||
addCriterion("created_by not in", values, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByBetween(String value1, String value2) { | |||||
addCriterion("created_by between", value1, value2, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotBetween(String value1, String value2) { | |||||
addCriterion("created_by not between", value1, value2, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIsNull() { | |||||
addCriterion("updated_by is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIsNotNull() { | |||||
addCriterion("updated_by is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByEqualTo(String value) { | |||||
addCriterion("updated_by =", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotEqualTo(String value) { | |||||
addCriterion("updated_by <>", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByGreaterThan(String value) { | |||||
addCriterion("updated_by >", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByGreaterThanOrEqualTo(String value) { | |||||
addCriterion("updated_by >=", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLessThan(String value) { | |||||
addCriterion("updated_by <", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLessThanOrEqualTo(String value) { | |||||
addCriterion("updated_by <=", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLike(String value) { | |||||
addCriterion("updated_by like", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotLike(String value) { | |||||
addCriterion("updated_by not like", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIn(List<String> values) { | |||||
addCriterion("updated_by in", values, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotIn(List<String> values) { | |||||
addCriterion("updated_by not in", values, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByBetween(String value1, String value2) { | |||||
addCriterion("updated_by between", value1, value2, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotBetween(String value1, String value2) { | |||||
addCriterion("updated_by not between", value1, value2, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIsNull() { | |||||
addCriterion("updated_at is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIsNotNull() { | |||||
addCriterion("updated_at is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtEqualTo(Date value) { | |||||
addCriterion("updated_at =", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotEqualTo(Date value) { | |||||
addCriterion("updated_at <>", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtGreaterThan(Date value) { | |||||
addCriterion("updated_at >", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("updated_at >=", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtLessThan(Date value) { | |||||
addCriterion("updated_at <", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { | |||||
addCriterion("updated_at <=", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIn(List<Date> values) { | |||||
addCriterion("updated_at in", values, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotIn(List<Date> values) { | |||||
addCriterion("updated_at not in", values, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { | |||||
addCriterion("updated_at between", value1, value2, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { | |||||
addCriterion("updated_at not between", value1, value2, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
} | |||||
public static class Criteria extends GeneratedCriteria { | |||||
protected Criteria() { | |||||
super(); | |||||
} | |||||
} | |||||
public static class Criterion { | |||||
private String condition; | |||||
private Object value; | |||||
private Object secondValue; | |||||
private boolean noValue; | |||||
private boolean singleValue; | |||||
private boolean betweenValue; | |||||
private boolean listValue; | |||||
private String typeHandler; | |||||
public String getCondition() { | |||||
return condition; | |||||
} | |||||
public Object getValue() { | |||||
return value; | |||||
} | |||||
public Object getSecondValue() { | |||||
return secondValue; | |||||
} | |||||
public boolean isNoValue() { | |||||
return noValue; | |||||
} | |||||
public boolean isSingleValue() { | |||||
return singleValue; | |||||
} | |||||
public boolean isBetweenValue() { | |||||
return betweenValue; | |||||
} | |||||
public boolean isListValue() { | |||||
return listValue; | |||||
} | |||||
public String getTypeHandler() { | |||||
return typeHandler; | |||||
} | |||||
protected Criterion(String condition) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.typeHandler = null; | |||||
this.noValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.typeHandler = typeHandler; | |||||
if (value instanceof List<?>) { | |||||
this.listValue = true; | |||||
} else { | |||||
this.singleValue = true; | |||||
} | |||||
} | |||||
protected Criterion(String condition, Object value) { | |||||
this(condition, value, null); | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.secondValue = secondValue; | |||||
this.typeHandler = typeHandler; | |||||
this.betweenValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue) { | |||||
this(condition, value, secondValue, null); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,27 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
public class MchPaymentTradeLogWithBLOBs extends MchPaymentTradeLog implements Serializable { | |||||
private String sendData; | |||||
private String receiveData; | |||||
private static final long serialVersionUID = 1L; | |||||
public String getSendData() { | |||||
return sendData; | |||||
} | |||||
public void setSendData(String sendData) { | |||||
this.sendData = sendData == null ? null : sendData.trim(); | |||||
} | |||||
public String getReceiveData() { | |||||
return receiveData; | |||||
} | |||||
public void setReceiveData(String receiveData) { | |||||
this.receiveData = receiveData == null ? null : receiveData.trim(); | |||||
} | |||||
} |
@@ -0,0 +1,258 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class PayOrder implements Serializable { | |||||
private Integer id; | |||||
private String mcode; | |||||
private String mOrderNumber; | |||||
private String tradeId; | |||||
private String outerOrderNumber; | |||||
private String description; | |||||
private String payType; | |||||
private Long orderAmount; | |||||
private String notifyUrl; | |||||
private String orderStatus; | |||||
private String timeExpire; | |||||
private String payStatus; | |||||
private Date payTime; | |||||
private String scanCode; | |||||
private String codeUrl; | |||||
private String payIp; | |||||
private String openId; | |||||
private String tradeType; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private String deviceId; | |||||
private String storeId; | |||||
private String pid; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getmOrderNumber() { | |||||
return mOrderNumber; | |||||
} | |||||
public void setmOrderNumber(String mOrderNumber) { | |||||
this.mOrderNumber = mOrderNumber == null ? null : mOrderNumber.trim(); | |||||
} | |||||
public String getTradeId() { | |||||
return tradeId; | |||||
} | |||||
public void setTradeId(String tradeId) { | |||||
this.tradeId = tradeId == null ? null : tradeId.trim(); | |||||
} | |||||
public String getOuterOrderNumber() { | |||||
return outerOrderNumber; | |||||
} | |||||
public void setOuterOrderNumber(String outerOrderNumber) { | |||||
this.outerOrderNumber = outerOrderNumber == null ? null : outerOrderNumber.trim(); | |||||
} | |||||
public String getDescription() { | |||||
return description; | |||||
} | |||||
public void setDescription(String description) { | |||||
this.description = description == null ? null : description.trim(); | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public Long getOrderAmount() { | |||||
return orderAmount; | |||||
} | |||||
public void setOrderAmount(Long orderAmount) { | |||||
this.orderAmount = orderAmount; | |||||
} | |||||
public String getNotifyUrl() { | |||||
return notifyUrl; | |||||
} | |||||
public void setNotifyUrl(String notifyUrl) { | |||||
this.notifyUrl = notifyUrl == null ? null : notifyUrl.trim(); | |||||
} | |||||
public String getOrderStatus() { | |||||
return orderStatus; | |||||
} | |||||
public void setOrderStatus(String orderStatus) { | |||||
this.orderStatus = orderStatus == null ? null : orderStatus.trim(); | |||||
} | |||||
public String getTimeExpire() { | |||||
return timeExpire; | |||||
} | |||||
public void setTimeExpire(String timeExpire) { | |||||
this.timeExpire = timeExpire == null ? null : timeExpire.trim(); | |||||
} | |||||
public String getPayStatus() { | |||||
return payStatus; | |||||
} | |||||
public void setPayStatus(String payStatus) { | |||||
this.payStatus = payStatus == null ? null : payStatus.trim(); | |||||
} | |||||
public Date getPayTime() { | |||||
return payTime; | |||||
} | |||||
public void setPayTime(Date payTime) { | |||||
this.payTime = payTime; | |||||
} | |||||
public String getScanCode() { | |||||
return scanCode; | |||||
} | |||||
public void setScanCode(String scanCode) { | |||||
this.scanCode = scanCode == null ? null : scanCode.trim(); | |||||
} | |||||
public String getCodeUrl() { | |||||
return codeUrl; | |||||
} | |||||
public void setCodeUrl(String codeUrl) { | |||||
this.codeUrl = codeUrl == null ? null : codeUrl.trim(); | |||||
} | |||||
public String getPayIp() { | |||||
return payIp; | |||||
} | |||||
public void setPayIp(String payIp) { | |||||
this.payIp = payIp == null ? null : payIp.trim(); | |||||
} | |||||
public String getOpenId() { | |||||
return openId; | |||||
} | |||||
public void setOpenId(String openId) { | |||||
this.openId = openId == null ? null : openId.trim(); | |||||
} | |||||
public String getTradeType() { | |||||
return tradeType; | |||||
} | |||||
public void setTradeType(String tradeType) { | |||||
this.tradeType = tradeType == null ? null : tradeType.trim(); | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
public String getDeviceId() { | |||||
return deviceId; | |||||
} | |||||
public void setDeviceId(String deviceId) { | |||||
this.deviceId = deviceId == null ? null : deviceId.trim(); | |||||
} | |||||
public String getStoreId() { | |||||
return storeId; | |||||
} | |||||
public void setStoreId(String storeId) { | |||||
this.storeId = storeId == null ? null : storeId.trim(); | |||||
} | |||||
public String getPid() { | |||||
return pid; | |||||
} | |||||
public void setPid(String pid) { | |||||
this.pid = pid == null ? null : pid.trim(); | |||||
} | |||||
} |
@@ -0,0 +1,178 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class PayRefundOrder implements Serializable { | |||||
private Integer id; | |||||
private String mcode; | |||||
private String tradeId; | |||||
private String mOrderNumber; | |||||
private String outerOrderNumber; | |||||
private String payType; | |||||
private String refundNotifyUrl; | |||||
private String thirdRefundNumber; | |||||
private String refundNumber; | |||||
private String refundStatus; | |||||
private Long refundedAmount; | |||||
private Date refundedTime; | |||||
private Integer version; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getTradeId() { | |||||
return tradeId; | |||||
} | |||||
public void setTradeId(String tradeId) { | |||||
this.tradeId = tradeId == null ? null : tradeId.trim(); | |||||
} | |||||
public String getmOrderNumber() { | |||||
return mOrderNumber; | |||||
} | |||||
public void setmOrderNumber(String mOrderNumber) { | |||||
this.mOrderNumber = mOrderNumber == null ? null : mOrderNumber.trim(); | |||||
} | |||||
public String getOuterOrderNumber() { | |||||
return outerOrderNumber; | |||||
} | |||||
public void setOuterOrderNumber(String outerOrderNumber) { | |||||
this.outerOrderNumber = outerOrderNumber == null ? null : outerOrderNumber.trim(); | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public String getRefundNotifyUrl() { | |||||
return refundNotifyUrl; | |||||
} | |||||
public void setRefundNotifyUrl(String refundNotifyUrl) { | |||||
this.refundNotifyUrl = refundNotifyUrl == null ? null : refundNotifyUrl.trim(); | |||||
} | |||||
public String getThirdRefundNumber() { | |||||
return thirdRefundNumber; | |||||
} | |||||
public void setThirdRefundNumber(String thirdRefundNumber) { | |||||
this.thirdRefundNumber = thirdRefundNumber == null ? null : thirdRefundNumber.trim(); | |||||
} | |||||
public String getRefundNumber() { | |||||
return refundNumber; | |||||
} | |||||
public void setRefundNumber(String refundNumber) { | |||||
this.refundNumber = refundNumber == null ? null : refundNumber.trim(); | |||||
} | |||||
public String getRefundStatus() { | |||||
return refundStatus; | |||||
} | |||||
public void setRefundStatus(String refundStatus) { | |||||
this.refundStatus = refundStatus == null ? null : refundStatus.trim(); | |||||
} | |||||
public Long getRefundedAmount() { | |||||
return refundedAmount; | |||||
} | |||||
public void setRefundedAmount(Long refundedAmount) { | |||||
this.refundedAmount = refundedAmount; | |||||
} | |||||
public Date getRefundedTime() { | |||||
return refundedTime; | |||||
} | |||||
public void setRefundedTime(Date refundedTime) { | |||||
this.refundedTime = refundedTime; | |||||
} | |||||
public Integer getVersion() { | |||||
return version; | |||||
} | |||||
public void setVersion(Integer version) { | |||||
this.version = version; | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,149 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
public class PayTypeDict implements Serializable { | |||||
private Integer id; | |||||
private String payType; | |||||
private String name; | |||||
private String beanName; | |||||
private String description; | |||||
private BigDecimal payFeeRate; | |||||
private String notifyUrl; | |||||
private String refundNotifyUrl; | |||||
private String isEnable; | |||||
private Byte priority; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public String getName() { | |||||
return name; | |||||
} | |||||
public void setName(String name) { | |||||
this.name = name == null ? null : name.trim(); | |||||
} | |||||
public String getBeanName() { | |||||
return beanName; | |||||
} | |||||
public void setBeanName(String beanName) { | |||||
this.beanName = beanName == null ? null : beanName.trim(); | |||||
} | |||||
public String getDescription() { | |||||
return description; | |||||
} | |||||
public void setDescription(String description) { | |||||
this.description = description == null ? null : description.trim(); | |||||
} | |||||
public BigDecimal getPayFeeRate() { | |||||
return payFeeRate; | |||||
} | |||||
public void setPayFeeRate(BigDecimal payFeeRate) { | |||||
this.payFeeRate = payFeeRate; | |||||
} | |||||
public String getNotifyUrl() { | |||||
return notifyUrl; | |||||
} | |||||
public void setNotifyUrl(String notifyUrl) { | |||||
this.notifyUrl = notifyUrl == null ? null : notifyUrl.trim(); | |||||
} | |||||
public String getRefundNotifyUrl() { | |||||
return refundNotifyUrl; | |||||
} | |||||
public void setRefundNotifyUrl(String refundNotifyUrl) { | |||||
this.refundNotifyUrl = refundNotifyUrl == null ? null : refundNotifyUrl.trim(); | |||||
} | |||||
public String getIsEnable() { | |||||
return isEnable; | |||||
} | |||||
public void setIsEnable(String isEnable) { | |||||
this.isEnable = isEnable == null ? null : isEnable.trim(); | |||||
} | |||||
public Byte getPriority() { | |||||
return priority; | |||||
} | |||||
public void setPriority(Byte priority) { | |||||
this.priority = priority; | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,108 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class PaymentTradeLog implements Serializable { | |||||
private Integer id; | |||||
private String mcode; | |||||
private String mOrderNumber; | |||||
private String payType; | |||||
private String description; | |||||
private String requestType; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getMcode() { | |||||
return mcode; | |||||
} | |||||
public void setMcode(String mcode) { | |||||
this.mcode = mcode == null ? null : mcode.trim(); | |||||
} | |||||
public String getmOrderNumber() { | |||||
return mOrderNumber; | |||||
} | |||||
public void setmOrderNumber(String mOrderNumber) { | |||||
this.mOrderNumber = mOrderNumber == null ? null : mOrderNumber.trim(); | |||||
} | |||||
public String getPayType() { | |||||
return payType; | |||||
} | |||||
public void setPayType(String payType) { | |||||
this.payType = payType == null ? null : payType.trim(); | |||||
} | |||||
public String getDescription() { | |||||
return description; | |||||
} | |||||
public void setDescription(String description) { | |||||
this.description = description == null ? null : description.trim(); | |||||
} | |||||
public String getRequestType() { | |||||
return requestType; | |||||
} | |||||
public void setRequestType(String requestType) { | |||||
this.requestType = requestType == null ? null : requestType.trim(); | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,899 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.util.ArrayList; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
public class PaymentTradeLogExample { | |||||
protected String orderByClause; | |||||
protected boolean distinct; | |||||
protected List<Criteria> oredCriteria; | |||||
private Integer offset; | |||||
private Integer limit; | |||||
public PaymentTradeLogExample() { | |||||
oredCriteria = new ArrayList<Criteria>(); | |||||
} | |||||
public void setOrderByClause(String orderByClause) { | |||||
this.orderByClause = orderByClause; | |||||
} | |||||
public String getOrderByClause() { | |||||
return orderByClause; | |||||
} | |||||
public void setDistinct(boolean distinct) { | |||||
this.distinct = distinct; | |||||
} | |||||
public boolean isDistinct() { | |||||
return distinct; | |||||
} | |||||
public List<Criteria> getOredCriteria() { | |||||
return oredCriteria; | |||||
} | |||||
public void or(Criteria criteria) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
public Criteria or() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
oredCriteria.add(criteria); | |||||
return criteria; | |||||
} | |||||
public Criteria createCriteria() { | |||||
Criteria criteria = createCriteriaInternal(); | |||||
if (oredCriteria.size() == 0) { | |||||
oredCriteria.add(criteria); | |||||
} | |||||
return criteria; | |||||
} | |||||
protected Criteria createCriteriaInternal() { | |||||
Criteria criteria = new Criteria(); | |||||
return criteria; | |||||
} | |||||
public void clear() { | |||||
oredCriteria.clear(); | |||||
orderByClause = null; | |||||
distinct = false; | |||||
this.offset = null; | |||||
this.limit = null; | |||||
} | |||||
public Integer getOffset() { | |||||
return this.offset; | |||||
} | |||||
public void setOffset(Integer offset) { | |||||
this.offset = offset; | |||||
} | |||||
public Integer getLimit() { | |||||
return this.limit; | |||||
} | |||||
public void setLimit(Integer limit) { | |||||
this.limit = limit; | |||||
} | |||||
public PaymentTradeLogExample page(int offset, int limit) { | |||||
this.offset = offset; | |||||
this.limit = limit; | |||||
return this; | |||||
} | |||||
protected abstract static class GeneratedCriteria { | |||||
protected List<Criterion> criteria; | |||||
protected GeneratedCriteria() { | |||||
super(); | |||||
criteria = new ArrayList<Criterion>(); | |||||
} | |||||
public boolean isValid() { | |||||
return criteria.size() > 0; | |||||
} | |||||
public List<Criterion> getAllCriteria() { | |||||
return criteria; | |||||
} | |||||
public List<Criterion> getCriteria() { | |||||
return criteria; | |||||
} | |||||
protected void addCriterion(String condition) { | |||||
if (condition == null) { | |||||
throw new RuntimeException("Value for condition cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition)); | |||||
} | |||||
protected void addCriterion(String condition, Object value, String property) { | |||||
if (value == null) { | |||||
throw new RuntimeException("Value for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value)); | |||||
} | |||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { | |||||
if (value1 == null || value2 == null) { | |||||
throw new RuntimeException("Between values for " + property + " cannot be null"); | |||||
} | |||||
criteria.add(new Criterion(condition, value1, value2)); | |||||
} | |||||
public Criteria andIdIsNull() { | |||||
addCriterion("id is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIsNotNull() { | |||||
addCriterion("id is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdEqualTo(Integer value) { | |||||
addCriterion("id =", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotEqualTo(Integer value) { | |||||
addCriterion("id <>", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThan(Integer value) { | |||||
addCriterion("id >", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) { | |||||
addCriterion("id >=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThan(Integer value) { | |||||
addCriterion("id <", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdLessThanOrEqualTo(Integer value) { | |||||
addCriterion("id <=", value, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdIn(List<Integer> values) { | |||||
addCriterion("id in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotIn(List<Integer> values) { | |||||
addCriterion("id not in", values, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdBetween(Integer value1, Integer value2) { | |||||
addCriterion("id between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andIdNotBetween(Integer value1, Integer value2) { | |||||
addCriterion("id not between", value1, value2, "id"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIsNull() { | |||||
addCriterion("mcode is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIsNotNull() { | |||||
addCriterion("mcode is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeEqualTo(String value) { | |||||
addCriterion("mcode =", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotEqualTo(String value) { | |||||
addCriterion("mcode <>", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeGreaterThan(String value) { | |||||
addCriterion("mcode >", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("mcode >=", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLessThan(String value) { | |||||
addCriterion("mcode <", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLessThanOrEqualTo(String value) { | |||||
addCriterion("mcode <=", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeLike(String value) { | |||||
addCriterion("mcode like", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotLike(String value) { | |||||
addCriterion("mcode not like", value, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeIn(List<String> values) { | |||||
addCriterion("mcode in", values, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotIn(List<String> values) { | |||||
addCriterion("mcode not in", values, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeBetween(String value1, String value2) { | |||||
addCriterion("mcode between", value1, value2, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMcodeNotBetween(String value1, String value2) { | |||||
addCriterion("mcode not between", value1, value2, "mcode"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberIsNull() { | |||||
addCriterion("m_order_number is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberIsNotNull() { | |||||
addCriterion("m_order_number is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberEqualTo(String value) { | |||||
addCriterion("m_order_number =", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotEqualTo(String value) { | |||||
addCriterion("m_order_number <>", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberGreaterThan(String value) { | |||||
addCriterion("m_order_number >", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberGreaterThanOrEqualTo(String value) { | |||||
addCriterion("m_order_number >=", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberLessThan(String value) { | |||||
addCriterion("m_order_number <", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberLessThanOrEqualTo(String value) { | |||||
addCriterion("m_order_number <=", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberLike(String value) { | |||||
addCriterion("m_order_number like", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotLike(String value) { | |||||
addCriterion("m_order_number not like", value, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberIn(List<String> values) { | |||||
addCriterion("m_order_number in", values, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotIn(List<String> values) { | |||||
addCriterion("m_order_number not in", values, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberBetween(String value1, String value2) { | |||||
addCriterion("m_order_number between", value1, value2, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andMOrderNumberNotBetween(String value1, String value2) { | |||||
addCriterion("m_order_number not between", value1, value2, "mOrderNumber"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeIsNull() { | |||||
addCriterion("pay_type is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeIsNotNull() { | |||||
addCriterion("pay_type is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeEqualTo(String value) { | |||||
addCriterion("pay_type =", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotEqualTo(String value) { | |||||
addCriterion("pay_type <>", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeGreaterThan(String value) { | |||||
addCriterion("pay_type >", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("pay_type >=", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeLessThan(String value) { | |||||
addCriterion("pay_type <", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeLessThanOrEqualTo(String value) { | |||||
addCriterion("pay_type <=", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeLike(String value) { | |||||
addCriterion("pay_type like", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotLike(String value) { | |||||
addCriterion("pay_type not like", value, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeIn(List<String> values) { | |||||
addCriterion("pay_type in", values, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotIn(List<String> values) { | |||||
addCriterion("pay_type not in", values, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeBetween(String value1, String value2) { | |||||
addCriterion("pay_type between", value1, value2, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andPayTypeNotBetween(String value1, String value2) { | |||||
addCriterion("pay_type not between", value1, value2, "payType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionIsNull() { | |||||
addCriterion("description is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionIsNotNull() { | |||||
addCriterion("description is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionEqualTo(String value) { | |||||
addCriterion("description =", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotEqualTo(String value) { | |||||
addCriterion("description <>", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionGreaterThan(String value) { | |||||
addCriterion("description >", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) { | |||||
addCriterion("description >=", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionLessThan(String value) { | |||||
addCriterion("description <", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionLessThanOrEqualTo(String value) { | |||||
addCriterion("description <=", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionLike(String value) { | |||||
addCriterion("description like", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotLike(String value) { | |||||
addCriterion("description not like", value, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionIn(List<String> values) { | |||||
addCriterion("description in", values, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotIn(List<String> values) { | |||||
addCriterion("description not in", values, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionBetween(String value1, String value2) { | |||||
addCriterion("description between", value1, value2, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andDescriptionNotBetween(String value1, String value2) { | |||||
addCriterion("description not between", value1, value2, "description"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeIsNull() { | |||||
addCriterion("request_type is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeIsNotNull() { | |||||
addCriterion("request_type is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeEqualTo(String value) { | |||||
addCriterion("request_type =", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotEqualTo(String value) { | |||||
addCriterion("request_type <>", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeGreaterThan(String value) { | |||||
addCriterion("request_type >", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeGreaterThanOrEqualTo(String value) { | |||||
addCriterion("request_type >=", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeLessThan(String value) { | |||||
addCriterion("request_type <", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeLessThanOrEqualTo(String value) { | |||||
addCriterion("request_type <=", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeLike(String value) { | |||||
addCriterion("request_type like", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotLike(String value) { | |||||
addCriterion("request_type not like", value, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeIn(List<String> values) { | |||||
addCriterion("request_type in", values, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotIn(List<String> values) { | |||||
addCriterion("request_type not in", values, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeBetween(String value1, String value2) { | |||||
addCriterion("request_type between", value1, value2, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andRequestTypeNotBetween(String value1, String value2) { | |||||
addCriterion("request_type not between", value1, value2, "requestType"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIsNull() { | |||||
addCriterion("created_at is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIsNotNull() { | |||||
addCriterion("created_at is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtEqualTo(Date value) { | |||||
addCriterion("created_at =", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotEqualTo(Date value) { | |||||
addCriterion("created_at <>", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtGreaterThan(Date value) { | |||||
addCriterion("created_at >", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("created_at >=", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtLessThan(Date value) { | |||||
addCriterion("created_at <", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { | |||||
addCriterion("created_at <=", value, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtIn(List<Date> values) { | |||||
addCriterion("created_at in", values, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotIn(List<Date> values) { | |||||
addCriterion("created_at not in", values, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtBetween(Date value1, Date value2) { | |||||
addCriterion("created_at between", value1, value2, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { | |||||
addCriterion("created_at not between", value1, value2, "createdAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIsNull() { | |||||
addCriterion("created_by is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIsNotNull() { | |||||
addCriterion("created_by is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByEqualTo(String value) { | |||||
addCriterion("created_by =", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotEqualTo(String value) { | |||||
addCriterion("created_by <>", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByGreaterThan(String value) { | |||||
addCriterion("created_by >", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByGreaterThanOrEqualTo(String value) { | |||||
addCriterion("created_by >=", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLessThan(String value) { | |||||
addCriterion("created_by <", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLessThanOrEqualTo(String value) { | |||||
addCriterion("created_by <=", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByLike(String value) { | |||||
addCriterion("created_by like", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotLike(String value) { | |||||
addCriterion("created_by not like", value, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByIn(List<String> values) { | |||||
addCriterion("created_by in", values, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotIn(List<String> values) { | |||||
addCriterion("created_by not in", values, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByBetween(String value1, String value2) { | |||||
addCriterion("created_by between", value1, value2, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andCreatedByNotBetween(String value1, String value2) { | |||||
addCriterion("created_by not between", value1, value2, "createdBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIsNull() { | |||||
addCriterion("updated_by is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIsNotNull() { | |||||
addCriterion("updated_by is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByEqualTo(String value) { | |||||
addCriterion("updated_by =", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotEqualTo(String value) { | |||||
addCriterion("updated_by <>", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByGreaterThan(String value) { | |||||
addCriterion("updated_by >", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByGreaterThanOrEqualTo(String value) { | |||||
addCriterion("updated_by >=", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLessThan(String value) { | |||||
addCriterion("updated_by <", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLessThanOrEqualTo(String value) { | |||||
addCriterion("updated_by <=", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByLike(String value) { | |||||
addCriterion("updated_by like", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotLike(String value) { | |||||
addCriterion("updated_by not like", value, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByIn(List<String> values) { | |||||
addCriterion("updated_by in", values, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotIn(List<String> values) { | |||||
addCriterion("updated_by not in", values, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByBetween(String value1, String value2) { | |||||
addCriterion("updated_by between", value1, value2, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedByNotBetween(String value1, String value2) { | |||||
addCriterion("updated_by not between", value1, value2, "updatedBy"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIsNull() { | |||||
addCriterion("updated_at is null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIsNotNull() { | |||||
addCriterion("updated_at is not null"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtEqualTo(Date value) { | |||||
addCriterion("updated_at =", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotEqualTo(Date value) { | |||||
addCriterion("updated_at <>", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtGreaterThan(Date value) { | |||||
addCriterion("updated_at >", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { | |||||
addCriterion("updated_at >=", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtLessThan(Date value) { | |||||
addCriterion("updated_at <", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { | |||||
addCriterion("updated_at <=", value, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtIn(List<Date> values) { | |||||
addCriterion("updated_at in", values, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotIn(List<Date> values) { | |||||
addCriterion("updated_at not in", values, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { | |||||
addCriterion("updated_at between", value1, value2, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { | |||||
addCriterion("updated_at not between", value1, value2, "updatedAt"); | |||||
return (Criteria) this; | |||||
} | |||||
} | |||||
public static class Criteria extends GeneratedCriteria { | |||||
protected Criteria() { | |||||
super(); | |||||
} | |||||
} | |||||
public static class Criterion { | |||||
private String condition; | |||||
private Object value; | |||||
private Object secondValue; | |||||
private boolean noValue; | |||||
private boolean singleValue; | |||||
private boolean betweenValue; | |||||
private boolean listValue; | |||||
private String typeHandler; | |||||
public String getCondition() { | |||||
return condition; | |||||
} | |||||
public Object getValue() { | |||||
return value; | |||||
} | |||||
public Object getSecondValue() { | |||||
return secondValue; | |||||
} | |||||
public boolean isNoValue() { | |||||
return noValue; | |||||
} | |||||
public boolean isSingleValue() { | |||||
return singleValue; | |||||
} | |||||
public boolean isBetweenValue() { | |||||
return betweenValue; | |||||
} | |||||
public boolean isListValue() { | |||||
return listValue; | |||||
} | |||||
public String getTypeHandler() { | |||||
return typeHandler; | |||||
} | |||||
protected Criterion(String condition) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.typeHandler = null; | |||||
this.noValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.typeHandler = typeHandler; | |||||
if (value instanceof List<?>) { | |||||
this.listValue = true; | |||||
} else { | |||||
this.singleValue = true; | |||||
} | |||||
} | |||||
protected Criterion(String condition, Object value) { | |||||
this(condition, value, null); | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | |||||
super(); | |||||
this.condition = condition; | |||||
this.value = value; | |||||
this.secondValue = secondValue; | |||||
this.typeHandler = typeHandler; | |||||
this.betweenValue = true; | |||||
} | |||||
protected Criterion(String condition, Object value, Object secondValue) { | |||||
this(condition, value, secondValue, null); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,27 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
public class PaymentTradeLogWithBLOBs extends PaymentTradeLog implements Serializable { | |||||
private String sendData; | |||||
private String receiveData; | |||||
private static final long serialVersionUID = 1L; | |||||
public String getSendData() { | |||||
return sendData; | |||||
} | |||||
public void setSendData(String sendData) { | |||||
this.sendData = sendData == null ? null : sendData.trim(); | |||||
} | |||||
public String getReceiveData() { | |||||
return receiveData; | |||||
} | |||||
public void setReceiveData(String receiveData) { | |||||
this.receiveData = receiveData == null ? null : receiveData.trim(); | |||||
} | |||||
} |
@@ -0,0 +1,138 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.domain; | |||||
import java.io.Serializable; | |||||
import java.util.Date; | |||||
public class UserPayInfo implements Serializable { | |||||
private Integer id; | |||||
private String loginName; | |||||
private String mobile; | |||||
private String email; | |||||
private String password; | |||||
private String nikeName; | |||||
private String status; | |||||
private String authType; | |||||
private String authStatus; | |||||
private Date createdAt; | |||||
private String createdBy; | |||||
private String updatedBy; | |||||
private Date updatedAt; | |||||
private static final long serialVersionUID = 1L; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public String getLoginName() { | |||||
return loginName; | |||||
} | |||||
public void setLoginName(String loginName) { | |||||
this.loginName = loginName == null ? null : loginName.trim(); | |||||
} | |||||
public String getMobile() { | |||||
return mobile; | |||||
} | |||||
public void setMobile(String mobile) { | |||||
this.mobile = mobile == null ? null : mobile.trim(); | |||||
} | |||||
public String getEmail() { | |||||
return email; | |||||
} | |||||
public void setEmail(String email) { | |||||
this.email = email == null ? null : email.trim(); | |||||
} | |||||
public String getPassword() { | |||||
return password; | |||||
} | |||||
public void setPassword(String password) { | |||||
this.password = password == null ? null : password.trim(); | |||||
} | |||||
public String getNikeName() { | |||||
return nikeName; | |||||
} | |||||
public void setNikeName(String nikeName) { | |||||
this.nikeName = nikeName == null ? null : nikeName.trim(); | |||||
} | |||||
public String getStatus() { | |||||
return status; | |||||
} | |||||
public void setStatus(String status) { | |||||
this.status = status == null ? null : status.trim(); | |||||
} | |||||
public String getAuthType() { | |||||
return authType; | |||||
} | |||||
public void setAuthType(String authType) { | |||||
this.authType = authType == null ? null : authType.trim(); | |||||
} | |||||
public String getAuthStatus() { | |||||
return authStatus; | |||||
} | |||||
public void setAuthStatus(String authStatus) { | |||||
this.authStatus = authStatus == null ? null : authStatus.trim(); | |||||
} | |||||
public Date getCreatedAt() { | |||||
return createdAt; | |||||
} | |||||
public void setCreatedAt(Date createdAt) { | |||||
this.createdAt = createdAt; | |||||
} | |||||
public String getCreatedBy() { | |||||
return createdBy; | |||||
} | |||||
public void setCreatedBy(String createdBy) { | |||||
this.createdBy = createdBy == null ? null : createdBy.trim(); | |||||
} | |||||
public String getUpdatedBy() { | |||||
return updatedBy; | |||||
} | |||||
public void setUpdatedBy(String updatedBy) { | |||||
this.updatedBy = updatedBy == null ? null : updatedBy.trim(); | |||||
} | |||||
public Date getUpdatedAt() { | |||||
return updatedAt; | |||||
} | |||||
public void setUpdatedAt(Date updatedAt) { | |||||
this.updatedAt = updatedAt; | |||||
} | |||||
} |
@@ -0,0 +1,43 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class AliGrantPayNotify implements Serializable { | |||||
private String notify_time; | |||||
private String notify_type; | |||||
private String notify_id; | |||||
private String sign_type; | |||||
private String sign; | |||||
private String auth_no; //支付宝资金授权订单号 | |||||
private String out_order_no;//商户的资金授权订单号 | |||||
private String operation_id;//支付宝的资金操作流水号 | |||||
private String out_request_no;//商户资金操作流水号 | |||||
private String operation_type;//资金操作类型,支持【FREEZE,UNFREEZE,PAY】 | |||||
private float amount;//本次操作冻结的金额,单位为:元(人民币),精确到小数点后两位 | |||||
private String status;//资金预授权明细的状态 目前支持: INIT:初始 SUCCESS: 成功 CLOSED:关闭 | |||||
private String gmt_create;//操作创建时间 | |||||
private String gmt_trans;//操作处理完成时间 | |||||
private String payer_logon_id;//付款方支付宝账号登录号 | |||||
private String payer_user_id;//付款方支付宝账号UID | |||||
private String payee_logon_id;//收款方支付宝账号登陆号 | |||||
private String payee_user_id;//收款方支付宝账号UID | |||||
private float total_freeze_amount;//累计冻结金额 | |||||
private float total_unfreeze_amount;//累计解冻金额 | |||||
private float total_pay_amount;//累计支付金额 | |||||
private float rest_amount;//剩余冻结金额 | |||||
private float credit_amount;//本次操作中信用金额,单位为:元(人民币),精确到小数点后两位(信用授权场景返回) | |||||
private float fund_amount;//本次操作中自有资金金额,单位为:元(人民币),精确到小数点后两位(信用授权场景返回) | |||||
private float total_freeze_credit_amount;//累计冻结信用金额,单位为:元(人民币),精确到小数点后两位(信用授权场景返回) | |||||
private float total_freeze_fund_amount;//累计冻结自有资金金额,单位为:元(人民币),精确到小数点后两位 (信用授权场景返回) | |||||
private float total_unfreeze_credit_amount;//累计解冻信用金额,单位为:元(人民币),精确到小数点后两位(信用授权场景返回) | |||||
private float total_unfreeze_fund_amount;//累计解冻自有资金金额,单位为:元(人民币),精确到小数点后两位 (信用授权场景返回) | |||||
private float total_pay_credit_amount;//累计支付信用金额,单位为:元(人民币),精确到小数点后两位 (信用授权场景返回) | |||||
private float total_pay_fund_amount;//累计支付自有资金金额,单位为:元(人民币),精确到小数点后两位 (信用授权场景返回) | |||||
private float rest_credit_amount;//剩余冻结信用金额,单位为:元(人民币),精确到小数点后两位 (信用授权场景返回) | |||||
private float rest_fund_amount;//剩余冻结自有资金金额,单位为:元(人民币),精确到小数点后两位(信用授权场景返回) | |||||
private String pre_auth_type;//预授权类型,目前支持 CREDIT_AUTH(信用预授权); 商户可根据该标识来判断该笔预授权的类型,当返回值为"CREDIT_AUTH"表明该笔预授权为信用预授权,没有真实冻结资金;如果未返回,则表示普通资金预授权,会冻结用户资金。 | |||||
private String trans_currency; | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class AliPayCreateOrder implements Serializable { | |||||
private String out_trade_no; | |||||
private String total_amount; | |||||
private String subject; | |||||
private String store_id; | |||||
private String timeout_express; | |||||
} |
@@ -0,0 +1,37 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class AliPayNotify implements Serializable { | |||||
private String notify_time; | |||||
private String notify_type; | |||||
private String notify_id; | |||||
private String sign_type; | |||||
private String sign; | |||||
private String trade_no; | |||||
private String app_id; | |||||
private String out_trade_no; | |||||
private String out_biz_no; | |||||
private String buyer_id; | |||||
private String buyer_logon_id; | |||||
private String seller_id; | |||||
private String seller_email; | |||||
private String trade_status; | |||||
private float total_amount; | |||||
private float receipt_amount; | |||||
private float invoice_amount; | |||||
private float buyer_pay_amount; | |||||
private float point_amount; | |||||
private float refund_fee; | |||||
private float send_back_fee; | |||||
private String subject; | |||||
private String body; | |||||
private String gmt_create; | |||||
private String gmt_payment; | |||||
private String gmt_refund; | |||||
private String gmt_close; | |||||
private String fund_bill_list; | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class BizGrantPayNotify implements Serializable { | |||||
private String mcode; //商户号 | |||||
private String orderNumber; //业务系统订单编号 | |||||
private String outerOrderNumber; //第三方交易平台流水号 | |||||
private String authNo; //第三方支付平台资金授权订单号 | |||||
private String grantAmount; //授权金额(单位分) | |||||
private String payType; //支付方式@1:微信扫码支付 @2:支付宝扫码支付 @3:支付宝当面资金授权支付 @4:银联二维码支付 | |||||
private String grantTime; //授权时间,格式为yyyyMMddHHmmss | |||||
private String tradeId; //支付平台交易流水ID | |||||
private String sign; //签名 | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class BizPayNotify implements Serializable { | |||||
private String mcode; //商户号 | |||||
private String orderNumber; //业务系统订单编号 | |||||
private String orderAmount; //订单金额(单位分) | |||||
private String payType; //支付方式@1:微信扫码支付 @2:支付宝扫码支付 @3:支付宝当面资金授权支付 @4:银联二维码支付 | |||||
private String payTime; //用户支付时间,格式为yyyyMMddHHmmss | |||||
private String tradeId; //支付平台交易流水ID | |||||
private String sign; //签名 | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class BizPayRefundNotify implements Serializable { | |||||
private String mcode; //商户号 | |||||
private String orderNumber; //业务系统订单编号 | |||||
private String refundNumber; //业务系统退款流水号 | |||||
private String refundAmount; //退款金额(单位分) | |||||
private String payType; //支付方式@1:微信扫码支付 @2:支付宝扫码支付 @3:支付宝当面资金授权支付 @4:银联二维码支付 | |||||
private String refundStatus; //退款状态1:成功 | |||||
private String refundTime; //退款完成时间 资金退款至用户帐号的时间,格式2017-12-15 09:46:01 | |||||
private String thirdRefundNumber; //第三方支付平台退款流水ID | |||||
private String sign; //签名 | |||||
} |
@@ -0,0 +1,17 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsBscPayCreateOrder implements Serializable { | |||||
private String merchantCode; //商户号 | |||||
private String terminalCode; //终端号 | |||||
private Long transactionAmount; //交易金额 单位:分 | |||||
private String transactionCurrencyCode; //交易币种 需填入156 | |||||
private String merchantOrderId; //商户订单号 | |||||
private String merchantRemark; //商户备注 | |||||
private String payMode; //支付方式 CODE_SCAN – 扫码 | |||||
private String payCode; //支付码 | |||||
} |
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsBscPayQueryOrder implements Serializable { | |||||
private String merchantCode; //商户号 | |||||
private String terminalCode; //终端号 | |||||
private String merchantOrderId; //商户订单号 | |||||
private String originalOrderId; //银商订单号 | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsBscPayRefundOrder implements Serializable { | |||||
private String merchantCode; //商户号 | |||||
private String terminalCode; //终端号 | |||||
private String merchantOrderId; //商户订单号 | |||||
private String originalOrderId; //银商订单号 | |||||
private String refundRequestId; //退款请求标识 | |||||
private Long transactionAmount; //交易金额 | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsBscPayReverseOrder implements Serializable { | |||||
private String merchantCode; //商户号 | |||||
private String terminalCode; //终端号 | |||||
private String merchantOrderId; //商户订单号 | |||||
private Long transactionAmount; //交易金额 单位:分 | |||||
private String transactionCurrencyCode; //交易币种 需填入156 | |||||
} |
@@ -0,0 +1,12 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsBscPayVoidOrder implements Serializable { | |||||
private String merchantCode; //商户号 | |||||
private String terminalCode; //终端号 | |||||
private String originalOrderId; //银商订单号 | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayCannelOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 bills.closeQRCode | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 QRPAYDEFAULT | |||||
private String qrCodeId; //二维码ID | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayCreateOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 | |||||
private String expireTime; //账单过期时间,为空则不过期,格式yyyy-MM-dd HH:mm:ss | |||||
private String notifyUrl; //支付结果通知地址 | |||||
private String billNo; //账单号 | |||||
private String billDate; //账单日期,格式yyyy-MM-dd | |||||
private String totalAmount; //支付总金额 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayQueryOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 bills.query | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 QRPAYDEFAULT | |||||
private String billNo; //账单号 | |||||
private String billDate; //订单时间,格式yyyy-MM-dd | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayRefundOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 bills.refund | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 QRPAYDEFAULT | |||||
private String billNo; //账单号 | |||||
private String billDate; //订单时间,格式yyyy-MM-dd | |||||
private String refundAmount; //退款金额 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayServiceCannelOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 bills.closeQRCode | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 QRPAYDEFAULT | |||||
private String merOrderId; //业务订单号 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayServiceCreateOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String merOrderId; //商户订单号 | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 | |||||
private String notifyUrl; //支付结果通知地址 | |||||
private String returnUrl; //网页跳转地址 | |||||
private String totalAmount; //支付总金额 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayServiceQueryOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 bills.query | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 QRPAYDEFAULT | |||||
private String merOrderId; //账单号 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ChinaumsPayServiceRefundOrder implements Serializable { | |||||
private String msgSrc; //消息来源 | |||||
private String msgType; //消息类型 bills.refund | |||||
private String requestTimestamp; //报文请求时间,格式yyyy-MM-dd HH:mm:ss | |||||
private String mid; //商户号 | |||||
private String tid; //终端号 | |||||
private String instMid; //业务类型 QRPAYDEFAULT | |||||
private String merOrderId; //账单号 | |||||
private String refundAmount; //退款金额 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformCancelOrder implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String payType; //支付方式@1:微信扫码支付@2:支付宝扫码支付@3:支付宝当面资金授权支付@4:银联二维码支付 | |||||
private String cancelStatus; //取消状态(@0:取消失败@1:取消成功) | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import com.neusoft.smart.pos.constants.DictionaryConstant; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformCreateOrder implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String tradeId; //聚合支付平台交易流水 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String outerOrderNumber; //第三方支付平台订单号 | |||||
private String outerCodeUrl; //第三方支付平台返回支付二维码 | |||||
private String payStatus = DictionaryConstant.PAY_STATUS_WFK.getCode(); //第三方支付平台返回支付结果@1:未支付@2:已支付 | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformCreateScanOrder implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String tradeId; //聚合支付平台交易流水 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String outerOrderNumber; //第三方支付平台订单号 | |||||
private String payStatus; //第三方支付平台返回支付结果@0:未支付@1:已支付 | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import com.neusoft.smart.pos.constants.DictionaryConstant; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformFreezePay implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String tradeId; //聚合支付平台交易流水 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String authNo; //第三方支付平台资金授权订单号 | |||||
private String outerOrderNumber; //支付宝的资金操作流水号operationId | |||||
private String outerCodeUrl; //第三方支付平台返回支付二维码 | |||||
private Long authAmount; //本次操作冻结的金额,单位为:分 | |||||
private String grantTime; //资金授权成功时间 格式:YYYY-MM-DD HH:MM:SS | |||||
private String payFreezeStatus = DictionaryConstant.PAY_GRANT_STATUS_CLZ.getCode(); //第三方支付平台返回支付结果@1:冻结处理中@2:冻结成功@3:冻结失败 | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import com.neusoft.smart.pos.constants.DictionaryConstant; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformGrantToPay implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String tradeId; //聚合支付平台交易流水 | |||||
private String mOrderNumber; //业务平台预授权订单号 | |||||
private String mPayOrderNumber; //业务平台支付订单号 | |||||
private String outerOrderNumber; //第三方支付平台预授权流水号 | |||||
private String outerPayOrderNumber; //第三方支付平台支付交易流水号 | |||||
private String authNo; //第三方支付平台资金授权订单号 | |||||
private String paidTime; //支付完成时间2014-11-27 15:45:57 | |||||
private Long payAmount; //支付交易金额,单位分 | |||||
private String payStatus = DictionaryConstant.PAY_STATUS_WFK.getCode(); //第三方支付平台返回支付结果@1:未支付@2:已支付 | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformInitFacePay implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String initStatus; //初始化状态@0:初始化失败@1:初始化成功 | |||||
private String zimId; //支付宝刷脸调用的标识 | |||||
private String zimInitClientData; //刷脸的下发协议数据 | |||||
private String authinfo; //微信SDK调用凭证。用于调用SDK的人脸识别接口。 | |||||
private String expiresIn; //微信authinfo的有效时间, 单位秒。 例如: 3600 | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformQueryOrder implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String outerTradeNumber; //第三方支付平台支付流水号(支付成功后会返回) | |||||
private String tradeStatus; //交易状态(@1:待支付@2:已支付@3:退款中@4:已退款@5交易关闭) | |||||
private String timeEnd; //支付完成时间 | |||||
} |
@@ -0,0 +1,34 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformQueryPayGrant implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String authNo; //支付宝资金授权订单号 | |||||
private Long totalFreezeAmount; //订单累计的冻结金额,单位为:分(人民币) | |||||
private Long restAmount; //订单总共剩余的冻结金额,单位为:分(人民币) | |||||
private Long totalPayAmount; //订单累计用于支付的金额,单位为:分(人民币) | |||||
private String orderTitle; //业务订单的简单描述,如商品名称等 | |||||
private String payerLogonId; //付款方支付宝账号(Email或手机号),仅作展示使用,默认会加“*”号处理 | |||||
private String payerUserId; //付款方支付宝账号对应的支付宝唯一用户号,以2088开头的16位纯数字组成 | |||||
private String outerOrderNumber; //支付宝资金操作流水号 | |||||
private String outRequestNo; //商户资金操作的请求流水号 | |||||
private Long amount; //该笔资金操作流水opertion_id对应的操作金额,单位为:分(人民币) | |||||
private String operationType; //支付宝资金操作类型, 目前支持: FREEZE:冻结 UNFREEZE:解冻 PAY:支付 | |||||
private String status; //资金操作流水的状态, 目前支持: INIT:初始 SUCCESS:成功 CLOSED:关闭 | |||||
private String remark; //商户对本次操作的附言描述,长度不超过100个字母或50个汉字 | |||||
private String gmtCreate; //资金授权单据操作流水创建时间, 格式:YYYY-MM-DD HH:MM:SS | |||||
private String gmtTrans; //支付宝账务处理成功时间, 格式:YYYY-MM-DD HH:MM:SS | |||||
// private Long totalFreezeCreditAmount; //累计冻结信用金额,单位为:分(人民币) | |||||
// private Long totalFreezeFundAmount; //累计冻结自有资金金额,单位为:分(人民币) | |||||
// private Long totalPayCreditAmount; //累计支付信用金额,单位为:分(人民币) | |||||
// private Long totalPayFundAmount; //累计支付自有资金金额,单位为:分(人民币) | |||||
// private Long restCreditAmount; //剩余冻结信用金额,单位为:分(人民币) | |||||
// private Long restFundAmount; //剩余冻结自有资金金额,单位为:分(人民币) | |||||
// private Long creditAmount; //该笔资金操作流水opertion_id对应的操作信用金额 | |||||
// private Long fundAmount; //该笔资金操作流水opertion_id对应的操作自有资金金额 | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformRefundOrder implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String payType; //支付方式@1:微信扫码支付@2:支付宝扫码支付@3:支付宝当面资金授权支付@4:银联二维码支付 | |||||
private String refundStatus; //订单状态(@0:申请退款失败@1:退款中@2:退款完成@3:订单未支付无法申请退款 | |||||
private String refundNumber; //商户退款单号 | |||||
private String thirdRefundNumber; //第三方平台退款单号 | |||||
private Long refundAmount; //退款金额 | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformReverseOrder implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String payType; //支付方式@1:微信扫码支付@2:支付宝扫码支付@3:支付宝当面资金授权支付@4:银联二维码支付 | |||||
private String reverseStatus; //撤销状态(@1:撤销失败@2:撤销成功) | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformReversePayGrant implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String payType; //支付方式@1:微信扫码支付@2:支付宝扫码支付@3:支付宝当面资金授权支付@4:银联二维码支付 | |||||
private String reverseStatus; //撤销状态(@1:撤销失败@2:撤销成功) | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class ThirdPlatformUnFreezePayGrant implements Serializable { | |||||
private String mcode; //聚合支付平台商户号 | |||||
private String mOrderNumber; //业务平台订单号 | |||||
private String payType; //支付方式@1:微信扫码支付@2:支付宝扫码支付@3:支付宝当面资金授权支付@4:银联二维码支付 | |||||
private String unFreezeStatus; //解冻状态(@1:解冻失败@2:解冻成功) | |||||
private Long amount; //解冻金额单位是分 | |||||
private String unFreezeTime; //解冻时间YYYY-MM-DD HH:MM:SS | |||||
} |
@@ -0,0 +1,28 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class UnionPayCreateOrder implements Serializable { | |||||
private String version = "5.1.0"; //版本号 全渠道默认值 | |||||
private String encoding = "UTF-8"; //字符集编码 可以使用UTF-8,GBK两种方式 | |||||
private String signMethod = "01"; //签名方法 | |||||
private String txnType = "01"; //交易类型 01:消费 | |||||
private String txnSubType = "07"; //交易子类 07:申请消费二维码 | |||||
private String bizType = "000000"; //填写000000 | |||||
private String channelType = "08"; //渠道类型 08手机 | |||||
/***商户接入参数***/ | |||||
private String accessType = "0"; //接入类型,商户接入填0 ,不需修改(0:直连商户, 1: 收单机构 2:平台商户) | |||||
private String currencyCode = "156"; //境内商户固定 156 人民币 | |||||
private String merId; //商户号码,请改成自己申请的商户号或者open上注册得来的777商户号测试 | |||||
private String orderId; //商户订单号,8-40位数字字母,不能含“-”或“_”,可以自行定制规则 | |||||
private String txnTime; //订单发送时间,取系统时间,格式为YYYYMMDDhhmmss,必须取当前时间,否则会报txnTime无效 | |||||
private String txnAmt; //交易金额 单位为分,不能带小数点 | |||||
private String backUrl; //支付成功回调URL | |||||
private String certId; //证书ID | |||||
private String signature; //签名 | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class UnionPayCreateOrderScan implements Serializable { | |||||
private String version = "5.1.0"; //版本号 全渠道默认值 | |||||
private String encoding = "UTF-8"; //字符集编码 可以使用UTF-8,GBK两种方式 | |||||
private String signMethod = "01"; //签名方法 | |||||
private String txnType = "01"; //交易类型 01:消费 | |||||
private String txnSubType = "06"; //交易子类 07:申请消费二维码 | |||||
private String bizType = "000000"; //填写000000 | |||||
private String channelType = "08"; //渠道类型 08手机 | |||||
/***商户接入参数***/ | |||||
private String accessType = "0"; //接入类型,商户接入填0 ,不需修改(0:直连商户, 1: 收单机构 2:平台商户) | |||||
private String currencyCode = "156"; //境内商户固定 156 人民币 | |||||
private String merId; //商户号码,请改成自己申请的商户号或者open上注册得来的777商户号测试 | |||||
private String orderId; //商户订单号,8-40位数字字母,不能含“-”或“_”,可以自行定制规则 | |||||
private String txnTime; //订单发送时间,取系统时间,格式为YYYYMMDDhhmmss,必须取当前时间,否则会报txnTime无效 | |||||
private String txnAmt; //交易金额 单位为分,不能带小数点 | |||||
private String backUrl; //支付成功回调URL | |||||
private String certId; //证书ID | |||||
private String qrNo; //用户二维码 | |||||
private String signature; //签名 | |||||
} |
@@ -0,0 +1,60 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class UnionPayNotify implements Serializable { | |||||
private String bizType; //产品类型 | |||||
private String signPubKeyCert; //签名公钥证书 | |||||
private String orderId; //商户订单号 | |||||
private String txnSubType; //交易子类 | |||||
private String signature; //签名 | |||||
private String traceNo; //系统跟踪号 | |||||
private String issInsCode; //发卡机构代码 | |||||
private String settleAmt; //清算金额 | |||||
private String customerInfo; //银行卡验证信息及身份信息 | |||||
private String settleCurrencyCode; //清算币种 | |||||
private String settleDate; //清算日期 | |||||
private String txnType; //交易类型 | |||||
private String encoding; //编码方式 | |||||
private String version; //版本号 | |||||
private String queryId; //查询流水号 | |||||
private String accessType; //接入类型 | |||||
private String respMsg; //应答信息 | |||||
private String traceTime; //交易传输时间 | |||||
private String txnTime; //订单发送时间 | |||||
private String merId; //商户代码 | |||||
private String currencyCode; //交易币种 | |||||
private String respCode; //应答码 | |||||
private String signMethod; //签名方法 | |||||
private String txnAmt; //交易金额 | |||||
// { | |||||
// "bizType": "000000", | |||||
// "signPubKeyCert": "-----BEGIN CERTIFICATE-----\r\nMIIEQzCCAyugAwIBAgIFEBJJZVgwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMC\r\nQ04xMDAuBgNVBAoTJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhv\r\ncml0eTEXMBUGA1UEAxMOQ0ZDQSBURVNUIE9DQTEwHhcNMTcxMTAxMDcyNDA4WhcN\r\nMjAxMTAxMDcyNDA4WjB3MQswCQYDVQQGEwJjbjESMBAGA1UEChMJQ0ZDQSBPQ0Ex\r\nMQ4wDAYDVQQLEwVDVVBSQTEUMBIGA1UECxMLRW50ZXJwcmlzZXMxLjAsBgNVBAMU\r\nJTA0MUBaMjAxNy0xMS0xQDAwMDQwMDAwOlNJR05AMDAwMDAwMDEwggEiMA0GCSqG\r\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDDIWO6AESrg+34HgbU9mSpgef0sl6avr1d\r\nbD/IjjZYM63SoQi3CZHZUyoyzBKodRzowJrwXmd+hCmdcIfavdvfwi6x+ptJNp9d\r\nEtpfEAnJk+4quriQFj1dNiv6uP8ARgn07UMhgdYB7D8aA1j77Yk1ROx7+LFeo7rZ\r\nDdde2U1opPxjIqOPqiPno78JMXpFn7LiGPXu75bwY2rYIGEEImnypgiYuW1vo9UO\r\nG47NMWTnsIdy68FquPSw5FKp5foL825GNX3oJSZui8d2UDkMLBasf06Jz0JKz5AV\r\nblaI+s24/iCfo8r+6WaCs8e6BDkaijJkR/bvRCQeQpbX3V8WoTLVAgMBAAGjgfQw\r\ngfEwHwYDVR0jBBgwFoAUz3CdYeudfC6498sCQPcJnf4zdIAwSAYDVR0gBEEwPzA9\r\nBghggRyG7yoBATAxMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmNmY2EuY29tLmNu\r\nL3VzL3VzLTE0Lmh0bTA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vdWNybC5jZmNh\r\nLmNvbS5jbi9SU0EvY3JsMjQ4NzIuY3JsMAsGA1UdDwQEAwID6DAdBgNVHQ4EFgQU\r\nmQQLyuqYjES7qKO+zOkzEbvdFwgwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUF\r\nBwMEMA0GCSqGSIb3DQEBBQUAA4IBAQAujhBuOcuxA+VzoUH84uoFt5aaBM3vGlpW\r\nKVMz6BUsLbIpp1ho5h+LaMnxMs6jdXXDh/du8X5SKMaIddiLw7ujZy1LibKy2jYi\r\nYYfs3tbZ0ffCKQtv78vCgC+IxUUurALY4w58fRLLdu8u8p9jyRFHsQEwSq+W5+bP\r\nMTh2w7cDd9h+6KoCN6AMI1Ly7MxRIhCbNBL9bzaxF9B5GK86ARY7ixkuDCEl4XCF\r\nJGxeoye9R46NqZ6AA/k97mJun//gmUjStmb9PUXA59fR5suAB5o/5lBySZ8UXkrI\r\npp/iLT8vIl1hNgLh0Ghs7DBSx99I+S3VuUzjHNxL6fGRhlix7Rb8\r\n-----END CERTIFICATE-----", | |||||
// "orderId": "20180528143329", | |||||
// "txnSubType": "07", | |||||
// "signature": "XfzvFp8yqea/ukNtzIVRD3JbrCs6nMYyc70dd9aGTpe1+deFzuKtuX3jwXMhEPLNJkN8SSaSL8T9U+R6aTCpw8DQOBsWZcB02lFY/pWRjvTPt0zRS+9LGRMBCxsOvB3GpnB1Z9k1ky/sYgfSGq1O5HZ1bcPuv08KMybaOm8UnzXfriEi73d6tOpjvUM6YXBj4dN/C0WTZrWSjEcb1ubrVgx4EANgJn/BkVcEyXbaWROMr5RzTHeQcA2ByaxSEIA3APh4BwK2aksKx1SdqAFGK/DpI080K3nlW3EGE3iS18mN5tXWYg81eVbmK4cbyexqazevN4lUB2smJasN1FkaQQ==", | |||||
// "traceNo": "378000", | |||||
// "issInsCode": "04100000", | |||||
// "settleAmt": "1", | |||||
// "customerInfo": "e2N1c3RvbWVyTm095a6L5bCPfQ==", | |||||
// "settleCurrencyCode": "156", | |||||
// "settleDate": "0528", | |||||
// "txnType": "01", | |||||
// "encoding": "UTF-8", | |||||
// "version": "5.1.0", | |||||
// "queryId": "20180528125632385617", | |||||
// "accessType": "0", | |||||
// "respMsg": "成功[0000000]", | |||||
// "traceTime": "0528102659", | |||||
// "txnTime": "20180528122645", | |||||
// "merId": "777290058159894", | |||||
// "currencyCode": "156", | |||||
// "respCode": "00", | |||||
// "signMethod": "01", | |||||
// "txnAmt": "1" | |||||
// } | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class UnionPayQueryOrder implements Serializable { | |||||
private String version = "5.1.0"; //版本号 全渠道默认值 | |||||
private String encoding = "UTF-8"; //字符集编码 可以使用UTF-8,GBK两种方式 | |||||
private String signMethod = "01"; //签名方法 | |||||
private String txnType = "00"; //交易类型 01:消费 | |||||
private String txnSubType = "00"; //交易子类 | |||||
private String bizType = "000000"; //填写000000 | |||||
private String channelType = "08"; //渠道类型 08手机 | |||||
/***商户接入参数***/ | |||||
private String accessType = "0"; //接入类型,商户接入填0 ,不需修改(0:直连商户, 1: 收单机构 2:平台商户) | |||||
private String merId; //商户号码,请改成自己申请的商户号或者open上注册得来的777商户号测试 | |||||
private String orderId; //商户订单号,8-40位数字字母,不能含“-”或“_”,可以自行定制规则 | |||||
private String txnTime; //订单发送时间,取系统时间,格式为YYYYMMDDhhmmss,必须取当前时间,否则会报txnTime无效 | |||||
private String certId; //证书ID | |||||
private String signature; //签名 | |||||
} |
@@ -0,0 +1,31 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class UnionPayRefundOrder implements Serializable { | |||||
private String version = "5.1.0"; //版本号 全渠道默认值 | |||||
private String encoding = "UTF-8"; //字符集编码 可以使用UTF-8,GBK两种方式 | |||||
private String signMethod = "01"; //签名方法 | |||||
private String txnType = "04"; //交易类型 01:消费 | |||||
private String txnSubType = "00"; //交易子类 | |||||
private String bizType = "000000"; //填写000000 | |||||
private String channelType = "08"; //渠道类型 08手机 | |||||
/***商户接入参数***/ | |||||
private String accessType = "0"; //接入类型,商户接入填0 ,不需修改(0:直连商户, 1: 收单机构 2:平台商户) | |||||
private String merId; //商户号码,请改成自己申请的商户号或者open上注册得来的777商户号测试 | |||||
private String orderId; //商户订单号,8-40位数字字母,不能含“-”或“_”,可以自行定制规则 | |||||
private String txnTime; //订单发送时间,取系统时间,格式为YYYYMMDDhhmmss,必须取当前时间,否则会报txnTime无效 | |||||
private String currencyCode = "156"; //境内商户固定 156 人民币 | |||||
private String txnAmt; //交易金额 单位为分,不能带小数点 | |||||
private String certId; //证书ID | |||||
private String backUrl; //后台通知地址,后台通知参数详见open.unionpay.com帮助中心 下载 产品接口规范 网关支付产品接口规范 退货交易 商户通知,其他说明同消费交易的后台通知 | |||||
private String origQryId; //原消费交易返回的的queryId,可以从消费交易后台通知接口中或者交易状态查询接口中获取 | |||||
private String origOrderId; //原消费交易返回的的orderId | |||||
// private String origTxnTime; //原消费交易返回的的queryId,可以从消费交易后台通知接口中或者交易状态查询接口中获取 | |||||
private String signature; //签名 | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class WFTPayCreateOrder implements Serializable { | |||||
private String service = "unified.trade.micropay"; //接口类型:unified.trade.micropay | |||||
private String mch_id; //商户号 1230000109 微信支付分配的商户号 | |||||
private String out_trade_no; //商户系统内部的订单号 ,5到32个字符、 只能包含字母数字或者下划线,区分大小写,每次下单请求确保在商户系统唯一 | |||||
private String body; //商品描述 商品简单描述 | |||||
private String total_fee; //标价金额 订单总金额,单位为分 | |||||
private String mch_create_ip; //订单生成的机器 IP | |||||
private String auth_code; //商户主扫授权码,设备读取用户微信中的条码或者二维码信息 | |||||
private String nonce_str; //随机字符串 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package com.neusoft.smart.pos.payment.persistent.ext.domain; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
@Data | |||||
public class WFTPayQueryOrder implements Serializable { | |||||
private String service = "unified.trade.query"; //接口类型 | |||||
private String mch_id; //商户号 1230000109 微信支付分配的商户号 | |||||
private String out_trade_no; //商户系统内部的订单号 ,5到32个字符、 只能包含字母数字或者下划线,区分大小写,每次下单请求确保在商户系统唯一 | |||||
private String nonce_str; //随机字符串 5K8264ILTKCH16CQ2502SI8ZNMTM67VS 随机字符串,长度要求在32位以内 | |||||
private String sign; //签名 C380BEC2BFD727A4B6845133519F3AD6 通过签名算法计算得出的签名值 | |||||
} |