| @@ -0,0 +1,130 @@ | |||||
| package com.iformall.controller.basic; | |||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.WxMerchant; | |||||
| import com.iformall.domain.po.WxProfitSharingReceiver; | |||||
| import com.iformall.domain.po.WxProfitSharingReceiverApply; | |||||
| import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxMerchantReceiverApplyVo; | |||||
| import com.iformall.douyin.pay.enums.MerchantImportStatus; | |||||
| import com.iformall.enums.*; | |||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.file.aliyun.AliyunOSS; | |||||
| import com.iformall.service.WxMerchantService; | |||||
| import com.iformall.service.WxProfitSharingReceiverApplyService; | |||||
| import com.iformall.service.WxProfitSharingReceiverService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.apache.commons.codec.binary.Base64; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.io.ByteArrayInputStream; | |||||
| import java.io.UnsupportedEncodingException; | |||||
| import java.util.HashMap; | |||||
| import java.util.Map; | |||||
| @RestController | |||||
| @RequestMapping("/api/sharingReceiverApply") | |||||
| @Api(description = "进件相关接口") | |||||
| @Slf4j | |||||
| public class WxProfitSharingReceiverApplyController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxProfitSharingReceiverApplyService wxProfitSharingReceiverApplyService; | |||||
| @Autowired | |||||
| private WxProfitSharingReceiverService wxProfitSharingReceiverService; | |||||
| @Autowired | |||||
| private WxMerchantService wxMerchantService; | |||||
| @Autowired | |||||
| private AliyunOSS aliyunOSS; | |||||
| @ApiOperation("分页列表接口") | |||||
| @GetMapping("listVo") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| }) | |||||
| @SystemControllerLog(description = "商户-列表") | |||||
| public ResultData listVo(WxMerchantReceiverApplyVo receiver, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::listVo"); | |||||
| if (null == receiver) receiver = new WxMerchantReceiverApplyVo(); | |||||
| receiver.updateTenantInfo(getTenantInfo()); | |||||
| final PageInfo<WxMerchantReceiverApplyVo> page = wxProfitSharingReceiverApplyService.listVoAsPage(receiver, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @TenantIgnore | |||||
| @ApiOperation("分页列表接口") | |||||
| @GetMapping("tenantListVo") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| }) | |||||
| @SystemControllerLog(description = "商户-列表") | |||||
| public ResultData tenantListVo(WxMerchantReceiverApplyVo receiver, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::tenantListVo"); | |||||
| if (null == receiver) receiver = new WxMerchantReceiverApplyVo(); | |||||
| final PageInfo<WxMerchantReceiverApplyVo> page = wxProfitSharingReceiverApplyService.listVoAsPage(receiver, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @TenantIgnore | |||||
| @ApiOperation("修改功能状态") | |||||
| @PostMapping("/updateFunctionState") | |||||
| @SystemControllerLog(description = "修改") | |||||
| public ResultData updateFunctionState(@RequestBody WxProfitSharingReceiverApply receiverAdd) { | |||||
| log.debug("[" + getIpAddr() + "] merchantProfitSharingReceiver::updateFunctionState"); | |||||
| if(receiverAdd.getId() == null || receiverAdd.getFunctionState() == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.selectById(receiverAdd.getId()); | |||||
| if(receiverApply == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未找到进件数据"); | |||||
| } | |||||
| if(!EnumSharingReceiverApplymentState.APPLYMENT_STATE_FINISHED.getCode().equals(receiverApply.getApplymentState())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "进件还未完成"); | |||||
| } | |||||
| receiverAdd.updateTenantInfo(receiverApply); | |||||
| return wxProfitSharingReceiverApplyService.updateFunctionState(receiverAdd); | |||||
| } | |||||
| @TenantIgnore | |||||
| @ApiOperation("刷新审核状态") | |||||
| @GetMapping("/syncApplymentStates") | |||||
| @SystemControllerLog(description = "刷新") | |||||
| public ResultData syncApplymentStates(Long id) { | |||||
| log.debug("[" + getIpAddr() + "] merchantProfitSharingReceiver::syncApplymentStates"); | |||||
| if(id == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "ID不能为空"); | |||||
| } | |||||
| WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.findResultStateById(id); | |||||
| if(receiverApply == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未找到进件数据"); | |||||
| } | |||||
| return wxProfitSharingReceiverApplyService.handApplymentStates(receiverApply); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,3 @@ | |||||
| ALTER TABLE `mallink`.`wx_profit_sharing_receiver_apply` | |||||
| ADD COLUMN `function_state` smallint(1) COMMENT '功能开通状态' AFTER `applyment_state_desc`, | |||||
| ADD COLUMN `function_state_desc` varchar(255) COMMENT '功能开通状态描述' AFTER `function_state`; | |||||
| @@ -112,7 +112,7 @@ public class WxMerchant extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "isPublic") | @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "isPublic") | ||||
| private Integer isPublic; | private Integer isPublic; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在广场", name = "isPrivate") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否保密", name = "isPrivate") | |||||
| private Integer isPrivate; | private Integer isPrivate; | ||||
| @Excel(name = "待缴提醒", width = 20, orderNum = "10") | @Excel(name = "待缴提醒", width = 20, orderNum = "10") | ||||
| @@ -81,6 +81,12 @@ public class WxProfitSharingReceiverApply extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="申请状态描述",name="applymentStateDesc") | @io.swagger.annotations.ApiModelProperty(value="申请状态描述",name="applymentStateDesc") | ||||
| private String applymentStateDesc; | private String applymentStateDesc; | ||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverApplyFunctionStatus 功能开通状态",name="functionState") | |||||
| private Integer functionState; | |||||
| @io.swagger.annotations.ApiModelProperty(value="功能开通状态描述",name="functionStateDesc") | |||||
| private String functionStateDesc; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverSignState 签约状态",name="signState") | @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverSignState 签约状态",name="signState") | ||||
| private Integer signState; | private Integer signState; | ||||
| @io.swagger.annotations.ApiModelProperty(value="签约链接",name="signUrl") | @io.swagger.annotations.ApiModelProperty(value="签约链接",name="signUrl") | ||||
| @@ -0,0 +1,89 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxMerchantReceiverApplyVo extends TenantEntity { | |||||
| private Long merchantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName") | |||||
| private String merchantName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户联系人",name="linkPhone") | |||||
| private String merchantlinkPerson; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户联系方式",name="linkPhone") | |||||
| private String merchantLinkPhone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户状态1可用0停用",name="status") | |||||
| private Integer merchantStatus; | |||||
| private Long applyId; | |||||
| private String outRequestNo; | |||||
| private Integer plat; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverOrganizationType 主体类型",name="organizationType") | |||||
| private Integer organizationType; | |||||
| @io.swagger.annotations.ApiModelProperty(value="营业执照名称",name="businessName") | |||||
| private String businessName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="营业执照法人",name="businessLegalPerson") | |||||
| private String businessLegalPerson; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户简称",name="businessShortName") | |||||
| private String businessShortName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="超管姓名",name="contactName") | |||||
| private String contactName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="超管手机",name="contactPhone") | |||||
| private String contactPhone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="超管邮箱",name="contactEmail") | |||||
| private String contactEmail; | |||||
| @io.swagger.annotations.ApiModelProperty(value="微信支付申请单号",name="applymentId") | |||||
| private String applymentId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverApplymentState 申请状态",name="applymentState") | |||||
| private Integer applymentState; | |||||
| @io.swagger.annotations.ApiModelProperty(value="申请状态描述",name="applymentStateDesc") | |||||
| private String applymentStateDesc; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverApplyFunctionStatus 功能开通状态",name="functionState") | |||||
| private Integer functionState; | |||||
| @io.swagger.annotations.ApiModelProperty(value="功能开通状态描述",name="functionStateDesc") | |||||
| private String functionStateDesc; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverSignState 签约状态",name="signState") | |||||
| private Integer signState; | |||||
| @io.swagger.annotations.ApiModelProperty(value="签约链接",name="signUrl") | |||||
| private String signUrl; | |||||
| @io.swagger.annotations.ApiModelProperty(value="电商平台二级商户号",name="subMchid") | |||||
| private String subMchid; | |||||
| @io.swagger.annotations.ApiModelProperty(value="汇款账户验证信息",name="accountValidation") | |||||
| private String accountValidation; | |||||
| @io.swagger.annotations.ApiModelProperty(value="驳回原因详情",name="auditDetail") | |||||
| private String auditDetail; | |||||
| @io.swagger.annotations.ApiModelProperty(value="法人验证链接",name="legalValidationUrl") | |||||
| private String legalValidationUrl; | |||||
| @io.swagger.annotations.ApiModelProperty(value="法人验证链接二维码",name="legalValidationQrcode") | |||||
| private String legalValidationQrcode; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverVerifyResult 修改收款帐号 申请状态",name="verifyResult") | |||||
| private Integer verifyResult; | |||||
| @io.swagger.annotations.ApiModelProperty(value="汇款验证失败原因",name="verifyFailReason") | |||||
| private String verifyFailReason; | |||||
| @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverApplyStatus",name="status") | |||||
| private Integer status; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="updateTime") | |||||
| private Date updateTime; | |||||
| } | |||||
| @@ -0,0 +1,37 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * luozukai | |||||
| */ | |||||
| public enum EnumSharingReceiverApplyFunctionStatus { | |||||
| wait(0, "待开通/不需要开通"), | |||||
| ing(1, "开通中"), | |||||
| FINISH(2, "开通完成"), | |||||
| ; | |||||
| public static EnumSharingReceiverApplyFunctionStatus getEnum(Integer code) { | |||||
| for (EnumSharingReceiverApplyFunctionStatus value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumSharingReceiverApplyFunctionStatus(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -3,6 +3,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxProfitSharingReceiver; | import com.iformall.domain.po.WxProfitSharingReceiver; | ||||
| import com.iformall.domain.po.WxProfitSharingReceiverApply; | import com.iformall.domain.po.WxProfitSharingReceiverApply; | ||||
| import com.iformall.domain.vo.WxMerchantReceiverApplyVo; | |||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -16,4 +17,6 @@ public interface WxProfitSharingReceiverApplyMapper extends CommonMapper<WxProfi | |||||
| List<WxProfitSharingReceiverApply> findListByVerifyResult(WxProfitSharingReceiverApply apply); | List<WxProfitSharingReceiverApply> findListByVerifyResult(WxProfitSharingReceiverApply apply); | ||||
| WxProfitSharingReceiverApply findResultStateById(@Param("id") Long id); | WxProfitSharingReceiverApply findResultStateById(@Param("id") Long id); | ||||
| List<WxMerchantReceiverApplyVo> findListVo(WxMerchantReceiverApplyVo receiver); | |||||
| } | } | ||||
| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxProfitSharingReceiverApply; | import com.iformall.domain.po.WxProfitSharingReceiverApply; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxMerchantReceiverApplyVo; | |||||
| import com.iformall.enums.EnumAppPlat; | import com.iformall.enums.EnumAppPlat; | ||||
| public interface WxProfitSharingReceiverApplyService { | public interface WxProfitSharingReceiverApplyService { | ||||
| @@ -35,4 +36,8 @@ public interface WxProfitSharingReceiverApplyService { | |||||
| ResultData handVerifyResult(WxProfitSharingReceiverApply apply); | ResultData handVerifyResult(WxProfitSharingReceiverApply apply); | ||||
| ResultData updateFunctionState(WxProfitSharingReceiverApply receiverAdd); | |||||
| PageInfo<WxMerchantReceiverApplyVo> listVoAsPage(WxMerchantReceiverApplyVo receiver, Integer pageNum, Integer pageSize); | |||||
| } | } | ||||
| @@ -15,6 +15,7 @@ import com.iformall.common.IdWorker; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxMerchantReceiverApplyVo; | |||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.WxProfitSharingReceiverApplyMapper; | import com.iformall.mapper.WxProfitSharingReceiverApplyMapper; | ||||
| @@ -143,6 +144,10 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR | |||||
| receiverApplyUpd.setApplymentId((String) result.data); | receiverApplyUpd.setApplymentId((String) result.data); | ||||
| receiverApplyUpd.setApplymentState(EnumSharingReceiverApplymentState.APPLYMENT_STATE_SUBMIT.getCode()); | receiverApplyUpd.setApplymentState(EnumSharingReceiverApplymentState.APPLYMENT_STATE_SUBMIT.getCode()); | ||||
| receiverApplyUpd.setApplymentStateDesc(EnumSharingReceiverApplymentState.APPLYMENT_STATE_SUBMIT.getMessage()); | receiverApplyUpd.setApplymentStateDesc(EnumSharingReceiverApplymentState.APPLYMENT_STATE_SUBMIT.getMessage()); | ||||
| if(receiverApply.getFunctionState() == null){ | |||||
| receiverApplyUpd.setFunctionState(EnumSharingReceiverApplyFunctionStatus.wait.getCode()); | |||||
| receiverApplyUpd.setFunctionStateDesc(EnumSharingReceiverApplyFunctionStatus.wait.getMessage()); | |||||
| } | |||||
| receiverApplyUpd.setSignUrl(""); | receiverApplyUpd.setSignUrl(""); | ||||
| receiverApplyUpd.setAuditDetail("[]"); | receiverApplyUpd.setAuditDetail("[]"); | ||||
| receiverApplyUpd.setUpdateTime(new Date()); | receiverApplyUpd.setUpdateTime(new Date()); | ||||
| @@ -265,6 +270,24 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public ResultData updateFunctionState(WxProfitSharingReceiverApply receiverAdd) { | |||||
| WxProfitSharingReceiverApply applyUpd = new WxProfitSharingReceiverApply(); | |||||
| applyUpd.setId(receiverAdd.getId()); | |||||
| applyUpd.updateTenantInfo(receiverAdd); | |||||
| applyUpd.setFunctionState(receiverAdd.getFunctionState()); | |||||
| if(StringUtils.isNotBlank(receiverAdd.getFunctionStateDesc())){ | |||||
| applyUpd.setFunctionStateDesc(receiverAdd.getFunctionStateDesc()); | |||||
| } | |||||
| wxProfitSharingReceiverApplyMapper.updateById(applyUpd); | |||||
| return new ResultData(); | |||||
| } | |||||
| @Override | |||||
| public PageInfo<WxMerchantReceiverApplyVo> listVoAsPage(WxMerchantReceiverApplyVo receiver, Integer pageNum, Integer pageSize) { | |||||
| return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxProfitSharingReceiverApplyMapper.findListVo(receiver)); | |||||
| } | |||||
| //------------------------------------------------------------------------------------------------------------------ | //------------------------------------------------------------------------------------------------------------------ | ||||
| @@ -36,6 +36,8 @@ | |||||
| <result column="applyment_id" jdbcType="VARCHAR" property="applymentId" /> | <result column="applyment_id" jdbcType="VARCHAR" property="applymentId" /> | ||||
| <result column="applyment_state" jdbcType="INTEGER" property="applymentState" /> | <result column="applyment_state" jdbcType="INTEGER" property="applymentState" /> | ||||
| <result column="applyment_state_desc" jdbcType="VARCHAR" property="applymentStateDesc" /> | <result column="applyment_state_desc" jdbcType="VARCHAR" property="applymentStateDesc" /> | ||||
| <result column="function_state" jdbcType="INTEGER" property="functionState" /> | |||||
| <result column="function_state_desc" jdbcType="VARCHAR" property="functionStateDesc" /> | |||||
| <result column="sign_state" jdbcType="INTEGER" property="signState" /> | <result column="sign_state" jdbcType="INTEGER" property="signState" /> | ||||
| <result column="sign_url" jdbcType="VARCHAR" property="signUrl" /> | <result column="sign_url" jdbcType="VARCHAR" property="signUrl" /> | ||||
| <result column="sub_mchid" jdbcType="VARCHAR" property="subMchid" /> | <result column="sub_mchid" jdbcType="VARCHAR" property="subMchid" /> | ||||
| @@ -60,7 +62,7 @@ | |||||
| `id_holder_type`,`id_doc_type`,`authorize_letter`,`authorize_letter_copy`,`id_card_info`,`id_doc_info`, | `id_holder_type`,`id_doc_type`,`authorize_letter`,`authorize_letter_copy`,`id_card_info`,`id_doc_info`, | ||||
| `owner`,`ubo_info_list`,`account_info`,`contact_info`,`sales_scene_info`,`settlement_info`, | `owner`,`ubo_info_list`,`account_info`,`contact_info`,`sales_scene_info`,`settlement_info`, | ||||
| `merchant_shortname`,`service_phone`,`sales_info`,`qualifications`,`addition_info`,`business_addition_pics`,`business_addition_desc`, | `merchant_shortname`,`service_phone`,`sales_info`,`qualifications`,`addition_info`,`business_addition_pics`,`business_addition_desc`, | ||||
| `applyment_id`,`applyment_state`,`applyment_state_desc`,`sign_state`,`sign_url`, | |||||
| `applyment_id`,`applyment_state`,`applyment_state_desc`,`function_state`,`function_state_desc`,`sign_state`,`sign_url`, | |||||
| `sub_mchid`,`account_validation`,`audit_detail`,`legal_validation_url`,`legal_validation_qrcode`, | `sub_mchid`,`account_validation`,`audit_detail`,`legal_validation_url`,`legal_validation_qrcode`, | ||||
| `verify_result`,`verify_fail_reason`,`status`,`create_time`,`update_time` | `verify_result`,`verify_fail_reason`,`status`,`create_time`,`update_time` | ||||
| </sql> | </sql> | ||||
| @@ -103,6 +105,10 @@ | |||||
| and `applyment_state` = #{applymentState} | and `applyment_state` = #{applymentState} | ||||
| </if> | </if> | ||||
| <if test=" null != functionState "> | |||||
| and `function_state` = #{functionState} | |||||
| </if> | |||||
| <if test=" null != signState "> | <if test=" null != signState "> | ||||
| and `sign_state` = #{signState} | and `sign_state` = #{signState} | ||||
| </if> | </if> | ||||
| @@ -161,5 +167,72 @@ | |||||
| from wx_profit_sharing_receiver_apply | from wx_profit_sharing_receiver_apply | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findListVo" parameterType="com.iformall.domain.vo.WxMerchantReceiverApplyVo" resultType="com.iformall.domain.vo.WxMerchantReceiverApplyVo"> | |||||
| select | |||||
| m.`id` as merchantId,m.`name` as merchantName,m.`link_person` as merchantlinkPerson,m.`link_phone` as merchantLinkPhone,m.`status` as merchantStatus, | |||||
| wpsra.`id` as applyId, wpsra.`tenant_id` as tenantId,wpsra.`parent_tenant_id` as parentTenantId,wpsra.`out_request_no` as outRequestNo,wpsra.`plat` as plat, | |||||
| wpsra.`organization_type` as organizationType, | |||||
| wpsra.`business_license_info`->'$.merchant_name' as businessName,wpsra.`business_license_info`->'$.legal_person' as businessLegalPerson,wpsra.`merchant_shortname` as businessShortName, | |||||
| wpsra.`contact_info`->'$.contact_name' as contactName,wpsra.`contact_info`->'$.mobile_phone' as contactPhone,wpsra.`contact_info`->'$.contact_email' as contactEmail, | |||||
| wpsra.`applyment_id` as applymentId,wpsra.`applyment_state` as applymentState,wpsra.`applyment_state_desc` as applymentStateDesc, | |||||
| wpsra.`function_state` as functionState,wpsra.`function_state_desc` as functionStateDesc,wpsra.`sign_state` as signState,wpsra.`sign_url` as signUrl, | |||||
| wpsra.`sub_mchid` as subMchid, | |||||
| wpsra.`account_validation` as accountValidation,wpsra.`audit_detail` as auditDetail, | |||||
| wpsra.`legal_validation_url` as legalValidationUrl,wpsra.`legal_validation_qrcode` as legalValidationQrcode, | |||||
| wpsra.`verify_result` as verifyResult,wpsra.`verify_fail_reason` as verifyFailReason, | |||||
| wpsra.`status` as status,wpsra.`create_time` as createTime,wpsra.`update_time` as updateTime | |||||
| from wx_profit_sharing_receiver_apply wpsra | |||||
| left join wx_merchant m on wpsra.merchant_id = m.id and m.is_del = 0 | |||||
| where m.`is_private` = 0 | |||||
| <if test=" null != merchantName and ''!=merchantName "> | |||||
| and m.`name` like concat('%', #{merchantName},'%') | |||||
| </if> | |||||
| <if test=" null != merchantStatus "> | |||||
| and m.`status` = #{merchantStatus} | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and wpsra.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and wpsra.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != organizationType "> | |||||
| and wpsra.`organization_type` = #{organizationType} | |||||
| </if> | |||||
| <if test=" null != businessName and '' != businessName"> | |||||
| and wpsra.`business_license_info`->'$.merchant_name' like concat('%', #{businessName},'%') | |||||
| </if> | |||||
| <if test=" null != contactName and '' != contactName"> | |||||
| and wpsra.`contact_info`->'$.contact_name' like concat('%', #{contactName},'%') | |||||
| </if> | |||||
| <if test=" null != applymentId and '' != applymentId "> | |||||
| and wpsra.`applyment_id` = #{applymentId} | |||||
| </if> | |||||
| <if test=" null != applymentState "> | |||||
| and wpsra.`applyment_state` = #{applymentState} | |||||
| </if> | |||||
| <if test=" null != functionState "> | |||||
| and wpsra.`function_state` = #{functionState} | |||||
| </if> | |||||
| <if test=" null != signState "> | |||||
| and wpsra.`sign_state` = #{signState} | |||||
| </if> | |||||
| <if test=" null != verifyResult "> | |||||
| and wpsra.`verify_result` = #{verifyResult} | |||||
| </if> | |||||
| <if test=" null != status "> | |||||
| and wpsra.`status` = #{status} | |||||
| </if> | |||||
| order by wpsra.`update_time` desc | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||