add 活动开关

master
luoyang 5 years ago
parent 791122cfa4
commit b5e7bd6321

@ -3377,11 +3377,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
logger.error("上传合规文件失败", e);
throw new BadRequestException("合同制作出现问题:" + e.getMessage());
}
// boolean clientSource = client.getIntValue("source") == 4 ? true : false;
// if (filesInfo.getAuthStatus() == 1 && clientSource) {
// client.put("approve_result", 3);
// clientMapper.update(client);
// }
return fileResult;
}

@ -12,4 +12,6 @@ public interface AppStyleService {
void addAppStyle(String style_id, JSONObject appStyleGroup);
void updateAppStyleByStyleId(String style_id, String originStyleId, JSONObject appStyleGroup);
void updateAppStyleStatus(String style_id, boolean is_valid);
}

@ -44,4 +44,9 @@ public class AppStyleServiceImpl implements AppStyleService {
public void updateAppStyleByStyleId(String style_id, String originStyleId, JSONObject appStyleGroup) {
royalPayCMSSupport.updateAppStyleByStyleId(style_id,originStyleId,appStyleGroup);
}
@Override
public void updateAppStyleStatus(String style_id, boolean is_valid) {
royalPayCMSSupport.updateAppStyleStatus(style_id, is_valid);
}
}

@ -39,4 +39,9 @@ public class AppStyleController {
public void updateAppStyleByStyleId(@PathVariable String style_id,@RequestParam String originStyleId, @RequestBody JSONObject appStyleGroup) {
appStyleService.updateAppStyleByStyleId(style_id, originStyleId, appStyleGroup);
}
@RequestMapping(value = "/style_group/{style_id}/{is_valid}", method = RequestMethod.PUT)
public void updateAppStyleStatus(@PathVariable String style_id,@PathVariable Boolean is_valid) {
appStyleService.updateAppStyleStatus(style_id, is_valid);
}
}

@ -288,7 +288,7 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angu
$scope.article = article.data;
}]);
app.controller('cmsAppStyleListCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
app.controller('cmsAppStyleListCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', function ($scope, $http, $uibModal, commonDialog) {
$scope.pagination = {};
$scope.appStyleGroupList = function (page) {
var params = $scope.queryParams || {};
@ -298,6 +298,13 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angu
$scope.pagination = resp.data.pagination;
})
};
$scope.updateStyleIdStatus = function (style_id, is_valid) {
$http.put('/app/cms/app_style/style_group/' + style_id + "/" + is_valid).then(function (resp) {
commonDialog.alert({type: 'success', title: 'success', content: "切换状态成功!"})
}, function (resp) {
commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message})
})
};
$scope.appStyleGroupList(1);
}]);

@ -33,7 +33,10 @@
<td><a role="button" ui-sref=".app_style_preview({style_id:appStyleGroup.style_id})" ng-bind="appStyleGroup.style_id"></a></td>
<td>
<a title="Toggle publish status">
<i class="fa" ng-class="{'fa-check text-success':appStyleGroup.is_valid,'fa-remove text-danger':!appStyleGroup.is_valid}"></i>
<i class="fa" ng-class="{'fa-check text-success':appStyleGroup.is_valid,'fa-remove text-danger':!appStyleGroup.is_valid}"
style="cursor: pointer"
ng-click="updateStyleIdStatus(appStyleGroup.style_id, !appStyleGroup.is_valid)"
></i>
</a>
</td>
<td>

@ -4000,18 +4000,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
type: 'error'
});
};
$scope.commitPartner = function () {
if ($scope.file) {
if ($scope.file.file_bank_info != null && $scope.file.file_company_info) {
$scope.file.authStatus = 1;
$scope.updateFile();
} else {
commitError();
}
} else {
commitError();
}
};
$scope.complianceCheck = function () {
if (!$rootScope.complianceCheck) {
$rootScope.complianceCheck = {};

@ -5,9 +5,6 @@
</style>
<div class="panel panel-default">
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<button class="btn-group btn btn-warning" ng-if="partner.approve_result==2 && partner.source==4" type="button"
ng-click="commitPartner()">Commit to Compliance
</button>
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank">
<i class="fa fa-cloud-download">一键下载</i>
</a>

Loading…
Cancel
Save