| @@ -63,12 +63,6 @@ public class WxAppinfo implements Serializable { | |||||
| /*消息类型**/ | /*消息类型**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="消息类型",name="msgDataFormat") | @io.swagger.annotations.ApiModelProperty(value="消息类型",name="msgDataFormat") | ||||
| private String msgDataFormat; | private String msgDataFormat; | ||||
| /*微信商户ID**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="微信商户ID",name="mchId") | |||||
| private String mchId; | |||||
| /*微信支付回调**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="微信支付回调",name="notifyUrl") | |||||
| private String notifyUrl; | |||||
| /*微信访问token**/ | /*微信访问token**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="微信访问token",name="accessToken") | @io.swagger.annotations.ApiModelProperty(value="微信访问token",name="accessToken") | ||||
| private String accessToken; | private String accessToken; | ||||
| @@ -120,18 +114,6 @@ public class WxAppinfo implements Serializable { | |||||
| public void setMsgDataFormat(String _msgDataFormat) { | public void setMsgDataFormat(String _msgDataFormat) { | ||||
| msgDataFormat = _msgDataFormat; | msgDataFormat = _msgDataFormat; | ||||
| } | } | ||||
| public String getMchId() { | |||||
| return mchId; | |||||
| } | |||||
| public void setMchId(String _mchId) { | |||||
| mchId = _mchId; | |||||
| } | |||||
| public String getNotifyUrl() { | |||||
| return notifyUrl; | |||||
| } | |||||
| public void setNotifyUrl(String _notifyUrl) { | |||||
| notifyUrl = _notifyUrl; | |||||
| } | |||||
| public String getAccessToken() { | public String getAccessToken() { | ||||
| return accessToken; | return accessToken; | ||||
| } | } | ||||
| @@ -163,8 +145,6 @@ public class WxAppinfo implements Serializable { | |||||
| ,Token_ASC("`token` ASC"),Token_DESC("`token` DESC") | ,Token_ASC("`token` ASC"),Token_DESC("`token` DESC") | ||||
| ,AesKey_ASC("`aesKey` ASC"),AesKey_DESC("`aesKey` DESC") | ,AesKey_ASC("`aesKey` ASC"),AesKey_DESC("`aesKey` DESC") | ||||
| ,MsgDataFormat_ASC("`msgDataFormat` ASC"),MsgDataFormat_DESC("`msgDataFormat` DESC") | ,MsgDataFormat_ASC("`msgDataFormat` ASC"),MsgDataFormat_DESC("`msgDataFormat` DESC") | ||||
| ,MchId_ASC("`mchId` ASC"),MchId_DESC("`mchId` DESC") | |||||
| ,NotifyUrl_ASC("`notifyUrl` ASC"),NotifyUrl_DESC("`notifyUrl` DESC") | |||||
| ,AccessToken_ASC("`accessToken` ASC"),AccessToken_DESC("`accessToken` DESC") | ,AccessToken_ASC("`accessToken` ASC"),AccessToken_DESC("`accessToken` DESC") | ||||
| ,LastTokenTime_ASC("`lastTokenTime` ASC"),LastTokenTime_DESC("`lastTokenTime` DESC") | ,LastTokenTime_ASC("`lastTokenTime` ASC"),LastTokenTime_DESC("`lastTokenTime` DESC") | ||||
| ,ExpiresIn_ASC("`expiresIn` ASC"),ExpiresIn_DESC("`expiresIn` DESC") | ,ExpiresIn_ASC("`expiresIn` ASC"),ExpiresIn_DESC("`expiresIn` DESC") | ||||
| @@ -1,40 +1,42 @@ | |||||
| package com.simple.domain.po; | package com.simple.domain.po; | ||||
| import javax.persistence.Id; | |||||
| import javax.persistence.Table; | |||||
| import javax.persistence.*; | |||||
| import java.util.*; | |||||
| import java.math.*; | |||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.io.Serializable; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.List; | import java.util.List; | ||||
| import javax.persistence.Id; | |||||
| import java.io.Serializable; | |||||
| @Table(name = "wx_mall") | @Table(name = "wx_mall") | ||||
| public class WxMall implements Serializable { | public class WxMall implements Serializable { | ||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @Id | @Id | ||||
| protected Long mallId; | |||||
| protected Long id; | |||||
| @Transient | @Transient | ||||
| protected List<String> ids; | |||||
| protected List<Long> ids; | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| public Long getMallId() { | |||||
| return mallId; | |||||
| public Long getId() { | |||||
| return id; | |||||
| } | } | ||||
| public void setMallId(Long mallId) { | |||||
| this.mallId = mallId; | |||||
| public void setId(Long id) { | |||||
| this.id = id; | |||||
| } | } | ||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| return sortColumns; | return sortColumns; | ||||
| } | } | ||||
| public List<String> getIds() { | |||||
| public List<Long> getIds() { | |||||
| return ids; | return ids; | ||||
| } | } | ||||
| public void setIds(List<String> ids) { | |||||
| public void setIds(List<Long> ids) { | |||||
| this.ids = ids; | this.ids = ids; | ||||
| } | } | ||||
| @@ -76,6 +78,9 @@ public class WxMall implements Serializable { | |||||
| /*车位数**/ | /*车位数**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="车位数",name="parkPlaceNumber") | @io.swagger.annotations.ApiModelProperty(value="车位数",name="parkPlaceNumber") | ||||
| private Integer parkPlaceNumber; | private Integer parkPlaceNumber; | ||||
| /*支付ID,参看wx_pay_account**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付ID,参看wx_pay_account",name="payId") | |||||
| private Long payId; | |||||
| public String getTenantId() { | public String getTenantId() { | ||||
| return tenantId; | return tenantId; | ||||
| } | } | ||||
| @@ -148,12 +153,18 @@ public class WxMall implements Serializable { | |||||
| public void setParkPlaceNumber(Integer _parkPlaceNumber) { | public void setParkPlaceNumber(Integer _parkPlaceNumber) { | ||||
| parkPlaceNumber = _parkPlaceNumber; | parkPlaceNumber = _parkPlaceNumber; | ||||
| } | } | ||||
| public Long getPayId() { | |||||
| return payId; | |||||
| } | |||||
| public void setPayId(Long _payId) { | |||||
| payId = _payId; | |||||
| } | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`mallId` ASC"),Id_DESC("`mallId` DESC") | |||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||||
| ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") | ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") | ||||
| ,Name_ASC("`name` ASC"),Name_DESC("`name` DESC") | ,Name_ASC("`name` ASC"),Name_DESC("`name` DESC") | ||||
| ,Group_ASC("`group` ASC"),Group_DESC("`group` DESC") | ,Group_ASC("`group` ASC"),Group_DESC("`group` DESC") | ||||
| @@ -166,6 +177,7 @@ public class WxMall implements Serializable { | |||||
| ,OperatingArea_ASC("`operatingArea` ASC"),OperatingArea_DESC("`operatingArea` DESC") | ,OperatingArea_ASC("`operatingArea` ASC"),OperatingArea_DESC("`operatingArea` DESC") | ||||
| ,ParkArea_ASC("`parkArea` ASC"),ParkArea_DESC("`parkArea` DESC") | ,ParkArea_ASC("`parkArea` ASC"),ParkArea_DESC("`parkArea` DESC") | ||||
| ,ParkPlaceNumber_ASC("`parkPlaceNumber` ASC"),ParkPlaceNumber_DESC("`parkPlaceNumber` DESC") | ,ParkPlaceNumber_ASC("`parkPlaceNumber` ASC"),ParkPlaceNumber_DESC("`parkPlaceNumber` DESC") | ||||
| ,PayId_ASC("`payId` ASC"),PayId_DESC("`payId` DESC") | |||||
| ; | ; | ||||
| private String value; | private String value; | ||||
| Field(String value){ | Field(String value){ | ||||
| @@ -16,7 +16,7 @@ public class WxMerchant implements Serializable { | |||||
| protected Long id; | protected Long id; | ||||
| @Transient | @Transient | ||||
| protected List<String> ids; | |||||
| protected List<Long> ids; | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| @@ -32,10 +32,10 @@ public class WxMerchant implements Serializable { | |||||
| return sortColumns; | return sortColumns; | ||||
| } | } | ||||
| public List<String> getIds() { | |||||
| public List<Long> getIds() { | |||||
| return ids; | return ids; | ||||
| } | } | ||||
| public void setIds(List<String> ids) { | |||||
| public void setIds(List<Long> ids) { | |||||
| this.ids = ids; | this.ids = ids; | ||||
| } | } | ||||
| @@ -59,9 +59,9 @@ public class WxMerchant implements Serializable { | |||||
| /*银行开户行**/ | /*银行开户行**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="银行开户行",name="bankName") | @io.swagger.annotations.ApiModelProperty(value="银行开户行",name="bankName") | ||||
| private String bankName; | private String bankName; | ||||
| /*微信收款账号**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="微信收款账号",name="wxchatAccount") | |||||
| private String wxchatAccount; | |||||
| /*支付ID,参看wx_pay_account**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付ID,参看wx_pay_account",name="payId") | |||||
| private Long payId; | |||||
| /*创建时间**/ | /*创建时间**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @@ -110,11 +110,11 @@ public class WxMerchant implements Serializable { | |||||
| public void setBankName(String _bankName) { | public void setBankName(String _bankName) { | ||||
| bankName = _bankName; | bankName = _bankName; | ||||
| } | } | ||||
| public String getWxchatAccount() { | |||||
| return wxchatAccount; | |||||
| public Long getPayId() { | |||||
| return payId; | |||||
| } | } | ||||
| public void setWxchatAccount(String _wxchatAccount) { | |||||
| wxchatAccount = _wxchatAccount; | |||||
| public void setPayId(Long _payId) { | |||||
| payId = _payId; | |||||
| } | } | ||||
| public Date getCreateDate() { | public Date getCreateDate() { | ||||
| return createDate; | return createDate; | ||||
| @@ -152,7 +152,7 @@ public class WxMerchant implements Serializable { | |||||
| ,LinkPhone_ASC("`linkPhone` ASC"),LinkPhone_DESC("`linkPhone` DESC") | ,LinkPhone_ASC("`linkPhone` ASC"),LinkPhone_DESC("`linkPhone` DESC") | ||||
| ,BankCard_ASC("`bankCard` ASC"),BankCard_DESC("`bankCard` DESC") | ,BankCard_ASC("`bankCard` ASC"),BankCard_DESC("`bankCard` DESC") | ||||
| ,BankName_ASC("`bankName` ASC"),BankName_DESC("`bankName` DESC") | ,BankName_ASC("`bankName` ASC"),BankName_DESC("`bankName` DESC") | ||||
| ,WxchatAccount_ASC("`wxchatAccount` ASC"),WxchatAccount_DESC("`wxchatAccount` DESC") | |||||
| ,PayId_ASC("`payId` ASC"),PayId_DESC("`payId` DESC") | |||||
| ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | ||||
| ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | ||||
| ,CarVendorType_ASC("`carVendorType` ASC"),CarVendorType_DESC("`carVendorType` DESC") | ,CarVendorType_ASC("`carVendorType` ASC"),CarVendorType_DESC("`carVendorType` DESC") | ||||
| @@ -0,0 +1,132 @@ | |||||
| package com.simple.domain.po; | |||||
| import javax.persistence.*; | |||||
| import java.util.*; | |||||
| import java.math.*; | |||||
| import javax.persistence.Transient; | |||||
| import java.util.List; | |||||
| import javax.persistence.Id; | |||||
| import java.io.Serializable; | |||||
| @Table(name = "wx_pay_account") | |||||
| public class WxPayAccount 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; | |||||
| } | |||||
| /***/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="mchId") | |||||
| private String mchId; | |||||
| /***/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="apiKey") | |||||
| private String apiKey; | |||||
| /*证书本地存放位置**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="证书本地存放位置",name="certPath") | |||||
| private String certPath; | |||||
| public String getMchId() { | |||||
| return mchId; | |||||
| } | |||||
| public void setMchId(String _mchId) { | |||||
| mchId = _mchId; | |||||
| } | |||||
| public String getApiKey() { | |||||
| return apiKey; | |||||
| } | |||||
| public void setApiKey(String _apiKey) { | |||||
| apiKey = _apiKey; | |||||
| } | |||||
| public String getCertPath() { | |||||
| return certPath; | |||||
| } | |||||
| public void setCertPath(String _certPath) { | |||||
| certPath = _certPath; | |||||
| } | |||||
| public static enum Field | |||||
| { | |||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||||
| ,MchId_ASC("`mchId` ASC"),MchId_DESC("`mchId` DESC") | |||||
| ,ApiKey_ASC("`apiKey` ASC"),ApiKey_DESC("`apiKey` DESC") | |||||
| ,CertPath_ASC("`certPath` ASC"),CertPath_DESC("`certPath` 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(WxPayAccount.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(","); | |||||
| java.util.List<Field> fList = new java.util.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)); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -5,7 +5,7 @@ import com.simple.common.CommonMapper; | |||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||
| import com.simple.domain.po.WxAppinfo; | import com.simple.domain.po.WxAppinfo; | ||||
| public interface WxAppinfoMapper extends CommonMapper<WxAppinfo, String> { | |||||
| public interface WxAppinfoMapper extends CommonMapper<WxAppinfo, Long> { | |||||
| List<WxAppinfo> findList(WxAppinfo wxAppinfo); | List<WxAppinfo> findList(WxAppinfo wxAppinfo); | ||||
| @@ -5,7 +5,7 @@ import com.simple.common.CommonMapper; | |||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||
| import com.simple.domain.po.WxMall; | import com.simple.domain.po.WxMall; | ||||
| public interface WxMallMapper extends CommonMapper<WxMall, String> { | |||||
| public interface WxMallMapper extends CommonMapper<WxMall, Long> { | |||||
| List<WxMall> findList(WxMall wxMall); | List<WxMall> findList(WxMall wxMall); | ||||
| @@ -5,7 +5,7 @@ import com.simple.common.CommonMapper; | |||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||
| import com.simple.domain.po.WxMerchant; | import com.simple.domain.po.WxMerchant; | ||||
| public interface WxMerchantMapper extends CommonMapper<WxMerchant, String> { | |||||
| public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> { | |||||
| List<WxMerchant> findList(WxMerchant wxMerchant); | List<WxMerchant> findList(WxMerchant wxMerchant); | ||||
| @@ -6,7 +6,7 @@ import com.simple.domain.vo.OrderVo; | |||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||
| import com.simple.domain.po.WxOrder; | import com.simple.domain.po.WxOrder; | ||||
| public interface WxOrderMapper extends CommonMapper<WxOrder, String> { | |||||
| public interface WxOrderMapper extends CommonMapper<WxOrder, Long> { | |||||
| List<WxOrder> findList(WxOrder wxOrder); | List<WxOrder> findList(WxOrder wxOrder); | ||||
| @@ -0,0 +1,17 @@ | |||||
| package com.simple.mapper; | |||||
| import java.util.*; | |||||
| import com.simple.common.CommonMapper; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import com.simple.domain.po.WxPayAccount; | |||||
| public interface WxPayAccountMapper extends CommonMapper<WxPayAccount, Long> { | |||||
| List<WxPayAccount> findList(WxPayAccount wxPayAccount); | |||||
| } | |||||
| @@ -0,0 +1,48 @@ | |||||
| package com.simple.service; | |||||
| import java.util.*; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.simple.domain.po.WxPayAccount; | |||||
| public interface WxPayAccountService { | |||||
| /** | |||||
| * 根据实体查询分页列表 | |||||
| * | |||||
| * @param record | |||||
| * @param offset | |||||
| * @param limit | |||||
| * @return | |||||
| */ | |||||
| PageInfo<WxPayAccount> listAsPage(WxPayAccount record, Integer pageIndex, Integer pageSize); | |||||
| /** | |||||
| * 根据Id获得实体 | |||||
| * | |||||
| * @param id | |||||
| * @return | |||||
| */ | |||||
| WxPayAccount getById(Long id); | |||||
| /** | |||||
| * 保存或更新实体 | |||||
| * | |||||
| * @param record | |||||
| */ | |||||
| void saveOrUpdate(WxPayAccount record); | |||||
| /** | |||||
| * 根据Id删除实体 | |||||
| * | |||||
| * @param id | |||||
| */ | |||||
| void deleteById(Long id); | |||||
| } | |||||
| @@ -29,10 +29,10 @@ public class WxMallServiceImpl implements WxMallService { | |||||
| @Override | @Override | ||||
| public void saveOrUpdate(WxMall record) { | public void saveOrUpdate(WxMall record) { | ||||
| if (record.getMallId() == null) { | |||||
| if (record.getId() == null) { | |||||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setMallId(idWorker.nextId()); | |||||
| record.setId(idWorker.nextId()); | |||||
| record.setTenantId(String.valueOf(idWorker.nextId())); | record.setTenantId(String.valueOf(idWorker.nextId())); | ||||
| wxMallMapper.insertSelective(record); | wxMallMapper.insertSelective(record); | ||||
| } else { | } else { | ||||
| @@ -0,0 +1,54 @@ | |||||
| package com.simple.service.impl; | |||||
| import java.util.*; | |||||
| import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.simple.domain.po.WxPayAccount; | |||||
| import com.simple.mapper.WxPayAccountMapper; | |||||
| import com.simple.service.WxPayAccountService; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| import com.simple.common.IdWorker; | |||||
| @Service | |||||
| public class WxPayAccountServiceImpl implements WxPayAccountService { | |||||
| @Autowired | |||||
| WxPayAccountMapper wxPayAccountMapper; | |||||
| @Override | |||||
| public PageInfo<WxPayAccount> listAsPage(WxPayAccount record, Integer pageIndex, Integer pageSize) { | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPayAccountMapper.findList(record)); | |||||
| } | |||||
| @Override | |||||
| public WxPayAccount getById(Long id) { | |||||
| return wxPayAccountMapper.selectByPrimaryKey(id); | |||||
| } | |||||
| @Override | |||||
| public void saveOrUpdate(WxPayAccount record) { | |||||
| if (record.getId() == null) { | |||||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||||
| final IdWorker idWorker = IdWorker.get(); | |||||
| record.setId(idWorker.nextId()); | |||||
| wxPayAccountMapper.insertSelective(record); | |||||
| } else { | |||||
| wxPayAccountMapper.updateByPrimaryKeySelective(record); | |||||
| } | |||||
| } | |||||
| @Override | |||||
| public void deleteById(Long id) { | |||||
| wxPayAccountMapper.deleteByPrimaryKey(id); | |||||
| } | |||||
| } | |||||
| @@ -112,13 +112,13 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||||
| String noncestr = Utility.generate32UUID(); | String noncestr = Utility.generate32UUID(); | ||||
| WxPayOrderP wxPayOrderP = new WxPayOrderP(); | WxPayOrderP wxPayOrderP = new WxPayOrderP(); | ||||
| wxPayOrderP.setAppid(appInfo.getAppId()); | wxPayOrderP.setAppid(appInfo.getAppId()); | ||||
| wxPayOrderP.setMch_id(appInfo.getMchId()); | |||||
| //wxPayOrderP.setMch_id(appInfo.getMchId()); | |||||
| wxPayOrderP.setNonce_str(noncestr); | wxPayOrderP.setNonce_str(noncestr); | ||||
| wxPayOrderP.setBody(body); | wxPayOrderP.setBody(body); | ||||
| wxPayOrderP.setOut_trade_no(record.getPayOrderNo()); | wxPayOrderP.setOut_trade_no(record.getPayOrderNo()); | ||||
| wxPayOrderP.setTotal_fee(order.getPayment()); | wxPayOrderP.setTotal_fee(order.getPayment()); | ||||
| wxPayOrderP.setSpbill_create_ip(record.getIp()); // 终端IP | wxPayOrderP.setSpbill_create_ip(record.getIp()); // 终端IP | ||||
| wxPayOrderP.setNotify_url(appInfo.getNotifyUrl()); | |||||
| //wxPayOrderP.setNotify_url(appInfo.getNotifyUrl()); | |||||
| wxPayOrderP.setTrade_type(WxPay.TradeType.APP.name()); // 终端类型 | wxPayOrderP.setTrade_type(WxPay.TradeType.APP.name()); // 终端类型 | ||||
| wxPayOrderP.setProduct_id(String.valueOf(order.getId())); // 订单ID | wxPayOrderP.setProduct_id(String.valueOf(order.getId())); // 订单ID | ||||
| wxPayOrderP.setTime_start(Utility.getDataFormatStringYYYYMMDDHHmmss(currentTime)); | wxPayOrderP.setTime_start(Utility.getDataFormatStringYYYYMMDDHHmmss(currentTime)); | ||||
| @@ -10,15 +10,13 @@ | |||||
| <result column="token" jdbcType="VARCHAR" property="token" /> | <result column="token" jdbcType="VARCHAR" property="token" /> | ||||
| <result column="aes_key" jdbcType="VARCHAR" property="aesKey" /> | <result column="aes_key" jdbcType="VARCHAR" property="aesKey" /> | ||||
| <result column="msg_data_format" jdbcType="VARCHAR" property="msgDataFormat" /> | <result column="msg_data_format" jdbcType="VARCHAR" property="msgDataFormat" /> | ||||
| <result column="mch_id" jdbcType="VARCHAR" property="mchId" /> | |||||
| <result column="notify_url" jdbcType="VARCHAR" property="notifyUrl" /> | |||||
| <result column="access_token" jdbcType="VARCHAR" property="accessToken" /> | <result column="access_token" jdbcType="VARCHAR" property="accessToken" /> | ||||
| <result column="last_token_time" jdbcType="TIMESTAMP" property="lastTokenTime" /> | <result column="last_token_time" jdbcType="TIMESTAMP" property="lastTokenTime" /> | ||||
| <result column="expires_in" jdbcType="INTEGER" property="expiresIn" /> | <result column="expires_in" jdbcType="INTEGER" property="expiresIn" /> | ||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`app_id`,`name`,`secret`,`token`,`aes_key`,`msg_data_format`,`mch_id`,`notify_url`,`access_token`,`last_token_time`,`expires_in` | |||||
| `id`,`tenant_id`,`app_id`,`name`,`secret`,`token`,`aes_key`,`msg_data_format`,`access_token`,`last_token_time`,`expires_in` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -61,15 +59,6 @@ | |||||
| <if test=" null != msgDataFormat "> | <if test=" null != msgDataFormat "> | ||||
| and `msg_data_format` like concat('%', #{msgDataFormat},'%') | and `msg_data_format` like concat('%', #{msgDataFormat},'%') | ||||
| </if> | |||||
| <if test=" null != mchId "> | |||||
| and `mch_id` like concat('%', #{mchId},'%') | |||||
| </if> | |||||
| <if test=" null != notifyUrl "> | |||||
| and `notify_url` like concat('%', #{notifyUrl},'%') | |||||
| </if> | </if> | ||||
| @@ -2,7 +2,7 @@ | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.simple.mapper.WxMallMapper"> | <mapper namespace="com.simple.mapper.WxMallMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.simple.domain.po.WxMall"> | <resultMap id="BaseResultMap" type="com.simple.domain.po.WxMall"> | ||||
| <id column="mall_id" jdbcType="BIGINT" property="mallId" /> | |||||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | ||||
| <result column="name" jdbcType="VARCHAR" property="name" /> | <result column="name" jdbcType="VARCHAR" property="name" /> | ||||
| <result column="group" jdbcType="VARCHAR" property="group" /> | <result column="group" jdbcType="VARCHAR" property="group" /> | ||||
| @@ -15,17 +15,18 @@ | |||||
| <result column="operating_area" jdbcType="DECIMAL" property="operatingArea" /> | <result column="operating_area" jdbcType="DECIMAL" property="operatingArea" /> | ||||
| <result column="park_area" jdbcType="DECIMAL" property="parkArea" /> | <result column="park_area" jdbcType="DECIMAL" property="parkArea" /> | ||||
| <result column="park_place_number" jdbcType="INTEGER" property="parkPlaceNumber" /> | <result column="park_place_number" jdbcType="INTEGER" property="parkPlaceNumber" /> | ||||
| <result column="pay_id" jdbcType="BIGINT" property="payId" /> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `mall_id`,`tenant_id`,`name`,`group`,`country`,`province`,`city`,`addr`,`wiwide_id`,`total_area`,`operating_area`,`park_area`,`park_place_number` | |||||
| `id`,`tenant_id`,`name`,`group`,`country`,`province`,`city`,`addr`,`wiwide_id`,`total_area`,`operating_area`,`park_area`,`park_place_number`,`pay_id` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != mallId "> | |||||
| and `mall_id` = #{mallId} | |||||
| <if test=" null != id "> | |||||
| and `id` = #{id} | |||||
| </if> | </if> | ||||
| @@ -87,9 +88,14 @@ | |||||
| <if test=" null != parkPlaceNumber "> | <if test=" null != parkPlaceNumber "> | ||||
| and `park_place_number` = #{parkPlaceNumber} | and `park_place_number` = #{parkPlaceNumber} | ||||
| </if> | |||||
| <if test=" null != payId "> | |||||
| and `pay_id` = #{payId} | |||||
| </if> | </if> | ||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and mall_id in | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| #{idItem} | #{idItem} | ||||
| </foreach> | </foreach> | ||||
| @@ -9,7 +9,7 @@ | |||||
| <result column="link_phone" jdbcType="VARCHAR" property="linkPhone" /> | <result column="link_phone" jdbcType="VARCHAR" property="linkPhone" /> | ||||
| <result column="bank_card" jdbcType="VARCHAR" property="bankCard" /> | <result column="bank_card" jdbcType="VARCHAR" property="bankCard" /> | ||||
| <result column="bank_name" jdbcType="VARCHAR" property="bankName" /> | <result column="bank_name" jdbcType="VARCHAR" property="bankName" /> | ||||
| <result column="wxchat_account" jdbcType="VARCHAR" property="wxchatAccount" /> | |||||
| <result column="pay_id" jdbcType="BIGINT" property="payId" /> | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | ||||
| <result column="car_vendor_type" jdbcType="INTEGER" property="carVendorType" /> | <result column="car_vendor_type" jdbcType="INTEGER" property="carVendorType" /> | ||||
| @@ -17,7 +17,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`bank_card`,`bank_name`,`wxchat_account`,`create_date`,`update_date`,`car_vendor_type`,`car_params` | |||||
| `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`bank_card`,`bank_name`,`pay_id`,`create_date`,`update_date`,`car_vendor_type`,`car_params` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -58,8 +58,8 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != wxchatAccount "> | |||||
| and `wxchat_account` like concat('%', #{wxchatAccount},'%') | |||||
| <if test=" null != payId "> | |||||
| and `pay_id` = #{payId} | |||||
| </if> | </if> | ||||
| @@ -0,0 +1,56 @@ | |||||
| <?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.simple.mapper.WxPayAccountMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.simple.domain.po.WxPayAccount"> | |||||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||||
| <result column="mch_id" jdbcType="VARCHAR" property="mchId" /> | |||||
| <result column="api_key" jdbcType="VARCHAR" property="apiKey" /> | |||||
| <result column="cert_path" jdbcType="VARCHAR" property="certPath" /> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`mch_id`,`api_key`,`cert_path` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1 = 1 | |||||
| <if test=" null != id "> | |||||
| and `id` = #{id} | |||||
| </if> | |||||
| <if test=" null != mchId "> | |||||
| and `mch_id` like concat('%', #{mchId},'%') | |||||
| </if> | |||||
| <if test=" null != apiKey "> | |||||
| and `api_key` like concat('%', #{apiKey},'%') | |||||
| </if> | |||||
| <if test=" null != certPath "> | |||||
| and `cert_path` like concat('%', #{certPath},'%') | |||||
| </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.simple.domain.po.WxPayAccount" resultMap="BaseResultMap"> | |||||
| select <include refid="allColumns" /> from wx_pay_account | |||||
| <include refid="dynamicWhereConditions" /> | |||||
| </select> | |||||
| </mapper> | |||||