wangning 7 years ago
commit 2a7d2b065e

@ -13,7 +13,7 @@ import java.text.SimpleDateFormat;
*
*/
public class NoticeInfo {
private final DateFormat format = new SimpleDateFormat("yyyyMMdd");
private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
@NotNull
private String title;
private String desc;

@ -101,16 +101,17 @@ public class NoticeManageImpl implements NoticeManage {
notice.put("create_id", manager.getString("manager_id"));
notice.put("create_name", manager.getString("display_name"));
if (!notice.getBoolean("merchants_type")){
String sendClients = "";
StringBuilder sendClients = new StringBuilder();
List<JSONObject> clients = clientMapper.listValidClient();
clients.forEach(c -> {
String p = c+",";
sendClients.concat(p);
if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){
String p = c.getString("client_moniker")+",";
sendClients.append(p);
}
});
if (sendClients.length()>0){
sendClients.substring(0,sendClients.length()-1);
notice.put("send_clients",sendClients.substring(0,sendClients.length()-1));
}
notice.put("send_clients",sendClients);
}
noticeManageMapper.createNotice(notice);

@ -102,7 +102,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
}
var notice = angular.copy($scope.notice);
if (notice.end_time) {
notice.end_time = $filter('date')(notice.end_time, 'yyyyMMdd')
notice.end_time = $filter('date')(notice.end_time, 'yyyy-MM-dd')
}
if (notice.merchants_type == 1) {
if (notice.send_clients.length == 0) {
@ -189,7 +189,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
$scope.saveNoticeResult = false;
commonDialog.alert({title: 'Success', content: 'Send a notice successfully', type: 'success'});
$scope.$close();
$state.go('notice.detail', {notice_id: $scope.notice.notice_id})
$state.go('^.detail', {notice_id: $scope.notice.notice_id},{reload:true})
}, function (resp) {
$scope.saveNoticeResult = false;
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
@ -220,7 +220,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
}
var notice = angular.copy($scope.notice);
if (notice.end_time) {
notice.end_time = $filter('date')(notice.end_time, 'yyyyMMdd')
notice.end_time = $filter('date')(notice.end_time, 'yyyy-MM-dd')
} else {
if (notice.status == '1') {
$scope.notice.status = '0';

@ -127,6 +127,7 @@
</div>
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="save(noticeForm)">Save</button>
<button class="btn btn-warning" type="button" ui-sref="notice">Cancel</button>
<!--<button ng-if="notice.status=='0'|| notice.status==null" class="btn btn-danger" type="button"-->
<!--ng-click="notice.status='1';save(noticeForm)">Send-->
<!--</button>-->

Loading…
Cancel
Save