commit
64d17e4027
@ -0,0 +1,25 @@
|
||||
package au.com.royalpay.payment.manage.mappers.system;
|
||||
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by yixian on 2017-03-14.
|
||||
*/
|
||||
@AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id")
|
||||
public interface SysWxMerchantApplyMapper {
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
List<JSONObject> listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds);
|
||||
|
||||
@AutoSql(type = SqlType.INSERT)
|
||||
void insertWxMerchantApply(JSONObject params);
|
||||
|
||||
}
|
@ -0,0 +1,174 @@
|
||||
package au.com.royalpay.payment.manage.merchants.beans;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* Created by yuan on 2018/1/19.
|
||||
*/
|
||||
public class SubMerchantIdApply {
|
||||
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@Length(max = 50)
|
||||
@JSONField(name = "company_name")
|
||||
private String merchant_name;
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@Length(max = 10)
|
||||
@JSONField(name = "merchant_id")
|
||||
private String merchant_id;
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@Length(max = 20)
|
||||
@JSONField(name = "short_name")
|
||||
private String merchant_shortname;
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@Length(max = 20)
|
||||
@JSONField(name = "company_phone")
|
||||
private String office_phone;
|
||||
@JSONField(name = "contact_person")
|
||||
private String contact_name;
|
||||
private String contact_phone;
|
||||
private String contact_email;
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@JSONField(name = "industry")
|
||||
private String business_category;
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@Length(max = 20)
|
||||
@JSONField(name = "remark")
|
||||
private String merchant_remark;
|
||||
@JSONField(name = "company_website")
|
||||
private String website;
|
||||
@NotBlank(message = "error.payment.valid.param_missing")
|
||||
@Length(min = 10, max = 256)
|
||||
@JSONField(name = "description")
|
||||
private String merchant_introduction;
|
||||
|
||||
public JSONObject insertObject() {
|
||||
JSONObject params = new JSONObject();
|
||||
if(StringUtils.isNotEmpty(merchant_name)){
|
||||
params.put("merchant_name",merchant_name);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(merchant_shortname)){
|
||||
params.put("merchant_shortname",merchant_shortname);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(office_phone)){
|
||||
params.put("office_phone",office_phone);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(contact_name)){
|
||||
params.put("contact_name",contact_name);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(contact_phone)){
|
||||
params.put("contact_phone",contact_phone);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(contact_email)){
|
||||
params.put("contact_email",contact_email);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(business_category)){
|
||||
params.put("business_category",business_category);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(merchant_remark)){
|
||||
params.put("merchant_remark",merchant_remark);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(website)){
|
||||
params.put("website",website);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(merchant_introduction)){
|
||||
params.put("merchant_introduction",merchant_introduction);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public SubMerchantIdApply() {
|
||||
}
|
||||
|
||||
public String getMerchant_name() {
|
||||
return this.merchant_name;
|
||||
}
|
||||
|
||||
public String getMerchant_id() {
|
||||
return merchant_id;
|
||||
}
|
||||
|
||||
public void setMerchant_id(String merchant_id) {
|
||||
this.merchant_id = merchant_id;
|
||||
}
|
||||
|
||||
public void setMerchant_name(String merchant_name) {
|
||||
this.merchant_name = merchant_name;
|
||||
}
|
||||
|
||||
public String getMerchant_shortname() {
|
||||
return this.merchant_shortname;
|
||||
}
|
||||
|
||||
public void setMerchant_shortname(String merchant_shortname) {
|
||||
this.merchant_shortname = merchant_shortname;
|
||||
}
|
||||
|
||||
public String getOffice_phone() {
|
||||
return this.office_phone;
|
||||
}
|
||||
|
||||
public void setOffice_phone(String office_phone) {
|
||||
this.office_phone = office_phone;
|
||||
}
|
||||
|
||||
public String getContact_name() {
|
||||
return this.contact_name;
|
||||
}
|
||||
|
||||
public void setContact_name(String contact_name) {
|
||||
this.contact_name = contact_name;
|
||||
}
|
||||
|
||||
public String getContact_phone() {
|
||||
return this.contact_phone;
|
||||
}
|
||||
|
||||
public void setContact_phone(String contact_phone) {
|
||||
this.contact_phone = contact_phone;
|
||||
}
|
||||
|
||||
public String getContact_email() {
|
||||
return this.contact_email;
|
||||
}
|
||||
|
||||
public void setContact_email(String contact_email) {
|
||||
this.contact_email = contact_email;
|
||||
}
|
||||
|
||||
public String getBusiness_category() {
|
||||
return this.business_category;
|
||||
}
|
||||
|
||||
public void setBusiness_category(String business_category) {
|
||||
this.business_category = business_category;
|
||||
}
|
||||
|
||||
public String getMerchant_remark() {
|
||||
return this.merchant_remark;
|
||||
}
|
||||
|
||||
public void setMerchant_remark(String merchant_remark) {
|
||||
this.merchant_remark = merchant_remark;
|
||||
}
|
||||
|
||||
public String getMerchant_introduction() {
|
||||
return this.merchant_introduction;
|
||||
}
|
||||
|
||||
public void setMerchant_introduction(String merchant_introduction) {
|
||||
this.merchant_introduction = merchant_introduction;
|
||||
}
|
||||
|
||||
public String getWebsite() {
|
||||
return this.website;
|
||||
}
|
||||
|
||||
public void setWebsite(String website) {
|
||||
this.website = website;
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
<div class="content">
|
||||
<form novalidate name="subForm">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Apply Sub Merchant Id</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">
|
||||
<label class="control-label col-sm-3" for="merchant_name_input">* Merchant Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.company_name"
|
||||
type="text" name="merchant_name" id="merchant_name_input" required maxlength="50">
|
||||
<div ng-messages="subForm.merchant_name.$error" ng-if="subForm.merchant_name.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.merchant_id.$invalid && subForm.merchant_id.$dirty}">
|
||||
<label class="control-label col-sm-3" for="business_category_input">* Merchant ID</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control" name="merchant_id"
|
||||
ng-model="subMerchantInfo.merchant_id"
|
||||
id="merchant_id_input" required
|
||||
ng-options="merchant_id.merchant_id as merchant_id.merchant_id for merchant_id in merchantIds">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
<div ng-messages="subForm.merchant_id.$error" ng-if="subForm.merchant_id.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.merchant_shortname.$invalid && subForm.merchant_shortname.$dirty}">
|
||||
<label class="control-label col-sm-3" for="merchant_shortname_input">* Merchant Short Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.short_name"
|
||||
type="text" name="merchant_shortname" id="merchant_shortname_input" required maxlength="50">
|
||||
<div ng-messages="subForm.merchant_shortname.$error" ng-if="subForm.merchant_shortname.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.business_category.$invalid && subForm.business_category.$dirty}">
|
||||
<label class="control-label col-sm-3" for="business_category_input">* Business Category</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control" name="business_category"
|
||||
ng-model="subMerchantInfo.industry"
|
||||
id="business_category_input" required
|
||||
ng-options="industry.value as industry.label for industry in wxIndustries">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.website.$invalid && subForm.website.$dirty}">
|
||||
<label class="control-label col-sm-3" for="website_input">* Website</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.company_website"
|
||||
type="url" name="website" id="website_input" required>
|
||||
<div ng-messages="subForm.website.$error" ng-if="subForm.website.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.merchant_remark.$invalid && subForm.merchant_remark.$dirty}">
|
||||
<label class="control-label col-sm-3" for="merchant_remark_input">* Merchant Remark</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.remark"
|
||||
type="text" name="merchant_remark" id="merchant_remark_input" maxlength="20" required>
|
||||
<div ng-messages="subForm.merchant_remark.$error" ng-if="subForm.merchant_remark.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 20</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.merchant_introduction.$invalid && subForm.merchant_introduction.$dirty}">
|
||||
<label class="control-label col-sm-3" for="merchant_introduction_input">* Merchant Introduction</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.description"
|
||||
type="text" name="merchant_introduction" id="merchant_introduction_input" required maxlength="256" MINLENGTH="10">
|
||||
<div ng-messages="subForm.merchant_introduction.$error" ng-if="subForm.merchant_introduction.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
|
||||
<p class="small text-danger" ng-message="minlength">Length is less than 10</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="office_phone_input">Office Phone</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.company_phone"
|
||||
type="text" name="office_phone" id="office_phone_input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="contact_name_input">Contact Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.contact_person"
|
||||
type="text" name="contact_name" id="contact_name_input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="contact_phone_input">Contact Phone</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.contact_phone"
|
||||
type="text" name="contact_phone" id="contact_phone_input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="contact_email_input">Contact Email</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.contact_email"
|
||||
type="text" name="contact_email" id="contact_email_input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end 商品基本资料-->
|
||||
<!--<div class="panel panel-default">-->
|
||||
<!--<div class="panel-heading">Goods Qr Code</div>-->
|
||||
<!--<div class="panel-body">-->
|
||||
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--end 商品二维码-->
|
||||
<div class="btn-group margin-bottom margin-top">
|
||||
<button ng-disabled="subForm.$dirty&&subForm.$invalid" class="btn btn-success" type="button"
|
||||
ng-click="saveAppliy(subForm)">Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,91 @@
|
||||
<style>
|
||||
.box_desk{
|
||||
width: 96%;
|
||||
height: 87%;
|
||||
background: rgba(0, 0, 0, .65);
|
||||
position: absolute;
|
||||
bottom: 28px;
|
||||
transition: all linear 0.5s;
|
||||
opacity:0;
|
||||
}
|
||||
.box-body:hover .box_desk{
|
||||
padding: 0px;
|
||||
opacity: 0.8;
|
||||
display: block;
|
||||
}
|
||||
.content_button{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #fff;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box-solid">
|
||||
<div class="box box-warning">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title pull-left" ng-if="partner.sub_merchant_id">
|
||||
Sub Merchant Id : {{partner.sub_merchant_id}}
|
||||
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="partner.temp_sub_merchant"></i>
|
||||
</h3>
|
||||
<button role="button" class="btn btn-info pull-right" title="Apply Sub Merchant Id"
|
||||
ng-click="applySubMerchantId()">
|
||||
<i class="fa fa-plus"></i>
|
||||
Apply Sub Merchant Id
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">List of Sub Merchant Id</h3>
|
||||
</div>
|
||||
<div class="box-body col-sm-6" ng-repeat="id_apply in subMerchantInfos">
|
||||
<ul class="list-group ui_desk">
|
||||
<li class="list-group-item list-group-item-success">
|
||||
<b>Sub Merchant Id</b>
|
||||
<b style="float: right"><span
|
||||
ng-if="partner.sub_merchant_id == id_apply.sub_merchant_id"><small
|
||||
class="text-red">(当前使用)</small></span>{{id_apply.sub_merchant_id}}</b>
|
||||
</li>
|
||||
<li class="list-group-item list-group-item-success">
|
||||
Apply Time
|
||||
<span style="float: right" ng-bind="id_apply.create_time"></span>
|
||||
</li>
|
||||
<li class="list-group-item list-group-item-success">
|
||||
Merchant Short Name
|
||||
<span style="float:right;">{{id_apply.merchant_shortname | cut:true:20:' ...'}}</span>
|
||||
</li>
|
||||
<li class="list-group-item list-group-item-success">
|
||||
Business Category
|
||||
<span style="float: right">{{id_apply.business_category | wxMerchants}}</span>
|
||||
</li>
|
||||
<li class="list-group-item list-group-item-success">
|
||||
Description
|
||||
<span style="float: right;">{{id_apply.merchant_introduction | cut:true:20:' ...'}}</span>
|
||||
</li>
|
||||
<li class="list-group-item list-group-item-success">
|
||||
Operator
|
||||
<span style="float: right" ng-bind="id_apply.operator"></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="box_desk">
|
||||
<div class="content_button">
|
||||
<button role="button" class="btn btn-info" title="use"
|
||||
ng-click="useSubMerchantId(id_apply.sub_merchant_id)">
|
||||
USE
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue