12 changed files with 416 additions and 6 deletions
-
28cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/HnaPayController.java
-
22cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/bhnapay/CereBusinessHnapayDao.java
-
24cereshop-admin/src/main/java/com/shop/cereshop/admin/service/bhnapay/CereBusinessHnapayService.java
-
64cereshop-admin/src/main/java/com/shop/cereshop/admin/service/bhnapay/impl/CereBusinessHnapayServiceImpl.java
-
30cereshop-admin/src/main/resources/mybatis/mapper/bhnapay/CereBusinessHnapayDAO.xml
-
7cereshop-business/src/main/java/com/shop/cereshop/business/controller/HnaPayController.java
-
24cereshop-business/src/main/java/com/shop/cereshop/business/dao/bhnapay/CereBusinessHnapayDao.java
-
23cereshop-business/src/main/java/com/shop/cereshop/business/service/bhnapay/CereBusinessHnapayService.java
-
50cereshop-business/src/main/java/com/shop/cereshop/business/service/bhnapay/impl/CereBusinessHnapayServiceImpl.java
-
34cereshop-business/src/main/resources/mybatis/mapper/bhnapay/CereBusinessHnapayDAO.xml
-
94cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/bhnapay/CereBusinessHnapay.java
-
22doc/3.0/update.sql
@ -0,0 +1,22 @@ |
|||
package com.shop.cereshop.admin.dao.bhnapay; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 11:49 |
|||
*/ |
|||
@Mapper |
|||
public interface CereBusinessHnapayDao extends BaseMapper<CereBusinessHnapay> { |
|||
|
|||
CereBusinessHnapay getByBusinessId(@Param("businessId") Long businessId); |
|||
|
|||
void updateHnaPayState(@Param("businessId") Long businessId, @Param("status") Integer status); |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.shop.cereshop.admin.service.bhnapay; |
|||
|
|||
import com.shop.cereshop.admin.param.business.BusinessHnapayCreateParam; |
|||
import com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 14:19 |
|||
*/ |
|||
public interface CereBusinessHnapayService { |
|||
|
|||
void save(CereBusinessHnapay record) throws CoBusinessException; |
|||
|
|||
void update(CereBusinessHnapay businessHnapay) throws CoBusinessException; |
|||
|
|||
CereBusinessHnapay getByBusinessId(Long businessId) throws CoBusinessException; |
|||
|
|||
void createBusinessHnaPay(BusinessHnapayCreateParam param, String xsPayId, String bindCardAgrNo) throws CoBusinessException; |
|||
|
|||
void updateHnaPayState(Long businessId, Integer status); |
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.shop.cereshop.admin.service.bhnapay.impl; |
|||
|
|||
import com.shop.cereshop.admin.dao.bhnapay.CereBusinessHnapayDao; |
|||
import com.shop.cereshop.admin.param.business.BusinessHnapayCreateParam; |
|||
import com.shop.cereshop.admin.service.bhnapay.CereBusinessHnapayService; |
|||
import com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Isolation; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 14:21 |
|||
*/ |
|||
@Service |
|||
public class CereBusinessHnapayServiceImpl implements CereBusinessHnapayService { |
|||
|
|||
@Autowired |
|||
private CereBusinessHnapayDao cereBusinessHnapayDao; |
|||
|
|||
@Override |
|||
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|||
public void save(CereBusinessHnapay record) throws CoBusinessException { |
|||
cereBusinessHnapayDao.insert(record); |
|||
} |
|||
|
|||
@Override |
|||
public void update(CereBusinessHnapay businessHnapay) throws CoBusinessException { |
|||
cereBusinessHnapayDao.updateById(businessHnapay); |
|||
} |
|||
|
|||
@Override |
|||
public CereBusinessHnapay getByBusinessId(Long businessId) throws CoBusinessException { |
|||
return cereBusinessHnapayDao.getByBusinessId(businessId); |
|||
} |
|||
|
|||
@Override |
|||
public void createBusinessHnaPay(BusinessHnapayCreateParam param, String xsPayId, String bindCardAgrNo) throws CoBusinessException { |
|||
CereBusinessHnapay hnapay = new CereBusinessHnapay(); |
|||
hnapay.setBusinessId(param.getBusinessId()); |
|||
hnapay.setXsPayId(xsPayId); |
|||
hnapay.setBindCardAgrNo(bindCardAgrNo); |
|||
hnapay.setName(param.getName()); |
|||
hnapay.setEnterpriseCode(param.getEnterpriseCode()); |
|||
hnapay.setValidDate(param.getValidDate()); |
|||
hnapay.setBankCard(param.getBankCard()); |
|||
hnapay.setBankCode(param.getBankCode()); |
|||
hnapay.setBankProvince(param.getBankProvince()); |
|||
hnapay.setBankCity(param.getBankCity()); |
|||
hnapay.setBankBranch(param.getBankBranch()); |
|||
hnapay.setContactPhone(param.getContactPhone()); |
|||
cereBusinessHnapayDao.insert(hnapay); |
|||
} |
|||
|
|||
@Override |
|||
public void updateHnaPayState(Long businessId, Integer status) { |
|||
cereBusinessHnapayDao.updateHnaPayState(businessId, status); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
<?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.shop.cereshop.admin.dao.bhnapay.CereBusinessHnapayDao"> |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay"> |
|||
<id column="id" jdbcType="BIGINT" property="id"/> |
|||
<result column="business_id" jdbcType="BIGINT" property="businessId" /> |
|||
<result column="xs_pay_id" jdbcType="VARCHAR" property="xsPayId" /> |
|||
<result column="bind_card_agr_no" jdbcType="VARCHAR" property="bindCardAgrNo" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="enterprise_code" jdbcType="VARCHAR" property="enterpriseCode" /> |
|||
<result column="valid_date" jdbcType="VARCHAR" property="validDate" /> |
|||
<result column="bank_card" jdbcType="VARCHAR" property="bankCard" /> |
|||
<result column="bank_code" jdbcType="VARCHAR" property="bankCode" /> |
|||
<result column="bank_province" jdbcType="VARCHAR" property="bankProvince" /> |
|||
<result column="bank_city" jdbcType="VARCHAR" property="bankCity" /> |
|||
<result column="bank_branch" jdbcType="VARCHAR" property="bankBranch" /> |
|||
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" /> |
|||
<result column="status" jdbcType="INTEGER" property="status" /> |
|||
<result column="reject_reason" jdbcType="INTEGER" property="rejectReason" /> |
|||
<result column="cert_type_list" jdbcType="INTEGER" property="certTypeList" /> |
|||
</resultMap> |
|||
|
|||
<select id="getByBusinessId" parameterType="java.lang.Object" resultType="com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay"> |
|||
SELECT * FROM cere_business_hnapay where business_id = #{businessId} |
|||
</select> |
|||
|
|||
<update id="updateHnaPayState"> |
|||
update cere_business_hnapay set status=#{status} where business_id = #{businessId} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,24 @@ |
|||
package com.shop.cereshop.business.dao.bhnapay; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 11:49 |
|||
*/ |
|||
@Mapper |
|||
public interface CereBusinessHnapayDao extends BaseMapper<CereBusinessHnapay> { |
|||
|
|||
CereBusinessHnapay getByBusinessId(@Param("businessId") Long businessId); |
|||
|
|||
void updateHnaPayState(@Param("businessId") Long businessId, @Param("status") Integer status); |
|||
|
|||
void updateHnaPayApproval(@Param("businessId") Long businessId, @Param("rejectReason") String rejectReason, @Param("certTypeList") String certTypeList); |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.shop.cereshop.business.service.bhnapay; |
|||
|
|||
import com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 14:19 |
|||
*/ |
|||
public interface CereBusinessHnapayService { |
|||
|
|||
void save(CereBusinessHnapay record) throws CoBusinessException; |
|||
|
|||
void update(CereBusinessHnapay businessHnapay) throws CoBusinessException; |
|||
|
|||
CereBusinessHnapay getByBusinessId(Long businessId) throws CoBusinessException; |
|||
|
|||
void updateHnaPayState(Long businessId, Integer status); |
|||
|
|||
void updateHnaPayApproval(Long businessId, String rejectReason, String certTypeList); |
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.shop.cereshop.business.service.bhnapay.impl; |
|||
|
|||
import com.shop.cereshop.business.dao.bhnapay.CereBusinessHnapayDao; |
|||
import com.shop.cereshop.business.service.bhnapay.CereBusinessHnapayService; |
|||
import com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Isolation; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 14:21 |
|||
*/ |
|||
@Service |
|||
public class CereBusinessHnapayServiceImpl implements CereBusinessHnapayService { |
|||
|
|||
@Autowired |
|||
private CereBusinessHnapayDao cereBusinessHnapayDao; |
|||
|
|||
@Override |
|||
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|||
public void save(CereBusinessHnapay record) throws CoBusinessException { |
|||
cereBusinessHnapayDao.insert(record); |
|||
} |
|||
|
|||
@Override |
|||
public void update(CereBusinessHnapay businessHnapay) throws CoBusinessException { |
|||
cereBusinessHnapayDao.updateById(businessHnapay); |
|||
} |
|||
|
|||
@Override |
|||
public CereBusinessHnapay getByBusinessId(Long businessId) throws CoBusinessException { |
|||
return cereBusinessHnapayDao.getByBusinessId(businessId); |
|||
} |
|||
|
|||
@Override |
|||
public void updateHnaPayState(Long businessId, Integer status) { |
|||
cereBusinessHnapayDao.updateHnaPayState(businessId, status); |
|||
} |
|||
|
|||
@Override |
|||
public void updateHnaPayApproval(Long businessId, String rejectReason, String certTypeList) { |
|||
cereBusinessHnapayDao.updateHnaPayApproval(businessId, rejectReason, certTypeList); |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
<?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.shop.cereshop.business.dao.bhnapay.CereBusinessHnapayDao"> |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay"> |
|||
<id column="id" jdbcType="BIGINT" property="id"/> |
|||
<result column="business_id" jdbcType="BIGINT" property="businessId" /> |
|||
<result column="xs_pay_id" jdbcType="VARCHAR" property="xsPayId" /> |
|||
<result column="bind_card_agr_no" jdbcType="VARCHAR" property="bindCardAgrNo" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="enterprise_code" jdbcType="VARCHAR" property="enterpriseCode" /> |
|||
<result column="valid_date" jdbcType="VARCHAR" property="validDate" /> |
|||
<result column="bank_card" jdbcType="VARCHAR" property="bankCard" /> |
|||
<result column="bank_code" jdbcType="VARCHAR" property="bankCode" /> |
|||
<result column="bank_province" jdbcType="VARCHAR" property="bankProvince" /> |
|||
<result column="bank_city" jdbcType="VARCHAR" property="bankCity" /> |
|||
<result column="bank_branch" jdbcType="VARCHAR" property="bankBranch" /> |
|||
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" /> |
|||
<result column="status" jdbcType="INTEGER" property="status" /> |
|||
<result column="reject_reason" jdbcType="INTEGER" property="rejectReason" /> |
|||
<result column="cert_type_list" jdbcType="INTEGER" property="certTypeList" /> |
|||
</resultMap> |
|||
|
|||
<select id="getByBusinessId" parameterType="java.lang.Object" resultType="com.shop.cereshop.commons.domain.bhnapay.CereBusinessHnapay"> |
|||
SELECT * FROM cere_business_hnapay where business_id = #{businessId} |
|||
</select> |
|||
|
|||
<update id="updateHnaPayState"> |
|||
update cere_business_hnapay set status=#{status} where business_id = #{businessId} |
|||
</update> |
|||
|
|||
<update id="updateHnaPayApproval"> |
|||
update cere_business_hnapay set reject_reason=#{rejectReason}, cert_type_list=#{certTypeList}, status=3 where business_id = #{businessId} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,94 @@ |
|||
package com.shop.cereshop.commons.domain.bhnapay; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 描述: |
|||
* |
|||
* @author stevenhu |
|||
* @version 2025/02/20 11:12 |
|||
*/ |
|||
@Data |
|||
public class CereBusinessHnapay implements Serializable { |
|||
/** |
|||
* 主键Id |
|||
*/ |
|||
private Long id; |
|||
|
|||
/** |
|||
* 商家id |
|||
*/ |
|||
private Long businessId; |
|||
|
|||
/** |
|||
* 新生支付新账通商户Id/分账方id |
|||
*/ |
|||
private String xsPayId; |
|||
|
|||
/** |
|||
* 新生支付绑卡协议号 |
|||
*/ |
|||
private String bindCardAgrNo; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
private String enterpriseCode; |
|||
|
|||
/** |
|||
* 营业执照有效期 |
|||
*/ |
|||
private String validDate; |
|||
|
|||
/** |
|||
* 银行卡号 |
|||
*/ |
|||
private String bankCard; |
|||
|
|||
/** |
|||
* 银行简码 |
|||
*/ |
|||
private String bankCode; |
|||
|
|||
/** |
|||
* 开户行所属省份 |
|||
*/ |
|||
private String bankProvince; |
|||
|
|||
/** |
|||
* 开户行所属城市 |
|||
*/ |
|||
private String bankCity; |
|||
|
|||
/** |
|||
* 开户支行 |
|||
*/ |
|||
private String bankBranch; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String contactPhone; |
|||
|
|||
/** |
|||
* 0-待上传 1-审核中 2-审核通过 3-审核拒绝 |
|||
*/ |
|||
private Integer status; |
|||
|
|||
/** |
|||
* 不通过原因 |
|||
*/ |
|||
private String rejectReason; |
|||
|
|||
/** |
|||
* 列出审批不通过证件类型 |
|||
*/ |
|||
private String certTypeList; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue