Merge branch 'develop'

master
luoyang 5 years ago
commit 3bdfe71314

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

@ -1,10 +1,7 @@
package au.com.royalpay.payment.manage.activities.app_index.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import java.text.ParseException;
@ -17,52 +14,20 @@ public class AppActBean {
private static final String[] DATE_PATTERNS = {"yyyy-MM-dd"};
private String act_name;
private String act_url;
private String params_json;
private boolean is_valid = true;
private String desc;
private String act_content;
private String show_type;
private boolean is_show_window;
private String act_img;
private String window_img;
private String active_date;
private String expire_date;
private String banner_img;
private String msg_start_date;
private String msg_end_date;
private String msg_interval;
private boolean app;
private boolean banner;
private boolean list;
public JSONObject toJsonParam(){
JSONObject params = new JSONObject();
params.put("act_name",act_name);
params.put("act_url",act_url);
params.put("params_json",params_json);
params.put("desc",desc);
params.put("act_content",act_content);
params.put("show_type",show_type);
params.put("act_img",act_img);
params.put("window_img",window_img);
params.put("banner_img",banner_img);
params.put("msg_interval",msg_interval);
params.put("is_show_window",is_show_window);
params.put("is_valid",is_valid);
params.put("msg_start_date", msg_start_date);
params.put("msg_end_date", msg_end_date);
int show_place = 0;
if (app) {
show_place |= ActAppShowPlaceEnum.App.getPlace();
}
if (banner) {
show_place |= ActAppShowPlaceEnum.Banner.getPlace();
}
if (list) {
show_place |= ActAppShowPlaceEnum.List.getPlace();
}
params.put("show_place", show_place);
if (active_date != null) {
try {
Date fromDate = DateUtils.parseDate(active_date, DATE_PATTERNS);
@ -79,22 +44,6 @@ public class AppActBean {
throw new ParamInvalidException("expire_date", "error.payment.valid.invalid_date_format");
}
}
if (msg_start_date != null) {
try {
Date fromDate = DateUtils.parseDate(msg_start_date, DATE_PATTERNS);
params.put("msg_start_date", fromDate);
} catch (ParseException e) {
throw new ParamInvalidException("msg_start_date", "error.payment.valid.invalid_date_format");
}
}
if (msg_end_date != null) {
try {
Date fromDate = DateUtils.parseDate(msg_end_date, DATE_PATTERNS);
params.put("msg_end_date", fromDate);
} catch (ParseException e) {
throw new ParamInvalidException("msg_end_date", "error.payment.valid.invalid_date_format");
}
}
return params;
}
@ -114,30 +63,6 @@ public class AppActBean {
this.act_url = act_url;
}
public String getParams_json() {
return params_json;
}
public void setParams_json(String params_json) {
this.params_json = params_json;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getAct_content() {
return act_content;
}
public void setAct_content(String act_content) {
this.act_content = act_content;
}
public String getAct_img() {
return act_img;
}
@ -146,14 +71,6 @@ public class AppActBean {
this.act_img = act_img;
}
public String getWindow_img() {
return window_img;
}
public void setWindow_img(String window_img) {
this.window_img = window_img;
}
public String getShow_type() {
return show_type;
}
@ -162,14 +79,6 @@ public class AppActBean {
this.show_type = show_type;
}
public Boolean getIs_show_window() {
return is_show_window;
}
public void setIs_show_window(Boolean is_show_window) {
this.is_show_window = is_show_window;
}
public Boolean getIs_valid() {
return is_valid;
}
@ -194,59 +103,11 @@ public class AppActBean {
this.expire_date = expire_date;
}
public String getBanner_img() {
return banner_img;
}
public void setBanner_img(String banner_img) {
this.banner_img = banner_img;
}
public String getMsg_start_date() {
return msg_start_date;
}
public void setMsg_start_date(String msg_start_date) {
this.msg_start_date = msg_start_date;
}
public String getMsg_end_date() {
return msg_end_date;
}
public void setMsg_end_date(String msg_end_date) {
this.msg_end_date = msg_end_date;
}
public String getMsg_interval() {
return msg_interval;
}
public void setMsg_interval(String msg_interval) {
this.msg_interval = msg_interval;
}
public boolean isApp() {
return app;
}
public void setApp(boolean app) {
this.app = app;
}
public boolean isBanner() {
return banner;
}
public void setBanner(boolean banner) {
this.banner = banner;
}
public boolean isList() {
return list;
public boolean isIs_valid() {
return is_valid;
}
public void setList(boolean list) {
this.list = list;
public void setIs_valid(boolean is_valid) {
this.is_valid = is_valid;
}
}

@ -1595,7 +1595,7 @@ public class RetailAppServiceImp implements RetailAppService {
act.put("data", latestAct);
act.put("type", "act");
if (StringUtils.equalsIgnoreCase("跨境商城", latestAct.getString("act_name"))) {
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannel(clientId, "RP跨境商城");
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannelIsValid(clientId, "RP跨境商城");
JSONObject applyInfo = clientServicesApplyMapper.findApplyByClientIdAndChannel(clientId, "RP跨境商城");
if (incrementalInfo == null && applyInfo == null) {
result.add(act);

@ -25,6 +25,14 @@ public interface ClientIncrementalMapper {
@AutoSql(type = SqlType.SELECT)
List<JSONObject> findAllByclientMoniker(@Param("client_id") int clientId);
@Select("select ci.*, " +
" si.source_code " +
" from sys_client_incremental ci inner join sys_incremental_channels si " +
" on ci.channel = si.channel" +
" where ci.client_id = #{client_id} " +
" and ci.channel = #{channel} ")
JSONObject findByClinetIdAndChannel(@Param("client_id")int clientId, @Param("channel")String channel);
@Select("select ci.*, " +
" si.source_code " +
" from sys_client_incremental ci inner join sys_incremental_channels si " +
@ -32,7 +40,7 @@ public interface ClientIncrementalMapper {
" where ci.client_id = #{client_id} " +
" and ci.channel = #{channel} " +
" and ci.is_valid = 1")
JSONObject findByClinetIdAndChannel(@Param("client_id")int clientId, @Param("channel")String channel);
JSONObject findByClinetIdAndChannelIsValid(@Param("client_id")int clientId, @Param("channel")String channel);
@AutoSql(type = SqlType.INSERT)
void save(JSONObject saveIncrementalService);

@ -6492,7 +6492,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannel(client.getInteger("client_id"), channel);
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannelIsValid(client.getInteger("client_id"), channel);
if(incrementalInfo==null){
throw new BadRequestException("Merchant service not opened");
}
@ -6505,7 +6505,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannel(client.getInteger("client_id"), channel);
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannelIsValid(client.getInteger("client_id"), channel);
if(incrementalInfo==null){
throw new BadRequestException("Merchant service not opened");
}

@ -65,12 +65,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
if ($scope.actDetail.expire_date) {
$scope.actDetail.expire_date = $filter('date')($scope.actDetail.expire_date, 'yyyy-MM-dd');
}
if ($scope.actDetail.msg_start_date) {
$scope.actDetail.msg_start_date = $filter('date')($scope.actDetail.msg_start_date, 'yyyy-MM-dd');
}
if ($scope.actDetail.msg_end_date) {
$scope.actDetail.msg_end_date = $filter('date')($scope.actDetail.msg_end_date, 'yyyy-MM-dd');
}
$http.put('/manager/app/act', $scope.actDetail).then(function (resp) {
commonDialog.alert({title: 'Success', content: '新增成功', type: 'success'});
$state.go('^.detail',{act_id:resp.data.act_id},{reload:true});
@ -97,12 +91,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
if ($scope.actDetail.expire_date) {
$scope.actDetail.expire_date = $filter('date')($scope.actDetail.expire_date, 'yyyy-MM-dd');
}
if ($scope.actDetail.msg_start_date) {
$scope.actDetail.msg_start_date = $filter('date')($scope.actDetail.msg_start_date, 'yyyy-MM-dd');
}
if ($scope.actDetail.msg_end_date) {
$scope.actDetail.msg_end_date = $filter('date')($scope.actDetail.msg_end_date, 'yyyy-MM-dd');
}
$http.put('/manager/app/act/' + $scope.actDetail.act_id, $scope.actDetail).then(function (resp) {
commonDialog.alert({title: 'Success', content: '修改成功', type: 'success'});
$state.reload();
@ -112,4 +100,4 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}
}]);
return app;
});
});

@ -32,17 +32,6 @@
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':appActForm.desc.$invalid && appActForm.desc.$dirty}">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.desc">ACT Desc *</label>
<div class="col-xs-8 col-sm-4">
<textarea class="form-control" id="actDetail.desc" name="desc"
ng-model="actDetail.desc" required></textarea>
<div ng-messages="appActForm.desc.$error" ng-if="appActForm.desc.$dirty">
<p class="small text-danger" ng-message="required">Desc is required</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2">Activity Time*</label>
<div class="col-xs-8 col-sm-4">
@ -68,28 +57,6 @@
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.params_json">Parms
Json</label>
<div class="col-xs-8 col-sm-4">
<textarea class="form-control" id="actDetail.params_json"
ng-model="actDetail.params_json"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2">Show Window</label>
<div class="col-xs-8 col-sm-4">
<input type="checkbox" class="checkbox-inline checkbox" ng-model="actDetail.is_show_window">
</div>
</div>
<div class="form-group" ng-if="actDetail.is_show_window">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.window_img">Window
Img</label>
<div class="col-xs-8 col-sm-4">
<input type="text" class="form-control" id="actDetail.window_img"
ng-model="actDetail.window_img">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_img">Act
Img</label>
@ -98,81 +65,21 @@
ng-model="actDetail.act_img">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_img">Banner
Img</label>
<div class="col-xs-8 col-sm-4">
<input type="text" class="form-control" id="actDetail.banner_img"
ng-model="actDetail.banner_img">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2">Msg Date</label>
<div class="col-xs-8 col-sm-4">
<div style="display: inline-block">
<input class="form-control" id="date-from-input2"
ng-model="actDetail.msg_start_date"
uib-datepicker-popup size="10" placeholder="Start Date"
is-open="dateStart.open" ng-click="dateStart.open=true"
name="msg_start_date">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input2" ng-model="actDetail.msg_end_date"
uib-datepicker-popup size="10" placeholder="End Date"
is-open="dateEnd.open" ng-click="dateEnd.open=true"
name="msg_end_date">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_img">Msg Interval</label>
<div class="col-xs-8 col-sm-4">
<div class="input-group">
<input type="number" class="form-control" id="actDetail.msg_interval"
ng-model="actDetail.msg_interval" aria-describedby="interval_h">
<span class="input-group-addon" id="interval_h">H</span>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_img">Show Place</label>
<div class="col-xs-8 col-sm-4">
<div class="input-group">
<p class="checkbox checkbox-inline">
<label>
<input type="checkbox" ng-model="actDetail.app" name="app">App
</label>
<label>
<input type="checkbox" ng-model="actDetail.banner" name="banner">Banner
</label>
<label>
<input type="checkbox" ng-model="actDetail.list" name="list">List
</label>
</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2">Show
Type</label>
<div class="col-xs-8 col-sm-4">
<label class="radio-inline">
<input type="radio" name="optionsRadiosinline" id="optionsRadios3" value="0" checked
<input type="radio" name="optionsRadiosinline" id="optionsRadios3" value="1" checked
ng-model="actDetail.show_type"> Url
</label>
<label class="radio-inline">
<input type="radio" name="optionsRadiosinline" id="optionsRadios4" value="1"
ng-model="actDetail.show_type"> Content
<input type="radio" name="optionsRadiosinline" id="optionsRadios4" value="2"
ng-model="actDetail.show_type"> App Route
</label>
</div>
</div>
<div class="form-group" ng-if="actDetail.show_type == 0">
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_url">Act
Url</label>
<div class="col-xs-8 col-sm-4">
@ -180,14 +87,6 @@
ng-model="actDetail.act_url">
</div>
</div>
<div class="form-group" ng-if="actDetail.show_type == 1">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_content">Act
Content</label>
<div class="col-xs-8 col-sm-4">
<input type="text" class="form-control" id="actDetail.act_content"
ng-model="actDetail.act_content">
</div>
</div>
<div class="col-xs-12">
<div class="btn-group">
<button class="btn btn-success" type="button" ng-click="submit(appActForm)">
@ -208,4 +107,4 @@
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save