Merge branch 'develop'

master
yixian 4 years ago
commit 970136d27a

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.3.46</version>
<version>2.3.47</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>

@ -9,6 +9,8 @@ import au.com.royalpay.payment.manage.mappers.log.GatewayClientApplyNotifyLogMap
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.organizations.beans.DefaultClientProfile;
import au.com.royalpay.payment.manage.organizations.core.OrgClientProfileUtils;
import au.com.royalpay.payment.manage.system.core.impl.ClientContractServiceImpl;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -16,6 +18,7 @@ import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.threadpool.RoyalThreadPoolExecutor;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.apache.commons.codec.binary.Base64;
@ -80,7 +83,7 @@ public class GatewayMerchantApplyImpl implements GatewayMerchantApply {
@Override
@Transactional
public JSONObject applicationMerchant(JSONObject org, JSONObject registerInfo) {
ClientRegisterInfo registerBean = JSONObject.toJavaObject(registerInfo, ClientRegisterInfo.class);
ClientRegisterInfo registerBean = JSON.toJavaObject(registerInfo, ClientRegisterInfo.class);
registerBean.checkParamsInvalid();
JSONObject result = new JSONObject();
JSONObject manager = managerMapper.findAvailableByLoginIdAndOrgId(registerBean.getApplyId(), org.getString("org_id"));
@ -99,8 +102,12 @@ public class GatewayMerchantApplyImpl implements GatewayMerchantApply {
try {
JSONObject client = registerBean.insertClientInfo(clientManager.initMerchantCode(), manager.getString("display_name"), hasParentBoolean, parentClientId);
client.put("org_id", org.getString("org_id"));
DefaultClientProfile defaultProfile = OrgClientProfileUtils.getOrgProfile(org);
defaultProfile.applyToClientConfig(client);
clientMapper.save(client);
clientConfigMapper.save(registerBean.insertClientConfigInfo(client.getIntValue("client_id"), client.getString("client_moniker")));
JSONObject clientConfig = registerBean.insertClientConfigInfo(client.getIntValue("client_id"), client.getString("client_moniker"));
defaultProfile.applyToClientConfig(clientConfig);
clientConfigMapper.save(clientConfig);
sysClientLegalPersonMapper.save(registerBean.insertClientLegalInfo(client.getIntValue("client_id")));
permissionPartnerManagerImpl.permissionClientModuleSave(client.getIntValue("client_id"), client.getString("client_moniker"));
JSONObject clientBd = new JSONObject();

@ -1,18 +1,10 @@
package au.com.royalpay.payment.manage.mappers.system;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import org.apache.ibatis.annotations.Param;
/**
* Created by wangning on 2018-04-08.

@ -1,12 +1,13 @@
package au.com.royalpay.payment.manage.mappers.system;
import au.com.royalpay.payment.manage.organizations.core.OrgClientProfileUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator;
@ -17,7 +18,6 @@ import java.util.List;
*/
@AutoMapper(tablename = "sys_org", pkName = "org_id", keyGenerator = Jdbc3KeyGenerator.class)
public interface OrgMapper {
@AutoSql(SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "type != 1")
List<JSONObject> listOrgsWithDetail(PageBounds order);
@ -39,11 +39,9 @@ public interface OrgMapper {
@AutoSql(SqlType.UPDATE)
void updateOrg(JSONObject org);
@AutoSql(SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1 AND parent_org_id is null")
List<JSONObject> listAllOrgs();
@AutoSql(SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1 AND senior_parent_org_id=0")
List<JSONObject> listSeniorOrgs();
@ -54,4 +52,7 @@ public interface OrgMapper {
List<JSONObject> listOrgAndChild(@Param("org_id") int org_id);
List<String> listSeniorOrgId(@Param("senior_parent_org_id") int senior_parent_org_id);
@AutoSql(SqlType.UPDATE)
void updateOrgClientProfile(@Param("org_id") int orgId, @Param(OrgClientProfileUtils.PROFILE_KEY) String clientDefaultProfile);
}

@ -1,10 +1,9 @@
package au.com.royalpay.payment.manage.mappers.system;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.alibaba.fastjson.JSONObject;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
@AutoMapper(tablename = "sys_client_legal_person", pkName = "client_id")

@ -50,6 +50,8 @@ import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.entity.impls.*;
import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum;
import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.organizations.beans.DefaultClientProfile;
import au.com.royalpay.payment.manage.organizations.core.OrgClientProfileUtils;
import au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils;
import au.com.royalpay.payment.manage.rservices.core.RServicesApplyService;
import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
@ -96,6 +98,7 @@ import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import io.jsonwebtoken.lang.Assert;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
@ -786,7 +789,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
partner.put("ali_sub_merchant_id", registery.getClientMoniker());
partner.put("credential_code", RandomStringUtils.random(32, true, true));
partner.put("creator", manager.getString("manager_id"));
partner.put("org_id", manager.getIntValue("org_id"));
int orgId = manager.getIntValue("org_id");
partner.put("org_id", orgId);
JSONObject org = orgMapper.findOne(orgId);
Assert.notNull(orgId, "Merchant Org shall not be null");
if (StringUtils.isNotEmpty(registery.getLogoId())) {
partner.put("logo_url", attachmentClient.getFileUrl(registery.getLogoId()));
partner.put("logo_thumbnail", attachmentClient.getThumbnail(registery.getLogoId(), 600).getString("url"));
@ -803,6 +809,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (clientMapper.findClientByMoniker(registery.getClientMoniker()) != null) {
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
}
DefaultClientProfile profile = OrgClientProfileUtils.getOrgProfile(org);
profile.applyToClientConfig(partner);
clientMapper.save(partner);
try {
@ -813,6 +821,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientConfig.put("client_pay_desc", partner.get("client_pay_desc"));
clientConfig.put("enable_cross_payment", partner.get("enable_cross_payment"));
clientConfig.put("enable_card_payment", partner.get("enable_card_payment"));
profile.applyToClientConfig(clientConfig);
clientConfigService.save(clientConfig);
permissionPartnerManagerImpl.permissionClientModuleSave(partner.getIntValue("client_id"), partner.getString("client_moniker"));
} catch (Exception e) {

@ -0,0 +1,127 @@
package au.com.royalpay.payment.manage.organizations.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.annotation.JSONType;
import com.google.common.base.CaseFormat;
import com.yixsoft.support.mybatis.utils.ClassFieldsDescription;
import com.yixsoft.support.mybatis.utils.FieldDescription;
import org.apache.commons.lang3.ObjectUtils;
import org.hibernate.validator.constraints.Range;
import org.springframework.core.annotation.AnnotatedElementUtils;
import java.util.List;
import java.util.stream.Collectors;
@JSONType(naming = PropertyNamingStrategy.SnakeCase)
public class DefaultClientProfile {
@ProfileDesc(value = "周末延迟清算", detail = "周末交易延迟到周二清算")
private boolean weekendDelay = true;
@ProfileDesc("手续费包含GST")
private boolean taxInSurcharge = false;
@ProfileDesc("允许退款")
private boolean enableRefund = true;
@ProfileDesc(value = "每日清算截止时间", detail = "默认基于GMT+10的0点有效范围0-24时区为商户时区")
@Range(max = 24)
private Integer settleHour;
@ProfileDesc("自动获取消费者信息")
private boolean requireCustinfo = true;
@ProfileDesc(value = "交易备注必填", detail = "仅限于商户静态码")
private boolean requireRemark = false;
public List<JSONObject> desc() {
return new ClassFieldsDescription<>(getClass()).getFields().stream()
.map(this::convertFieldInfo)
.collect(Collectors.toList());
}
private JSONObject convertFieldInfo(FieldDescription field) {
Object value = field.readField(this);
String fieldName = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.LOWER_UNDERSCORE).convert(field.getFieldName());
JSONObject info = new JSONObject();
info.put("field", fieldName);
info.put("value", value);
Class<?> fieldType = field.getMethod().getReturnType();
if (fieldType.isPrimitive()) {
if (fieldType.equals(Boolean.class)) {
info.put("type", "checkbox");
} else {
info.put("type", "number");
}
} else {
info.put("type", "text");
}
ProfileDesc getterDesc = AnnotatedElementUtils.findMergedAnnotation(field.getMethod(), ProfileDesc.class);
try {
ProfileDesc fieldDesc = AnnotatedElementUtils.findMergedAnnotation(getClass().getDeclaredField(field.getFieldName()), ProfileDesc.class);
ProfileDesc desc = ObjectUtils.defaultIfNull(getterDesc, fieldDesc);
if (desc != null) {
info.put("title", desc.value());
info.put("detail", desc.detail());
}
} catch (NoSuchFieldException e) {
}
return info;
}
public void applyToClientConfig(JSONObject client) {
JSONObject profile = (JSONObject) JSON.toJSON(this);
profile.forEach(client::putIfAbsent);
}
public boolean isWeekendDelay() {
return weekendDelay;
}
public DefaultClientProfile setWeekendDelay(boolean weekendDelay) {
this.weekendDelay = weekendDelay;
return this;
}
public boolean isTaxInSurcharge() {
return taxInSurcharge;
}
public DefaultClientProfile setTaxInSurcharge(boolean taxInSurcharge) {
this.taxInSurcharge = taxInSurcharge;
return this;
}
public boolean isEnableRefund() {
return enableRefund;
}
public DefaultClientProfile setEnableRefund(boolean enableRefund) {
this.enableRefund = enableRefund;
return this;
}
public Integer getSettleHour() {
return settleHour;
}
public DefaultClientProfile setSettleHour(Integer settleHour) {
this.settleHour = settleHour;
return this;
}
public boolean isRequireCustinfo() {
return requireCustinfo;
}
public DefaultClientProfile setRequireCustinfo(boolean requireCustinfo) {
this.requireCustinfo = requireCustinfo;
return this;
}
public boolean isRequireRemark() {
return requireRemark;
}
public DefaultClientProfile setRequireRemark(boolean requireRemark) {
this.requireRemark = requireRemark;
return this;
}
}

@ -0,0 +1,17 @@
package au.com.royalpay.payment.manage.organizations.beans;
import org.springframework.data.mongodb.core.mapping.Document;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Document
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.METHOD})
public @interface ProfileDesc {
String value();
String detail() default "";
}

@ -0,0 +1,30 @@
package au.com.royalpay.payment.manage.organizations.core;
import au.com.royalpay.payment.manage.organizations.beans.DefaultClientProfile;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
public final class OrgClientProfileUtils {
public static final String PROFILE_KEY = "default_client_profile";
private OrgClientProfileUtils() {
}
public static DefaultClientProfile getOrgProfile(JSONObject org) {
String profile = org.getString(PROFILE_KEY);
if (profile == null) {
return new DefaultClientProfile();
}
try {
return JSON.parseObject(profile).toJavaObject(DefaultClientProfile.class);
} catch (JSONException e) {
return new DefaultClientProfile();
}
}
public static void applyOrgClientDefaultProfile(JSONObject org, JSONObject client) {
DefaultClientProfile profile = getOrgProfile(org);
profile.applyToClientConfig(client);
}
}

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.organizations.core;
import au.com.royalpay.payment.manage.organizations.beans.DefaultClientProfile;
import au.com.royalpay.payment.manage.organizations.beans.OrgInfo;
import com.alibaba.fastjson.JSONObject;
@ -46,4 +47,6 @@ public interface OrgManager {
JSONObject checkOrg(JSONObject manager, JSONObject params);
JSONObject checkOrgIds(JSONObject manager, JSONObject params);
void updateDefaultClientProfile(int orgId, JSONObject manager, DefaultClientProfile profile);
}

@ -3,11 +3,13 @@ package au.com.royalpay.payment.manage.organizations.core.impls;
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgSignInfoMapper;
import au.com.royalpay.payment.manage.organizations.beans.DefaultClientProfile;
import au.com.royalpay.payment.manage.organizations.beans.OrgInfo;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import au.com.royalpay.payment.tools.codec.RSACrypt;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.utils.PageListUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
@ -91,7 +93,7 @@ public class OrgManagerImpl implements OrgManager {
children.add(child);
}
}
if(children.size()> 0){
if (!children.isEmpty()) {
org.put("children", children);
}
}
@ -322,6 +324,13 @@ public class OrgManagerImpl implements OrgManager {
}
return params;
}
@Override
public void updateDefaultClientProfile(int orgId, JSONObject manager, DefaultClientProfile profile) {
getOrgDetail(orgId, manager);
orgMapper.updateOrgClientProfile(orgId, JSON.toJSONString(profile));
}
private void orgIds(JSONObject params, JSONObject manager) {
List<JSONObject> orgs = orgMapper.listOrgAndChild(Integer.parseInt(params.getString("org_id")));
if (orgs.size() > 1) {

@ -1,6 +1,8 @@
package au.com.royalpay.payment.manage.organizations.web;
import au.com.royalpay.payment.manage.organizations.beans.DefaultClientProfile;
import au.com.royalpay.payment.manage.organizations.beans.OrgInfo;
import au.com.royalpay.payment.manage.organizations.core.OrgClientProfileUtils;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
@ -68,7 +70,9 @@ public class OrgManageController {
@ManagerMapping(value = "/{orgId}", method = RequestMethod.GET, role = {ManagerRole.ADMIN})
public JSONObject getOrgDetail(@PathVariable int orgId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return orgManager.getOrgDetail(orgId,manager);
JSONObject org = orgManager.getOrgDetail(orgId, manager);
org.remove(OrgClientProfileUtils.PROFILE_KEY);
return org;
}
@ManagerMapping(value = "/{orgId}", method = RequestMethod.PUT)
@ -77,6 +81,18 @@ public class OrgManageController {
orgManager.updateOrg(orgId, org, manager);
}
@ManagerMapping(value = "/{orgId}/default_client_profile", method = RequestMethod.GET, role = ManagerRole.ADMIN)
public List<JSONObject> getOrgDefaultClientProfile(@PathVariable int orgId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject org = orgManager.getOrgDetail(orgId, manager);
return OrgClientProfileUtils.getOrgProfile(org).desc();
}
@ManagerMapping(value = "/{orgId}/default_client_profile", method = RequestMethod.PUT, role = ManagerRole.ADMIN)
public void updateOrgProfile(@PathVariable int orgId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody @Valid DefaultClientProfile profile, Errors errors) {
HttpUtils.handleValidErrors(errors);
orgManager.updateDefaultClientProfile(orgId, manager, profile);
}
@ManagerMapping(value = "/{orgId}/partner_public_key", method = RequestMethod.PUT)
public void setPartnerPublicKeyConfig(@PathVariable int orgId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody JSONObject config) {
orgManager.setPartnerPublicKeyConfig(orgId, manager, config.getString("partner_public_key"));

@ -139,7 +139,8 @@
INSERT sys_client_rates (manager_id, client_id, rate_name, rate_value, transaction_fee, active_time, expiry_time, create_time, update_time, manager_name, clean_days, remark)
SELECT CONCAT('System-', CURRENT_DATE()),r.client_id,r.rate_name,r.rate_value,r.transaction_fee,DATE_ADD(r.expiry_time, INTERVAL 1 day),DATE_ADD(r.expiry_time, INTERVAL 1 year),NOW(), NOW(),
SELECT CONCAT('System-', CURRENT_DATE()),r.client_id,r.rate_name,r.rate_value,r.transaction_fee,DATE_ADD(r.expiry_time, INTERVAL 1 day),
IF(DATE_ADD( r.expiry_time, INTERVAL 1 YEAR )<=NOW(),DATE_ADD( r.expiry_time, INTERVAL 2 YEAR ),DATE_ADD( r.expiry_time, INTERVAL 1 YEAR )) expiry_time,NOW(), NOW(),
CONCAT('System-', CURRENT_DATE()),r.clean_days,'费率自动延期一年'
FROM (select rr.* from sys_client_rates rr
WHERE rr.client_id = #{clientId}

@ -26,6 +26,7 @@ define(['./app',
'./directives/royalCalendar',
'./directives/multiLevelSelect',
'./directives/jsonview',
'./directives/ngInputName',
'./filters/propsFilter',
'./filters/inverseColor',
'./filters/limitToWithEllipsis',

@ -0,0 +1,55 @@
define(['../app', 'angular'], function (app, angular) {
'use strict';
app.directive('ngInputName', function () {
let myNameError = "myName directive error: "
return {
restrict: 'A', // Declares an Attributes Directive.
require: 'ngModel', // ngModelController.
link: function (scope, elem, attrs, ngModel) {
if (!ngModel) {
return
} // no ngModel exists for this element
// check myName input for proper formatting ex. something/something
checkInputFormat(attrs);
let inputName = attrs.myName.match('^\\w+').pop(); // match upto '/'
assignInputNameToInputModel(inputName, ngModel);
let formName = attrs.myName.match('\\w+$').pop(); // match after '/'
findForm(formName, ngModel, scope);
} // end link
} // end return
function checkInputFormat(attrs) {
if (!/\w\/\w/.test(attrs.rsName)) {
throw myNameError + "Formatting should be \"inputName/formName\" but is " + attrs.rsName
}
}
function assignInputNameToInputModel(inputName, ngModel) {
ngModel.$name = inputName
}
function addInputNameToForm(formName, ngModel, scope) {
scope[formName][ngModel.$name] = ngModel;
return
}
function findForm(formName, ngModel, scope) {
if (!scope) { // ran out of scope before finding scope[formName]
throw myNameError + "<Form> element named " + formName + " could not be found."
}
if (formName in scope) { // found scope[formName]
addInputNameToForm(formName, ngModel, scope)
return
}
findForm(formName, ngModel, scope.$parent) // recursively search through $parent scopes
}
})
});

@ -130,6 +130,24 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
$scope.params.begin = currentYearFirstDate;
$scope.loadTransactionAmountInOrg();
};
$scope.loadClientProfile = function () {
$http.get('/sys/orgs/' + $scope.org.org_id + '/default_client_profile').then(function (res) {
$scope.clientProfileFields = res.data;
})
};
$scope.loadClientProfile();
$scope.submitClientProfile = function () {
let profile = {};
for (let field of $scope.clientProfileFields) {
profile[field.field] = field.value;
}
$http.put('/sys/orgs/' + $scope.org.org_id + '/default_client_profile').then(function () {
commonDialog.alert({type: 'success', title: 'Success', content: 'Modify Success'});
$scope.loadClientProfile();
}, function (res) {
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message});
})
};
$scope.scales = [
{
key: 'today',
@ -256,6 +274,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
$scope.future_loading = false;
});
};
function loadPartnersByOrgId(org_id) {
var params = angular.copy($scope.params);
if (params.begin) {
@ -298,6 +317,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
};
$scope.chooseLast7Days();
//$scope.loadTransactionAmountInOrg();
function loadFeeAnalysis(params) {
@ -436,8 +456,6 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
$scope.loadCommission();
$scope.uploadLogo = function (file) {
if (file == null) {
return;
@ -593,7 +611,11 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
content: 'This operation will refresh the gateway short id, Are you sure?'
}).then(function () {
$http.get('/sys/orgs/' + $scope.org.org_id + '/init/merchant_code').then(function (response) {
commonDialog.alert({title: 'Success', content: "Gateway Short Id Refresh Successfully", type: 'success'})
commonDialog.alert({
title: 'Success',
content: "Gateway Short Id Refresh Successfully",
type: 'success'
})
$scope.org.gateway_short_id = response.data.partner_code;
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
@ -713,7 +735,11 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
content: 'This operation will refresh the gateway short id, Are you sure?'
}).then(function () {
$http.get('/sys/orgs/' + $scope.org.org_id + '/init/merchant_code').then(function (response) {
commonDialog.alert({title: 'Success', content: "Gateway Short Id Refresh Successfully", type: 'success'})
commonDialog.alert({
title: 'Success',
content: "Gateway Short Id Refresh Successfully",
type: 'success'
})
$scope.org.gateway_short_id = response.data.partner_code;
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})

@ -757,7 +757,21 @@
</div>
</div>
</uib-tab>
<uib-tab heading="Default Client Profile">
<form name="profileForm" class="form-horizontal">
<div class="form-group" ng-repeat="field in clientProfileFields">
<label class="control-label col-md-3" ng-bind="field.title"></label>
<div class="col-md-7" ng-class="{'checkbox-inline':field.type=='checkbox'}">
<input ng-class="{'checkbox':field.type=='checkbox','form-control':field.type!='checkbox'}"
ng-model="field.value" ng-input-name="{{field.field}}" type="{{field.type}}">
<p ng-if="field.detail" ng-bind="field.detail" class="text-success text-sm"></p>
</div>
</div>
</form>
<button class="btn btn-warning"><i class="fa fa-refresh"></i> Reset</button>
<button class="btn btn-success"><i class="fa fa-check"></i> Submit</button>
</uib-tab>
</uib-tabset>
</div>
</div>

Loading…
Cancel
Save