master
dalong306 4 years ago
commit 37add536e2

@ -28,7 +28,9 @@ public class PermissionManagerImpl implements PermissionManager {
private PermissionModuleMapper permissionModuleMapper; private PermissionModuleMapper permissionModuleMapper;
@Resource @Resource
private PermissionReader permissionReader; private PermissionReader permissionReader;
@Override @Override
@Transactional
public void synchronizeFunctions() { public void synchronizeFunctions() {
List<JSONObject> functions = permissionFunctionMapper.listAll(); List<JSONObject> functions = permissionFunctionMapper.listAll();
Map<String, JSONObject> funcMapFromDB = new HashMap<>(); Map<String, JSONObject> funcMapFromDB = new HashMap<>();
@ -40,7 +42,7 @@ public class PermissionManagerImpl implements PermissionManager {
for (PermissionNode node : nodes) { for (PermissionNode node : nodes) {
String funcId = node.getFuncId(); String funcId = node.getFuncId();
if (funcMapFromDB.containsKey(funcId.toLowerCase())) { if (funcMapFromDB.containsKey(funcId.toLowerCase())) {
funcMapFromDB.remove(funcId); funcMapFromDB.remove(funcId.toLowerCase());
JSONObject func = node.initFuncObject(); JSONObject func = node.initFuncObject();
func.remove("role"); func.remove("role");
permissionFunctionMapper.update(func); permissionFunctionMapper.update(func);
@ -181,5 +183,4 @@ public class PermissionManagerImpl implements PermissionManager {
} }
} }

@ -25,12 +25,12 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="wechat_rate_value" stringToNumber2 class="form-control" ng-model="rate.wechat_rate_value" <input type="number" name="wechat_rate_value" stringToNumber2 class="form-control" ng-model="rate.wechat_rate_value"
min="0.6" max="5" step="0.1" id="wechat_rate_value_input" required> min="0.6" max="10" step="0.1" id="wechat_rate_value_input" required>
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_form.wechat_rate_value.$error" ng-if="rate_form.wechat_rate_value.$dirty"> <div ng-messages="rate_form.wechat_rate_value.$error" ng-if="rate_form.wechat_rate_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>
<div class="small text-danger" ng-message="min"> <div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6% <i class="glyphicon glyphicon-alert"></i> No less than 0.6%
@ -48,12 +48,12 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="alipay_rate_value" stringToNumber2 class="form-control" ng-model="rate.alipay_rate_value" <input type="number" name="alipay_rate_value" stringToNumber2 class="form-control" ng-model="rate.alipay_rate_value"
min="0.6" max="5" step="0.1" id="alipay_rate_value_input" required> min="0.6" max="10" step="0.1" id="alipay_rate_value_input" required>
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_form.alipay_rate_value.$error" ng-if="rate_form.alipay_rate_value.$dirty"> <div ng-messages="rate_form.alipay_rate_value.$error" ng-if="rate_form.alipay_rate_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>
<div class="small text-danger" ng-message="min"> <div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6% <i class="glyphicon glyphicon-alert"></i> No less than 0.6%
@ -71,12 +71,12 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="alipayonline_rate_value" stringToNumber2 class="form-control" ng-model="rate.alipayonline_rate_value" <input type="number" name="alipayonline_rate_value" stringToNumber2 class="form-control" ng-model="rate.alipayonline_rate_value"
min="0.6" max="5.0" step="0.1" id="alipayonline_rate_value_input" required> min="0.6" max="10.0" step="0.1" id="alipayonline_rate_value_input" required>
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_form.alipayonline_rate_value.$error" ng-if="rate_form.alipayonline_rate_value.$dirty"> <div ng-messages="rate_form.alipayonline_rate_value.$error" ng-if="rate_form.alipayonline_rate_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>
<div class="small text-danger" ng-message="min"> <div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6% <i class="glyphicon glyphicon-alert"></i> No less than 0.6%
@ -95,12 +95,12 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="Rpay_rate_value" stringToNumber2 class="form-control" ng-model="rate.Rpay_rate_value" <input type="number" name="Rpay_rate_value" stringToNumber2 class="form-control" ng-model="rate.Rpay_rate_value"
min="0.6" max="5" step="0.1" id="Rpay_rate_value_input" required> min="0.6" max="10" step="0.1" id="Rpay_rate_value_input" required>
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_form.Rpay_rate_value.$error" ng-if="rate_form.Rpay_rate_value.$dirty"> <div ng-messages="rate_form.Rpay_rate_value.$error" ng-if="rate_form.Rpay_rate_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>
<div class="small text-danger" ng-message="min"> <div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6% <i class="glyphicon glyphicon-alert"></i> No less than 0.6%
@ -143,12 +143,12 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="cb_bankpay_rate_value" stringToNumber2 class="form-control" ng-model="rate.cb_bankpay_rate_value" <input type="number" name="cb_bankpay_rate_value" stringToNumber2 class="form-control" ng-model="rate.cb_bankpay_rate_value"
min="0.6" max="5" step="0.1" id="cb_bankpay_rate_value_input"> min="0.6" max="10" step="0.1" id="cb_bankpay_rate_value_input">
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_form.cb_bankpay_rate_value.$error" ng-if="rate_form.cb_bankpay_rate_value.$dirty"> <div ng-messages="rate_form.cb_bankpay_rate_value.$error" ng-if="rate_form.cb_bankpay_rate_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>
<div class="small text-danger" ng-message="min"> <div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6% <i class="glyphicon glyphicon-alert"></i> No less than 0.6%

Loading…
Cancel
Save