| @@ -123,14 +123,21 @@ public class WxMerchantController extends BaseController { | |||
| return wxMerchantService.updateMerchantAdmin(wxMerchant); | |||
| } | |||
| @ApiOperation("更新法人及税务接口") | |||
| @PostMapping("updateMerchantCoprAndTax") | |||
| public ResultData updateMerchantCoprAndTax(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantAdmin"); | |||
| @ApiOperation("更新法人接口") | |||
| @PostMapping("updateMerchantCorp") | |||
| public ResultData updateMerchantCopr(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantCorp"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| return wxMerchantService.updateMerchantCoprAndTax(wxMerchant); | |||
| return wxMerchantService.updateMerchantCorp(wxMerchant); | |||
| } | |||
| @ApiOperation("更新税务接口") | |||
| @PostMapping("updateMerchantTax") | |||
| public ResultData updateMerchantTax(@RequestBody WxMerchant wxMerchant) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantTax"); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| return wxMerchantService.updateMerchantTax(wxMerchant); | |||
| } | |||
| } | |||
| @@ -84,6 +84,13 @@ public class WxMerchant implements Serializable { | |||
| @Transient | |||
| private List<Map<String,Object>> shoplist; | |||
| @Transient | |||
| private WxMerchantCorp wxMerchantCorp; | |||
| @Transient | |||
| private WxMerchantTax wxMerchantTax; | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @@ -124,54 +131,6 @@ public class WxMerchant implements Serializable { | |||
| @io.swagger.annotations.ApiModelProperty(value="品牌",name="brand") | |||
| private String brand; | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件类型",name="corpPapersType") | |||
| private Integer corpPapersType; | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件号码",name="corpPapersNumber") | |||
| private String corpPapersNumber; | |||
| @io.swagger.annotations.ApiModelProperty(value="法人",name="corpPapersPerson") | |||
| private String corpPapersPerson; | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件正面",name="corpPapersPicFace") | |||
| private String corpPapersPicFace; | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件背面",name="corpPapersPicBack") | |||
| private String corpPapersPicBack; | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件背面",name="taxpayerType") | |||
| private Integer taxpayerType; | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税证件类型",name="taxPapersType") | |||
| private Integer taxPapersType; | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税证件号码",name="taxPapersNumber") | |||
| private String taxPapersNumber; | |||
| @io.swagger.annotations.ApiModelProperty(value="发票类型",name="invoiceType") | |||
| private Integer invoiceType; | |||
| @io.swagger.annotations.ApiModelProperty(value="购方名称",name="invoiceBuyer") | |||
| private String invoiceBuyer; | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税人识别号",name="taxpayerIdentifyNumber") | |||
| private String taxpayerIdentifyNumber; | |||
| @io.swagger.annotations.ApiModelProperty(value="开票地址及电话",name="invoiceAddressPhone") | |||
| private String invoiceAddressPhone; | |||
| @io.swagger.annotations.ApiModelProperty(value="开户行及账号",name="bankAccountNumber") | |||
| private String bankAccountNumber; | |||
| @io.swagger.annotations.ApiModelProperty(value="开户名",name="bankAccountPerson") | |||
| private String bankAccountPerson; | |||
| @io.swagger.annotations.ApiModelProperty(value="开户行",name="bankName") | |||
| private String bankName; | |||
| @io.swagger.annotations.ApiModelProperty(value="银行账号",name="bankAccount") | |||
| private String bankAccount; | |||
| @io.swagger.annotations.ApiModelProperty(value="VIP折扣率1",name="vipDiscountRate1") | |||
| private Integer vipDiscountRate1; | |||
| @@ -181,7 +140,6 @@ public class WxMerchant implements Serializable { | |||
| @io.swagger.annotations.ApiModelProperty(value="VIP折扣率3",name="vipDiscountRate3") | |||
| private Integer vipDiscountRate3; | |||
| public List<Map<String, Object>> getShoplist() { | |||
| return shoplist; | |||
| } | |||
| @@ -378,132 +336,20 @@ public class WxMerchant implements Serializable { | |||
| this.brand = brand; | |||
| } | |||
| public Integer getCorpPapersType() { | |||
| return corpPapersType; | |||
| } | |||
| public void setCorpPapersType(Integer corpPapersType) { | |||
| this.corpPapersType = corpPapersType; | |||
| } | |||
| public String getCorpPapersNumber() { | |||
| return corpPapersNumber; | |||
| } | |||
| public void setCorpPapersNumber(String corpPapersNumber) { | |||
| this.corpPapersNumber = corpPapersNumber; | |||
| } | |||
| public String getCorpPapersPerson() { | |||
| return corpPapersPerson; | |||
| } | |||
| public void setCorpPapersPerson(String corpPapersPerson) { | |||
| this.corpPapersPerson = corpPapersPerson; | |||
| } | |||
| public String getCorpPapersPicFace() { | |||
| return corpPapersPicFace; | |||
| } | |||
| public void setCorpPapersPicFace(String corpPapersPicFace) { | |||
| this.corpPapersPicFace = corpPapersPicFace; | |||
| } | |||
| public String getCorpPapersPicBack() { | |||
| return corpPapersPicBack; | |||
| } | |||
| public void setCorpPapersPicBack(String corpPapersPicBack) { | |||
| this.corpPapersPicBack = corpPapersPicBack; | |||
| } | |||
| public Integer getTaxpayerType() { | |||
| return taxpayerType; | |||
| } | |||
| public void setTaxpayerType(Integer taxpayerType) { | |||
| this.taxpayerType = taxpayerType; | |||
| } | |||
| public Integer getTaxPapersType() { | |||
| return taxPapersType; | |||
| } | |||
| public void setTaxPapersType(Integer taxPapersType) { | |||
| this.taxPapersType = taxPapersType; | |||
| } | |||
| public String getTaxPapersNumber() { | |||
| return taxPapersNumber; | |||
| } | |||
| public void setTaxPapersNumber(String taxPapersNumber) { | |||
| this.taxPapersNumber = taxPapersNumber; | |||
| } | |||
| public Integer getInvoiceType() { | |||
| return invoiceType; | |||
| } | |||
| public void setInvoiceType(Integer invoiceType) { | |||
| this.invoiceType = invoiceType; | |||
| } | |||
| public String getInvoiceBuyer() { | |||
| return invoiceBuyer; | |||
| } | |||
| public void setInvoiceBuyer(String invoiceBuyer) { | |||
| this.invoiceBuyer = invoiceBuyer; | |||
| } | |||
| public String getTaxpayerIdentifyNumber() { | |||
| return taxpayerIdentifyNumber; | |||
| } | |||
| public void setTaxpayerIdentifyNumber(String taxpayerIdentifyNumber) { | |||
| this.taxpayerIdentifyNumber = taxpayerIdentifyNumber; | |||
| } | |||
| public String getInvoiceAddressPhone() { | |||
| return invoiceAddressPhone; | |||
| } | |||
| public void setInvoiceAddressPhone(String invoiceAddressPhone) { | |||
| this.invoiceAddressPhone = invoiceAddressPhone; | |||
| } | |||
| public String getBankAccountNumber() { | |||
| return bankAccountNumber; | |||
| } | |||
| public void setBankAccountNumber(String bankAccountNumber) { | |||
| this.bankAccountNumber = bankAccountNumber; | |||
| } | |||
| public String getBankAccountPerson() { | |||
| return bankAccountPerson; | |||
| } | |||
| public void setBankAccountPerson(String bankAccountPerson) { | |||
| this.bankAccountPerson = bankAccountPerson; | |||
| } | |||
| public String getBankName() { | |||
| return bankName; | |||
| public WxMerchantCorp getWxMerchantCorp() { | |||
| return wxMerchantCorp; | |||
| } | |||
| public void setBankName(String bankName) { | |||
| this.bankName = bankName; | |||
| public void setWxMerchantCorp(WxMerchantCorp wxMerchantCorp) { | |||
| this.wxMerchantCorp = wxMerchantCorp; | |||
| } | |||
| public String getBankAccount() { | |||
| return bankAccount; | |||
| public WxMerchantTax getWxMerchantTax() { | |||
| return wxMerchantTax; | |||
| } | |||
| public void setBankAccount(String bankAccount) { | |||
| this.bankAccount = bankAccount; | |||
| public void setWxMerchantTax(WxMerchantTax wxMerchantTax) { | |||
| this.wxMerchantTax = wxMerchantTax; | |||
| } | |||
| public Integer getVipDiscountRate1() { | |||
| @@ -0,0 +1,219 @@ | |||
| package com.iformall.domain.po; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.io.Serializable; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| @Table(name = "wx_merchant_corp") | |||
| public class WxMerchantCorp implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @Id | |||
| protected Long id; | |||
| @Transient | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /*商户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | |||
| private Long merchantId; | |||
| /*法人证件类型1居民身份证2军官证3学生证4驾驶证6护照**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件类型1居民身份证2军官证3学生证4驾驶证5护照",name="corpPapersType") | |||
| private Integer corpPapersType; | |||
| /*法人证件号码**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件号码",name="corpPapersNumber") | |||
| private String corpPapersNumber; | |||
| /*法人**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="法人",name="corpPapersPerson") | |||
| private String corpPapersPerson; | |||
| /*法人证件正面**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件正面",name="corpPapersPicFace") | |||
| private String corpPapersPicFace; | |||
| /*法人证件背面**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="法人证件背面",name="corpPapersPicBack") | |||
| private String corpPapersPicBack; | |||
| /*注册地址**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="注册地址",name="corpPapersAddress") | |||
| private String corpPapersAddress; | |||
| /*执照注册号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="执照注册号",name="corpPapersRegisterNumber") | |||
| private String corpPapersRegisterNumber; | |||
| /*执照文件**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="执照文件",name="corpPapersFile") | |||
| private String corpPapersFile; | |||
| /*创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /*更新时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public Long getMerchantId() { | |||
| return merchantId; | |||
| } | |||
| public void setMerchantId(Long _merchantId) { | |||
| merchantId = _merchantId; | |||
| } | |||
| public Integer getCorpPapersType() { | |||
| return corpPapersType; | |||
| } | |||
| public void setCorpPapersType(Integer _corpPapersType) { | |||
| corpPapersType = _corpPapersType; | |||
| } | |||
| public String getCorpPapersNumber() { | |||
| return corpPapersNumber; | |||
| } | |||
| public void setCorpPapersNumber(String _corpPapersNumber) { | |||
| corpPapersNumber = _corpPapersNumber; | |||
| } | |||
| public String getCorpPapersPerson() { | |||
| return corpPapersPerson; | |||
| } | |||
| public void setCorpPapersPerson(String _corpPapersPerson) { | |||
| corpPapersPerson = _corpPapersPerson; | |||
| } | |||
| public String getCorpPapersPicFace() { | |||
| return corpPapersPicFace; | |||
| } | |||
| public void setCorpPapersPicFace(String _corpPapersPicFace) { | |||
| corpPapersPicFace = _corpPapersPicFace; | |||
| } | |||
| public String getCorpPapersPicBack() { | |||
| return corpPapersPicBack; | |||
| } | |||
| public void setCorpPapersPicBack(String _corpPapersPicBack) { | |||
| corpPapersPicBack = _corpPapersPicBack; | |||
| } | |||
| public String getCorpPapersAddress() { | |||
| return corpPapersAddress; | |||
| } | |||
| public void setCorpPapersAddress(String _corpPapersAddress) { | |||
| corpPapersAddress = _corpPapersAddress; | |||
| } | |||
| public String getCorpPapersRegisterNumber() { | |||
| return corpPapersRegisterNumber; | |||
| } | |||
| public void setCorpPapersRegisterNumber(String _corpPapersRegisterNumber) { | |||
| corpPapersRegisterNumber = _corpPapersRegisterNumber; | |||
| } | |||
| public String getCorpPapersFile() { | |||
| return corpPapersFile; | |||
| } | |||
| public void setCorpPapersFile(String _corpPapersFile) { | |||
| corpPapersFile = _corpPapersFile; | |||
| } | |||
| public Date getCreateDate() { | |||
| return createDate; | |||
| } | |||
| public void setCreateDate(Date _createDate) { | |||
| createDate = _createDate; | |||
| } | |||
| public Date getUpdateDate() { | |||
| return updateDate; | |||
| } | |||
| public void setUpdateDate(Date _updateDate) { | |||
| updateDate = _updateDate; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") | |||
| ,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC") | |||
| ,CorpPapersType_ASC("`corpPapersType` ASC"),CorpPapersType_DESC("`corpPapersType` DESC") | |||
| ,CorpPapersNumber_ASC("`corpPapersNumber` ASC"),CorpPapersNumber_DESC("`corpPapersNumber` DESC") | |||
| ,CorpPapersPerson_ASC("`corpPapersPerson` ASC"),CorpPapersPerson_DESC("`corpPapersPerson` DESC") | |||
| ,CorpPapersPicFace_ASC("`corpPapersPicFace` ASC"),CorpPapersPicFace_DESC("`corpPapersPicFace` DESC") | |||
| ,CorpPapersPicBack_ASC("`corpPapersPicBack` ASC"),CorpPapersPicBack_DESC("`corpPapersPicBack` DESC") | |||
| ,CorpPapersAddress_ASC("`corpPapersAddress` ASC"),CorpPapersAddress_DESC("`corpPapersAddress` DESC") | |||
| ,CorpPapersRegisterNumber_ASC("`corpPapersRegisterNumber` ASC"),CorpPapersRegisterNumber_DESC("`corpPapersRegisterNumber` DESC") | |||
| ,CorpPapersFile_ASC("`corpPapersFile` ASC"),CorpPapersFile_DESC("`corpPapersFile` DESC") | |||
| ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | |||
| ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | |||
| ; | |||
| private String value; | |||
| Field(String value){ | |||
| this.value = value; | |||
| } | |||
| public String getValue() { | |||
| return value; | |||
| } | |||
| public void setCol(String value) { | |||
| this.value = value; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return this.getValue(); | |||
| } | |||
| } | |||
| public void setSortColumns(Field... fields) | |||
| { | |||
| if (fields == null || fields.length == 0) { | |||
| return; | |||
| } | |||
| for (int k = 0; k < fields.length; k++) { | |||
| if (fields[k] == null) { | |||
| return; | |||
| } | |||
| } | |||
| StringBuilder sb = new StringBuilder(fields[0].toString()); | |||
| for (int k = 1; k < fields.length; k++) { | |||
| sb.append(","); | |||
| sb.append(fields[k].toString()); | |||
| } | |||
| } | |||
| public void setSortColumns(String sortColumns) | |||
| { | |||
| if (sortColumns == null || "".equals(sortColumns.trim())) { | |||
| return; | |||
| } | |||
| if (sortColumns.contains(",")) { | |||
| String[] cols = sortColumns.split(","); | |||
| List<Field> fList = new ArrayList(); | |||
| for (int k = 0; k < cols.length; k++) { | |||
| fList.add(Field.valueOf(cols[k])); | |||
| } | |||
| this.setSortColumns(fList.toArray(new Field[fList.size()])); | |||
| } else { | |||
| this.setSortColumns(Field.valueOf(sortColumns)); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,249 @@ | |||
| package com.iformall.domain.po; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.io.Serializable; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| @Table(name = "wx_merchant_tax") | |||
| public class WxMerchantTax implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @Id | |||
| protected Long id; | |||
| @Transient | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /*商户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | |||
| private Long merchantId; | |||
| /*纳税人类型1一般纳税人2小规模纳税人**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税人类型1一般纳税人2小规模纳税人",name="taxpayerType") | |||
| private Integer taxpayerType; | |||
| /*纳税证件类型1企业登记证2营业执照3组织机构代码证4税务登记证5银行开户许可证**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税证件类型1企业登记证2营业执照3组织机构代码证4税务登记证5银行开户许可证",name="taxPapersType") | |||
| private Integer taxPapersType; | |||
| /*纳税证件号码**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税证件号码",name="taxPapersNumber") | |||
| private String taxPapersNumber; | |||
| /*发票类型1增值税专用发票2普通发票3定额发票**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="发票类型1增值税专用发票2普通发票3定额发票",name="invoiceType") | |||
| private Integer invoiceType; | |||
| /*购方名称**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="购方名称",name="invoiceBuyer") | |||
| private String invoiceBuyer; | |||
| /*纳税人识别号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="纳税人识别号",name="taxpayerIdentifyNumber") | |||
| private String taxpayerIdentifyNumber; | |||
| /*开票地址及电话**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="开票地址及电话",name="invoiceAddressPhone") | |||
| private String invoiceAddressPhone; | |||
| /*开户行及账号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="开户行及账号",name="bankAccountNumber") | |||
| private String bankAccountNumber; | |||
| /*开户名**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="开户名",name="bankAccountPerson") | |||
| private String bankAccountPerson; | |||
| /*银行名称**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="银行名称",name="bankName") | |||
| private String bankName; | |||
| /*银行账号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="银行账号",name="bankAccount") | |||
| private String bankAccount; | |||
| /*创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /*更新时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public Long getMerchantId() { | |||
| return merchantId; | |||
| } | |||
| public void setMerchantId(Long _merchantId) { | |||
| merchantId = _merchantId; | |||
| } | |||
| public Integer getTaxpayerType() { | |||
| return taxpayerType; | |||
| } | |||
| public void setTaxpayerType(Integer _taxpayerType) { | |||
| taxpayerType = _taxpayerType; | |||
| } | |||
| public Integer getTaxPapersType() { | |||
| return taxPapersType; | |||
| } | |||
| public void setTaxPapersType(Integer _taxPapersType) { | |||
| taxPapersType = _taxPapersType; | |||
| } | |||
| public String getTaxPapersNumber() { | |||
| return taxPapersNumber; | |||
| } | |||
| public void setTaxPapersNumber(String _taxPapersNumber) { | |||
| taxPapersNumber = _taxPapersNumber; | |||
| } | |||
| public Integer getInvoiceType() { | |||
| return invoiceType; | |||
| } | |||
| public void setInvoiceType(Integer _invoiceType) { | |||
| invoiceType = _invoiceType; | |||
| } | |||
| public String getInvoiceBuyer() { | |||
| return invoiceBuyer; | |||
| } | |||
| public void setInvoiceBuyer(String _invoiceBuyer) { | |||
| invoiceBuyer = _invoiceBuyer; | |||
| } | |||
| public String getTaxpayerIdentifyNumber() { | |||
| return taxpayerIdentifyNumber; | |||
| } | |||
| public void setTaxpayerIdentifyNumber(String _taxpayerIdentifyNumber) { | |||
| taxpayerIdentifyNumber = _taxpayerIdentifyNumber; | |||
| } | |||
| public String getInvoiceAddressPhone() { | |||
| return invoiceAddressPhone; | |||
| } | |||
| public void setInvoiceAddressPhone(String _invoiceAddressPhone) { | |||
| invoiceAddressPhone = _invoiceAddressPhone; | |||
| } | |||
| public String getBankAccountNumber() { | |||
| return bankAccountNumber; | |||
| } | |||
| public void setBankAccountNumber(String _bankAccountNumber) { | |||
| bankAccountNumber = _bankAccountNumber; | |||
| } | |||
| public String getBankAccountPerson() { | |||
| return bankAccountPerson; | |||
| } | |||
| public void setBankAccountPerson(String _bankAccountPerson) { | |||
| bankAccountPerson = _bankAccountPerson; | |||
| } | |||
| public String getBankName() { | |||
| return bankName; | |||
| } | |||
| public void setBankName(String _bankName) { | |||
| bankName = _bankName; | |||
| } | |||
| public String getBankAccount() { | |||
| return bankAccount; | |||
| } | |||
| public void setBankAccount(String _bankAccount) { | |||
| bankAccount = _bankAccount; | |||
| } | |||
| public Date getCreateDate() { | |||
| return createDate; | |||
| } | |||
| public void setCreateDate(Date _createDate) { | |||
| createDate = _createDate; | |||
| } | |||
| public Date getUpdateDate() { | |||
| return updateDate; | |||
| } | |||
| public void setUpdateDate(Date _updateDate) { | |||
| updateDate = _updateDate; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") | |||
| ,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC") | |||
| ,TaxpayerType_ASC("`taxpayerType` ASC"),TaxpayerType_DESC("`taxpayerType` DESC") | |||
| ,TaxPapersType_ASC("`taxPapersType` ASC"),TaxPapersType_DESC("`taxPapersType` DESC") | |||
| ,TaxPapersNumber_ASC("`taxPapersNumber` ASC"),TaxPapersNumber_DESC("`taxPapersNumber` DESC") | |||
| ,InvoiceType_ASC("`invoiceType` ASC"),InvoiceType_DESC("`invoiceType` DESC") | |||
| ,InvoiceBuyer_ASC("`invoiceBuyer` ASC"),InvoiceBuyer_DESC("`invoiceBuyer` DESC") | |||
| ,TaxpayerIdentifyNumber_ASC("`taxpayerIdentifyNumber` ASC"),TaxpayerIdentifyNumber_DESC("`taxpayerIdentifyNumber` DESC") | |||
| ,InvoiceAddressPhone_ASC("`invoiceAddressPhone` ASC"),InvoiceAddressPhone_DESC("`invoiceAddressPhone` DESC") | |||
| ,BankAccountNumber_ASC("`bankAccountNumber` ASC"),BankAccountNumber_DESC("`bankAccountNumber` DESC") | |||
| ,BankAccountPerson_ASC("`bankAccountPerson` ASC"),BankAccountPerson_DESC("`bankAccountPerson` DESC") | |||
| ,BankName_ASC("`bankName` ASC"),BankName_DESC("`bankName` DESC") | |||
| ,BankAccount_ASC("`bankAccount` ASC"),BankAccount_DESC("`bankAccount` DESC") | |||
| ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | |||
| ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | |||
| ; | |||
| private String value; | |||
| Field(String value){ | |||
| this.value = value; | |||
| } | |||
| public String getValue() { | |||
| return value; | |||
| } | |||
| public void setCol(String value) { | |||
| this.value = value; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return this.getValue(); | |||
| } | |||
| } | |||
| public void setSortColumns(Field... fields) | |||
| { | |||
| if (fields == null || fields.length == 0) { | |||
| return; | |||
| } | |||
| for (int k = 0; k < fields.length; k++) { | |||
| if (fields[k] == null) { | |||
| return; | |||
| } | |||
| } | |||
| StringBuilder sb = new StringBuilder(fields[0].toString()); | |||
| for (int k = 1; k < fields.length; k++) { | |||
| sb.append(","); | |||
| sb.append(fields[k].toString()); | |||
| } | |||
| } | |||
| public void setSortColumns(String sortColumns) | |||
| { | |||
| if (sortColumns == null || "".equals(sortColumns.trim())) { | |||
| return; | |||
| } | |||
| if (sortColumns.contains(",")) { | |||
| String[] cols = sortColumns.split(","); | |||
| List<Field> fList = new ArrayList(); | |||
| for (int k = 0; k < cols.length; k++) { | |||
| fList.add(Field.valueOf(cols[k])); | |||
| } | |||
| this.setSortColumns(fList.toArray(new Field[fList.size()])); | |||
| } else { | |||
| this.setSortColumns(Field.valueOf(sortColumns)); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxMerchantCorp; | |||
| import java.util.List; | |||
| public interface WxMerchantCorpMapper extends CommonMapper<WxMerchantCorp, String> { | |||
| List<WxMerchantCorp> findList(WxMerchantCorp wxMerchantCorp); | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxMerchantTax; | |||
| import java.util.List; | |||
| public interface WxMerchantTaxMapper extends CommonMapper<WxMerchantTax, String> { | |||
| List<WxMerchantTax> findList(WxMerchantTax wxMerchantTax); | |||
| } | |||
| @@ -55,6 +55,8 @@ public interface WxMerchantService { | |||
| ResultData updateMerchantAdmin(WxMerchant wxMerchant); | |||
| ResultData updateMerchantCoprAndTax(WxMerchant wxMerchant); | |||
| ResultData updateMerchantCorp(WxMerchant wxMerchant); | |||
| ResultData updateMerchantTax(WxMerchant wxMerchant); | |||
| } | |||
| @@ -66,6 +66,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| @Autowired | |||
| WxBillDepositMapper wxBillDepositMapper; | |||
| @Autowired | |||
| WxMerchantCorpMapper wxMerchantCorpMapper; | |||
| @Autowired | |||
| WxMerchantTaxMapper wxMerchantTaxMapper; | |||
| @Override | |||
| public PageInfo<WxMerchant> listAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { | |||
| @@ -135,6 +141,23 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| wxMerchant.setAccountTypeValue(receiver.getReceiverType()); | |||
| } | |||
| WxMerchantCorp wxMerchantCorp = new WxMerchantCorp(); | |||
| wxMerchantCorp.setMerchantId(wxMerchant.getId()); | |||
| List<WxMerchantCorp> corps = wxMerchantCorpMapper.findList(wxMerchantCorp); | |||
| if(!corps.isEmpty()){ | |||
| wxMerchant.setWxMerchantCorp(corps.get(0)); | |||
| }else{ | |||
| wxMerchant.setWxMerchantCorp(new WxMerchantCorp()); | |||
| } | |||
| WxMerchantTax wxMerchantTax = new WxMerchantTax(); | |||
| wxMerchantCorp.setMerchantId(wxMerchant.getId()); | |||
| List<WxMerchantTax> taxes = wxMerchantTaxMapper.findList(wxMerchantTax); | |||
| if(!taxes.isEmpty()){ | |||
| wxMerchant.setWxMerchantTax(taxes.get(0)); | |||
| }else{ | |||
| wxMerchant.setWxMerchantTax(new WxMerchantTax()); | |||
| } | |||
| return wxMerchant; | |||
| } | |||
| @@ -367,34 +390,66 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| @Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updateMerchantCoprAndTax(WxMerchant wxMerchant) { | |||
| public ResultData updateMerchantCorp(WxMerchant wxMerchant) { | |||
| try { | |||
| if (wxMerchant.getId() == null) { | |||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); | |||
| } | |||
| WxMerchant merchant = wxMerchantMapper.selectByPrimaryKey(wxMerchant.getId()); | |||
| merchant.setCorpPapersType(wxMerchant.getCorpPapersType()); | |||
| merchant.setCorpPapersNumber(wxMerchant.getCorpPapersNumber()); | |||
| merchant.setCorpPapersPerson(wxMerchant.getCorpPapersPerson()); | |||
| merchant.setCorpPapersPicFace(wxMerchant.getCorpPapersPicFace()); | |||
| merchant.setCorpPapersPicBack(wxMerchant.getCorpPapersPicBack()); | |||
| merchant.setTaxpayerType(wxMerchant.getTaxpayerType()); | |||
| merchant.setTaxPapersType(wxMerchant.getTaxPapersType()); | |||
| merchant.setTaxPapersNumber(wxMerchant.getTaxPapersNumber()); | |||
| merchant.setInvoiceType(wxMerchant.getInvoiceType()); | |||
| merchant.setInvoiceBuyer(wxMerchant.getInvoiceBuyer()); | |||
| merchant.setTaxpayerIdentifyNumber(wxMerchant.getTaxpayerIdentifyNumber()); | |||
| merchant.setInvoiceAddressPhone(wxMerchant.getInvoiceAddressPhone()); | |||
| merchant.setBankAccountNumber(wxMerchant.getBankAccountNumber()); | |||
| merchant.setBankAccountPerson(wxMerchant.getBankAccountPerson()); | |||
| merchant.setBankName(wxMerchant.getBankName()); | |||
| merchant.setBankAccount(wxMerchant.getBankAccount()); | |||
| //更新商户 | |||
| Date date = new Date(); | |||
| merchant.setUpdateDate(date); | |||
| wxMerchantMapper.updateByPrimaryKeySelective(merchant); | |||
| WxMerchantCorp wxMerchantCorp = new WxMerchantCorp(); | |||
| wxMerchantCorp.setMerchantId(wxMerchant.getId()); | |||
| List<WxMerchantCorp> list = wxMerchantCorpMapper.findList(wxMerchantCorp); | |||
| if(list.isEmpty()){ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxMerchantCorp record = wxMerchant.getWxMerchantCorp(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setTenantId(wxMerchant.getTenantId()); | |||
| record.setMerchantId(wxMerchant.getId()); | |||
| Date date = new Date(); | |||
| record.setCreateDate(date); | |||
| record.setUpdateDate(date); | |||
| wxMerchantCorpMapper.insertSelective(record); | |||
| }else{ | |||
| WxMerchantCorp record = wxMerchant.getWxMerchantCorp(); | |||
| Date date = new Date(); | |||
| record.setUpdateDate(date); | |||
| wxMerchantCorpMapper.updateByPrimaryKeySelective(record); | |||
| } | |||
| } catch (Exception e) { | |||
| logger.error("db failed: 操作法人信息失败, e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| } | |||
| @Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updateMerchantTax(WxMerchant wxMerchant) { | |||
| try { | |||
| if (wxMerchant.getId() == null) { | |||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); | |||
| } | |||
| WxMerchantTax wxMerchantTax = new WxMerchantTax(); | |||
| wxMerchantTax.setMerchantId(wxMerchant.getId()); | |||
| List<WxMerchantTax> list = wxMerchantTaxMapper.findList(wxMerchantTax); | |||
| if(list.isEmpty()){ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxMerchantTax record = wxMerchant.getWxMerchantTax(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setTenantId(wxMerchant.getTenantId()); | |||
| record.setMerchantId(wxMerchant.getId()); | |||
| Date date = new Date(); | |||
| record.setCreateDate(date); | |||
| record.setUpdateDate(date); | |||
| wxMerchantTaxMapper.insertSelective(record); | |||
| }else{ | |||
| WxMerchantTax record = wxMerchant.getWxMerchantTax(); | |||
| Date date = new Date(); | |||
| record.setUpdateDate(date); | |||
| wxMerchantTaxMapper.updateByPrimaryKeySelective(record); | |||
| } | |||
| } catch (Exception e) { | |||
| logger.error("db failed: 更新法人及税务信息失败, e:" + e.getMessage()); | |||
| logger.error("db failed: 操作税务信息失败, e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||
| @@ -678,14 +678,18 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| result.put("buildArea", wxShop.get("buildArea")); | |||
| result.put("operationArea", wxShop.get("operationArea")); | |||
| //商户信息 | |||
| WxMerchant merchant = wxMerchantMapper.selectByPrimaryKey(wxRentContract.getMerchantId()); | |||
| result.put("corpPapersNumber", merchant.getCorpPapersNumber()!=null?merchant.getCorpPapersNumber():" "); | |||
| result.put("corpPapersType", merchant.getCorpPapersType()!=null?EnumPapersType.getEnum(merchant.getCorpPapersType()).getMessage():" "); | |||
| result.put("corpPapersPerson", merchant.getCorpPapersPerson()!=null?merchant.getCorpPapersPerson():" "); | |||
| result.put("taxPapersType", merchant.getTaxPapersType()!=null?EnumTaxpayerType.getEnum(merchant.getTaxPapersType()).getMessage():" "); | |||
| result.put("bankName", merchant.getBankName()!=null?merchant.getBankName():" "); | |||
| result.put("bankAccount", merchant.getBankAccount()!=null?merchant.getBankAccount():" "); | |||
| result.put("invoiceAddressPhone", merchant.getInvoiceAddressPhone()!=null?merchant.getInvoiceAddressPhone():" "); | |||
| WxMerchant merchant = wxMerchantService.getById(wxRentContract.getMerchantId()); | |||
| //法人信息 | |||
| WxMerchantCorp wxMerchantCorp = merchant.getWxMerchantCorp(); | |||
| result.put("corpPapersNumber", wxMerchantCorp.getCorpPapersNumber()!=null?wxMerchantCorp.getCorpPapersNumber():" "); | |||
| result.put("corpPapersType", wxMerchantCorp.getCorpPapersType()!=null?EnumPapersType.getEnum(wxMerchantCorp.getCorpPapersType()).getMessage():" "); | |||
| result.put("corpPapersPerson", wxMerchantCorp.getCorpPapersPerson()!=null?wxMerchantCorp.getCorpPapersPerson():" "); | |||
| //税务信息 | |||
| WxMerchantTax wxMerchantTax = merchant.getWxMerchantTax(); | |||
| result.put("taxPapersType", wxMerchantTax.getTaxPapersType()!=null?EnumTaxpayerType.getEnum(wxMerchantTax.getTaxPapersType()).getMessage():" "); | |||
| result.put("bankName", wxMerchantTax.getBankName()!=null?wxMerchantTax.getBankName():" "); | |||
| result.put("bankAccount", wxMerchantTax.getBankAccount()!=null?wxMerchantTax.getBankAccount():" "); | |||
| result.put("invoiceAddressPhone", wxMerchantTax.getInvoiceAddressPhone()!=null?wxMerchantTax.getInvoiceAddressPhone():" "); | |||
| //租赁合同信息 | |||
| String rentalStartDate = DateUtils.date2String(wxRentContract.getRentalStartDate(), "yyyy-MM-dd"); | |||
| result.put("rentalStartDate", rentalStartDate); | |||
| @@ -0,0 +1,58 @@ | |||
| <?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.iformall.mapper.WxMerchantCorpMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchantCorp"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | |||
| <result column="corp_papers_type" jdbcType="INTEGER" property="corpPapersType" /> | |||
| <result column="corp_papers_number" jdbcType="VARCHAR" property="corpPapersNumber" /> | |||
| <result column="corp_papers_person" jdbcType="VARCHAR" property="corpPapersPerson" /> | |||
| <result column="corp_papers_pic_face" jdbcType="VARCHAR" property="corpPapersPicFace" /> | |||
| <result column="corp_papers_pic_back" jdbcType="VARCHAR" property="corpPapersPicBack" /> | |||
| <result column="corp_papers_address" jdbcType="VARCHAR" property="corpPapersAddress" /> | |||
| <result column="corp_papers_register_number" jdbcType="VARCHAR" property="corpPapersRegisterNumber" /> | |||
| <result column="corp_papers_file" jdbcType="VARCHAR" property="corpPapersFile" /> | |||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | |||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`merchant_id`,`corp_papers_type`,`corp_papers_number`,`corp_papers_person`,`corp_papers_pic_face`,`corp_papers_pic_back`,`corp_papers_address`,`corp_papers_register_number`,`corp_papers_file`,`create_date`,`update_date` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> and `id` = #{id} </if> | |||
| <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if> | |||
| <if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if> | |||
| <if test=" null != corpPapersType "> and `corp_papers_type` = #{corpPapersType} </if> | |||
| <if test=" null != corpPapersNumber "> and `corp_papers_number` = #{corpPapersNumber} </if> | |||
| <if test=" null != corpPapersPerson "> and `corp_papers_person` = #{corpPapersPerson} </if> | |||
| <if test=" null != corpPapersPicFace "> and `corp_papers_pic_face` = #{corpPapersPicFace} </if> | |||
| <if test=" null != corpPapersPicBack "> and `corp_papers_pic_back` = #{corpPapersPicBack} </if> | |||
| <if test=" null != corpPapersAddress "> and `corp_papers_address` = #{corpPapersAddress} </if> | |||
| <if test=" null != corpPapersRegisterNumber "> and `corp_papers_register_number` = #{corpPapersRegisterNumber} </if> | |||
| <if test=" null != corpPapersFile "> and `corp_papers_file` = #{corpPapersFile} </if> | |||
| <if test=" null != createDate "> and `create_date` = #{createDate} </if> | |||
| <if test=" null != updateDate "> and `update_date` = #{updateDate} </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxMerchantCorp" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_merchant_corp | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||
| @@ -16,22 +16,6 @@ | |||
| <result column="business_id" jdbcType="INTEGER" property="businessId"/> | |||
| <result column="shop_type" jdbcType="INTEGER" property="shopType"/> | |||
| <result column="brand" jdbcType="VARCHAR" property="brand"/> | |||
| <result column="corp_papers_type" jdbcType="INTEGER" property="corpPapersType"/> | |||
| <result column="corp_papers_number" jdbcType="VARCHAR" property="corpPapersNumber"/> | |||
| <result column="corp_papers_person" jdbcType="VARCHAR" property="corpPapersPerson"/> | |||
| <result column="corp_papers_pic_face" jdbcType="VARCHAR" property="corpPapersPicFace"/> | |||
| <result column="corp_papers_pic_back" jdbcType="VARCHAR" property="corpPapersPicBack"/> | |||
| <result column="taxpayer_type" jdbcType="INTEGER" property="taxpayerType"/> | |||
| <result column="tax_papers_type" jdbcType="INTEGER" property="taxPapersType"/> | |||
| <result column="tax_papers_number" jdbcType="VARCHAR" property="taxPapersNumber"/> | |||
| <result column="invoice_type" jdbcType="INTEGER" property="invoiceType"/> | |||
| <result column="invoice_buyer" jdbcType="VARCHAR" property="invoiceBuyer"/> | |||
| <result column="taxpayer_identify_number" jdbcType="VARCHAR" property="taxpayerIdentifyNumber"/> | |||
| <result column="invoice_address_phone" jdbcType="VARCHAR" property="invoiceAddressPhone"/> | |||
| <result column="bank_account_number" jdbcType="VARCHAR" property="bankAccountNumber"/> | |||
| <result column="bank_account_person" jdbcType="VARCHAR" property="bankAccountPerson"/> | |||
| <result column="bank_name" jdbcType="VARCHAR" property="bankName"/> | |||
| <result column="bank_account" jdbcType="VARCHAR" property="bankAccount"/> | |||
| <result column="vip_discount_rate1" jdbcType="SMALLINT" property="vipDiscountRate1"/> | |||
| <result column="vip_discount_rate2" jdbcType="SMALLINT" property="vipDiscountRate2"/> | |||
| <result column="vip_discount_rate3" jdbcType="SMALLINT" property="vipDiscountRate3"/> | |||
| @@ -41,10 +25,7 @@ | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | |||
| `business_id`,`shop_type`,`brand`,`corp_papers_type`,`corp_papers_number`,`corp_papers_person`,`corp_papers_pic_face`, | |||
| `corp_papers_pic_back`,`taxpayer_type`,`tax_papers_type`,`tax_papers_number`,`invoice_type`,`invoice_buyer`, | |||
| `taxpayer_identify_number``invoice_address_phone`,`bank_account_number`,`bank_account_person`,`bank_name`,`bank_account`, | |||
| `vip_discount_rate1`,`vip_discount_rate2`,`vip_discount_rate3` | |||
| `business_id`,`shop_type`,`brand`,`vip_discount_rate1`,`vip_discount_rate2`,`vip_discount_rate3` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -0,0 +1,64 @@ | |||
| <?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.iformall.mapper.WxMerchantTaxMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchantTax"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | |||
| <result column="taxpayer_type" jdbcType="INTEGER" property="taxpayerType" /> | |||
| <result column="tax_papers_type" jdbcType="INTEGER" property="taxPapersType" /> | |||
| <result column="tax_papers_number" jdbcType="VARCHAR" property="taxPapersNumber" /> | |||
| <result column="invoice_type" jdbcType="INTEGER" property="invoiceType" /> | |||
| <result column="invoice_buyer" jdbcType="VARCHAR" property="invoiceBuyer" /> | |||
| <result column="taxpayer_identify_number" jdbcType="VARCHAR" property="taxpayerIdentifyNumber" /> | |||
| <result column="invoice_address_phone" jdbcType="VARCHAR" property="invoiceAddressPhone" /> | |||
| <result column="bank_account_number" jdbcType="VARCHAR" property="bankAccountNumber" /> | |||
| <result column="bank_account_person" jdbcType="VARCHAR" property="bankAccountPerson" /> | |||
| <result column="bank_name" jdbcType="VARCHAR" property="bankName" /> | |||
| <result column="bank_account" jdbcType="VARCHAR" property="bankAccount" /> | |||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | |||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`merchant_id`,`taxpayer_type`,`tax_papers_type`,`tax_papers_number`,`invoice_type`,`invoice_buyer`,`taxpayer_identify_number`,`invoice_address_phone`,`bank_account_number`,`bank_account_person`,`bank_name`,`bank_account`,`create_date`,`update_date` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> and `id` = #{id} </if> | |||
| <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if> | |||
| <if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if> | |||
| <if test=" null != taxpayerType "> and `taxpayer_type` = #{taxpayerType} </if> | |||
| <if test=" null != taxPapersType "> and `tax_papers_type` = #{taxPapersType} </if> | |||
| <if test=" null != taxPapersNumber "> and `tax_papers_number` = #{taxPapersNumber} </if> | |||
| <if test=" null != invoiceType "> and `invoice_type` = #{invoiceType} </if> | |||
| <if test=" null != invoiceBuyer "> and `invoice_buyer` = #{invoiceBuyer} </if> | |||
| <if test=" null != taxpayerIdentifyNumber "> and `taxpayer_identify_number` = #{taxpayerIdentifyNumber} </if> | |||
| <if test=" null != invoiceAddressPhone "> and `invoice_address_phone` = #{invoiceAddressPhone} </if> | |||
| <if test=" null != bankAccountNumber "> and `bank_account_number` = #{bankAccountNumber} </if> | |||
| <if test=" null != bankAccountPerson "> and `bank_account_person` = #{bankAccountPerson} </if> | |||
| <if test=" null != bankName "> and `bank_name` = #{bankName} </if> | |||
| <if test=" null != bankAccount "> and `bank_account` = #{bankAccount} </if> | |||
| <if test=" null != createDate "> and `create_date` = #{createDate} </if> | |||
| <if test=" null != updateDate "> and `update_date` = #{updateDate} </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxMerchantTax" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_merchant_tax | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||